]> git.pld-linux.org Git - packages/X11.git/commitdiff
obsolete
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 5 Feb 2005 22:07:52 +0000 (22:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    X11-6.8.2-20050108.patch -> 1.2

X11-6.8.2-20050108.patch [deleted file]

diff --git a/X11-6.8.2-20050108.patch b/X11-6.8.2-20050108.patch
deleted file mode 100644 (file)
index c704b7d..0000000
+++ /dev/null
@@ -1,62117 +0,0 @@
-Index: ChangeLog
-===================================================================
-RCS file: /cvs/xorg/xc/ChangeLog,v
-retrieving revision 1.365.2.1
-retrieving revision 1.365.2.107
-diff -u -u -r1.365.2.1 -r1.365.2.107
---- ChangeLog  15 Sep 2004 15:47:36 -0000      1.365.2.1
-+++ ChangeLog  17 Dec 2004 02:07:35 -0000      1.365.2.107
-@@ -1,3 +1,1182 @@
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/cf/xorgversion.def
-+      Bugzilla #2086 (https://bugs.freedesktop.org/show_bug.cgi?id=2086)
-+      attachment #1557 (https://bugs.freedesktop.org/attachment.cgi?id=1557):
-+      Bump version number for upcoming X11R6.8.2rc1 (release canidate 1) to
-+      X11R6.8.1.901.
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/common/xf86Init.c
-+      Bugzilla #2086 (https://bugs.freedesktop.org/show_bug.cgi?id=2086)
-+      attachment #1556 (https://bugs.freedesktop.org/attachment.cgi?id=1556):
-+      Fix problems with printing the release candidate version
-+      number for point releases.
-+      Patch by Kevin E. Martin <kem@freedesktop.org>
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/ddc/edid.h
-+      * xc/programs/Xserver/hw/xfree86/ddc/interpret_edid.c
-+      * xc/programs/Xserver/hw/xfree86/ddc/print_edid.c
-+      Bugzilla #1490 (https://bugs.freedesktop.org/show_bug.cgi?id=1490)
-+      attachment #1122 (https://bugs.freedesktop.org/attachment.cgi?id=1122):
-+      Updating to EDID 1.3.
-+      Patch by Jay Cotton <jay.cotton@sun.com> and Egbert Eich
-+      <eich@freedesktop.org>.
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/Xpm/Imakefile
-+      * xc/extras/Xpm/lib/Attrib.c
-+      * xc/extras/Xpm/lib/CrBufFrI.c
-+      * xc/extras/Xpm/lib/CrDatFrI.c
-+      * xc/extras/Xpm/lib/RdFToBuf.c
-+      * xc/extras/Xpm/lib/RdFToI.c
-+      * xc/extras/Xpm/lib/WrFFrBuf.c
-+      * xc/extras/Xpm/lib/WrFFrI.c
-+      * xc/extras/Xpm/lib/XpmI.h
-+      * xc/extras/Xpm/lib/create.c
-+      * xc/extras/Xpm/lib/data.c
-+      * xc/extras/Xpm/lib/hashtab.c
-+      * xc/extras/Xpm/lib/misc.c
-+      * xc/extras/Xpm/lib/parse.c
-+      * xc/extras/Xpm/lib/scan.c
-+      Bugzilla #1920 (https://bugs.freedesktop.org/show_bug.cgi?id=1920)
-+      attachment #1514 (https://bugs.freedesktop.org/attachment.cgi?id=1514):
-+      libXpm security fixes for CAN-2004-0914.
-+        Patch by Thomas Biege.
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c
-+      Bugzilla #1383 (https://bugs.freedesktop.org/show_bug.cgi?id=1383)
-+      attachment #902 (https://bugs.freedesktop.org/attachment.cgi?id=902):
-+      Fix typo in PCI code for Intel 460gx in X server, which causes a SEGV.
-+      Patch by H.J.Lu <hongjiu.lu@intel.com> 
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/fb/fbwindow.c
-+      * xc/programs/Xserver/hw/xfree86/xaa/xaaWrapper.c
-+      * xc/programs/Xserver/mi/micmap.c
-+      Bugzilla #1912 (https://bugs.freedesktop.org/show_bug.cgi?id=1220)
-+      attachment #980 (https://bugs.freedesktop.org/attachment.cgi?id=980):
-+      Fix (scrolling) performance problems caused by PseudoColor emulation layer.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+        
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-+      Bugzilla #1912 (https://bugs.freedesktop.org/show_bug.cgi?id=1220)
-+      attachment #980 (https://bugs.freedesktop.org/attachment.cgi?id=980):
-+      Fix garbage screen on radeon cards which may appear after a system
-+      suspend/resume cycle.
-+      Patch by Matthias Hopf <mhopf@suse.de>
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
-+      Bugzilla #1912 (https://bugs.freedesktop.org/show_bug.cgi?id=1912)
-+      attachment #1433 (https://bugs.freedesktop.org/attachment.cgi?id=1433):
-+      Fix hard lockup on Radeon 7000 + SMP due dynamic clock.
-+      Patch by Alex Deucher <agd5f@yahoo.com>.
-+
-+2004-12-16 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c:
-+      Bugzilla #1890 (https://bugs.freedesktop.org/show_bug.cgi?id=1890)
-+      attachment #1331 (https://bugs.freedesktop.org/attachment.cgi?id=1331):
-+      Apply Debian patch to re-POST via VBE if driver thinks it has no
-+      video memory (a symptom of incompletely coming up from D3 power
-+      state), which fixes some Dell laptops
-+      This enables resume from suspend level S3 by asking the Radeon chip if it
-+      thinks it has no memory.  If so, the card is re-POSTed via the int10
-+      interface.  Reportedly enables the driver to work for this type of
-+      suspend/resume cycle on Dell D600 laptops (Dell D800s as well, if the video
-+      BIOS is patched to 4.28.20.31.C1 or later).  See Debian Bug #234575.
-+      This patch by Emmanuel Thome and Ole Rohne.
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c
-+      Bugzilla #1651 (https://bugs.freedesktop.org/show_bug.cgi?id=1651)
-+      attachment #1484 (https://bugs.freedesktop.org/attachment.cgi?id=1484):
-+      - set default XkbModel to pc105 (like legacy keyboard driver did)
-+      - fix autorepeat
-+      Patch by Matthieu Herrb and Petter Urkedal
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-+      Bugzilla #1881 (https://bugs.freedesktop.org/show_bug.cgi?id=1881)
-+      attachment #1322 (https://bugs.freedesktop.org/attachment.cgi?id=1322):
-+      Fix typo in radeon driver
-+      Patch by Daniel Stone <daniel@freedesktop.org>
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_bios.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-+      Bugzilla #1559 (https://bugs.freedesktop.org/show_bug.cgi?id=1559)
-+      attachment #1133 (https://bugs.freedesktop.org/attachment.cgi?id=1133):
-+      Fix display detection regression on Radeon Mobile.
-+      Patch by HUI YU <hyu@ati.com>
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-+      Bugzilla #1306 (https://bugs.freedesktop.org/show_bug.cgi?id=1306)
-+      attachment #1292 (https://bugs.freedesktop.org/attachment.cgi?id=1292):
-+
-+      This patch should work around the panel timing params not being initialized. 
-+      Here's the problem:
-+
-+      Previously, the PanelXRes and PanelYRes were either read from the BIOS or were
-+      left as 0 (if no BIOS was detected).  Then, in RADEONUpdatePanelSize(), the max
-+      panel size was found and the timing parameters were initialized, which worked
-+      fine for this ppc system.
-+
-+      Now, the PanelXRes and PanelYRes are either read from the BIOS or are read from
-+      the registers.  Note that the other timing parameters (in particular the
-+      DotClock) are not initialized when reading from the registers.  Then, when
-+      RADEONUpdatePanelSize() is called, the max panel size is already set, so none
-+      of the other timing parameters are initialized here either (or anywhere else
-+      for that matter), which appears to be why the new code fails for this ppc
-+      system.
-+
-+      The patch changes the test from < to <= in RADEONUpdatePanelSize() and then
-+      tests to make sure that only the first set of timings for the panel size read
-+      from the registers will be used -- this mimics the way the previous code
-+      worked.  The only problem with this code occurs when the registers hold invalid
-+      panel size params, which do not match any of the monitor's DDC info.  This
-+      should never happen; however, if it does, then the only solution in this case
-+      is to explicitly set the panel size in the config file.
-+
-+      Patch by Kevin E. Martin <kem@freedesktop.org>
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-+      Bugzilla #1306 (https://bugs.freedesktop.org/show_bug.cgi?id=1306)
-+      attachment #1291 (https://bugs.freedesktop.org/attachment.cgi?id=1291):
-+      Fix SEGV in "radeon" driver.
-+      Patch by Kevin E. Martin <kem@freedesktop.org>
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h
-+      Bugzilla #1985 (https://bugs.freedesktop.org/show_bug.cgi?id=1985)
-+      attachment #1504 (https://bugs.freedesktop.org/attachment.cgi?id=1504)
-+      sync to 12/08/04 version of Nvidia driver from Mark Vojkovich,
-+      including these fixes since last sync:
-+      Fix some DAC/Graphics memory contention issues on newer 
-+      NVIDIA chips (specifically, NV40).
-+      More PCI IDs.
-+      Also, I've had trouble getting some panels to work 
-+      automagically so I expose an FPTweak option to let the user 
-+      adjust a troublesome register.
-+
-+2004-12-15 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c
-+      Bug #1937 (https://bugs.freedesktop.org/show_bug.cgi?id=1937)
-+      attachment #1396 (https://bugs.freedesktop.org/attachment.cgi?id=1396):
-+      XV support doesn't depend on 2D acceleration any more. This patch
-+      removes this limitation from the NSC driver. This is a patch that
-+      I have committed to XFree86 a while ago but never ported over to
-+      X.Org.
-+      Patch by Egbert Eich <eich@freedesktop.org> and Matthieu
-+      Herrb <matthieu.herrb@laas.fr>
-+
-+2004-12-15 Alexander Gottwald <ago@freedesktop.org>
-+      * xc/programs/Xserver/Imakefile
-+      * xc/programs/Xserver/hw/xwin/ChangeLog
-+      * xc/programs/Xserver/hw/xwin/Imakefile
-+      * xc/programs/Xserver/hw/xwin/InitOutput.c
-+      * xc/programs/Xserver/hw/xwin/XWin.rc
-+      * xc/programs/Xserver/hw/xwin/win.h
-+      * xc/programs/Xserver/hw/xwin/winclipboardthread.c
-+      * xc/programs/Xserver/hw/xwin/winclipboardwndproc.c
-+      * xc/programs/Xserver/hw/xwin/winclipboardxevents.c
-+      * xc/programs/Xserver/hw/xwin/winconfig.c
-+      * xc/programs/Xserver/hw/xwin/wincreatewnd.c
-+      * xc/programs/Xserver/hw/xwin/winmessages.h
-+      * xc/programs/Xserver/hw/xwin/winmouse.c
-+      * xc/programs/Xserver/hw/xwin/winmultiwindowwm.c
-+      * xc/programs/Xserver/hw/xwin/winmultiwindowwndproc.c
-+      * xc/programs/Xserver/hw/xwin/winprocarg.c
-+      * xc/programs/Xserver/hw/xwin/winresource.h
-+      * xc/programs/Xserver/hw/xwin/winshadddnl.c
-+      * xc/programs/Xserver/hw/xwin/winwin32rootlesswndproc.c
-+      * xc/programs/Xserver/hw/xwin/winwndproc.c
-+      Bug #1831 (https://bugs.freedesktop.org/show_bug.cgi?id=1831)
-+      attachment #1547 (https://bugs.freedesktop.org/attachment.cgi?id=1547)
-+      attachment #1548 (https://bugs.freedesktop.org/attachment.cgi?id=1548):
-+      Cygwin/X patches since 6.8.1, including:
-+      - Support for placing the mainwindow by coordinates and monitor
-+      - Setting default cursor in multiwindow mode
-+      - Added keyboardlayout "French (Switzerland)"
-+      - Fixed crashes after switching videomodes
-+      - Added support for reading the fontpath from /etc/X11/font-dirs
-+      - Make -multiplemonitors for multiwindow modes
-+      - Added support for mice with more than 3 buttons
-+      - Fixed another clipboard bug with Unicode applications
-+      
-+2004-12-15  Egbert Eich  <eich-at-freedesktop-org>
-+
-+      * programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c:
-+      (xorgProbe460GX), (xf86PreScan460GX):
-+      * programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.h:
-+      * programs/Xserver/hw/xfree86/os-support/bus/Imakefile:
-+      * programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c:
-+      (xorgProbeE8870), (xf86PreScanE8870):
-+      * programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.h:
-+      * programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c:
-+      * programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c:
-+      (xf86PreScanZX1):
-+      * programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.h:
-+      * programs/Xserver/hw/xfree86/os-support/linux/Imakefile:
-+      * programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c:
-+      (OS_PROBE_PCI_CHIPSET):
-+      * programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.c:
-+      (ia64ScanPCIWrapper):
-+      * programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.h:
-+      Adding support for OS dependent probing of IA64 chipsets.
-+      Not all IA64 chipsets can be probed without OS support as
-+      probing them is only possible using ACPI. One example of 
-+      this are the HP ZX1/2 chipsets: previously the code assumed
-+      that these chips were present when no other of the known
-+      chipsets could be probed. This assumption brought SGI Altrix
-+        machines with 64 CPUs to a grinding halt.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/common.h
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c
-+      Bug #1944 (https://bugs.freedesktop.org/show_bug.cgi?id=1944)
-+      attachment #1403 (https://bugs.freedesktop.org/attachment.cgi?id=1403):
-+      Various I8xx driver fixes, including:
-+      - Fixed server crash on reset when a structure allocated in
-+        PreInit() was freed on CloseScreen().
-+      - Fixed ring buffer lock ups that happened because the structure
-+        that contained ringbuffer data was not zeroed after allocation.
-+      - Fixed numerous warnings due to signed unsigned comparisons.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c:
-+      Bug #1889 (https://bugs.freedesktop.org/show_bug.cgi?id=1889)
-+      attachment #1330 (https://bugs.freedesktop.org/attachment.cgi?id=1330):
-+      Retry CCE idle commands until the (higher) timeout is reached, and
-+      properly stop the engine if we totally fail -- gets rid of serious
-+      performance issues and lockups with r128 DRI (see also Debian bug
-+      reports #223089, #236187, #236373, #243436).
-+      Patch by Daniel Jacobowitz.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c
-+      Bug #1888 (https://bugs.freedesktop.org/show_bug.cgi?id=1888)
-+      attachment #1329 (https://bugs.freedesktop.org/attachment.cgi?id=1329):
-+      Allow pitches with a granularity of 32, rather than 64, because some
-+      clamshell iBooks have 800-byte pitches.  Change Xv allocation
-+      granularity to 8 bytes, rather than 16 bytes, also (see Debian
-+      #148775).
-+      Patch by Branden Robinson and Dagfinn Ilmari Mannsåker.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
-+      Bug #1886 (https://bugs.freedesktop.org/show_bug.cgi?id=1886)
-+      attachment #1327 (https://bugs.freedesktop.org/attachment.cgi?id=1327):
-+      Disable interrupt handling after the DRM handler has been removed,
-+      preventing lockups.
-+      Patch by Daniel Stone <daniel@freedesktop.org>
-+        
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c
-+      Bug #1962 (https://bugs.freedesktop.org/show_bug.cgi?id=1962)
-+      attachment #1423 (https://bugs.freedesktop.org/attachment.cgi?id=1423):
-+      Avoid PIO access on IA64. Some IA64 machine check if legacy ports
-+      outside the VGA range are accessed. The ATi driver however does 
-+      this to probe for ISA Mach8/32/64. 
-+      Since no IA64 has ISA slots this restriction should not be
-+      relevant to the user.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c
-+      Bug #1928 (https://bugs.freedesktop.org/show_bug.cgi?id=1928)
-+      attachment #1387 (https://bugs.freedesktop.org/attachment.cgi?id=1387):
-+      Added some early bailouts to atiprobe if PCI structure pointer is
-+      NULL to prevent sig11.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/atipreinit.c
-+      * xc/programs/Xserver/hw/xfree86/drivers/ati/ativga.c
-+      Bug #591 (https://bugs.freedesktop.org/show_bug.cgi?id=591)
-+      attachment #308 (https://bugs.freedesktop.org/attachment.cgi?id=308):
-+      Fix video timing problems with Sony PCG-C1VN Vaio Picturebook notebook
-+      && co.
-+      Patch by Marc Aurele La France
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/doc/man/general/Imakefile
-+      * xc/doc/man/general/Xprint.html
-+      * xc/doc/man/general/Xprint.man
-+      * xc/doc/man/general/Xprint.sgml
-+      * xc/programs/Xserver/Xprint/Imakefile
-+      * xc/programs/Xserver/Xprint/Xprint.html
-+      * xc/programs/Xserver/Xprint/Xprint.man
-+      * xc/programs/Xserver/Xprint/Xprint.sgml
-+      * xc/programs/Xserver/Xprint/Xprt.html
-+      * xc/programs/Xserver/Xprint/Xprt.man
-+      * xc/programs/Xserver/Xprint/Xprt.sgml
-+      Bug #811 (https://bugs.freedesktop.org/show_bug.cgi?id=811)
-+      attachment #1374 (https://bugs.freedesktop.org/attachment.cgi?id=1374),
-+      attachment #1379 (https://bugs.freedesktop.org/attachment.cgi?id=1379),
-+      attachment #1431 (https://bugs.freedesktop.org/attachment.cgi?id=1431): 
-+      Add the missing manual page for the Xprt server (and move the Xprint(7)
-+      to it's correct location).
-+      Authors: Alan Coopersmith, Giuseppe Ghibò, Thomas Gilg, Jay Hobson,
-+      Julien Lafon, Masaki Katakai, Roland Mainz, Simon Montagu, Drew Parsons.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/doc/man/X11/XGetWProp.man
-+      Bug #2056 (https://bugs.freedesktop.org/show_bug.cgi?id=2056)
-+      attachment #1515 (https://bugs.freedesktop.org/attachment.cgi?id=1515):
-+      Fix the missing XChangeProperty() prototype in man page's
-+        synopsis section.
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/docbook/docbookconv.sh
-+      * xc/doc/hardcopy/XPRINT/Xprint_FAQ.html
-+      * xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt
-+      * xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml
-+      * xc/programs/Xserver/Xprint/Xprint.html
-+      * xc/programs/Xserver/Xprint/Xprint.man
-+      * xc/programs/Xserver/Xprint/Xprint.sgml
-+      * xc/programs/xlsfonts/xlsfonts.man
-+      * xc/programs/xlsfonts/xlsfonts.sgml
-+      * xc/programs/xphelloworld/xphelloworld/xphelloworld.html
-+      * xc/programs/xphelloworld/xphelloworld/xphelloworld.man
-+      * xc/programs/xphelloworld/xphelloworld/xphelloworld.sgml
-+      * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.html
-+      * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.man
-+      * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.sgml
-+      * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.html
-+      * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.man
-+      * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.sgml
-+      * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.html
-+      * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.man
-+      * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.sgml
-+      * xc/programs/xplsprinters/xplsprinters.html
-+      * xc/programs/xplsprinters/xplsprinters.man
-+      * xc/programs/xplsprinters/xplsprinters.sgml
-+      * xc/programs/xprehashprinterlist/xprehashprinterlist.man
-+      * xc/programs/xprehashprinterlist/xprehashprinterlist.sgml
-+      Bugzilla #1557 (https://bugs.freedesktop.org/show_bug.cgi?id=1557)
-+      attachment #1032 (https://bugs.freedesktop.org/attachment.cgi?id=1391):
-+      Update DocBook SGML+XML manual pages and docmentation
-+      and the in-tree copies of the generated files (*.man, *.html) to
-+      get them properly working with newer versions of the tools within the
-+      Xorg tree.
-+        Patch by Roland Mainz, Drew Parsons, Julien Lafon, Giuseppe Ghibò
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml
-+      Bug #1932 (https://bugs.freedesktop.org/show_bug.cgi?id=1932)
-+      attachment #1391 (https://bugs.freedesktop.org/attachment.cgi?id=1391
-+      with typo fixed):
-+      Added explanation for DESTDIR to install to a different directory
-+      than /.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile:
-+      Bug #1987 (https://bugs.freedesktop.org/show_bug.cgi?id=1987)
-+      attachment #1462 (https://bugs.freedesktop.org/attachment.cgi?id=1462):
-+      HAVE_SYSV_IPC should be defined when building libc_wrapper.c on 
-+      Solaris/SVR4Architecture (otherwise some drivers like those from
-+      Nvidia may not work).
-+      Patch by Alan Coopersmith <alan.coopersmith@sun.com>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c
-+      Bug #1965 (https://bugs.freedesktop.org/show_bug.cgi?id=1965)
-+      attachment #1425 (https://bugs.freedesktop.org/attachment.cgi?id=1425):
-+      Avoid recursive calls of xf86scanpci(). This function normally 
-+      detects that it has been called before by checking if the PCI
-+      structure is filled out. So far if this was not the case 
-+      (because PCI probing has failed for some reason) the function
-+      is traversed again. With the chipset specific PCI bus probing
-+      this can lead to an endless recursive loop as the post-probing
-+      code calls xf86scanpci() from within this function.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c
-+      Bug #1963 (https://bugs.freedesktop.org/show_bug.cgi?id=1963)
-+      attachment #1424 (https://bugs.freedesktop.org/attachment.cgi?id=1424):
-+      The OS specific PCI code for Linux worked only if bus 0
-+      was populated as it checked for the presence of /proc/bus/pci/00.
-+      Fixed to check for /proc/bus/pci/<bus_to_look_for> instead.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/common/xf86Events.c
-+      * xc/programs/Xserver/hw/xfree86/common/xf86Init.c
-+      Bug #1933 (https://bugs.freedesktop.org/show_bug.cgi?id=1933)
-+      attachment #1392 (https://bugs.freedesktop.org/attachment.cgi?id=1392):
-+      Improving DPMS handling on VT swich and server
-+      termination/abort: previous version called the driver directly and
-+      too late.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/common/xf86Configure.c
-+      Bug #1931 (https://bugs.freedesktop.org/show_bug.cgi?id=1931)
-+      attachment #1390 (https://bugs.freedesktop.org/attachment.cgi?id=1390):
-+      Removing unused DDC sections that caused misinterpretation of
-+      DDC data due to a missing break statement in a switch.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c
-+      Bug #1927 (https://bugs.freedesktop.org/show_bug.cgi?id=1927)
-+      attachment #1386 (https://bugs.freedesktop.org/attachment.cgi?id=1386):
-+      Fixed typo in |ix86PciSelectCfgmech()|: #if <-> #ifdef.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xext/xf86vmode.c
-+      Bug #1552 (https://bugs.freedesktop.org/show_bug.cgi?id=1552)
-+      attachment #1026 (https://bugs.freedesktop.org/attachment.cgi?id=1026):
-+
-+        Currently, when a screensaver kicks in, it calls xf86GetModeLine()
-+        which causes the Vidmode extension to write out a debugging log
-+        message of what the current modeline is.  These messages are
-+        generally only useful to an X11 developer who is debugging the
-+        extension itself, or to an application developer who is developing
-+        an application which uses the vidmode extension to get/set the video
-+        mode, however they're not very useful for end users.
-+
-+        The current default Xvidmode verbosity causes the X server to write
-+        overly detailed video modeline information to the X server log file
-+        whenever any application uses the extension to get, set, or delete
-+        modelines.  This causes a problem for laptop users on battery power
-+        with their hard disks set to power saving mode, because the hard disk
-+        will power down, then later the screensaver kicks in, which calls
-+        xf86GetModeLine(), which causes the log message to get written out,
-+        which causes the hard disk to be powered back up.
-+
-+        Having these messages off by default solves this problem for laptop
-+        users, and seems to make the most sense considering how useful they
-+        are in general.
-+        By changing the default log level for these messages, developers
-+        who need to see these for debugging purposes can increase their X
-+        server verbosity level and still see them, so no functionality is lost.
-+
-+        This patch lowers the default verbosity of the X server's Xvidmode
-+        extension log file messages, in order to stop Xvidmode from writing
-+        out non-critical log messages to the X server log whenever an
-+        application uses this extension.
-+
-+        Patch by Mike A. Harris <mharris@redhat.com>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/cf/X11.tmpl
-+      * xc/config/cf/cygwin.cf
-+      * xc/config/cf/darwin.cf
-+      * xc/programs/Xserver/dix/Imakefile
-+      * xc/programs/Xserver/miext/damage/Imakefile
-+      Bug #1816 (https://bugs.freedesktop.org/show_bug.cgi?id=1816)
-+      attachment #1300 (https://bugs.freedesktop.org/attachment.cgi?id=1300):
-+      Add BuildRootless Imake variable and ROOTLESS define.
-+      Patch by Torrey T. Lyons  <torrey@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/cf/cygwin.cf
-+      * xc/config/cf/xorg.cf
-+      * xc/config/cf/xorgversion.def
-+      * xc/config/cf/Imakefile
-+      Bug #1393 (https://bugs.freedesktop.org/show_bug.cgi?id=1393)
-+      attachment #1188 (https://bugs.freedesktop.org/attachment.cgi?id=1188):
-+      Move xorg version numbers to separate config file
-+      (xc/config/cf/xorgversion.def).
-+      Patch by Alexander Gottwald <ago@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/GL/mesa/drivers/osmesa/Imakefile
-+      Bugzilla #1743 (https://bugs.freedesktop.org/show_bug.cgi?id=1743)
-+      attachment #1196 (https://bugs.freedesktop.org/attachment.cgi?id=1196):
-+      Fix build failure on Solaris due "ld: fatal:
-+      too many symbols require `small' PIC references" via adding
-+      |#define LargePICTable YES| to the Imakefile.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c
-+      Bug #1826 (https://bugs.freedesktop.org/show_bug.cgi?id=1826)
-+      attachment #1283 (https://bugs.freedesktop.org/attachment.cgi?id=1283):
-+      Do not add '-4' to generated default file name (e.g. "xorg.conf"
-+      instead of "xorg.conf-4").
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xkbcomp/symbols/inet
-+      Bug #1935 (https://bugs.freedesktop.org/show_bug.cgi?id=1935)
-+      attachment #1394 (https://bugs.freedesktop.org/attachment.cgi?id=1394):
-+      Changed comment in xkbcomp/symbols/inet to mention xorg (instead of
-+      Xfree86).
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xkbcomp/rules/Imakefile
-+      Bug #1929 (https://bugs.freedesktop.org/show_bug.cgi?id=1929)
-+      attachment #1388 (https://bugs.freedesktop.org/attachment.cgi?id=1388):
-+      Create missing links for backward compatibility to XFree86
-+      Patch by Stefan Dirsch <sndirsch@suse.de>.
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xkbcomp/symbols/macintosh/us
-+      Bug #1872 (https://bugs.freedesktop.org/show_bug.cgi?id=1872)
-+      attachment #1315 (https://bugs.freedesktop.org/attachment.cgi?id=1315):
-+      Include srvrv_ctrl(xfree86) in macintosh US XKB symbol file so VT
-+      switching works again on mac.
-+      Patch by Kristian Høgsberg <krh@bitplanet.net>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xdm/resource.c
-+      Bug #1825 (https://bugs.freedesktop.org/show_bug.cgi?id=1825)
-+      attachment #1282 (https://bugs.freedesktop.org/attachment.cgi?id=1282):
-+      Fix typo in prngdSocket resource name in xdm/resource.c.
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>
-+
-+2004-12-14 Adam Jackson <ajax@freedesktop.org>
-+      * xc/extras/Mesa/:
-+      Bug #2003 (https://bugs.freedesktop.org/show_bug.cgi?id=2003):
-+      Merge Mesa 6.2.1.
-+      * lib/GL/mesa/drivers/dri/r128/Imakefile.inc:
-+      Fix Imakefile for r128 (Sergio Monteiro Basto)
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xrx/helper/helper.c
-+      Bug #1942 (https://bugs.freedesktop.org/show_bug.cgi?id=1942)
-+      attachment #1401 (https://bugs.freedesktop.org/attachment.cgi?id=1401):
-+      Fix problems with random return code returned by "xrx".
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-14 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xedit/lisp/lisp.c
-+      Bug #1936 (https://bugs.freedesktop.org/show_bug.cgi?id=1936)
-+      attachment #1395 (https://bugs.freedesktop.org/attachment.cgi?id=1395):
-+      Removed inclusion of unnecessary kernel header on Linux. 
-+      This may fail in an -ansi environment.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/cf/xorgsite.def
-+      * xc/config/cf/xprint_site.def
-+      Bug #1827 (https://bugs.freedesktop.org/show_bug.cgi?id=1827)
-+      attachment #1284 (https://bugs.freedesktop.org/attachment.cgi?id=1284):
-+      xf86site.def is referenced in comments in places where
-+      xorgsite.def is used
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/fonts/bdf/100dpi/Imakefile:
-+      * xc/fonts/bdf/75dpi/Imakefile:
-+      Bug #1560 (https://bugs.freedesktop.org/show_bug.cgi?id=1560)
-+      attachment #1036 (https://bugs.freedesktop.org/attachment.cgi?id=1036):
-+      Fix build of lucida fonts which were broken since 6.8.0.
-+      Patch by Alexander Gottwald  <ago@freedesktop.org>.
-+        
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/nls/XLC_LOCALE/en_US.UTF-8
-+      Bug #1842 (https://bugs.freedesktop.org/show_bug.cgi?id=1842)
-+      attachment #1389 (https://bugs.freedesktop.org/attachment.cgi?id=1298):
-+        Move iso10646 last so the "fallback"
-+      fonts will actually be used if they are better matches.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/cf/xorgsite.def:
-+      Bug 2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c
-+      * xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c
-+      Bug #1824 (https://bugs.freedesktop.org/show_bug.cgi?id=1824)
-+      attachment #1288 (https://bugs.freedesktop.org/attachment.cgi?id=1288):
-+      Fix kbd driver for wskbd protocol and pure wscons console driver
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>#1930 (https://bugs.freedesktop.org/show_bug.cgi?id=1930)
-+      attachment #1389 (https://bugs.freedesktop.org/attachment.cgi?id=1389):
-+      Make Xorg the default server to install.
-+      Patch by Egbert Eich <eich@freedesktop.org>
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c
-+      * xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c
-+      Bug #1824 (https://bugs.freedesktop.org/show_bug.cgi?id=1824)
-+      attachment #1288 (https://bugs.freedesktop.org/attachment.cgi?id=1288):
-+      Fix kbd driver for wskbd protocol and pure wscons console driver
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c
-+      * xc/lib/GL/glx/glxext.c
-+      Bug #1501 (https://bugs.freedesktop.org/show_bug.cgi?id=1501)
-+      attachment #1013 (https://bugs.freedesktop.org/attachment.cgi?id=1013):
-+      More complete fix for libglx bugs (double-free etc.).
-+      Patch by Egbert Eich and Matthias Hopf.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/fonts/encodings/Imakefile
-+      * xc/fonts/encodings/ascii-0.enc
-+      * xc/programs/mkfontscale/mkfontscale.c
-+      Bugzilla #1703 (https://bugs.freedesktop.org/show_bug.cgi?id=1703)
-+      attachment #1226 (https://bugs.freedesktop.org/attachment.cgi?id=1226):
-+      Adding ascii-0 font encoding which helps in
-+      cases where a font has all ASCII chars populated but not enougth
-+      glyphs to match the requirements for ISO8859-1 (and to add
-+      backwards compatibility to ttmkfdir).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/extras/Mesa/src/mesa/tnl/t_vtx_x86_gcc.S:
-+      Bugzilla #1079 (https://bugs.freedesktop.org/show_bug.cgi?id=1079)
-+      attachment #636 (https://bugs.freedesktop.org/attachment.cgi?id=636):
-+      Add missing check for CYGWIN for adding underscores tosymbol names
-+      in assembler.  Merged upstream, and should be brought in in
-+      the next import.
-+      Patch by  Alexander Gottwald <ago@freedesktop.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xset/Imakefile
-+      * xc/programs/xset/xset.c
-+      Bugzilla #1659 (https://bugs.freedesktop.org/show_bug.cgi?id=1659)
-+      attachment #1120 (https://bugs.freedesktop.org/attachment.cgi?id=1120):
-+      Fix Imakefile bug which caused the Xprint support
-+      in "xset" not being build.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xman/print.c
-+      * xc/programs/xmore/print.c
-+      * xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
-+      Bugzilla #1601 (https://bugs.freedesktop.org/show_bug.cgi?id=1601)
-+      attachment #1088 (https://bugs.freedesktop.org/attachment.cgi?id=1088):
-+      Fix problems with wrong page counts in xedit&co.
-+      when a global "*geometry" resource was overriding the internal
-+      geometry management used by XawPrintShell(=usually adjust to
-+      current page size, the resource was turning this into a static
-+      value).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xman/search.c
-+      Bugzilla #1481 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1481)
-+      attachment #976 (https://bugs.freedesktop.org/attachment.cgi?id=976)
-+      Avoid several buffer overflows in xman if search string is too long. 
-+      Patch by Matthieu Herrb <matthieu.herrb@laas.fr>.
-+        
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/ps/psout.c
-+      Bugzilla #661 (https://freedesktop.org/bugzilla/show_bug.cgi?id=661)
-+      attachment #1002 (https://bugs.freedesktop.org/attachment.cgi?id=1002):
-+      Xprt producing spurious characters in PS
-+      output when using the bitmap cache (Originally reported
-+      against Solaris Xprt as Sun bug id #4369307, and 
-+      fixed in Solaris by Jay Hobson <jay.hobson@sun.com>).
-+      Patch by Jay Hobson <jay.hobson@sun.com>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/ps/PsInit.c
-+      Bugzilla #1800 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1800)
-+      attachment #1474 (https://bugs.freedesktop.org/attachment.cgi?id=1474):
-+      Fix Postscript DDX's 1bit StaticGray visual to report only 1bit
-+      of significant bits in color specification (instead of 8bits).
-+      Patch by Julien Lafon <julien.lafon@gmail.com>
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/config/cf/xprint_site.def
-+      * xc/programs/Xserver/Xprint/ps/Ps.h
-+      * xc/programs/Xserver/Xprint/ps/PsPixmap.c
-+      * xc/programs/Xserver/Xprint/ps/PsPolygon.c
-+      * xc/programs/Xserver/mi/miinitext.c
-+      Bugzilla #1664 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1664)
-+      attachment #1161 (https://bugs.freedesktop.org/attachment.cgi?id=1161):
-+      RFE: Add support for the DOUBLE-BUFFER extension
-+      to the Xprint server and DDX. Additionally a "pixmap-scrubber"
-+      optimisation is added to the PostScript DDX to remove all content
-+      from a vector pixmap when a |PolyFillRect()| call covers the whole
-+      pixmap surface with a solid fill (this avoids that a backbuffer
-+      vector pixmap gets constantly filled even when the content is
-+      not visible anymore after |XdbeSwapBuffers()| has cleared the
-+      hidden buffer with the background color).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/attributes.c
-+      Bugzilla #1647 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1647)
-+      attachment #1117 (https://bugs.freedesktop.org/attachment.cgi?id=1117):
-+        Fix the problem that |XpSubmitJob()| returns
-+      a random value (patch by Stefan Dirsch/SuSE).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/ps/PsColor.c
-+      Bugzilla #1646 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1646)
-+      attachment #1116 (https://bugs.freedesktop.org/attachment.cgi?id=1116):
-+        Fix the problem that |PsCreateColormap()| returns
-+      a random value (patch by Stefan Dirsch/SuSE).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/Oid.c
-+      Bugzilla #1637 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1637)
-+      attachment #1114 (https://bugs.freedesktop.org/attachment.cgi?id=1114):
-+      Fix problems in oid code which may cause the
-+      usage of an invalid string pointer (original patch by Egbert Eich).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xlsfonts/Imakefile
-+      * xc/programs/xlsfonts/xlsfonts.c 
-+      * xc/programs/xlsfonts/xlsfonts.man
-+      * xc/programs/xlsfonts/xlsfonts.sgml
-+      * xc/programs/xplsprinters/xplsprinters.html
-+      * xc/programs/xplsprinters/xplsprinters.man
-+      * xc/programs/xplsprinters/xplsprinters.sgml
-+      Bugzilla #1551 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1551)
-+      attachment #1025 (https://bugs.freedesktop.org/attachment.cgi?id=1025):
-+      Convert "xlsfonts" manual page to DocBook
-+      format (and document the new functionality introduced
-+      with bug #1518).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xlsfonts/Imakefile
-+      * xc/programs/xlsfonts/dsimple.c
-+      * xc/programs/xlsfonts/dsimple.h
-+      * xc/programs/xlsfonts/xlsfonts.c
-+      Bugzilla #1518 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1518)
-+      attachment #1022 (https://bugs.freedesktop.org/attachment.cgi?id=1022):
-+        Add filter support to "xlsfonts" that it can
-+      filter builtin-, glyph- and/or other kinds of printer fonts
-+      (controlled by the xp-listfonts-modes attribute as described
-+      in the CDE DtPrint and Xprint specifications).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/pcl/PclInit.c
-+      * xc/programs/Xserver/Xprint/ps/PsInit.c
-+      Bugzilla #1629 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1629)
-+      attachment #1107 (https://bugs.freedesktop.org/attachment.cgi?id=1107):
-+      Fix crash on AMD64, regression caused by bug
-+      1496 ("Xorg Xprt does not support "*xp-listfonts-mode:
-+      xp-list-internal-printer-fonts" to toggle the usage of
-+      printer-builtin fonts").
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/Init.c
-+      * xc/programs/Xserver/Xprint/pcl/PclInit.c
-+      * xc/programs/Xserver/Xprint/ps/PsInit.c
-+      Bugzilla #1496 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1496)
-+      attachment #998 (https://bugs.freedesktop.org/attachment.cgi?id=998):
-+      Fixed Xprt font handling which did not support
-+      "*xp-listfonts-modes: xp-list-internal-printer-fonts" or
-+      "*xp-listfonts-modes: xp-list-glyph-fonts" to toggle
-+      the usage of printer-builtin and glyph fonts in XListFonts*(),
-+      XLoad*Font(), etc.
-+      Additionally the Xprint DDX now explicitly list "xp-listfonts-modes"
-+      in "document-attributes-supported" (for document-level) or
-+      "xp-page-attributes-supported" (for page-level) when the DDX implements
-+      this feature (as described in the CDE DtPrint and Xprint
-+      specifications).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/ps/PsGC.c
-+      * xc/programs/Xserver/Xprint/ps/PsPixmap.c
-+      Bugzilla #1416 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1416)
-+      attachment #994 (https://bugs.freedesktop.org/attachment.cgi?id=994):
-+      Fix Xprt PostScript DDX crashes when copying
-+      offscreen pixmap content to the same pixmap (the crash can
-+      be reproduced with % x11perf -copypixpix500 ... # or the
-+      reduced testcase in bug #1416 (attachment #993)).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xprint/Init.c
-+      * xc/programs/Xserver/Xprint/ps/Ps.h
-+      * xc/programs/Xserver/Xprint/ps/PsArea.c
-+      * xc/programs/Xserver/Xprint/ps/PsColor.c
-+      * xc/programs/Xserver/Xprint/ps/PsInit.c
-+      * xc/programs/Xserver/Xprint/ps/psout.c
-+      * xc/programs/Xserver/Xprint/ps/psout.h
-+      Bugzilla #1299 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1299)
-+      attachment #1001 (https://bugs.freedesktop.org/attachment.cgi?id=1001):
-+      Add more visuals to the Postscript DDX (8bit GrayScale/StaticGray,
-+      1bit StaticGray and the basic infratructure for "deep" visuals with more
-+      than 8bits per RGB gun).
-+      Patch by Roland Mainz <roland.mainz@nrubsig.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/GL/glx/glxcmds.c
-+      Bugzilla #1672 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1672)
-+      attachment #1132 (https://bugs.freedesktop.org/attachment.cgi?id=1132):
-+      Prevent libGL segfault if server's GLX version is > 1.2.
-+      Patch by Adam Jackson <ajax@freedesktop.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/GL/mesa/Imakefile
-+      * xc/lib/GL/mesa/math/Imakefile
-+      * xc/lib/GL/mesa/shader/Imakefile
-+      * xc/lib/GL/mesa/sparc/Imakefile
-+      * xc/lib/GL/mesa/swrast/Imakefile
-+      * xc/lib/GL/mesa/swrast_setup/Imakefile
-+      * xc/lib/GL/mesa/tnl/Imakefile
-+      * xc/lib/GL/mesa/tnl_dd/Imakefile
-+      Bugzilla #1843 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1843)
-+      attachment #1301 (https://bugs.freedesktop.org/attachment.cgi?id=1301):
-+      Fix build failure in the linker stage of libOSMesa.so.4.0 which
-+      happens more or less every couple of months with the message
-+      "ld: fatal: too many symbols require `small' PIC references:
-+      have 2112, maximum 2048 -- recompile some modules -K PIC.".
-+      The fix is to add |#define LargePICTable YES| to _ALL_ relevant
-+      Imakefiles (previously this was done only on "on-demand" basis).
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/util/memleak/getretmips.c
-+      Bugzilla #758 (https://bugs.freedesktop.org/show_bug.cgi?id=758)
-+      attachment #375 (https://bugs.freedesktop.org/attachment.cgi?id=375):
-+      Fix a buffer overrun which may happen when the size of the stack buffer
-+      is exactly the same as the actual stack size.
-+      Patch by Stephen Kennedy <Stephen.Kennedy@havok.com>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/extras/Xpm/lib/xpm.h
-+      Bugzilla #830 (https://bugs.freedesktop.org/show_bug.cgi?id=830)
-+      attachment #1493 (https://bugs.freedesktop.org/attachment.cgi?id=1493):
-+      Fix libXpm header (xpm.h) to use the X11 function begin/end marker
-+      macros (_XFUNCPROTOBEGIN, _XFUNCPROTOEND) instead of homegrown
-+      (native) C++ code.
-+      Patch by Kevin DeKorte <kdekorte@yahoo.com>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/include/extensions/dpms.h
-+      Bugzilla #830 (https://bugs.freedesktop.org/show_bug.cgi?id=830)
-+      attachment #1492 (https://bugs.freedesktop.org/attachment.cgi?id=1492):
-+      Get DPMS header file (include/extensions/dpms.h) working with C++
-+      applications.
-+      Patch by Kevin DeKorte <kdekorte@yahoo.com> and Roland
-+      Mainz <roland.mainz@nrubsig.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xext/saver.c
-+      Bugzilla #1695 (https://bugs.freedesktop.org/show_bug.cgi?id=1695)
-+      attachment #1230 (https://bugs.freedesktop.org/attachment.cgi?id=1230):       
-+      Fix crash in Xscreensaver code which allowed any authentificated X client
-+        to crash the Xserver using |XScreenSaverUnsetAttributes()|.
-+        Patch by ajax@nwnk.net
-+        
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/include/extensions/Imakefile
-+      Bugzilla #1871 (https://bugs.freedesktop.org/show_bug.cgi?id=1871)
-+      attachment #1314 (https://bugs.freedesktop.org/attachment.cgi?id=1314):       
-+      Remove old and now obsolete xc/include/extensions/damage.h.
-+        Patch by Kristian Høgsberg <krh@bitplanet.net>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/include/extensions/Xinerama.h
-+      Bugzilla #1897 (https://bugs.freedesktop.org/show_bug.cgi?id=1897)
-+      attachment #1338 (https://bugs.freedesktop.org/attachment.cgi?id=1338):       
-+      xc/include/extensions/Xinerama.h should include <X11/Xlib.h>, since it uses
-+        libX11 functions.
-+        Patch by Xavier Bestel and Daniel Stone <daniel@freedesktop.org>.
-+        
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/Xaw/AsciiSink.c
-+      * xc/lib/Xaw/Label.c
-+      * xc/lib/Xaw/List.c
-+      * xc/lib/Xaw/MultiSink.c
-+      * xc/lib/Xaw/SmeBSB.c
-+      * xc/lib/Xaw/Tip.c
-+      * xc/lib/Xaw/XawIm.c
-+      Bugzilla #1941 (https://bugs.freedesktop.org/show_bug.cgi?id=1941)
-+      attachment #1400 (https://bugs.freedesktop.org/attachment.cgi?id=1400):       
-+      Fail during initialization with error if font/fontset is not 
-+      set for widget. This prevents a sig11 later when the non-existent
-+      font/fontset structs are referenced.
-+        Patch by Egbert Eich <eich@freedesktop.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/X11/XKBBind.c
-+      Bugzilla #1459 (https://bugs.freedesktop.org/show_bug.cgi?id=1459)
-+      attachment #966 (https://bugs.freedesktop.org/attachment.cgi?id=966):       
-+      Fix |bzero()| size argument so it doesn't trash the stack.
-+        Patch by Mike A. Harris <mharris@www.linux.org.uk>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/X11/XlibInt.c
-+      Bugzilla #1864 (https://bugs.freedesktop.org/show_bug.cgi?id=1864)
-+      attachment #1434 (https://bugs.freedesktop.org/attachment.cgi?id=1434):       
-+      Fix random crashes because |bufp| variable is not initialized in
-+        |_XopenFile| (later the pointer is checked for |NULL| and freed
-+        otherwise. If the file was not found the pointer is uninitialized and
-+        rando memory is freed).
-+        Patch by  Alexander Gottwald <ago@freedesktop.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/X11/XlibInt.c
-+      Bugzilla #1864 (https://bugs.freedesktop.org/show_bug.cgi?id=1864)
-+      attachment #1310 (https://bugs.freedesktop.org/attachment.cgi?id=1310):       
-+      Fix random crashes because |pbuf| variable is not initialized in
-+        |_XFopenFile| (later the pointer is checked for |NULL| and freed
-+        otherwise. If the file was not found the pointer is uninitialized and
-+        rando memory is freed).
-+        Patch by  Alexander Gottwald <ago@freedesktop.org>
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/X11/imInsClbk.c
-+      Bugzilla #1926 (https://bugs.freedesktop.org/show_bug.cgi?id=1926)
-+      attachment #1482 (https://bugs.freedesktop.org/attachment.cgi?id=1482):       
-+      Unregistering events in XSelectInput() when unregistering IM
-+      filter callbacks via |_XimUnRegisterIMInstantiateCallback| may be a
-+        bad idea as others may be interested in this event.
-+        Removed the call to XSelectInput() altogether as we are in root
-+        window anyway.
-+        Patch by Lubos Lunak and and Egbert Eich <eich@freedesktop.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c
-+      Bugzilla #1688 (https://bugs.freedesktop.org/show_bug.cgi?id=1688)
-+      attachment #1530 (https://bugs.freedesktop.org/attachment.cgi?id=1530):       
-+        Fix the current implementation to make it  possible to slow down the
-+        mouse pointer or use arbitrary fractions (without running into
-+        rounding error issues). The change is using the same method of
-+        preserving rounding errors that the exponential method is already
-+        using.
-+      Patch by Jan Brunner <Jan_B@gmx.ch>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/os/WaitFor.c
-+      Bugzilla #1934 (https://bugs.freedesktop.org/show_bug.cgi?id=1934)
-+      attachment #1393 (https://bugs.freedesktop.org/attachment.cgi?id=1393):       
-+      Fixing |SetDPMSTimers()| so that DPMS*Time == 0 disables the
-+      appropriate timer. This takes advantage of the fact that
-+      |TimerSet()| with a timeout argument 0 behaves like |TimerCanel()|.
-+      Patch by Egbert Eich <eich@freedesktop.org>.
-+        
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/dix/dispatch.c
-+      Bugzilla #1939 (https://bugs.freedesktop.org/show_bug.cgi?id=1939)
-+      attachment #1398 (https://bugs.freedesktop.org/attachment.cgi?id=1398):       
-+      Fixe size of a variable that gets assigned the value of
-+        SmartScheduleTime (|long|) to |long|. This should help to prevent
-+        smart scheduler lockup on 64 bit systems due to datatype overruns.
-+      Patch by Andreas Schwab and Egbert Eich <eich@freedesktop.org>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xext/saver.c
-+      Bugzilla #1989 (https://bugs.freedesktop.org/show_bug.cgi?id=1989)
-+      attachment #1399 (https://bugs.freedesktop.org/attachment.cgi?id=1399):       
-+      Fixed sig11 in |ScreenSaverUnsetAttributes()| which occured when
-+        calling a |CloseDisplay()| after |XScreenSaverSetAttributes()|
-+        followed by |XScreenSaverUnsetAttributes()|. Caused by missing
-+        |FreeResource()| in |XScreenSaverUnsetAttributes()|.
-+      Patch by Egbert Eich <eich@freedesktop.org>.
-+        
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/dmx/dmx.c
-+      Bugzilla #1989 (https://bugs.freedesktop.org/show_bug.cgi?id=1989)
-+      attachment #1442 (https://bugs.freedesktop.org/attachment.cgi?id=1442):       
-+      Fix invalid write in libXdmx extension library (for |DMXAddInput()|).
-+      Patch by Mark McLoughlin <mark@skynet.ie>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/lib/dmx/dmx.c
-+      Bugzilla #1989 (https://bugs.freedesktop.org/show_bug.cgi?id=1989)
-+      attachment #1441 (https://bugs.freedesktop.org/attachment.cgi?id=1441):       
-+      Fix invalid write in libXdmx extension library.
-+      Patch by Mark McLoughlin <mark@skynet.ie>.
-+
-+2004-12-12 Roland Mainz <roland.mainz@nrubsig.org>
-+        * xc/programs/Xserver/miext/damage/damage.c
-+        Bugzilla #1204 (https://bugs.freedesktop.org/show_bug.cgi?id=1204)
-+        attachment #1360 (https://bugs.freedesktop.org/attachment.cgi?id=1360):
-+        Fix X11 test suite (caused by DAMAGE layer) failure with Xvfb when
-+        rendering text using |XDrawText*()| (XDrawText() tests 1, 3, 4, 27, 28,
-+        29, 30, 34, 37, 39, 41, 43 and XDrawText16() tests 1, 3, 9, 10, 11, 12,
-+        13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34,
-+        37, 39, 41, 43).
-+        Patch by Hong Bo Peng <penghb@cn.ibm.com> and Stefan Dirsch
-+        <sndirsch@suse.de>.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/xf86cfg/loader.h
-+      Bugzilla #557 (https://bugs.freedesktop.org/show_bug.cgi?id=557)
-+      attachment #1255 (https://bugs.freedesktop.org/attachment.cgi?id=1255):       
-+      Do not use "bool" as a variable name in xf86cfg, to avoid
-+      compiler bugs.
-+      Patch by Donnie Berkholz <spyderous@gentoo.org>.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/Xext/xf86bigfont.c
-+      Bugzilla #1402 (https://bugs.freedesktop.org/show_bug.cgi?id=1402)
-+      attachment #948 (https://bugs.freedesktop.org/attachment.cgi?id=948):       
-+      Fix BigFont extension if SHM is compiled in but 
-+      not working. Does not access SHM and privates if the SHM syscall
-+      failed during extension initialization.    
-+      Patch by Alexander Gottwald <ago@freedesktop.org>.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/os/utils.c
-+      Bugzilla #1453 (https://bugs.freedesktop.org/show_bug.cgi?id=1453)
-+      attachment #964 (https://bugs.freedesktop.org/attachment.cgi?id=964):       
-+      Fix spaces in usage output for BIGREQUESTS extension (option
-+      "-maxbigreqsize").
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/os/utils.c
-+      Bugzilla #1489 (https://bugs.freedesktop.org/show_bug.cgi?id=1489)
-+      attachment #979 (https://bugs.freedesktop.org/attachment.cgi?id=979):       
-+      Use |long| instead of |int| for BIGREQUESTS commandline option.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/loader/elfloader.c:
-+      Bugzilla #1812 (https://bugs.freedesktop.org/show_bug.cgi?id=1812)
-+      attachment #1263 (https://bugs.freedesktop.org/attachment.cgi?id=1263),
-+      Sun bug id #6175128:       
-+      Add Solaris to the platforms on which mprotect() is run to set
-+      execute permissions when necessary.
-+      Patch by Alan Coopersmith <alan.coopersmith@sun.com>.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/xmodmap/pf.c
-+      * xc/programs/xmodmap/xmodmap.c
-+      * xc/programs/xmodmap/xmodmap.h
-+      Bugzilla #1818 (https://bugs.freedesktop.org/show_bug.cgi?id=1818)
-+      attachment #1286 (https://bugs.freedesktop.org/attachment.cgi?id=1286):
-+      Fixing off-by-one allocation error.
-+      Patch by Kristian Høgsberg <krh@bitplanet.net>.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/dix/main.c
-+      Bugzilla #1404 (https://bugs.freedesktop.org/show_bug.cgi?id=1404):
-+      Fixing random crashes (like in DAMAGE code etc.) in Xnest due
-+      uninitalised GetWindowPixmap.
-+      Original patch by Alexander Gottwald <ago@freedesktop.org>
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/mi/miinitext.c
-+      Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361)
-+      attachment #1287 (https://bugs.freedesktop.org/attachment.cgi?id=1287):
-+      Avoid DRI initalisation when the Xfree86-DRI extension was turned
-+      off.
-+      Patch by Kristian Høgsberg <krh@bitplanet.net>.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/mi/miinitext.c
-+      Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361)
-+      attachment #938 (https://bugs.freedesktop.org/attachment.cgi?id=938):
-+      Allow more extensions to be enabled/disabled.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/mi/miinitext.c
-+      Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361)
-+      attachment #938 (https://bugs.freedesktop.org/attachment.cgi?id=938):
-+      Allow more extensions to be enabled/disabled.
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/loader/dixsym.c
-+      * xc/programs/Xserver/hw/xfree86/loader/extsym.c
-+      Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361)
-+      attachment #899 (https://bugs.freedesktop.org/attachment.cgi?id=899):
-+      Fix module loader bustage due duplicate symbols
-+      caused by the first patch in Bugzilla #1361
-+
-+2004-12-08 Roland Mainz <roland.mainz@nrubsig.org>
-+      * xc/programs/Xserver/hw/xfree86/loader/dixsym.c
-+      * xc/programs/Xserver/include/globals.h
-+      * xc/programs/Xserver/mi/miinitext.c
-+      * xc/programs/Xserver/os/utils.c
-+      Bugzilla #1361 (https://bugs.freedesktop.org/show_bug.cgi?id=1361)
-+      attachment #894 (https://bugs.freedesktop.org/attachment.cgi?id=894):
-+      Allow turning on/off most of the Xserver extensions
-+      (=all except server-specific extensions (e.g. DMX, XpExtension,
-+      etc.) via +extension/-extension
-+
-+2004-11-14  Alan Coopersmith  <alan.coopersmith@sun.com>
-+      
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c:
-+      * xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c:
-+
-+      (Bugzilla #1777) Import Mark Vojkovich's changes to NV driver 
-+      since last sync with XFree86, including:
-+         Support for new NVIDIA chips.
-+         Egbert has a laptop that needs some DPMS ordering reversed.
-+         New chip support and workaround for Toshiba M30 laptop issue.
-+         PCI-Xpress chip support.
-+         DPMS support for DVI.
-+         Cursor changes for NV11 so that alpha blended cursors will work
-+           in conjunction with dithering (laptop panels).  It previously
-+           did not.
-+         HW support for alpha blended stretch blits on NV5 and higher,
-+           though nothing is using them at this point.
-+         Add support for VBlank syncing the Xv Blit adaptor on hardware
-+           that supports it (NV11 and higher).
-+         Make console restoration a little more robust.  We were making
-+           an assumption that failed on a newer laptop.
-+         Workaround for some NV31 DVI artifacts.      
-+      
-+      Also add nVidia license statement to nv man page to comply with
-+      requirement that it appear in "user documentation"
-+
-+2004-10-17  Alex Deucher  <agd5f@yahoo.com>
-+
-+      * programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c:
-+      (RADEONEnterVT):
-+      Fix resume in radeon driver (bug 1220)
-+
-+----------- 6.8.1 Release
-+      
-+2004-09-17  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-+
-+      * config/cf/xorg.cf:
-+      Update the XORG_DATE for the release.
-+
-+      * config/cf/cygwin.cf:
-+      Update cygwin release version.
-+
-+      * BUILD:
-+      * README:
-+      * RELNOTES:
-+      * programs/Xserver/hw/xfree86/doc/BUILD:
-+      * programs/Xserver/hw/xfree86/doc/DESIGN:
-+      * programs/Xserver/hw/xfree86/doc/Install:
-+      * programs/Xserver/hw/xfree86/doc/OS2.Notes:
-+      * programs/Xserver/hw/xfree86/doc/README:
-+      * programs/Xserver/hw/xfree86/doc/README.DECtga:
-+      * programs/Xserver/hw/xfree86/doc/README.Darwin:
-+      * programs/Xserver/hw/xfree86/doc/README.LynxOS:
-+      * programs/Xserver/hw/xfree86/doc/README.NetBSD:
-+      * programs/Xserver/hw/xfree86/doc/README.OpenBSD:
-+      * programs/Xserver/hw/xfree86/doc/README.SCO:
-+      * programs/Xserver/hw/xfree86/doc/README.SiS:
-+      * programs/Xserver/hw/xfree86/doc/README.Solaris:
-+      * programs/Xserver/hw/xfree86/doc/README.XKB-Config:
-+      * programs/Xserver/hw/xfree86/doc/README.chips:
-+      * programs/Xserver/hw/xfree86/doc/README.dps:
-+      * programs/Xserver/hw/xfree86/doc/README.fonts:
-+      * programs/Xserver/hw/xfree86/doc/README.i740:
-+      * programs/Xserver/hw/xfree86/doc/README.i810:
-+      * programs/Xserver/hw/xfree86/doc/README.mouse:
-+      * programs/Xserver/hw/xfree86/doc/README.r128:
-+      * programs/Xserver/hw/xfree86/doc/README.rendition:
-+      * programs/Xserver/hw/xfree86/doc/README.s3virge:
-+      * programs/Xserver/hw/xfree86/doc/RELNOTES:
-+      * programs/Xserver/hw/xfree86/doc/Versions:
-+      * programs/Xserver/hw/xfree86/doc/sgml/defs.ent:
-+      * programs/xkbcomp/README.config:
-+      Update documentation for release.
-+
- 2004-09-15  Daniel Stone  <daniel@freedesktop.org>
-       * xc/extras/Xpm/lib/Attrib.c:
-@@ -6404,4 +7583,4 @@
-        so i18n libs from build tree get used instead of installed ones
-        (Egbert Eich).
--$XdotOrg: xc/ChangeLog,v 1.365.2.1 2004/09/15 15:47:36 daniel Exp $
-+$XdotOrg: xc/ChangeLog,v 1.365.2.107 2004/12/17 02:07:35 gisburn Exp $
-Index: config/cf/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- config/cf/Imakefile        9 Aug 2004 22:37:21 -0000       1.3
-+++ config/cf/Imakefile        15 Dec 2004 03:26:31 -0000      1.3.2.1
-@@ -26,7 +26,8 @@
- xorgsite.def \
- $(VERSIONDEFFILES) \
- $(HOSTDEFFILES) \
--site.def
-+site.def \
-+xorgversion.def  
- RULEFILES = \
- Imake.rules \
-Index: config/cf/OpenBSDLib.tmpl
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/OpenBSDLib.tmpl,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- config/cf/OpenBSDLib.tmpl  2 Sep 2004 01:10:28 -0000       1.6
-+++ config/cf/OpenBSDLib.tmpl  13 Dec 2004 03:20:44 -0000      1.6.2.1
-@@ -175,7 +175,7 @@
- # elif OSMajorVersion > 3 || OSMajorVersion == 3 && OSMinorVersion >= 6
- # ifndef SharedX11Rev
--#  define SharedX11Rev 8.0
-+#  define SharedX11Rev 8.1
- # endif
- # ifndef SharedXThrStubRev
- #  define SharedXThrStubRev 8.0
-@@ -225,22 +225,22 @@
- #  endif
- # endif
- # ifndef SharedGlxRev
--#  define SharedGlxRev 3.0
-+#  define SharedGlxRev 3.1
- # endif
- # ifndef SharedOSMesaRev
--#  define SharedOSMesaRev 5.0
-+#  define SharedOSMesaRev 6.0
- # endif
- # ifndef SharedGLwRev
- #  define SharedGLwRev 3.0
- # endif
- # ifndef SharedXrenderRev
--#  define SharedXrenderRev 3.0
-+#  define SharedXrenderRev 3.1
- # endif
- # ifndef SharedXrandrRev
- #  define SharedXrandrRev 4.0
- # endif
- # ifndef SharedXcursorRev
--#  define SharedXcursorRev 2.0
-+#  define SharedXcursorRev 2.2
- # endif
- # ifndef SharedXfontcacheRev
- #  define SharedXfontcacheRev 3.0
-@@ -273,7 +273,7 @@
- #  define SharedXawRev 9.0
- # endif
- # ifndef SharedXaw6Rev
--#  define SharedXaw6Rev 8.0
-+#  define SharedXaw6Rev 8.1
- # endif
- # ifndef SharedXiRev
- #  define SharedXiRev 8.0
-@@ -294,7 +294,7 @@
- #  define SharedFSRev 8.0
- # endif
- # ifndef SharedFontRev
--#  define SharedFontRev 3.0
-+#  define SharedFontRev 4.0
- # endif
- # ifndef SharedFontEncRev
- #  define SharedFontEncRev 3.0
-@@ -303,16 +303,16 @@
- #  define SharedXpmRev 6.0
- # endif
- # ifndef SharedFreetype2Rev
--#  define SharedFreetype2Rev 12.0
-+#  define SharedFreetype2Rev 13.0
- # endif
- # ifndef SharedExpatRev
- #  define SharedExpatRev 5.0
- # endif
- # ifndef SharedXft1Rev
--#  define SharedXft1Rev 2.0
-+#  define SharedXft1Rev 3.0
- # endif
- # ifndef SharedXftRev
--#  define SharedXftRev 4.0
-+#  define SharedXftRev 5.0
- # endif
- # ifndef SharedFontconfigRev
- #  define SharedFontconfigRev 2.0
-Index: config/cf/X11.tmpl
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/X11.tmpl,v
-retrieving revision 1.35
-retrieving revision 1.35.2.1
-diff -u -u -r1.35 -r1.35.2.1
---- config/cf/X11.tmpl 3 Sep 2004 16:18:18 -0000       1.35
-+++ config/cf/X11.tmpl 15 Dec 2004 04:53:05 -0000      1.35.2.1
-@@ -1,6 +1,6 @@
- XCOMM ----------------------------------------------------------------------
- XCOMM X Window System Build Parameters and Rules
--XCOMM $XdotOrg: xc/config/cf/X11.tmpl,v 1.35 2004/09/03 16:18:18 kem Exp $
-+XCOMM $XdotOrg: xc/config/cf/X11.tmpl,v 1.35.2.1 2004/12/15 04:53:05 gisburn Exp $
- XCOMM $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $
- XCOMM
- XCOMM
-@@ -680,6 +680,10 @@
- #define BuildXevieLibrary     !BuildServersOnly
- #endif
-+#ifndef BuildRootless
-+#define BuildRootless NO
-+#endif
-+
- #ifndef BuildXterm
- #define BuildXterm            BuildClients
- #endif
-@@ -1237,6 +1241,14 @@
- #endif
- #endif
-+#ifndef RootlessDefines
-+#if BuildRootless
-+#define RootlessDefines -DROOTLESS
-+#else
-+#define RootlessDefines /**/
-+#endif
-+#endif
-+
- #ifndef SitePervasiveExtensionDefines
- #define SitePervasiveExtensionDefines /**/
- #endif
-@@ -1247,7 +1259,8 @@
-       XF86BigfontExtensionDefines DPMSDefines \
-       LowMemDefines XprintDefines XineramaDefines \
-       SitePervasiveExtensionDefines RenderDefines RandRDefines \
--      XfixesDefines XDamageDefines CompositeDefines XevieDefines
-+      XfixesDefines XDamageDefines CompositeDefines XevieDefines \
-+      RootlessDefines
- #endif
- #ifndef SiteExtensionDefines
- #define SiteExtensionDefines /**/
-Index: config/cf/cygwin.cf
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/cygwin.cf,v
-retrieving revision 1.14.2.1
-retrieving revision 1.14.2.2
-diff -u -u -r1.14.2.1 -r1.14.2.2
---- config/cf/cygwin.cf        17 Sep 2004 15:38:18 -0000      1.14.2.1
-+++ config/cf/cygwin.cf        15 Dec 2004 04:53:05 -0000      1.14.2.2
-@@ -329,6 +329,7 @@
- # define XWinMultiWindowDefines 
- #endif /* BuildXWinMultiWindow */
- #if BuildXWinMultiWindowExtWM
-+# define BuildRootless                YES
- # define XWinMultiWindowExtWMDefines -DXWIN_MULTIWINDOWEXTWM
- #else /* BuildXWinMultiWindowExtWM */
- # define XWinMultiWindowExtWMDefines 
-Index: config/cf/darwin.cf
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/darwin.cf,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- config/cf/darwin.cf        2 Sep 2004 01:23:45 -0000       1.4
-+++ config/cf/darwin.cf        15 Dec 2004 04:53:05 -0000      1.4.2.1
-@@ -1,4 +1,4 @@
--XCOMM $XdotOrg: xc/config/cf/darwin.cf,v 1.4 2004/09/02 01:23:45 kem Exp $
-+XCOMM $XdotOrg: xc/config/cf/darwin.cf,v 1.4.2.1 2004/12/15 04:53:05 gisburn Exp $
- XCOMM platform:  $XFree86: xc/config/cf/darwin.cf,v 1.50 2004/01/20 23:54:50 torrey Exp $
- /* Darwin / Mac OS X configuration by John Carmack <johnc@idsoftware.com> */
-@@ -133,6 +133,7 @@
- #  define GlxExtraDefines -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL GlxArchDefines
- # endif
-+# define BuildRootless          YES
- #define BuildAppleWMLibrary     YES
- #endif  /* DarwinQuartzSupport */
-Index: config/cf/xorg.cf
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/xorg.cf,v
-retrieving revision 1.27.2.2
-retrieving revision 1.27.2.3
-diff -u -u -r1.27.2.2 -r1.27.2.3
---- config/cf/xorg.cf  17 Sep 2004 15:38:18 -0000      1.27.2.2
-+++ config/cf/xorg.cf  15 Dec 2004 03:26:32 -0000      1.27.2.3
-@@ -1,4 +1,4 @@
--XCOMM $XdotOrg: xc/config/cf/xorg.cf,v 1.27.2.2 2004/09/17 15:38:18 kem Exp $
-+XCOMM $XdotOrg: xc/config/cf/xorg.cf,v 1.27.2.3 2004/12/15 03:26:32 gisburn Exp $
- /*
-  * This configuration file contains all of the configuration
-  * information for the Xorg based X Servers.
-@@ -11,13 +11,7 @@
- /* Get and set version information. */
- #include "date.def"
--
--#define XORG_VERSION_MAJOR  6
--#define XORG_VERSION_MINOR  8
--#define XORG_VERSION_PATCH  1
--#define XORG_VERSION_SNAP   0
--
--#define XORG_DATE "17 September 2004"
-+#include "xorgversion.def"
- #if !defined(XorgVersionString) && \
-     defined(XORG_VERSION_MAJOR) && defined(XORG_VERSION_MINOR) && \
-Index: config/cf/xorgsite.def
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/xorgsite.def,v
-retrieving revision 1.10
-retrieving revision 1.10.2.2
-diff -u -u -r1.10 -r1.10.2.2
---- config/cf/xorgsite.def     21 Aug 2004 02:06:44 -0000      1.10
-+++ config/cf/xorgsite.def     13 Dec 2004 14:27:33 -0000      1.10.2.2
-@@ -24,7 +24,7 @@
-  * The host.def file will never be patched.
-  *
-  * The distributed version of this file MUST contain no uncommented
-- * definitions.  Default definitions belong in xfree86.cf, or <vendor>.cf
-+ * definitions.  Default definitions belong in xorg.cf, or <vendor>.cf
-  * files.
-  */
- /******************************************************************************/
-@@ -71,7 +71,7 @@
- /*
-  * Set the default server (ie the one that gets the sym-link to "X")
-  *
--#define ServerToInstall               XFree86
-+#define ServerToInstall               Xorg
-  */
- /*
-Index: config/cf/xorgversion.def
-===================================================================
-RCS file: config/cf/xorgversion.def
-diff -N config/cf/xorgversion.def
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ config/cf/xorgversion.def  17 Dec 2004 02:07:36 -0000      1.1.4.2
-@@ -0,0 +1,6 @@
-+#define XORG_VERSION_MAJOR  6
-+#define XORG_VERSION_MINOR  8
-+#define XORG_VERSION_PATCH  1
-+#define XORG_VERSION_SNAP   901
-+
-+#define XORG_DATE "16 December 2004"
-Index: config/cf/xprint_site.def
-===================================================================
-RCS file: /cvs/xorg/xc/config/cf/Attic/xprint_site.def,v
-retrieving revision 1.3
-retrieving revision 1.3.4.2
-diff -u -u -r1.3 -r1.3.4.2
---- config/cf/xprint_site.def  4 May 2004 22:58:59 -0000       1.3
-+++ config/cf/xprint_site.def  13 Dec 2004 14:27:33 -0000      1.3.4.2
-@@ -90,7 +90,6 @@
- #define BuildGlxExt                    NO
- #define BuildXIE                       NO
- /* X extensions not needed */
--#define BuildDBE                     NO
- #define BuildXKB                     NO
- #define BuildRECORD                  NO
- #define BuildDPMS                    NO
-@@ -136,7 +135,7 @@
- #endif /* BuildXprintAppsOnly */
- /* Set our own XVendorString/XVendorRelease
-- * (and to avoid that xfree86.cf sets it's own stuff here) */
-+ * (and to avoid that xorg.cf sets it's own stuff here) */
- #define XVendorString "xprint.mozdev.org"
- #define XVendorRelease 100000
-Index: config/docbook/docbookconv.sh
-===================================================================
-RCS file: /cvs/xorg/xc/config/docbook/docbookconv.sh,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- config/docbook/docbookconv.sh      23 Apr 2004 18:42:00 -0000      1.2
-+++ config/docbook/docbookconv.sh      15 Dec 2004 07:17:48 -0000      1.2.6.1
-@@ -1,5 +1,7 @@
- #!/bin/sh
-+#set -x
-+
- fatal_error()
- {
-     echo "$1" 1>&2
-@@ -97,8 +99,15 @@
-         fi
-         ;;
-     "man")
--        cp "${MYCURRDIR}/${infile}" "${infile}.tmp"
--        ${docbook2man} "${infile}.tmp"
-+        if [ "${infile}" != "${infile%.sgml}" ] ; then
-+          #cp "${MYCURRDIR}/${infile}" "${infile%.sgml}.xml"
-+          #${docbook2man} --network "${infile%.sgml}.xml"
-+          cp "${MYCURRDIR}/${infile}" "${infile}.tmp"
-+          ${docbook2man} --network "${infile}.tmp"
-+        else
-+          cp "${MYCURRDIR}/${infile}" "${infile}.tmp"
-+          ${docbook2man} --network "${infile}.tmp"
-+        fi
-         manfile="$(ls -1 ${infile%.*}.__*)"
-         verbose_echo "manfile=${manfile}"
-Index: doc/man/X11/XGetWProp.man
-===================================================================
-RCS file: /cvs/xorg/xc/doc/man/X11/XGetWProp.man,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- doc/man/X11/XGetWProp.man  23 Apr 2004 18:42:09 -0000      1.2
-+++ doc/man/X11/XGetWProp.man  15 Dec 2004 07:22:55 -0000      1.2.4.1
-@@ -153,6 +153,7 @@
- .HP
- Atom *XListProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int
- *\fInum_prop_return\fP\^); 
-+.HP
- int XChangeProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom
- \fIproperty\fP\^, Atom \fItype\fP\^, int \fIformat\fP\^, int \fImode\fP\^,
- unsigned char *\fIdata\fP\^, int \fInelements\fP\^); 
-Index: doc/man/general/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/doc/man/general/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- doc/man/general/Imakefile  23 Apr 2004 18:42:14 -0000      1.2
-+++ doc/man/general/Imakefile  15 Dec 2004 07:38:28 -0000      1.2.4.1
-@@ -8,8 +8,16 @@
- MANSUFFIX = $(MISCMANSUFFIX)
- InstallManPage(X,$(MANDIR))
-+InstallManPage(Xprint,$(MANDIR))
- InstallManPageLong(Consortium,$(MANDIR),XConsortium)
- InstallManPageLong(Standards,$(MANDIR),XStandards)
- InstallManPageLong(XProjectTeam,$(MANDIR),XProjectTeam)
- InstallManPageAliases(XProjectTeam,$(MANDIR),X.Org)
- InstallManPageLong(security,$(MANDIR),Xsecurity)
-+
-+#ifdef HasDocBookTools
-+all:: Xprint.man Xprint.html
-+
-+ConvertDocBookToManPage(Xprint.sgml, Xprint.man)
-+ConvertDocBookToHTML(Xprint.sgml, Xprint.html)
-+#endif /* HasDocBookTools */
-Index: doc/man/general/Xprint.html
-===================================================================
-RCS file: doc/man/general/Xprint.html
-diff -N doc/man/general/Xprint.html
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ doc/man/general/Xprint.html        15 Dec 2004 07:38:28 -0000      1.1.4.1
-@@ -0,0 +1,296 @@
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Xprint</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="Xprint"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>Xprint &#8212; The &quot;X print service&quot; - a portable, network-transparent printing system based on the X11 protocol</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p>Xprint is a very flexible, extensible, scaleable, client/server
-+     print system based on ISO 10175 (and some other specs) and the X11        
-+     rendering protocol.                                                       
-+     Using Xprint an application can search, query and use devices like        
-+     printers, FAX machines or create documents in formats like PDF.           
-+     In particular, an application can seek a printer, query supported         
-+     attributes (like paper size, trays, fonts etc.), configure the printer    
-+     device to match it&#8217;s needs and print on it like on any other X device     
-+     reusing parts of the code which is used for the video card Xserver.    
-+    </p></div><div xmlns:ns1="" class="refsect1" lang="en"><a name="id2802144"></a><h2>OVERVIEW</h2><p>
-+      The &quot;X Print Service&quot; technology allows X rendering to devices such as
-+      printers and fax.  Most of the service is available in the X11
-+      technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
-+      Modifications have also been made to the LessTif/Motif/Qt technology
-+      stacks to support Xprint.
-+    </p><p>
-+      The Xp portion consists of:
-+      </p><div class="itemizedlist"><ul type="disc"><li><p>Xp Extension for the X-Server (included in the X-Server Xprt)</p></li><li><p>Xp Extension API for the client side (libXp/libXprintUtils)</p></li><li><p>PCL ddx driver that converts core X to native PCL</p></li><li><p>PDF ddx driver that converts core X to native PDF</p></li><li><p>PostScript ddx driver that converts core X to native PostScript</p></li><li><p>Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters</p></li></ul></div><p>
-+      From an X clients perspective, it can attach to one of two nearly
-+      identical X-Servers, a &quot;Video&quot; X-Server, and a &quot;Print&quot; X-Server
-+      which has the additional Xp capability but otherwise looks and
-+      behaves the same.   
-+    </p></div><div xmlns:ns2="" class="refsect1" lang="en"><a name="id2804972"></a><h2>HOW THE X PRINT SERVICE WORKS</h2><p>    
-+      The X Print Service expands on the traditional X-Server and Xlib world
-+      in four ways.
-+
-+      </p><div class="orderedlist"><ol type="1"><li><p>
-+            Most obvious is the use of &quot;print ddx drivers&quot; instead of
-+            &quot;video ddx drivers&quot;.  While a video ddx driver modifies pixels
-+            in a video frame buffer, a print ddx driver generates &quot;page
-+            description language (PDL)&quot; output (such as PCL, PDF or PostScript)
-+            or sends the print rendering instructions to a platform-specific
-+            print API (like Win32/GDI).
-+          </p><p>
-+            Once a print ddx driver generates PDL output, it can be sent to
-+            a spooler such as <span class="citerefentry"><span class="refentrytitle">lp</span>(1)</span>
-+            or retrieved by the client (to implement functionality like &quot;print-to-file&quot;).
-+          </p><p>
-+            Though not currently done, a single X-Server can support both
-+            print and video ddx drivers.
-+            </p></li><li><p>
-+            Since printers support &quot;paged&quot; output, unlike video, a portion
-+            of the Xp Extension supports APIs to delineate printed output.
-+            For example, <tt class="function">XpStartPage</tt> and <tt class="function">XpEndPage</tt> tell the X-Server where
-+            a physical page starts and ends in an otherwise continuous
-+            stream of X rendering primitives.  Likewise, <tt class="function">XpStartJob</tt> and
-+            <tt class="function">XpEndJob</tt> determine when a collection of pages starts and ends.
-+            <tt class="function">XpEndJob</tt> typically causes the generated PDL to be submitted to
-+            a spooler, such as <span class="citerefentry"><span class="refentrytitle">lp</span>(1)</span>.
-+          </p></li><li><p>
-+            Since printers have extensive capabilities, another portion of
-+            the Xp Extension supports APIs to manipulate &quot;print contexts&quot;.
-+          </p><p>
-+            Once a printer is selected using the Xp Extension API, a print
-+            context to represent it can be created.  A print context
-+            embodies the printer selected - it contains the printer's
-+            default capabilities, selectable range of capabilities,
-+            printer state, and generated output.  Some &quot;attributes&quot; within
-+            the print context can be modified by the user, and the
-+            X-Server and print ddx driver will react accordingly.  For
-+            example, the attribute &quot;content-orientation&quot; can be set to
-+            &quot;landscape&quot; or &quot;portrait&quot; (if the printer supports these 
-+            values - which can be queried using the Xprint API as well).
-+          </p></li><li><p>
-+            Since printers can have &quot;built in&quot; fonts, the Xp Extension in
-+            the X-Server works with the print ddx drivers to make
-+            available (for printing only) additional fonts on a per print
-+            context basis.
-+          </p><p>
-+            When a print context is created and set for a given printer,
-+            the X font calls may be able to access additional printer
-+            fonts.  To do this (typically), the X-Server must have access
-+            to &quot;printer metric files&quot; (.pmf) that describe at minimum the
-+            metrics of the built in fonts.
-+          </p></li></ol></div></div><div xmlns:ns3="" class="refsect1" lang="en"><a name="id2804885"></a><h2>USAGE</h2><p>    
-+      There are three tasks to start the X Print Service:
-+      </p><div class="orderedlist"><ol type="1"><li><p>configuring the X Print Server,</p></li><li><p>starting the X Print Service</p></li><li><p>configuring the user session so that clients can find the running X Print Service</p></li></ol></div><p>
-+      The tasks are described in detail below.
-+    </p></div><div xmlns:ns4="" class="refsect1" lang="en"><a name="id2804911"></a><h2>SERVER CONFIGURATION</h2><p>
-+      The X Print Server (Xprt) can read a number of configuration files which
-+      control its behavior and support for printers.  Each vendor platform has
-+      a default location for this information.  Xprt can also read the
-+      environment variable <tt class="envar">XPCONFIGDIR</tt> to locate alternate configuration
-+      directories.  Common settings include:
-+
-+      </p><table class="simplelist" border="0" summary="Simple list"><tr><td>export XPCONFIGDIR=/X11/lib/X11/XpConfig/</td></tr><tr><td>export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/</td></tr></table><p>
-+      Xprt has many built-in defaults, and lacking any configuration files,
-+      will immediately try to support all printers visible via <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span>.
-+    </p><p>
-+      In order of importance for configuration by a system administrator, the
-+      configuration files for a &quot;C&quot; locale are as follows (see <span class="citerefentry"><span class="refentrytitle">Xprt</span>(7)</span> for more
-+      details (including support for non-&quot;C&quot; locales)):
-+      </p><div class="variablelist"><dl><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/Xprinters</tt></span></dt><dd><p>
-+              'Xprinters' is the top most configuration file.  It tells
-+              Xprt which specific printer names (e.g.  mylaser) should
-+              be supported, and whether <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> or other commands
-+              should be used to automatically supplement the list of
-+              printers.
-+            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/printer</tt></span></dt><dd><p>
-+              The 'printer' file maps printer names to model
-+              configurations (see 'model-config' below).  For example,
-+              &quot;mylaser&quot; could be mapped to a &quot;HPDJ1600C&quot;, and all other
-+              arbitrary printers could be mapped to a default, such as
-+              &quot;HPLJ4SI&quot;.  When depending on <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> in the Xprinters
-+              file, setting up defaults in 'printer' becomes all the
-+              more important.
-+            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/document</tt></span></dt><dd><p>
-+              The 'document' file specifies the initial document values
-+              for any print jobs.  For example, which paper tray to
-+              use, what default resolution, etc.
-+            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/job</tt></span></dt><dd><p>
-+              The 'job' file specifies the initial job values for any
-+              print jobs.  For example, &quot;notification-profile&quot; can be
-+              set so that when a print job is successfully sent to a
-+              printer, e-mail is sent to the user.
-+            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/model-config</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</tt></span></dt><dd><p>
-+              The 'model-config' file has attributes that describe the
-+              printer model&#8217;s capabilities and default settings.
-+              Printer model fonts may also be present.  The model-config
-+              file also identifies the print ddx driver to be used.
-+
-+              For each printer model supported, a complete hierarchy of
-+              files should exist.  In most cases, these files do not
-+              need to be modified.
-+            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</tt></span></dt><dd><p>
-+              The print ddx drivers can have highly specific
-+              configuration files to control their behavior.  In most
-+              cases, these files do not need to be modified.
-+            </p></dd></dl></div><p>
-+      
-+      More information in how to configure and customize the X print server can be found in the
-+      <span class="citerefentry"><span class="refentrytitle">Xprt</span>(7)</span>
-+      manual page.
-+    </p></div><div xmlns:ns5="" class="refsect1" lang="en"><a name="id2805166"></a><h2>STARTING UP</h2><p>
-+      The summary checklist for starting the X Print Service is as follows:
-+      
-+      </p><div class="orderedlist"><ol type="1"><li><p>
-+            Choose an execution model for the X Print Service.  The X
-+            Print Service can be run on a per-user session basis, per
-+            machine basis, or can be run on a few machines globally
-+            available to a number of users.
-+          </p></li><li><p>
-+            If print jobs are to be submitted to a spooler (almost always
-+            the case), make sure all needed printers are available to the
-+            spooler subsystem (most often <span class="citerefentry"><span class="refentrytitle">lp</span>(1)</span>)
-+            on the same machine running the X Print Service.
-+          </p></li><li><p>
-+            Configure the X Print Server.  See ``X Print Server
-+            Configuration''.
-+          </p></li><li><p>
-+            Depending on #1, start the X Print Server process &quot;Xprt&quot;, and
-+            then the toolkit-specific Print Dialog Manager Daemon process
-+            (such as CDEnext's &quot;dtpdmd&quot;) at the appropriate times.
-+            Note that libXprintUtils-based applications/toolkits do not need
-+            a Print Dialog Manager Daemon process to use Xprint.
-+          </p></li></ol></div><p>     
-+      The details are described below.
-+    </p><p>
-+      Because the X Print Service is based on X, it can be easily distributed.
-+      The most significant factors in which execution model to choose will be
-+      driven by:
-+      </p><div class="itemizedlist"><ul type="disc"><li><p>
-+            how many printers will be accessable through the printer
-+            subsystem on any given machine.  A system administrator may
-+            choose to cluster printers on a few given machines, or
-+            scatter them across an organization and possibly make
-+            extensive use of remote spoolers to make them globally
-+            available.
-+          </p></li><li><p>
-+            how many machines will need a copy of the X Print Server
-+            configuration files.  The files have been architected so
-+            that one super-set version of them can be maintained and
-+            distributed (e.g.  via NFS), and a per-machine or per-user
-+            version of the `Xprinters' is all that is needed to have the
-+            appropriate information in them utilized or ignored.
-+          </p></li><li><p>
-+            how many users can demand services from a given X Print
-+            Service.
-+          </p></li></ul></div><p>
-+
-+      With the above in mind, some obvious execution models include:
-+      </p><div class="itemizedlist"><ul type="disc"><li><p>
-+            Global - in this model, the system administrator is choosing
-+            to run the X Print Service on a *few* select machines with
-+            appropriate printers configured, and allow clients access to
-+            the global resource.  This can centralize the administration
-+            of printers and configuration files, but may have to be
-+            monitored for performance loading.
-+          </p><p>
-+            Startup would likely be done by boot-up scripts (such as <tt class="filename">/etc/init.d/xprint</tt>).
-+          </p></li><li><p>
-+            Per-machine - every machine with potential X Print Service
-+            users would run the service.  Printer and configuration file
-+            administration is decentralized, and usage would be limited
-+            to the users on the machine.
-+          </p><p>
-+            Startup would likely be done by boot-up scripts (such as <tt class="filename">/etc/init.d/xprint</tt>).
-+          </p></li><li><p>
-+            Per-user session - every user would run an entire X Print
-+            Service for themselves.  In the future, the Video X Server
-+            normally started may contain Print X Server capability, so
-+            this model becomes very natural.
-+          </p><p>
-+            Startup would likely be done at session login or by
-+            launching actions or processes manually once the user
-+            logs in.  Note: Deamons like &quot;dtpdmd&quot; must be started after Xprt.
-+          </p></li></ul></div><p>
-+       Starting of the processes is straight forward.  In strict order (example is for manually starting the X print server for CDEnext usage):
-+       </p><div class="orderedlist"><ol type="1"><li><pre class="programlisting">[machineA] % Xprt [-XpFile Xprinters file] [:dispNum] </pre><p>
-+             Note that Xprt will look for configuration files in either
-+             a default location or where <tt class="envar">XPCONFIGDIR</tt> points.
-+           </p><p><tt class="option">-XpFile</tt> specifies an alternate `Xprinters' file, rather
-+             than the default one or `<tt class="filename">${XPCONFIGDIR}/C/print/Xprinters</tt>'.
-+           </p></li><li><pre class="programlisting">[machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] </pre><p>
-+            The dtpdmd will maintain an X-Selection on the X-Server,
-+            and will start dtpdm's as required to service requests.
-+           </p></li></ol></div><p>
-+       In all but the per-user session model, the machine running the dtpdmd
-+       (thus dtpdm's) will need display authorization to the users video
-+       display.
-+    </p></div><div xmlns:ns6="" class="refsect1" lang="en"><a name="id2805371"></a><h2>CLIENT CONFIGURATION</h2><p>
-+      Once a X Print Server and dtpdmd have been started -- many of them
-+      in some cases -- clients will need to find and use them.  There are
-+      two mechanisms that allow clients to discover X Print Servers and
-+      printers.
-+
-+      </p><div class="itemizedlist"><ul type="disc"><li><p>
-+            &quot;X Print Specifier&quot; - assuming usage of the DtPrint/XprintUtils-based print
-+            applications, the following notation is understood:
-+          </p><pre class="programlisting">printer_name@machine[:dispNum]</pre><p>
-+            For example:
-+          </p><pre class="programlisting">colorlj7@printhub:2</pre><p>
-+           In the above example, the X Print Server running at `printhub:2'
-+           is assumed to support the printer named `colorlj7'.
-+          </p></li><li><p><tt class="envar">${XPSERVERLIST}</tt> - assuming usage of the DtPrint print dialogs,
-+            the environment variable <tt class="envar">${XPSERVERLIST}</tt> can contain a list
-+            of X Print Servers.  For example:
-+          </p><pre class="programlisting">XPSERVERLIST=&quot;printhub:2 printhub:3 otherdept:0&quot;</pre><p>
-+            Then in the dialogs, only a printer name needs to be entered.
-+            The dialog will then search the X Print Servers in <tt class="envar">${XPSERVERLIST}</tt>
-+            for a server than supports the printer, and then establish
-+            contact.
-+          </p></li></ul></div></div><div class="refsect1" lang="en"><a name="id2806227"></a><h2>END-USER SEQUENCE</h2><p>
-+      From most CDEnext applications, printing is accomplished by bringing
-+      down the File menu and selecting Print....  This will result in
-+      the DtPrintSetupBox dialog, which will request the name of a printer,
-+      and offer limited capability to configure print options (e.g. number
-+      of copies).  If the user wishes, they can select Setup..., which
-+      will start a dtpdm capable of modifying additional print options.
-+      Finally, the user should select Print.
-+    </p></div><div class="refsect1" lang="en"><a name="id2806249"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">${XPCONFIGDIR}</tt></span></dt><dd><p> This environment variable points to the  root
-+          of  the Xprint server configuration directory hierarchy.
-+          If the variable is not defined,  the  default
-+          path  is be assumed.  The default path may be
-+            <tt class="filename">/usr/X11R6/lib/X11/xserver/</tt>, 
-+            <tt class="filename">/usr/lib/X11/xserver/</tt>,
-+            <tt class="filename">/usr/share/Xprint/xserver/</tt> or
-+            <tt class="filename">/usr/openwin/server/etc/XpConfig</tt>, depending on the
-+          system, and may be configured in <tt class="filename">/etc/init.d/xprint</tt>.</p></dd><dt><span class="term"><tt class="envar">${LANG}</tt></span></dt><dd><p>
-+            This environment variable selects the locale settings used by the Xprint server.
-+            Xprt allows language-specific settings (stored in <tt class="filename">${XPCONFIGDIR}/${LANG}/print/</tt>)
-+            which will override the default settings (stored in <tt class="filename">${XPCONFIGDIR}/C/print/</tt>).
-+            If <tt class="envar">${LANG}</tt> is not set &quot;C&quot; is assumed.
-+          </p></dd><dt><span class="term"><tt class="envar">${XPSERVERLIST}</tt></span></dt><dd xmlns:ns7=""><p>The environment variable <tt class="envar">${XPSERVERLIST}</tt> contains a list
-+          of display identifiers (separated by whitespace) which tell an
-+          application where it can find the Xprint servers.  Usually
-+          <tt class="envar">${XPSERVERLIST}</tt> is set by the profile startup scripts (e.g.
-+          <tt class="filename">/etc/profile</tt> or <tt class="filename">/etc/profile.d/xprint.sh</tt>) using the output of
-+          <b class="userinput"><tt>/etc/init.d/xprint get_xpserverlist</tt></b>.</p><p>Example: 
-+          </p><div class="informalexample"><pre class="programlisting">
-+              export XPSERVERLIST=&quot;`/etc/init.d/xprint get_xpserverlist`&quot;</pre></div><p>Alternatively <tt class="envar">${XPSERVERLIST}</tt> can be set
-+          manually. Example:</p><div class="informalexample"><pre class="programlisting">
-+              export XPSERVERLIST=&quot;littlecat:80 bitdog:72&quot;</pre></div><p>
-+          instructs an application to find an Xprint server at display
-+          80 on the machine &quot;littlecat&quot; and at display 72 on the
-+          machine bigdog.
-+        </p></dd><dt><span class="term"><tt class="envar">${XPRINTER}</tt></span></dt><dd xmlns:ns8=""><p>The environment variable <tt class="envar">${XPRINTER}</tt>
-+          defines the default printer used by print
-+          applications. The syntax is either
-+          <i class="replaceable"><tt>printername</tt></i> or
-+          <i class="replaceable"><tt>printername</tt></i>@<i class="replaceable"><tt>display</tt></i>.</p><p>Examples:
-+          </p><div class="variablelist"><dl><dt><span class="term"><b class="userinput"><tt>XPRINTER=ps003</tt></b></span></dt><dd><p>
-+                tells an application to look for the
-+                first printer named &quot;ps003&quot; on all Xprint
-+                servers.</p></dd><dt><span class="term"><b class="userinput"><tt>XPRINTER=hplaser19@littlecat:80</tt></b></span></dt><dd><p>
-+                tells an application to use the printer &quot;hplaser19&quot;
-+              on the Xprint server at display 
-+                &quot;littlecat:80&quot;.</p></dd></dl></div><p>If <tt class="envar">${XPRINTER}</tt> is not set the applications
-+          will examine the values of the <tt class="envar">${PDPRINTER}</tt>,
-+          <tt class="envar">${LPDEST}</tt>, and 
-+          <tt class="envar">${PRINTER}</tt> environment variables (in that order).  
-+        </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2806468"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xprehashprinterlist</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div><div class="refsect1" lang="en"><a name="id2806639"></a><h2>AUTHORS</h2><p>
-+      This manual page was written by 
-+      Roland Mainz <tt class="email">&lt;<a href="mailto:roland.mainz@nrubsig.org">roland.mainz@nrubsig.org</a>&gt;</tt> based on the original X11R6.6
-+      <tt class="filename">xc/programs/Xserver/XpConfig/README</tt>.
-+    </p></div></div></body></html>
-Index: doc/man/general/Xprint.man
-===================================================================
-RCS file: doc/man/general/Xprint.man
-diff -N doc/man/general/Xprint.man
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ doc/man/general/Xprint.man 15 Dec 2004 07:38:28 -0000      1.1.4.1
-@@ -0,0 +1,421 @@
-+.\" -*- coding: us-ascii -*-
-+.TH Xprint __miscmansuffix__ "8 October 2004"  
-+.SH NAME
-+Xprint \- The "X print service" - a portable, network-transparent printing system based on the X11 protocol
-+.SH SYNOPSIS
-+Xprint is a very flexible, extensible, scaleable, client/server
-+print system based on ISO 10175 (and some other specs) and the X11 
-+rendering protocol. 
-+Using Xprint an application can search, query and use devices like 
-+printers, FAX machines or create documents in formats like PDF. 
-+In particular, an application can seek a printer, query supported 
-+attributes (like paper size, trays, fonts etc.), configure the printer 
-+device to match it\(cqs needs and print on it like on any other X device 
-+reusing parts of the code which is used for the video card Xserver. 
-+.SH OVERVIEW
-+The "X Print Service" technology allows X rendering to devices such as
-+printers and fax. Most of the service is available in the X11
-+technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
-+Modifications have also been made to the LessTif/Motif/Qt technology
-+stacks to support Xprint.
-+.PP
-+The Xp portion consists of:
-+.TP 0.2i
-+\(bu
-+Xp Extension for the X-Server (included in the X-Server Xprt)
-+.TP 0.2i
-+\(bu
-+Xp Extension API for the client side (libXp/libXprintUtils)
-+.TP 0.2i
-+\(bu
-+PCL ddx driver that converts core X to native PCL
-+.TP 0.2i
-+\(bu
-+PDF ddx driver that converts core X to native PDF
-+.TP 0.2i
-+\(bu
-+PostScript ddx driver that converts core X to native PostScript
-+.TP 0.2i
-+\(bu
-+Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters
-+.PP
-+.PP
-+From an X clients perspective, it can attach to one of two nearly
-+identical X-Servers, a "Video" X-Server, and a "Print" X-Server
-+which has the additional Xp capability but otherwise looks and
-+behaves the same. 
-+.SH "HOW THE X PRINT SERVICE WORKS"
-+The X Print Service expands on the traditional X-Server and Xlib world
-+in four ways.
-+.TP 0.4i
-+1.
-+Most obvious is the use of "print ddx drivers" instead of
-+"video ddx drivers". While a video ddx driver modifies pixels
-+in a video frame buffer, a print ddx driver generates "page
-+description language (PDL)" output (such as PCL, PDF or PostScript)
-+or sends the print rendering instructions to a platform-specific
-+print API (like Win32/GDI).
-+
-+Once a print ddx driver generates PDL output, it can be sent to
-+a spooler such as \fBlp\fR(1)
-+or retrieved by the client (to implement functionality like "print-to-file").
-+
-+Though not currently done, a single X-Server can support both
-+print and video ddx drivers.
-+.TP 0.4i
-+2.
-+Since printers support "paged" output, unlike video, a portion
-+of the Xp Extension supports APIs to delineate printed output.
-+For example, XpStartPage and XpEndPage tell the X-Server where
-+a physical page starts and ends in an otherwise continuous
-+stream of X rendering primitives. Likewise, XpStartJob and
-+XpEndJob determine when a collection of pages starts and ends.
-+XpEndJob typically causes the generated PDL to be submitted to
-+a spooler, such as \fBlp\fR(1).
-+.TP 0.4i
-+3.
-+Since printers have extensive capabilities, another portion of
-+the Xp Extension supports APIs to manipulate "print contexts".
-+
-+Once a printer is selected using the Xp Extension API, a print
-+context to represent it can be created. A print context
-+embodies the printer selected - it contains the printer's
-+default capabilities, selectable range of capabilities,
-+printer state, and generated output. Some "attributes" within
-+the print context can be modified by the user, and the
-+X-Server and print ddx driver will react accordingly. For
-+example, the attribute "content-orientation" can be set to
-+"landscape" or "portrait" (if the printer supports these 
-+values - which can be queried using the Xprint API as well).
-+.TP 0.4i
-+4.
-+Since printers can have "built in" fonts, the Xp Extension in
-+the X-Server works with the print ddx drivers to make
-+available (for printing only) additional fonts on a per print
-+context basis.
-+
-+When a print context is created and set for a given printer,
-+the X font calls may be able to access additional printer
-+fonts. To do this (typically), the X-Server must have access
-+to "printer metric files" (.pmf) that describe at minimum the
-+metrics of the built in fonts.
-+.PP
-+.SH USAGE
-+There are three tasks to start the X Print Service:
-+.TP 0.4i
-+1.
-+configuring the X Print Server,
-+.TP 0.4i
-+2.
-+starting the X Print Service
-+.TP 0.4i
-+3.
-+configuring the user session so that clients can find the running X Print Service
-+.PP
-+.PP
-+The tasks are described in detail below.
-+.SH "SERVER CONFIGURATION"
-+The X Print Server (Xprt) can read a number of configuration files which
-+control its behavior and support for printers. Each vendor platform has
-+a default location for this information. Xprt can also read the
-+environment variable \fBXPCONFIGDIR\fR to locate alternate configuration
-+directories. Common settings include:
-+
-+export XPCONFIGDIR=/X11/lib/X11/XpConfig/
-+.PP
-+export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/
-+
-+.PP
-+Xprt has many built-in defaults, and lacking any configuration files,
-+will immediately try to support all printers visible via \fBlpstat\fR(1).
-+.PP
-+In order of importance for configuration by a system administrator, the
-+configuration files for a "C" locale are as follows (see \fBXprt\fR(__appmansuffix__) for more
-+details (including support for non-"C" locales)):
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/Xprinters\fR
-+\&'Xprinters' is the top most configuration file. It tells
-+Xprt which specific printer names (e.g. mylaser) should
-+be supported, and whether \fBlpstat\fR(1) or other commands
-+should be used to automatically supplement the list of
-+printers.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/attributes/printer\fR
-+The 'printer' file maps printer names to model
-+configurations (see 'model-config' below). For example,
-+"mylaser" could be mapped to a "HPDJ1600C", and all other
-+arbitrary printers could be mapped to a default, such as
-+"HPLJ4SI". When depending on \fBlpstat\fR(1) in the Xprinters
-+file, setting up defaults in 'printer' becomes all the
-+more important.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/attributes/document\fR
-+The 'document' file specifies the initial document values
-+for any print jobs. For example, which paper tray to
-+use, what default resolution, etc.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/attributes/job\fR
-+The 'job' file specifies the initial job values for any
-+print jobs. For example, "notification-profile" can be
-+set so that when a print job is successfully sent to a
-+printer, e-mail is sent to the user.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/models/PSdefault/model\-config\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf\fR
-+The 'model-config' file has attributes that describe the
-+printer model\(cqs capabilities and default settings.
-+Printer model fonts may also be present. The model-config
-+file also identifies the print ddx driver to be used.
-+For each printer model supported, a complete hierarchy of
-+files should exist. In most cases, these files do not
-+need to be modified.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pcl\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pdf\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/postscript\fR
-+The print ddx drivers can have highly specific
-+configuration files to control their behavior. In most
-+cases, these files do not need to be modified.
-+.PP
-+More information in how to configure and customize the X print server can be found in the
-+\fBXprt\fR(__appmansuffix__)
-+manual page.
-+.SH "STARTING UP"
-+The summary checklist for starting the X Print Service is as follows:
-+.TP 0.4i
-+1.
-+Choose an execution model for the X Print Service. The X
-+Print Service can be run on a per-user session basis, per
-+machine basis, or can be run on a few machines globally
-+available to a number of users.
-+.TP 0.4i
-+2.
-+If print jobs are to be submitted to a spooler (almost always
-+the case), make sure all needed printers are available to the
-+spooler subsystem (most often \fBlp\fR(1))
-+on the same machine running the X Print Service.
-+.TP 0.4i
-+3.
-+Configure the X Print Server. See ``X Print Server
-+Configuration''.
-+.TP 0.4i
-+4.
-+Depending on #1, start the X Print Server process "Xprt", and
-+then the toolkit-specific Print Dialog Manager Daemon process
-+(such as CDEnext's "dtpdmd") at the appropriate times.
-+Note that libXprintUtils-based applications/toolkits do not need
-+a Print Dialog Manager Daemon process to use Xprint.
-+.PP
-+The details are described below.
-+.PP
-+Because the X Print Service is based on X, it can be easily distributed.
-+The most significant factors in which execution model to choose will be
-+driven by:
-+.TP 0.2i
-+\(bu
-+how many printers will be accessable through the printer
-+subsystem on any given machine. A system administrator may
-+choose to cluster printers on a few given machines, or
-+scatter them across an organization and possibly make
-+extensive use of remote spoolers to make them globally
-+available.
-+.TP 0.2i
-+\(bu
-+how many machines will need a copy of the X Print Server
-+configuration files. The files have been architected so
-+that one super-set version of them can be maintained and
-+distributed (e.g. via NFS), and a per-machine or per-user
-+version of the `Xprinters' is all that is needed to have the
-+appropriate information in them utilized or ignored.
-+.TP 0.2i
-+\(bu
-+how many users can demand services from a given X Print
-+Service.
-+.PP
-+With the above in mind, some obvious execution models include:
-+.TP 0.2i
-+\(bu
-+Global - in this model, the system administrator is choosing
-+to run the X Print Service on a *few* select machines with
-+appropriate printers configured, and allow clients access to
-+the global resource. This can centralize the administration
-+of printers and configuration files, but may have to be
-+monitored for performance loading.
-+
-+Startup would likely be done by boot-up scripts (such as \fB/etc/init.d/xprint\fR).
-+.TP 0.2i
-+\(bu
-+Per-machine - every machine with potential X Print Service
-+users would run the service. Printer and configuration file
-+administration is decentralized, and usage would be limited
-+to the users on the machine.
-+
-+Startup would likely be done by boot-up scripts (such as \fB/etc/init.d/xprint\fR).
-+.TP 0.2i
-+\(bu
-+Per-user session - every user would run an entire X Print
-+Service for themselves. In the future, the Video X Server
-+normally started may contain Print X Server capability, so
-+this model becomes very natural.
-+
-+Startup would likely be done at session login or by
-+launching actions or processes manually once the user
-+logs in. Note: Deamons like "dtpdmd" must be started after Xprt.
-+.PP
-+.PP
-+Starting of the processes is straight forward. In strict order (example is for manually starting the X print server for CDEnext usage):
-+.TP 0.4i
-+1.
-+
-+.nf
-+[machineA] % Xprt [\-XpFile <Xprinters file>] [:dispNum] &
-+.fi
-+
-+
-+Note that Xprt will look for configuration files in either
-+a default location or where \fBXPCONFIGDIR\fR points.
-+
-+\fB\-XpFile\fR specifies an alternate `Xprinters' file, rather
-+than the default one or `\fB${XPCONFIGDIR}/C/print/Xprinters\fR'.
-+.TP 0.4i
-+2.
-+
-+.nf
-+[machineA] % dtpdmd \-d machineA[:dispNum] [\-l /tmp/dtpdmd.log] &
-+.fi
-+
-+
-+The dtpdmd will maintain an X-Selection on the X-Server,
-+and will start dtpdm's as required to service requests.
-+.PP
-+.PP
-+In all but the per-user session model, the machine running the dtpdmd
-+(thus dtpdm's) will need display authorization to the users video
-+display.
-+.SH "CLIENT CONFIGURATION"
-+Once a X Print Server and dtpdmd have been started -- many of them
-+in some cases -- clients will need to find and use them. There are
-+two mechanisms that allow clients to discover X Print Servers and
-+printers.
-+.TP 0.2i
-+\(bu
-+"X Print Specifier" - assuming usage of the DtPrint/XprintUtils-based print
-+applications, the following notation is understood:
-+
-+
-+.nf
-+printer_name@machine[:dispNum]
-+.fi
-+
-+
-+For example:
-+
-+
-+.nf
-+colorlj7@printhub:2
-+.fi
-+
-+
-+In the above example, the X Print Server running at `printhub:2'
-+is assumed to support the printer named `colorlj7'.
-+.TP 0.2i
-+\(bu
-+\fB${XPSERVERLIST}\fR - assuming usage of the DtPrint print dialogs,
-+the environment variable \fB${XPSERVERLIST}\fR can contain a list
-+of X Print Servers. For example:
-+
-+
-+.nf
-+XPSERVERLIST="printhub:2 printhub:3 otherdept:0"
-+.fi
-+
-+
-+Then in the dialogs, only a printer name needs to be entered.
-+The dialog will then search the X Print Servers in \fB${XPSERVERLIST}\fR
-+for a server than supports the printer, and then establish
-+contact.
-+.PP
-+.SH "END-USER SEQUENCE"
-+From most CDEnext applications, printing is accomplished by bringing
-+down the <File> menu and selecting <Print...>. This will result in
-+the DtPrintSetupBox dialog, which will request the name of a printer,
-+and offer limited capability to configure print options (e.g. number
-+of copies). If the user wishes, they can select <Setup...>, which
-+will start a dtpdm capable of modifying additional print options.
-+Finally, the user should select <Print>.
-+.SH ENVIRONMENT
-+.TP 
-+\fB${XPCONFIGDIR}\fR
-+This environment variable points to the root
-+of the Xprint server configuration directory hierarchy.
-+If the variable is not defined, the default
-+path is be assumed. The default path may be
-+\fB/usr/X11R6/lib/X11/xserver/\fR, 
-+\fB/usr/lib/X11/xserver/\fR,
-+\fB/usr/share/Xprint/xserver/\fR or
-+\fB/usr/openwin/server/etc/XpConfig\fR, depending on the
-+system, and may be configured in \fB/etc/init.d/xprint\fR.
-+.TP 
-+\fB${LANG}\fR
-+This environment variable selects the locale settings used by the Xprint server.
-+Xprt allows language-specific settings (stored in \fB${XPCONFIGDIR}/${LANG}/print/\fR)
-+which will override the default settings (stored in \fB${XPCONFIGDIR}/C/print/\fR).
-+If \fB${LANG}\fR is not set "C" is assumed.
-+.TP 
-+\fB${XPSERVERLIST}\fR
-+The environment variable \fB${XPSERVERLIST}\fR contains a list
-+of display identifiers (separated by whitespace) which tell an
-+application where it can find the Xprint servers. Usually
-+\fB${XPSERVERLIST}\fR is set by the profile startup scripts (e.g.
-+\fB/etc/profile\fR or \fB/etc/profile.d/xprint.sh\fR) using the output of
-+\fB/etc/init.d/xprint get_xpserverlist\fR.
-+
-+Example: 
-+
-+.nf
-+
-+              export XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
-+.fi
-+
-+
-+Alternatively \fB${XPSERVERLIST}\fR can be set
-+manually. Example:
-+
-+.nf
-+
-+              export XPSERVERLIST="littlecat:80 bitdog:72"
-+.fi
-+
-+instructs an application to find an Xprint server at display
-+80 on the machine "littlecat" and at display 72 on the
-+machine bigdog.
-+.TP 
-+\fB${XPRINTER}\fR 
-+The environment variable \fB${XPRINTER}\fR
-+defines the default printer used by print
-+applications. The syntax is either
-+\fIprintername\fR or
-+\fIprintername\fR@\fIdisplay\fR.
-+
-+Examples:
-+.RS 
-+.TP 
-+\fBXPRINTER=ps003\fR
-+tells an application to look for the
-+first printer named "ps003" on all Xprint
-+servers.
-+.TP 
-+\fBXPRINTER=hplaser19@littlecat:80\fR
-+tells an application to use the printer "hplaser19"
-+on the Xprint server at display 
-+"littlecat:80".
-+.RE
-+
-+
-+If \fB${XPRINTER}\fR is not set the applications
-+will examine the values of the \fB${PDPRINTER}\fR,
-+\fB${LPDEST}\fR, and 
-+\fB${PRINTER}\fR environment variables (in that order). 
-+.SH "SEE ALSO"
-+\fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxprehashprinterlist\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-+.SH AUTHORS
-+This manual page was written by 
-+Roland Mainz <roland.mainz@nrubsig.org> based on the original X11R6.6
-+\fBxc/programs/Xserver/XpConfig/README\fR.
-Index: doc/man/general/Xprint.sgml
-===================================================================
-RCS file: doc/man/general/Xprint.sgml
-diff -N doc/man/general/Xprint.sgml
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ doc/man/general/Xprint.sgml        15 Dec 2004 07:38:28 -0000      1.1.4.1
-@@ -0,0 +1,627 @@
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
-+
-+<!-- Process this file with docbook-to-man to generate an nroff manual
-+     page: 'docbook-to-man manpage.sgml > manpage.1'.  You may view
-+     the manual page with: 'docbook-to-man manpage.sgml | nroff -man | less'. 
-+     A typical entry in a Makefile or Makefile.am is:
-+
-+manpage.1: manpage.sgml
-+      docbook-to-man $< > $@
-+
-+HTML generation can be done like this:
-+% xsltproc ==docbook /usr/share/sgml/docbook/docbook-xsl-stylesheets-1.60.1/html/docbook.xsl Xprint.sgml >Xprint.html
-+  -->
-+
-+<refentry id="Xprint">
-+  <refmeta>
-+    <refentrytitle>Xprint</refentrytitle>
-+    <manvolnum>__miscmansuffix__</manvolnum>
-+  </refmeta>
-+  <refnamediv>
-+    <refname>Xprint</refname>
-+
-+    <refpurpose>The "X print service" - a portable, network-transparent printing system based on the X11 protocol</refpurpose>
-+  </refnamediv>
-+  <refsynopsisdiv>
-+    <para>Xprint is a very flexible, extensible, scaleable, client/server
-+     print system based on ISO 10175 (and some other specs) and the X11        
-+     rendering protocol.                                                       
-+     Using Xprint an application can search, query and use devices like        
-+     printers, FAX machines or create documents in formats like PDF.           
-+     In particular, an application can seek a printer, query supported         
-+     attributes (like paper size, trays, fonts etc.), configure the printer    
-+     device to match it&rsquo;s needs and print on it like on any other X device     
-+     reusing parts of the code which is used for the video card Xserver.    
-+    </para>
-+  </refsynopsisdiv>
-+  
-+  <refsect1>
-+    <title>OVERVIEW</title>
-+    <para>
-+      The "X Print Service" technology allows X rendering to devices such as
-+      printers and fax.  Most of the service is available in the X11
-+      technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
-+      Modifications have also been made to the LessTif/Motif/Qt technology
-+      stacks to support Xprint.
-+    </para>
-+    <para>
-+      The Xp portion consists of:
-+      <itemizedlist>
-+        <listitem><para>Xp Extension for the X-Server (included in the X-Server Xprt)</para></listitem>
-+        <listitem><para>Xp Extension API for the client side (libXp/libXprintUtils)</para></listitem>
-+        <listitem><para>PCL ddx driver that converts core X to native PCL</para></listitem>
-+        <listitem><para>PDF ddx driver that converts core X to native PDF</para></listitem>
-+        <listitem><para>PostScript ddx driver that converts core X to native PostScript</para></listitem>
-+        <listitem><para>Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters</para></listitem>
-+      </itemizedlist>
-+    </para>
-+    <para>
-+      From an X clients perspective, it can attach to one of two nearly
-+      identical X-Servers, a "Video" X-Server, and a "Print" X-Server
-+      which has the additional Xp capability but otherwise looks and
-+      behaves the same.   
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>HOW THE X PRINT SERVICE WORKS</title>
-+    <para>    
-+      The X Print Service expands on the traditional X-Server and Xlib world
-+      in four ways.
-+
-+      <orderedlist>
-+        <listitem>
-+          <para>
-+            Most obvious is the use of "print ddx drivers" instead of
-+            "video ddx drivers".  While a video ddx driver modifies pixels
-+            in a video frame buffer, a print ddx driver generates "page
-+            description language (PDL)" output (such as PCL, PDF or PostScript)
-+            or sends the print rendering instructions to a platform-specific
-+            print API (like Win32/GDI).
-+          </para>
-+          <para>
-+            Once a print ddx driver generates PDL output, it can be sent to
-+            a spooler such as <citerefentry><refentrytitle>lp</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-+            or retrieved by the client (to implement functionality like "print-to-file").
-+          </para>
-+          <para>
-+            Though not currently done, a single X-Server can support both
-+            print and video ddx drivers.
-+            <!-- FIXME: IBM/AIX people have integrated Xprt into their main Xserver (currently experimental) ... -->
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            Since printers support "paged" output, unlike video, a portion
-+            of the Xp Extension supports APIs to delineate printed output.
-+            For example, <function>XpStartPage</function> and <function>XpEndPage</function> tell the X-Server where
-+            a physical page starts and ends in an otherwise continuous
-+            stream of X rendering primitives.  Likewise, <function>XpStartJob</function> and
-+            <function>XpEndJob</function> determine when a collection of pages starts and ends.
-+            <function>XpEndJob</function> typically causes the generated PDL to be submitted to
-+            a spooler, such as <citerefentry><refentrytitle>lp</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            Since printers have extensive capabilities, another portion of
-+            the Xp Extension supports APIs to manipulate "print contexts".
-+          </para>
-+          <para>
-+            Once a printer is selected using the Xp Extension API, a print
-+            context to represent it can be created.  A print context
-+            embodies the printer selected - it contains the printer's
-+            default capabilities, selectable range of capabilities,
-+            printer state, and generated output.  Some "attributes" within
-+            the print context can be modified by the user, and the
-+            X-Server and print ddx driver will react accordingly.  For
-+            example, the attribute "content-orientation" can be set to
-+            "landscape" or "portrait" (if the printer supports these 
-+            values - which can be queried using the Xprint API as well).
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            Since printers can have "built in" fonts, the Xp Extension in
-+            the X-Server works with the print ddx drivers to make
-+            available (for printing only) additional fonts on a per print
-+            context basis.
-+          </para>
-+          <para>
-+            When a print context is created and set for a given printer,
-+            the X font calls may be able to access additional printer
-+            fonts.  To do this (typically), the X-Server must have access
-+            to "printer metric files" (.pmf) that describe at minimum the
-+            metrics of the built in fonts.
-+          </para>
-+        </listitem>
-+      </orderedlist>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>USAGE</title>
-+    <para>    
-+      There are three tasks to start the X Print Service:
-+      <orderedlist>
-+        <listitem><para>configuring the X Print Server,</para></listitem>
-+        <listitem><para>starting the X Print Service</para></listitem>
-+        <listitem><para>configuring the user session so that clients can find the running X Print Service</para></listitem>
-+      </orderedlist>
-+    </para>
-+    <para>
-+      The tasks are described in detail below.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>SERVER CONFIGURATION</title>
-+    <para>
-+      The X Print Server (Xprt) can read a number of configuration files which
-+      control its behavior and support for printers.  Each vendor platform has
-+      a default location for this information.  Xprt can also read the
-+      environment variable <envar>XPCONFIGDIR</envar> to locate alternate configuration
-+      directories.  Common settings include:
-+
-+      <simplelist type="vert">
-+        <member>export XPCONFIGDIR=/X11/lib/X11/XpConfig/</member>
-+        <member>export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/</member>
-+      </simplelist>
-+    </para>
-+    <para>
-+      Xprt has many built-in defaults, and lacking any configuration files,
-+      will immediately try to support all printers visible via <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
-+    </para>
-+    <para>
-+      In order of importance for configuration by a system administrator, the
-+      configuration files for a "C" locale are as follows (see <citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry> for more
-+      details (including support for non-"C" locales)):
-+      <variablelist>
-+        <varlistentry>
-+          <term><filename>${XPCONFIGDIR}/C/print/Xprinters</filename></term>
-+          <listitem>
-+            <para>
-+              'Xprinters' is the top most configuration file.  It tells
-+              Xprt which specific printer names (e.g.  mylaser) should
-+              be supported, and whether <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> or other commands
-+              should be used to automatically supplement the list of
-+              printers.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+
-+        <varlistentry>
-+          <term><filename>${XPCONFIGDIR}/C/print/attributes/printer</filename></term>
-+          <listitem>
-+            <para>
-+              The 'printer' file maps printer names to model
-+              configurations (see 'model-config' below).  For example,
-+              "mylaser" could be mapped to a "HPDJ1600C", and all other
-+              arbitrary printers could be mapped to a default, such as
-+              "HPLJ4SI".  When depending on <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> in the Xprinters
-+              file, setting up defaults in 'printer' becomes all the
-+              more important.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+
-+        <varlistentry>
-+          <term><filename>${XPCONFIGDIR}/C/print/attributes/document</filename></term>
-+          <listitem>
-+            <para>
-+              The 'document' file specifies the initial document values
-+              for any print jobs.  For example, which paper tray to
-+              use, what default resolution, etc.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+
-+        <varlistentry>
-+          <term><filename>${XPCONFIGDIR}/C/print/attributes/job</filename></term>
-+          <listitem>
-+            <para>
-+              The 'job' file specifies the initial job values for any
-+              print jobs.  For example, "notification-profile" can be
-+              set so that when a print job is successfully sent to a
-+              printer, e-mail is sent to the user.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+
-+        <varlistentry>
-+          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/model-config</filename></term>
-+          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</filename></term>
-+          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</filename></term>
-+          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</filename></term>
-+
-+          <listitem>
-+            <para>
-+              The 'model-config' file has attributes that describe the
-+              printer model&rsquo;s capabilities and default settings.
-+              Printer model fonts may also be present.  The model-config
-+              file also identifies the print ddx driver to be used.
-+
-+              For each printer model supported, a complete hierarchy of
-+              files should exist.  In most cases, these files do not
-+              need to be modified.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+
-+        <varlistentry>
-+          <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</filename></term>
-+          <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</filename></term>
-+          <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</filename></term>
-+
-+          <listitem>
-+            <para>
-+              The print ddx drivers can have highly specific
-+              configuration files to control their behavior.  In most
-+              cases, these files do not need to be modified.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+      </variablelist>
-+      
-+      More information in how to configure and customize the X print server can be found in the
-+      <citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry>
-+      manual page.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>STARTING UP</title>
-+    <para>
-+      The summary checklist for starting the X Print Service is as follows:
-+      
-+      <orderedlist>
-+        <listitem>
-+          <para>
-+            Choose an execution model for the X Print Service.  The X
-+            Print Service can be run on a per-user session basis, per
-+            machine basis, or can be run on a few machines globally
-+            available to a number of users.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            If print jobs are to be submitted to a spooler (almost always
-+            the case), make sure all needed printers are available to the
-+            spooler subsystem (most often <citerefentry><refentrytitle>lp</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
-+            on the same machine running the X Print Service.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            Configure the X Print Server.  See ``X Print Server
-+            Configuration''.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            Depending on #1, start the X Print Server process "Xprt", and
-+            then the toolkit-specific Print Dialog Manager Daemon process
-+            (such as CDEnext's "dtpdmd") at the appropriate times.
-+            Note that libXprintUtils-based applications/toolkits do not need
-+            a Print Dialog Manager Daemon process to use Xprint.
-+          </para>
-+        </listitem>
-+      </orderedlist>     
-+      The details are described below.
-+    </para>
-+    <para>
-+      Because the X Print Service is based on X, it can be easily distributed.
-+      The most significant factors in which execution model to choose will be
-+      driven by:
-+      <itemizedlist>
-+        <listitem>
-+          <para>
-+            how many printers will be accessable through the printer
-+            subsystem on any given machine.  A system administrator may
-+            choose to cluster printers on a few given machines, or
-+            scatter them across an organization and possibly make
-+            extensive use of remote spoolers to make them globally
-+            available.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            how many machines will need a copy of the X Print Server
-+            configuration files.  The files have been architected so
-+            that one super-set version of them can be maintained and
-+            distributed (e.g.  via NFS), and a per-machine or per-user
-+            version of the `Xprinters' is all that is needed to have the
-+            appropriate information in them utilized or ignored.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            how many users can demand services from a given X Print
-+            Service.
-+          </para>
-+        </listitem>
-+      </itemizedlist>
-+
-+      With the above in mind, some obvious execution models include:
-+      <itemizedlist>
-+        <listitem>
-+          <para>
-+            Global - in this model, the system administrator is choosing
-+            to run the X Print Service on a *few* select machines with
-+            appropriate printers configured, and allow clients access to
-+            the global resource.  This can centralize the administration
-+            of printers and configuration files, but may have to be
-+            monitored for performance loading.
-+          </para>
-+          <para>
-+            Startup would likely be done by boot-up scripts (such as <filename>/etc/init.d/xprint</filename>).
-+          </para>
-+        </listitem>
-+
-+        <listitem>
-+          <para>
-+            Per-machine - every machine with potential X Print Service
-+            users would run the service.  Printer and configuration file
-+            administration is decentralized, and usage would be limited
-+            to the users on the machine.
-+          </para>
-+          <para>
-+            Startup would likely be done by boot-up scripts (such as <filename>/etc/init.d/xprint</filename>).
-+          </para>
-+        </listitem>
-+
-+        <listitem>
-+          <para>
-+            Per-user session - every user would run an entire X Print
-+            Service for themselves.  In the future, the Video X Server
-+            normally started may contain Print X Server capability, so
-+            this model becomes very natural.
-+          </para>
-+          <para>
-+            Startup would likely be done at session login or by
-+            launching actions or processes manually once the user
-+            logs in.  Note: Deamons like "dtpdmd" must be started after Xprt.
-+          </para>
-+        </listitem>
-+      </itemizedlist>
-+     </para>
-+     <para>
-+       Starting of the processes is straight forward.  In strict order (example is for manually starting the X print server for CDEnext usage):
-+       <orderedlist>
-+         <listitem>
-+           <para>
-+             <programlisting>[machineA] % Xprt [-XpFile &lt;Xprinters file&gt;] [:dispNum] &amp;</programlisting>
-+           </para>
-+           <para>
-+             Note that Xprt will look for configuration files in either
-+             a default location or where <envar>XPCONFIGDIR</envar> points.
-+           </para>
-+           <para>
-+             <option>-XpFile</option> specifies an alternate `Xprinters' file, rather
-+             than the default one or `<filename>${XPCONFIGDIR}/C/print/Xprinters</filename>'.
-+           </para>
-+         </listitem>
-+         <listitem>
-+           <para>
-+             <programlisting>[machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] &amp;</programlisting>
-+           </para>
-+           <para>
-+            The dtpdmd will maintain an X-Selection on the X-Server,
-+            and will start dtpdm's as required to service requests.
-+           </para>
-+         </listitem>
-+       </orderedlist>
-+     </para>
-+     <para>
-+       In all but the per-user session model, the machine running the dtpdmd
-+       (thus dtpdm's) will need display authorization to the users video
-+       display.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>CLIENT CONFIGURATION</title>
-+    <para>
-+      Once a X Print Server and dtpdmd have been started -- many of them
-+      in some cases -- clients will need to find and use them.  There are
-+      two mechanisms that allow clients to discover X Print Servers and
-+      printers.
-+
-+      <itemizedlist>
-+        <listitem>
-+          <para>
-+            "X Print Specifier" - assuming usage of the DtPrint/XprintUtils-based print
-+            applications, the following notation is understood:
-+          </para>
-+          <para>
-+            <programlisting>printer_name@machine[:dispNum]</programlisting>
-+          </para>
-+          <para>
-+            For example:
-+          </para>
-+          <para>
-+            <programlisting>colorlj7@printhub:2</programlisting>
-+          </para>
-+          <para>
-+           In the above example, the X Print Server running at `printhub:2'
-+           is assumed to support the printer named `colorlj7'.
-+          </para>
-+        </listitem>
-+        <listitem>
-+          <para>
-+            <envar>${XPSERVERLIST}</envar> - assuming usage of the DtPrint print dialogs,
-+            the environment variable <envar>${XPSERVERLIST}</envar> can contain a list
-+            of X Print Servers.  For example:
-+          </para>
-+          <para>
-+            <programlisting>XPSERVERLIST="printhub:2 printhub:3 otherdept:0"</programlisting>
-+          </para>
-+          <para>
-+            Then in the dialogs, only a printer name needs to be entered.
-+            The dialog will then search the X Print Servers in <envar>${XPSERVERLIST}</envar>
-+            for a server than supports the printer, and then establish
-+            contact.
-+          </para>
-+        </listitem>
-+      </itemizedlist>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>END-USER SEQUENCE</title>
-+    <para>
-+      From most CDEnext applications, printing is accomplished by bringing
-+      down the &lt;File&gt; menu and selecting &lt;Print...&gt;.  This will result in
-+      the DtPrintSetupBox dialog, which will request the name of a printer,
-+      and offer limited capability to configure print options (e.g. number
-+      of copies).  If the user wishes, they can select &lt;Setup...&gt;, which
-+      will start a dtpdm capable of modifying additional print options.
-+      Finally, the user should select &lt;Print&gt;.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>ENVIRONMENT</title>
-+    <variablelist>
-+      <varlistentry>
-+        <term><envar>${XPCONFIGDIR}</envar></term>
-+        <listitem>
-+          <para> This environment variable points to the  root
-+          of  the Xprint server configuration directory hierarchy.
-+          If the variable is not defined,  the  default
-+          path  is be assumed.  The default path may be
-+            <filename>/usr/X11R6/lib/X11/xserver/</filename>, 
-+            <filename>/usr/lib/X11/xserver/</filename>,
-+            <filename>/usr/share/Xprint/xserver/</filename> or
-+            <filename>/usr/openwin/server/etc/XpConfig</filename>, depending on the
-+          system, and may be configured in <filename>/etc/init.d/xprint</filename>.</para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><envar>${LANG}</envar></term>
-+        <listitem>
-+          <para>
-+            This environment variable selects the locale settings used by the Xprint server.
-+            Xprt allows language-specific settings (stored in <filename>${XPCONFIGDIR}/${LANG}/print/</filename>)
-+            which will override the default settings (stored in <filename>${XPCONFIGDIR}/C/print/</filename>).
-+            If <envar>${LANG}</envar> is not set "C" is assumed.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+      
-+      <varlistentry>
-+        <term><envar>${XPSERVERLIST}</envar></term>
-+        <listitem>
-+          <para>The environment variable <envar>${XPSERVERLIST}</envar> contains a list
-+          of display identifiers (separated by whitespace) which tell an
-+          application where it can find the Xprint servers.  Usually
-+          <envar>${XPSERVERLIST}</envar> is set by the profile startup scripts (e.g.
-+          <filename>/etc/profile</filename> or <filename>/etc/profile.d/xprint.sh</filename>) using the output of
-+          <userinput>/etc/init.d/xprint get_xpserverlist</userinput>.</para>
-+        <para>Example: 
-+          <informalexample>
-+            <programlisting>
-+              export XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"</programlisting>
-+          </informalexample>
-+        </para>
-+        <para>Alternatively <envar>${XPSERVERLIST}</envar> can be set
-+          manually. Example:</para>
-+          <informalexample>
-+            <programlisting>
-+              export XPSERVERLIST="littlecat:80 bitdog:72"</programlisting>
-+          </informalexample>
-+        <para>
-+          instructs an application to find an Xprint server at display
-+          80 on the machine "littlecat" and at display 72 on the
-+          machine bigdog.
-+        </para>
-+      </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><envar>${XPRINTER}</envar>
-+        </term>
-+        <listitem>
-+          <para>The environment variable <envar>${XPRINTER}</envar>
-+          defines the default printer used by print
-+          applications. The syntax is either
-+          <replaceable>printername</replaceable> or
-+          <replaceable>printername</replaceable>@<replaceable>display</replaceable>.</para>
-+          <para>Examples:
-+          <variablelist>
-+            <varlistentry>
-+              <term><userinput>XPRINTER=ps003</userinput></term>
-+              <listitem><para>
-+                tells an application to look for the
-+                first printer named "ps003" on all Xprint
-+                servers.</para>
-+              </listitem>
-+            </varlistentry>
-+      
-+            <varlistentry>
-+              <!-- brain dead <term> does not permit quote marks
-+              (in XPRINTER="hplaser19@littlecat:80"), so omit them -->
-+              <term><userinput>XPRINTER=hplaser19@littlecat:80</userinput></term>
-+              <listitem><para>
-+                tells an application to use the printer "hplaser19"
-+              on the Xprint server at display 
-+                "littlecat:80".</para>
-+            </listitem>
-+            </varlistentry>
-+
-+          </variablelist>
-+        </para>
-+        <para>If <envar>${XPRINTER}</envar> is not set the applications
-+          will examine the values of the <envar>${PDPRINTER}</envar>,
-+          <envar>${LPDEST}</envar>, and 
-+          <envar>${PRINTER}</envar> environment variables (in that order).  
-+        </para>
-+        </listitem>
-+      </varlistentry>
-+    </variablelist>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>SEE ALSO</title>
-+    <para>
-+      <simplelist type="inline">
-+        <!-- specific references -->
-+        <!-- none -->
-+        
-+        <!-- Xprint general references -->
-+<!--
-+        <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-+-->
-+        <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-+        <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>libXprintAppUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>XmPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>XawPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member>Xprint FAQ (<ulink url="http://xprint.mozdev.org/docs/Xprint_FAQ.html">http://xprint.mozdev.org/docs/Xprint_FAQ.html</ulink>)</member>
-+        <member>Xprint main site (<ulink url="http://xprint.mozdev.org/">http://xprint.mozdev.org/</ulink>)</member>
-+      </simplelist>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>AUTHORS</title>
-+    <para>
-+      This manual page was written by 
-+      Roland Mainz <email>roland.mainz@nrubsig.org</email> based on the original X11R6.6
-+      <filename>xc/programs/Xserver/XpConfig/README</filename>.
-+    </para>
-+  </refsect1>
-+</refentry>
-+
-Index: extras/Mesa/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/Makefile,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/Makefile       28 Aug 2004 04:26:58 -0000      1.1.1.3
-+++ extras/Mesa/Makefile       15 Dec 2004 01:50:55 -0000      1.1.1.3.2.1
-@@ -45,17 +45,22 @@
- # Rules to set/install a specific build configuration
- aix \
-+aix-64 \
- aix-gcc \
- aix-static \
- beos \
- darwin \
- darwin-static \
- freebsd \
-+freebsd-dri \
-+freebsd-dri-x86 \
- hpux10 \
- hpux10-gcc \
- hpux10-static \
-+hpux11-32 \
- hpux11-32-static \
- hpux11-32-static-nothreads \
-+hpux11-64 \
- hpux11-64-static \
- hpux9 \
- hpux9-gcc \
-@@ -81,6 +86,7 @@
- linux-ppc \
- linux-ppc-static \
- linux-solo \
-+linux-solo-x86 \
- linux-solo-ia64 \
- linux-sparc \
- linux-sparc5 \
-@@ -111,9 +117,9 @@
- # Rules for making release tarballs
--DIRECTORY = Mesa-6.1
--LIB_NAME = MesaLib-6.1
--DEMO_NAME = MesaDemos-6.1
-+DIRECTORY = Mesa-6.2.1
-+LIB_NAME = MesaLib-6.2.1
-+DEMO_NAME = MesaDemos-6.2.1
- LIB_FILES =   \
-       $(DIRECTORY)/Makefile*                                          \
-@@ -121,6 +127,7 @@
-       $(DIRECTORY)/mms-config.                                        \
-       $(DIRECTORY)/Mesa.dsw                                           \
-       $(DIRECTORY)/bin/mklib                                          \
-+      $(DIRECTORY)/bin/installmesa                                    \
-       $(DIRECTORY)/configs/[a-z]*                                     \
-       $(DIRECTORY)/docs/*.html                                        \
-       $(DIRECTORY)/docs/COPYING                                       \
-@@ -186,7 +193,6 @@
-       $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch]                         \
-       $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm                      \
-       $(DIRECTORY)/src/mesa/drivers/beos/*.cpp                        \
--      $(DIRECTORY)/src/mesa/drivers/beos/*.h                          \
-       $(DIRECTORY)/src/mesa/drivers/beos/Makefile                     \
-       $(DIRECTORY)/src/mesa/drivers/common/*.[ch]                     \
-       $(DIRECTORY)/src/mesa/drivers/common/descrip.mms                \
-@@ -249,6 +255,7 @@
-       $(DIRECTORY)/src/glw/*.[ch]                                     \
-       $(DIRECTORY)/src/glw/Makefile*                                  \
-       $(DIRECTORY)/src/glw/README                                     \
-+      $(DIRECTORY)/src/glw/depend                                     \
-       $(DIRECTORY)/progs/Makefile                                     \
-       $(DIRECTORY)/progs/util/README                                  \
-       $(DIRECTORY)/progs/util/*.[ch]                                  \
-@@ -274,6 +281,8 @@
-       $(DIRECTORY)/src/glut/dos/*.[ch]                \
-       $(DIRECTORY)/src/glut/dos/Makefile.DJ           \
-       $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS]         \
-+      $(DIRECTORY)/src/glut/ggi/*.[ch]                \
-+      $(DIRECTORY)/src/glut/ggi/Makefile              \
-       $(DIRECTORY)/progs/beos/*.cpp                   \
-       $(DIRECTORY)/progs/beos/Makefile                \
-       $(DIRECTORY)/progs/images/*.rgb                 \
-@@ -301,6 +310,26 @@
-       $(DIRECTORY)/progs/ggi/*.c
-+DRI_FILES = \
-+      $(DIRECTORY)/src/glx/Makefile                                   \
-+      $(DIRECTORY)/src/glx/mini/*.[ch]                                \
-+      $(DIRECTORY)/src/glx/mini/example.miniglx.conf                  \
-+      $(DIRECTORY)/src/glx/mini/NOTES                                 \
-+      $(DIRECTORY)/src/mesa/drivers/dri/Makefile                      \
-+      $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template             \
-+      $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch]                 \
-+      $(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h        \
-+      $(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch]                      \
-+      $(DIRECTORY)/src/mesa/drivers/dri/*/depend                      \
-+      $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile                    \
-+      $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile                    \
-+      $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
-+
-+
-+# Everything for new a Mesa release:
-+tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
-+
-+
- lib_gz:
-       rm -f configs/current ; \
-       cd .. ; \
-@@ -347,6 +376,3 @@
-       @-md5sum $(DEMO_NAME).tar.gz
-       @-md5sum $(DEMO_NAME).tar.bz2
-       @-md5sum $(DEMO_NAME).zip
--
--# Everything for new a Mesa release:
--tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
-Index: extras/Mesa/Makefile.mgw
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/Makefile.mgw,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/Makefile.mgw   16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/Makefile.mgw   15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -40,6 +40,9 @@
- #                     As a consequence, you'll need the Win32 Glide3
- #                     library to build any application.
- #                     default = no
-+#     ICD=1           build the installable client driver interface
-+#                     (windows opengl driver interface)
-+#                     default = no
- #     X86=1           optimize for x86 (if possible, use MMX, SSE, 3DNow).
- #                     default = no
- #
-@@ -56,7 +59,13 @@
- CPU ?= pentium
--CFLAGS = -Wall -W -pedantic
-+ifeq ($(ICD),1)
-+  # when -std=c99 mingw will not define WIN32
-+  CFLAGS = -Wall -W -Werror
-+else
-+  # I love c89
-+  CFLAGS = -Wall -W -pedantic
-+endif
- CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
- export CFLAGS
-Index: extras/Mesa/Mesa.dsw
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/Mesa.dsw,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/Mesa.dsw       28 Aug 2004 04:26:58 -0000      1.1.1.2
-+++ extras/Mesa/Mesa.dsw       15 Dec 2004 01:50:55 -0000      1.1.1.2.2.1
-@@ -3,7 +3,7 @@
\r
- ###############################################################################\r
\r
--Project: "array_cache"=.\SRC\MESA\array_cache\array_cache.dsp - Package Owner=<4>\r
-+Project: "array_cache"=".\SRC\MESA\array_cache\array_cache.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -15,7 +15,7 @@
\r
- ###############################################################################\r
\r
--Project: "gdi"=.\src\mesa\drivers\windows\gdi\gdi.dsp - Package Owner=<4>\r
-+Project: "gdi"=".\src\mesa\drivers\windows\gdi\gdi.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -51,7 +51,7 @@
\r
- ###############################################################################\r
\r
--Project: "glapi"=.\SRC\MESA\glapi\glapi.dsp - Package Owner=<4>\r
-+Project: "glapi"=".\SRC\MESA\glapi\glapi.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -63,7 +63,7 @@
\r
- ###############################################################################\r
\r
--Project: "glu"=.\src\glu\sgi\glu.dsp - Package Owner=<4>\r
-+Project: "glu"=".\src\glu\sgi\glu.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -78,22 +78,7 @@
\r
- ###############################################################################\r
\r
--Project: "glut"=.\src\glut\glx\glut.dsp - Package Owner=<4>\r
--\r
--Package=<5>\r
--{{{\r
--}}}\r
--\r
--Package=<4>\r
--{{{\r
--    Begin Project Dependency\r
--    Project_Dep_Name glu\r
--    End Project Dependency\r
--}}}\r
--\r
--###############################################################################\r
--\r
--Project: "main"=.\SRC\MESA\main\main.dsp - Package Owner=<4>\r
-+Project: "main"=".\SRC\MESA\main\main.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -105,7 +90,7 @@
\r
- ###############################################################################\r
\r
--Project: "math"=.\SRC\MESA\math\math.dsp - Package Owner=<4>\r
-+Project: "math"=".\SRC\MESA\math\math.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -117,7 +102,7 @@
\r
- ###############################################################################\r
\r
--Project: "osmesa"=.\SRC\MESA\DRIVERS\osmesa\osmesa.dsp - Package Owner=<4>\r
-+Project: "osmesa"=".\SRC\MESA\DRIVERS\osmesa\osmesa.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -132,7 +117,7 @@
\r
- ###############################################################################\r
\r
--Project: "shader"=.\SRC\MESA\shader\shader.dsp - Package Owner=<4>\r
-+Project: "shader"=".\SRC\MESA\shader\shader.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -144,7 +129,7 @@
\r
- ###############################################################################\r
\r
--Project: "swrast"=.\SRC\MESA\swrast\swrast.dsp - Package Owner=<4>\r
-+Project: "swrast"=".\SRC\MESA\swrast\swrast.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -156,7 +141,7 @@
\r
- ###############################################################################\r
\r
--Project: "swrast_setup"=.\SRC\MESA\swrast_setup\swrast_setup.dsp - Package Owner=<4>\r
-+Project: "swrast_setup"=".\SRC\MESA\swrast_setup\swrast_setup.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-@@ -168,7 +153,7 @@
\r
- ###############################################################################\r
\r
--Project: "tnl"=.\SRC\MESA\tnl\tnl.dsp - Package Owner=<4>\r
-+Project: "tnl"=".\SRC\MESA\tnl\tnl.dsp" - Package Owner=<4>\r
\r
- Package=<5>\r
- {{{\r
-Index: extras/Mesa/bin/mklib
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/bin/mklib,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/bin/mklib      28 Aug 2004 04:26:58 -0000      1.1.1.3
-+++ extras/Mesa/bin/mklib      15 Dec 2004 01:50:55 -0000      1.1.1.3.2.1
-@@ -116,6 +116,14 @@
-     'Linux' | 'OpenBSD')
-       # GCC-based environment
-+      # Set default compilers if env vars not set
-+      if [ "x$CXX" = "x" ] ; then
-+          CXX=g++
-+      fi
-+      if [ "x$CC" = "x" ] ; then
-+          CC=gcc
-+      fi
-+
-       if [ $NOPREFIX = 1 ] ; then
-           # No "lib" or ".so" part
-           echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
-@@ -372,7 +380,30 @@
-             ar -X64 -ruv ${LIBNAME} ${OBJECTS}
-             FINAL_LIBS=${LIBNAME}
-         else
--            echo "mklib: PROBLEM: AIX64 shared libs not supported!!!"
-+          EXPFILE="lib${LIBNAME}.exp"
-+          OFILE=shr.o  #Want to be consistent with the IBM libGL.a
-+          LIBNAME="lib${LIBNAME}.a"  # shared objects are still stored in the .a libraries
-+          OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64"
-+          rm -f ${EXPFILE} ${OFILE}
-+          NM="/bin/nm -eC -X64"
-+          echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
-+          ${NM} ${OBJECTS} | awk '{
-+          if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
-+          && ( substr($1,1,1) != ".")) {
-+                  if (substr ($1, 1, 7) != "__sinit" &&
-+                          substr ($1, 1, 7) != "__sterm") {
-+                          if (substr ($1, 1, 5) == "__tf1")
-+                              print (substr ($1, 7))
-+                          else if (substr ($1, 1, 5) == "__tf9")
-+                              print (substr ($1, 15))
-+                          else
-+                              print $1
-+                      }
-+              }
-+          }' | sort -u >> ${EXPFILE}
-+          cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
-+          ar -X64 -r ${LIBNAME} ${OFILE}
-+            FINAL_LIBS="${LIBNAME}"
-         fi
-         ;;
-Index: extras/Mesa/configs/aix
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/aix,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/aix    22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/aix    15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -20,9 +20,9 @@
- OSMESA_LIB_NAME = libOSMesa.a
- GL_LIB_DEPS = -lX11 -lXext -lm
--GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm -lC
--GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -lXi -lXmu -lX11 -lm
--GLW_LIB_DEPS = -L$(TOP)/lib -lGL -lXt -lX11
--OSMESA_LIB_DEPS = -L$(TOP)/lib -lGL
--APP_LIB_DEPS = -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm -lC
-+GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
-+GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
-+GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11
-+OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
-+APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
-Index: extras/Mesa/configs/aix-64
-===================================================================
-RCS file: extras/Mesa/configs/aix-64
-diff -N extras/Mesa/configs/aix-64
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/configs/aix-64 15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -0,0 +1,28 @@
-+# Configuration for AIX 64-bit, dynamic libs
-+
-+include $(TOP)/configs/default
-+
-+CONFIG_NAME = aix-64
-+
-+# Compiler and flags
-+CC = xlc
-+CXX = xlC
-+
-+CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3
-+CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3
-+MKLIB_OPTIONS = -arch AIX64
-+
-+# Library names (actual file names)
-+GL_LIB_NAME = libGL.a
-+GLU_LIB_NAME = libGLU.a
-+GLUT_LIB_NAME = libglut.a
-+GLW_LIB_NAME = libGLw.a
-+OSMESA_LIB_NAME = libOSMesa.a
-+
-+GL_LIB_DEPS = -lX11 -lXext -lm
-+GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
-+GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
-+GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11
-+OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
-+APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
-+
-Index: extras/Mesa/configs/aix-gcc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/aix-gcc,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/aix-gcc        16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/aix-gcc        15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -13,7 +13,7 @@
- MKLIB_OPTIONS = -arch aix-gcc
- GL_LIB_DEPS = -lX11 -lXext -lm
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR -lGLU -lGL -lXi -lXmu
--APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -lglut -lGLU -lGL -lm -lX11 -lXext -lXmu -lXi
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu
-+APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi
-Index: extras/Mesa/configs/beos
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/beos,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.2.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.2.1
---- extras/Mesa/configs/beos   28 Aug 2004 04:27:03 -0000      1.1.1.1
-+++ extras/Mesa/configs/beos   15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -42,11 +42,10 @@
-       ifdef DEBUG
-               CFLAGS   += -g -O0
--              CXXFLAGS += -g -O0
-               LDFLAGS += -g
-+              DEFINES += -DDEBUG
-       else
-               CFLAGS   += -O3
--              CXXFLAGS += -O3
-       endif
-       GLUT_CFLAGS = -fexceptions
-@@ -93,8 +92,8 @@
- # Library/program dependencies
- GL_LIB_DEPS = 
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
-+OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
- GLU_LIB_DEPS =  
--GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -lGL
--APP_LIB_DEPS = -lbe -L$(LIB_DIR) -lGL -lglut
-+GLUT_LIB_DEPS = -lgame -L$(LIB_DIR) -l$(GL_LIB)
-+APP_LIB_DEPS = -lbe -L$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
-Index: extras/Mesa/configs/darwin
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/darwin,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/darwin 16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/darwin 15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -22,4 +22,4 @@
- GLU_LIB_DEPS = $(TOP)/lib/GL.dylib
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
--APP_LIB_DEPS = -L$(TOP)/lib -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-Index: extras/Mesa/configs/darwin-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/darwin-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/darwin-static  16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/darwin-static  15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -21,4 +21,4 @@
- GLU_LIB_DEPS = 
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = 
--APP_LIB_DEPS = -L$(TOP)/lib -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-Index: extras/Mesa/configs/default
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/default,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/default        22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/default        15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -7,8 +7,8 @@
- # Version info
- MESA_MAJOR=6
--MESA_MINOR=1
--MESA_TINY=0
-+MESA_MINOR=2
-+MESA_TINY=1
- # external projects
- DRM_SOURCE_PATH=$(TOP)/../drm
-@@ -61,8 +61,8 @@
- # Library/program dependencies
- GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/freebsd-dri
-===================================================================
-RCS file: extras/Mesa/configs/freebsd-dri
-diff -N extras/Mesa/configs/freebsd-dri
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/configs/freebsd-dri    15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -0,0 +1,39 @@
-+# -*-makefile-*-
-+# Configuration for freebsd-dri: FreeBSD DRI hardware drivers
-+
-+include $(TOP)/configs/freebsd
-+
-+CONFIG_NAME = freebsd-dri
-+
-+# Compiler and flags
-+CC = gcc
-+CXX = g++
-+WARN_FLAGS = -Wall
-+OPT_FLAGS = -O
-+
-+CFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wmissing-prototypes -g -std=c99  -Wundef -fPIC -ffast-math -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
-+CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wall -g -ansi -pedantic -fPIC
-+
-+ASM_SOURCES = 
-+
-+# Library/program dependencies
-+DRI_LIB_DEPS = -lm -lpthread -lexpat
-+GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -pthread
-+
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11
-+
-+
-+# Directories
-+SRC_DIRS = mesa glu glut/glx glw glx/x11
-+DRIVER_DIRS = dri
-+PROGRAM_DIRS = 
-+WINDOW_SYSTEM=dri
-+
-+DRM_SOURCE_PATH=$(TOP)/../drm
-+
-+# ffb and gamma are missing because they have not been converted to use the new
-+# interface.
-+DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx \
-+         unichrome savage sis
-+
-Index: extras/Mesa/configs/freebsd-dri-x86
-===================================================================
-RCS file: extras/Mesa/configs/freebsd-dri-x86
-diff -N extras/Mesa/configs/freebsd-dri-x86
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/configs/freebsd-dri-x86        15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -0,0 +1,12 @@
-+# -*-makefile-*-
-+# Configuration for freebsd-dri: FreeBSD DRI hardware drivers
-+
-+include $(TOP)/configs/freebsd-dri
-+
-+CONFIG_NAME = freebsd-dri-x86
-+
-+# Unnecessary on x86, generally.
-+PIC_FLAGS = 
-+
-+ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
-+ASM_SOURCES = $(X86_SOURCES)
-Index: extras/Mesa/configs/hpux10-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/hpux10-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/hpux10-static  16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/hpux10-static  15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -26,5 +26,5 @@
- GLU_LIB_DEPS = 
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = 
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++
-Index: extras/Mesa/configs/hpux11-32
-===================================================================
-RCS file: extras/Mesa/configs/hpux11-32
-diff -N extras/Mesa/configs/hpux11-32
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/configs/hpux11-32      15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -0,0 +1,26 @@
-+# Configuration for HPUX v11
-+
-+include $(TOP)/configs/default
-+
-+CONFIG_NAME = hpux11-32
-+
-+# Compiler and flags
-+CC = cc
-+CXX = aCC
-+
-+CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
-+
-+CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
-+
-+MKLIB_OPTIONS =
-+
-+
-+# Library names (actual file names)
-+GL_LIB_NAME = libGL.a
-+GLU_LIB_NAME = libGLU.a
-+GLUT_LIB_NAME = libglut.a
-+GLW_LIB_NAME = libGLw.a
-+OSMESA_LIB_NAME = libOSMesa.a
-+
-+# Library/program dependencies
-+APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
-Index: extras/Mesa/configs/hpux11-64
-===================================================================
-RCS file: extras/Mesa/configs/hpux11-64
-diff -N extras/Mesa/configs/hpux11-64
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/configs/hpux11-64      15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -0,0 +1,27 @@
-+# Configuration for HPUX v11, 64-bit
-+
-+include $(TOP)/configs/default
-+
-+CONFIG_NAME = hpux11-64
-+
-+# Compiler and flags
-+CC = cc
-+CXX = aCC
-+
-+CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
-+
-+CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
-+
-+MKLIB_OPTIONS =
-+
-+LIBDIR = $(TOP)/lib64
-+
-+# Library names (actual file names)
-+GL_LIB_NAME = libGL.a
-+GLU_LIB_NAME = libGLU.a
-+GLUT_LIB_NAME = libglut.a
-+GLW_LIB_NAME = libGLw.a
-+OSMESA_LIB_NAME = libOSMesa.a
-+
-+# Library/program dependencies
-+APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
-Index: extras/Mesa/configs/irix6-64
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/irix6-64,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/irix6-64       16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/irix6-64       15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -15,4 +15,4 @@
- LIB_DIR = $(TOP)/lib64
--APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -lglut -lGLU -lGL -lX11 -lXmu -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
-Index: extras/Mesa/configs/irix6-64-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/irix6-64-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/irix6-64-static        16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/irix6-64-static        15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -15,7 +15,7 @@
- LIB_DIR = $(TOP)/lib64
--APP_LIB_DEPS = -L$(LIB_DIR) -64 -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
- GL_LIB_NAME = libGL.a
- GLU_LIB_NAME = libGLU.a
-Index: extras/Mesa/configs/irix6-n32
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/irix6-n32,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/irix6-n32      16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/irix6-n32      15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -15,4 +15,4 @@
- LIB_DIR = $(TOP)/lib32
--APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -lglut -lGLU -lGL -lX11 -lXmu -lXi -lfpe -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lm
-Index: extras/Mesa/configs/irix6-n32-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/irix6-n32-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/irix6-n32-static       16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/irix6-n32-static       15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -15,7 +15,7 @@
- LIB_DIR = $(TOP)/lib32
--APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
- GL_LIB_NAME = libGL.a
- GLU_LIB_NAME = libGLU.a
-Index: extras/Mesa/configs/irix6-o32
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/irix6-o32,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/irix6-o32      16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/irix6-o32      15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -15,5 +15,5 @@
- LIB_DIR = $(TOP)/lib32
--APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(LIB_DIR) -lglut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
-Index: extras/Mesa/configs/irix6-o32-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/irix6-o32-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/irix6-o32-static       16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/irix6-o32-static       15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -15,7 +15,7 @@
- LIB_DIR = $(TOP)/lib32
--APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -lGLU -lGL -lX11 -lXext -lXmu -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
- GL_LIB_NAME = libGL.a
- GLU_LIB_NAME = libGLU.a
-Index: extras/Mesa/configs/linux
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux  22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux  15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -14,9 +14,7 @@
- # Library/program dependencies
-+# Need to have -L/usr/X11R6/lib in these:
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-Index: extras/Mesa/configs/linux-alpha
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-alpha,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-alpha    16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-alpha    15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -12,8 +12,7 @@
- GLUT_CFLAGS = -fexceptions
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/linux-alpha-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-alpha-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-alpha-static     16 Jun 2004 09:16:21 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-alpha-static     15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -22,7 +22,6 @@
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -L/usr/X11R6/lib -lX11 -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -L/usr/X11R6/lib -lX11 -lm
-Index: extras/Mesa/configs/linux-debug
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-debug,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-debug    22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-debug    15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -14,9 +14,7 @@
- GLUT_CFLAGS = -fexceptions
-+# Need to have -L/usr/X11R6/lib in these:
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -lXt -L/usr/X11R6/lib -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
-Index: extras/Mesa/configs/linux-dri
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-dri,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-dri      22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-dri      15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -9,19 +9,26 @@
- CC = gcc
- CXX = g++
--CFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wmissing-prototypes -g -std=c99  -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -D_GNU_SOURCE -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
--
--CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE 
--
-+WARN_FLAGS = -Wall
-+OPT_FLAGS = -O
-+SOURCE_FLAGS = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-+      -D_BSD_SOURCE -D_GNU_SOURCE
-+PIC_FLAGS = -fPIC
-+
-+CFLAGS = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) -g $(OPT_FLAGS) $(ASM_FLAGS) \
-+      -std=c99 $(PIC_FLAGS) -ffast-math $(SOURCE_FLAGS) -DPTHREADS \
-+      -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
-+CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) -g $(OPT_FLAGS) -fPIC \
-+      $(SOURCE_FLAGS)
- ASM_SOURCES = 
- # Library/program dependencies
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
- # Directories
-@@ -30,8 +37,8 @@
- PROGRAM_DIRS = 
- WINDOW_SYSTEM=dri
--# Savage is missing.  ffb, gamma, and sis are also missing because they have
--# not be converted to use the new interface.
--#
--DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome
-+# ffb and gamma are missing because they have not been converted to use the new
-+# interface.
-+DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx \
-+         unichrome savage sis
-Index: extras/Mesa/configs/linux-dri-x86
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-dri-x86,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-dri-x86  22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-dri-x86  15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -1,35 +1,12 @@
- # -*-makefile-*-
- # Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
--include $(TOP)/configs/default
-+include $(TOP)/configs/linux-dri
- CONFIG_NAME = linux-dri-x86
--# Compiler and flags
--CC = gcc
--CXX = g++
--
--CFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wmissing-prototypes -g -std=c99  -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -D_GNU_SOURCE -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
--
--CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE 
-+# Unnecessary on x86, generally.
-+PIC_FLAGS = 
-+ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
- ASM_SOURCES = $(X86_SOURCES)
--
--# Library/program dependencies
--GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl
--
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--
--
--# Directories
--SRC_DIRS = mesa glu glut/glx glw
--DRIVER_DIRS = dri
--PROGRAM_DIRS = 
--WINDOW_SYSTEM=dri
--
--# Savage is missing.  ffb, gamma, and sis are also missing because they have
--# not be converted to use the new interface.
--#
--DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome
--
-Index: extras/Mesa/configs/linux-dri-x86-64
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-dri-x86-64,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-dri-x86-64       22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-dri-x86-64       15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -19,8 +19,8 @@
- # Library/program dependencies
- GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread -lexpat -ldl
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib64 -lXt -lX11
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
- # Directories
- SRC_DIRS = mesa glu glut/glx glw
-@@ -28,9 +28,9 @@
- PROGRAM_DIRS = 
- WINDOW_SYSTEM=dri
--# Savage is missing.  ffb, gamma, and sis are also missing because they have
-+# ffb, gamma, and sis are missing because they have
- # not be converted to use the new interface.  Do i810 & i830 really
- # need to be included here?
- #
--DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome
-+DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome savage
-Index: extras/Mesa/configs/linux-glide
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-glide,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-glide    22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-glide    15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -15,8 +15,6 @@
- # Library/program dependencies
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/local/glide/lib -lglide3x -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
-Index: extras/Mesa/configs/linux-icc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-icc,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-icc      22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-icc      15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -13,9 +13,8 @@
- MKLIB_OPTIONS = -arch icc
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
- ASM_SOURCES = $(X86_SOURCES) $(X86_API)
-Index: extras/Mesa/configs/linux-icc-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-icc-static,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-icc-static       22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-icc-static       15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -20,9 +20,8 @@
- OSMESA_LIB_NAME = libOSMesa.a
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
- MKLIB_OPTIONS = -arch icc
- ASM_SOURCES = $(X86_SOURCES) $(X86_API)
-Index: extras/Mesa/configs/linux-ppc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-ppc,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-ppc      16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-ppc      15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -12,8 +12,7 @@
- GLUT_CFLAGS = -fexceptions
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/linux-ppc-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-ppc-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-ppc-static       16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-ppc-static       15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -21,7 +21,6 @@
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
-Index: extras/Mesa/configs/linux-solo
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-solo,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-solo     22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-solo     15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -19,9 +19,9 @@
- # Library/program dependencies
- GL_LIB_DEPS = -lm -lpthread -lexpat -ldl
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -lpthread
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
- # Directories
- SRC_DIRS = mesa glx glu glut/mini
-Index: extras/Mesa/configs/linux-solo-ia64
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-solo-ia64,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/configs/linux-solo-ia64        12 Aug 2004 23:04:47 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-solo-ia64        15 Dec 2004 01:50:55 -0000      1.1.1.2.2.1
-@@ -17,9 +17,8 @@
- # Library/program dependencies
- GL_LIB_DEPS = -lm -lpthread -lexpat -ldl
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm -lpthread
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
- # Directories
- SRC_DIRS = mesa glx glu glut/mini
-Index: extras/Mesa/configs/linux-solo-x86
-===================================================================
-RCS file: extras/Mesa/configs/linux-solo-x86
-diff -N extras/Mesa/configs/linux-solo-x86
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/configs/linux-solo-x86 15 Dec 2004 01:50:55 -0000      1.1.1.1.2.1
-@@ -0,0 +1,31 @@
-+# Configuration for linux-solo: Linux DRI hardware drivers for fbdev
-+
-+include $(TOP)/configs/default
-+
-+CONFIG_NAME = linux-solo-x86
-+
-+# Compiler and flags
-+CC = gcc
-+CXX = g++
-+
-+CCOMMON = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS
-+
-+CFLAGS = $(CCOMMON) -Wmissing-prototypes -O3 -g -std=c99 -Wundef -fPIC -ffast-math
-+
-+CXXFLAGS = $(CCOMMON) -Wall -O3 -ansi -pedantic -fPIC
-+
-+
-+ASM_SOURCES = $(X86_SOURCES)
-+
-+# Library/program dependencies
-+GL_LIB_DEPS = -lm -lpthread -lexpat -ldl
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
-+
-+# Directories
-+SRC_DIRS = mesa glx glu glut/mini
-+DRIVER_DIRS = dri
-+PROGRAM_DIRS = miniglx
-+
-+#DRI_DIRS = fb ffb gamma sis savage
-+DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome
-Index: extras/Mesa/configs/linux-sparc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-sparc,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-sparc    16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-sparc    15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -12,7 +12,5 @@
- GLUT_CFLAGS = -fexceptions
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-Index: extras/Mesa/configs/linux-sparc5
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-sparc5,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-sparc5   16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-sparc5   15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -12,8 +12,6 @@
- GLUT_CFLAGS = -fexceptions
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-Index: extras/Mesa/configs/linux-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-static   16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-static   15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -27,4 +27,4 @@
- GLU_LIB_DEPS = 
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = 
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-Index: extras/Mesa/configs/linux-tcc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-tcc,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-tcc      22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-tcc      15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -17,9 +17,6 @@
- GLUT_CFLAGS = -fexceptions
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L$(TCC_DIR) -ltcc -ldl
--
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -lXt -L/usr/X11R6/lib -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/linux-ultrasparc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-ultrasparc,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-ultrasparc       16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-ultrasparc       15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -12,7 +12,6 @@
- GLUT_CFLAGS = -fexceptions
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR)-lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/linux-x86
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-x86,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-x86      22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-x86      15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -19,8 +19,6 @@
- # Library/program dependencies
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/linux-x86-64
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-x86-64,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-x86-64   22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-x86-64   15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -23,8 +23,6 @@
- # Library/program dependencies
- GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib64 -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/linux-x86-64-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-x86-64-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/linux-x86-64-static    16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/linux-x86-64-static    15 Dec 2004 01:50:55 -0000      1.1.1.1.4.1
-@@ -37,4 +37,4 @@
- GLU_LIB_DEPS = 
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = 
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib64 -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-Index: extras/Mesa/configs/linux-x86-glide
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-x86-glide,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-x86-glide        22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-x86-glide        15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -19,8 +19,6 @@
- # Library/program dependencies
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
--OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/X11R6/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/local/glide/lib -lglide3x -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
-Index: extras/Mesa/configs/linux-x86-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/linux-x86-static,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/linux-x86-static       22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/linux-x86-static       15 Dec 2004 01:50:55 -0000      1.1.1.2.4.1
-@@ -34,4 +34,4 @@
- GLU_LIB_DEPS = 
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = 
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
-Index: extras/Mesa/configs/openbsd
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/openbsd,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/openbsd        16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/openbsd        15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -12,7 +12,7 @@
- GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm
- OSMESA_LIB_DEPS = -lm
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lglut -lGLU -lGL -lm
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/osf1
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/osf1,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/osf1   16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/osf1   15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -11,8 +11,6 @@
- CXXFLAGS = -O2 -std ansi -ieee
- GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lXext -lXmu -lXi -lm
--
--
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
-Index: extras/Mesa/configs/solaris-x86-gcc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/solaris-x86-gcc,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/solaris-x86-gcc        16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/solaris-x86-gcc        15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -13,9 +13,9 @@
- MKLIB_OPTIONS = -static
- GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
--APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lglut -lGLU -lGL -lm
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
- GL_LIB_NAME = libGL.a
- GLU_LIB_NAME = libGLU.a
-Index: extras/Mesa/configs/sunos4-static
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/sunos4-static,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/sunos4-static  16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/sunos4-static  15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -22,4 +22,4 @@
- GLU_LIB_DEPS = 
- GLUT_LIB_DEPS = 
- GLW_LIB_DEPS = 
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm
-Index: extras/Mesa/configs/sunos5
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/sunos5,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/sunos5 16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/sunos5 15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -12,7 +12,7 @@
- GLUT_CFLAGS = -DSOLARIS_2_4_BUG
- GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/openwin/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lCrun -lX11 -lglut -lGLU -lGL -lm
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -lCrun -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/sunos5-gcc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/sunos5-gcc,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/configs/sunos5-gcc     22 Jul 2004 06:49:32 -0000      1.1.1.2
-+++ extras/Mesa/configs/sunos5-gcc     15 Dec 2004 01:50:56 -0000      1.1.1.2.4.1
-@@ -14,8 +14,8 @@
- GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
- GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/openwin/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lglut -lGLU -lGL -lm
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
-Index: extras/Mesa/configs/sunos5-smp
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/sunos5-smp,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/sunos5-smp     16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/sunos5-smp     15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -12,8 +12,8 @@
- GLUT_CFLAGS = -DSOLARIS_2_4_BUG
- GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
--GLU_LIB_DEPS = -L$(LIB_DIR) -lGL -lm
--GLUT_LIB_DEPS = -L$(LIB_DIR) -lGLU -lGL -lm
--GLW_LIB_DEPS = -L$(LIB_DIR) -lGL -L/usr/openwin/lib -lXt -lX11
--APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lglut -lGLU -lGL -lm -lCrun
-+GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
-+GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
-+GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
-+APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lCrun
-Index: extras/Mesa/configs/ultrix-gcc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/configs/ultrix-gcc,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/configs/ultrix-gcc     16 Jun 2004 09:16:22 -0000      1.1.1.1
-+++ extras/Mesa/configs/ultrix-gcc     15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -18,4 +18,4 @@
- GLW_LIB_NAME = libGLw.a
- OSMESA_LIB_NAME = libOSMesa.a
--APP_LIB_DEPS = -L$(LIB_DIR) -lglut -lGLU -lGL -lXmu -lX11 -lXi -lm
-+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXmu -lX11 -lXi -lm
-Index: extras/Mesa/docs/README.3DFX
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/README.3DFX,v
-retrieving revision 1.1.1.4
-retrieving revision 1.1.1.4.2.1
-diff -u -u -r1.1.1.4 -r1.1.1.4.2.1
---- extras/Mesa/docs/README.3DFX       12 Aug 2004 23:43:26 -0000      1.1.1.4
-+++ extras/Mesa/docs/README.3DFX       15 Dec 2004 01:50:56 -0000      1.1.1.4.2.1
-@@ -3,13 +3,13 @@
--Mesa-6.1 release notes:
-+Mesa-6.2 release notes:
- -----------------------
- 1) Glide2 support has been ceased; please visit the Glide SourceForge and
-    help us improve Glide3.
- 2) The current release is a WIP; among other things, the Linux build works
--   only to some extent. Voodoo Rush not fully supported. Any help will be
-+   only to some extent. Voodoo Rush not fully tested. Any help will be
-    appreciated.
- 3) Although Mesa is designed to work with any Glide3, it would benefit from
-    interacting with newer Glide libraries, which can export functions like:
-@@ -60,10 +60,13 @@
-       enable driver debug code
- FX_TRAP_GLIDE
-       enable Glide trace code
-+FX_PACKEDCOLOR
-+      use packed color in vertex structure
- FX_TC_NAPALM
-       map GL_COMPRESSED_RGB[A] to FXT1. This will have effect on Napalm
-       only (can coexist with FX_TC_NCC, but has higher priority)
- FX_TC_NCC
-+      experimental
-       map GL_COMPRESSED_RGB[A] to NCC. This will have effect on any 3dfx
-       HW (can coexist with FX_TC_NAPALM, but has lesser priority)
- FX_COMPRESS_S3TC_AS_FXT1_HACK
-@@ -93,7 +96,7 @@
- FX_GLIDE_NUM_TMU
-       OS: all
--      HW: dual-TMU cards (some Voodoo1, Voodoo2, Avenger, Napalm)
-+      HW: dual-TMU cards (Voodoo2, Avenger, Napalm)
-       Desc: force single-TMU
-       Note: (*)
-       Value: "1"
-@@ -141,6 +144,11 @@
-       HW: all
-       Desc: verbose to stderr
-       Value: any; special value "r" to redirect stderr to MESA.LOG
-+MESA_FX_NOSNAP
-+      OS: all
-+      HW: Voodoo1, Rush, Banshee
-+      Desc: do not snap vertices inside Mesa
-+      Note: to be used with Glide3x that snaps vertices itself
- MESA_FX_POINTCAST
-       OS: all
-       HW: dual-TMU cards (some Voodoo1, Voodoo2, Avenger, Napalm)
-Index: extras/Mesa/docs/README.BEOS
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/README.BEOS,v
-retrieving revision 1.1.1.4
-retrieving revision 1.1.1.4.2.1
-diff -u -u -r1.1.1.4 -r1.1.1.4.2.1
---- extras/Mesa/docs/README.BEOS       28 Aug 2004 04:26:59 -0000      1.1.1.4
-+++ extras/Mesa/docs/README.BEOS       15 Dec 2004 01:50:56 -0000      1.1.1.4.2.1
-@@ -32,12 +32,22 @@
-   - gcc version 2.95.3 for BeOS 
-   You can find it here: http://www.bebits.com/app/2157
--To build Mesa-powered BeOS libGL.so version, type this at root folder:
-+To build Mesa-powered BeOS libGL.so version, open an Terminal window,
-+move to Mesa root folder and type this command:
- $ make beos
-+Note that the "beos" argument is only needed the first time to setup build config.
-+Next times, typing "make" will be enough.
-+
- When it finishes the Mesa based libGL.so library for
--BeOS will be in the lib/ directory.
-+BeOS will be in the lib/ directory, along libglut.so library.
-+Several demo/test programs should have been build too under progs/* folders.
-+If it stop when building one of the progs/* programs, you may want to ignore it
-+and force make to move on next target by adding the -k make option:
-+
-+$ cd progs
-+$ make -k
- To install it as Be's default libGL.so replacement, put it in your 
- /boot/home/config/lib/ directory. All your GL/GLUT apps will use 
-@@ -50,26 +60,27 @@
- To build a DEBUG version, type instead this :
--$ DEBUG=1 make beos
-+$ DEBUG=1 make
- * Example Programs
--Look in the progs/beos/ directory for one or two BGLView demo
--programs.  They should have been compiled along with the Mesa
--library.
-+Look under progs/beos/ for some BGLView-based programs.
-+You should find under progs/samples and progs/redbook directories GLUT-based programs too.
-+They all should have been compiled along with the Mesa library.
- * GLUT
--A beta version of GLUT 3.7 port for BeOS can be found at 
-+A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at 
- http://anobject.com/jehamby/Code/Glut-3.7-x86.zip.
-+This is the version currently included in Mesa source code, and
-+build in lib/libglut.so.
-  
--There's is a 3.5 version in src/glut/beos/, too.
--The original distribution can be obtained from
--http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip
-+A previous 3.5 version of this GLUT BeOS port used to be available at
-+http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip.
--They are special version of GLUT adapted for the BeOS.  I don't
-+They're special versions of GLUT for the BeOS platform.  I don't
- believe Mark Kilgard's normal GLUT distribution includes BeOS
- support.
-@@ -87,8 +98,6 @@
- * Work Left To Do
--- Switch to SGI GLU implementation..
--- Add to build the BeOS GLUT port. Update it to latest known (3.7 ?)
- - BDirectWindow single buffering support is not implemented yet.
- - Color index mode is not implemented yet.
- - Reading pixels from the front buffer not implemented yet.
-@@ -99,7 +108,8 @@
- * Other contributors to this BeOS port
--Marcin Konicki                   ahwayakchih <at> neoni <dot> net
-+Jake Hamby                      jhamby <at> anobject <dot> com
-+Marcin Konicki                  ahwayakchih <at> neoni <dot> net
- Francois Revol                  revol <at> free <dot> fr
-@@ -121,4 +131,4 @@
- ----------------------------------------------------------------------
--$Id$
-+$Id$
-Index: extras/Mesa/docs/README.WIN32
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/README.WIN32,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/README.WIN32      12 Aug 2004 23:43:27 -0000      1.1.1.3
-+++ extras/Mesa/docs/README.WIN32      15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -1,6 +1,6 @@
- File: docs/README.WIN32
--Last updated: Sep 18, 2003 - Karl Schultz - kschultz@users.sourceforge.net
-+Last updated: Oct 01, 2004 - Karl Schultz - kschultz@users.sourceforge.net
- Quick Start
-@@ -14,16 +14,36 @@
- workspaces and projects.  Makefiles are no longer shipped or supported, but
- can be generated from the projects using Visual Studio.
-+The workspace and project files were created with Visual Studio 6, so that
-+they can be used with VS6 and so that they can also be imported into VS 7.
-+
- Details and Notes
- - To build the Mesa libraries, open the Mesa.dsw workspace file
--  in the top directory.  You can build each project one-by-one,
--  or build the glut project to build everything except osmesa,
--  which needs to be built separately.  The build process will
--  create a lib directory in the top directory and will put the
--  following files there:
--      OPENGL32.LIB, GLU32.LIB, GLUT32.LIB, OSMESA32.LIB
--      OPENGL32.DLL, GLU32.DLL, GLUT32.DLL, OSMESA32.DLL
-+  in the top directory.  You will need to build at least one
-+  driver.  Currently, only the gdi and osmesa drivers are available.
-+  Select one or the other as the active project and build it.
-+  If you want glu, select the glu project as active and build that as well.
-+
-+- Glut is no longer in the Mesa.dsw workspace.  It is now built in
-+  the demo workspace (see below).
-+  
-+- The build process will create a lib directory in the top directory 
-+  and will put the following files there as you build them:
-+      OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
-+      OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
-+
-+- Some users have reported problems building glu with VS7 after importing
-+  and converting the VS6 project files.  The problem is caused by a custom
-+  build step that was put in place to work around a problem with VS6 not
-+  recognizing .cc files as C++ source files.  It appears that VS7 can be
-+  configured to recognize .cc files as C++ files and so it compiles these
-+  glu files with the default settings, and does not use settings that are
-+  required to compile the files correctly.  The easiest way to solve the
-+  problem is to remove the .cc files from the glu project.  This does not
-+  delete the files, but removes them from the project so that VS does not
-+  try to compile them at all.  This allows the custom build step to compile 
-+  the files with the proper settings.
- - After building, you can copy the above DLL files to a place in your PATH
-   such as $SystemRoot/SYSTEM32.  If you don't like putting things in a
-@@ -51,9 +71,6 @@
- - The si-glu sources are used to build the GLU libs.  This was done
-   mainly to get the better tessellator code.
--- The osmesa driver builds and should work on Windows as well as
--  any other platform.
--
- - The Windows driver (in src/Windows) builds and runs at least at
-   a minimal level.  I modified this driver to work with the new
-   Mesa 4.0 code and driver architecture, but I did not do a great
-Index: extras/Mesa/docs/RELNOTES-6.2
-===================================================================
-RCS file: extras/Mesa/docs/RELNOTES-6.2
-diff -N extras/Mesa/docs/RELNOTES-6.2
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/docs/RELNOTES-6.2      15 Dec 2004 01:50:56 -0000      1.1.1.1.2.1
-@@ -0,0 +1,49 @@
-+
-+                           Mesa 6.2 release notes
-+
-+                              October 2, 2004
-+
-+                              PLEASE READ!!!!
-+
-+
-+
-+Introduction
-+------------
-+
-+Mesa uses an even/odd version number scheme like the Linux kernel.
-+Odd numbered versions (such as 6.1) designate new developmental releases.
-+Even numbered versions (such as 6.2) designate stable releases.
-+
-+
-+This release primarily just fixes bugs found in the Mesa 6.1 release.
-+See the VERSIONS file for details.
-+
-+
-+
-+Known Issues
-+------------
-+
-+The GL_EXT_pixel_buffer_object extension isn't fully implemented for
-+functions like glPolygonStipple, glConvolutionFilter, glColorTable,
-+etc.  The important functions like glRead/DrawPixels, glTex[Sub]Image,
-+and glBitmap work with PBOs.
-+
-+
-+
-+Driver                        Status
-+----------------------        ---------------------
-+XMesa (Xlib)          implements OpenGL 1.5
-+OSMesa (off-screen)   implements OpenGL 1.5
-+Glide (3dfx Voodoo1/2)        implements OpenGL 1.3
-+SVGA                  implements OpenGL 1.3
-+Wind River UGL                implements OpenGL 1.3
-+Windows/Win32         implements OpenGL 1.5
-+DJGPP                 implements OpenGL 1.5
-+GGI                   implements OpenGL 1.3
-+BeOS                  implements OpenGL 1.5
-+Allegro                       needs updating
-+D3D                   needs updating
-+
-+
-+----------------------------------------------------------------------
-+$Id$
-Index: extras/Mesa/docs/RELNOTES-6.2.1
-===================================================================
-RCS file: extras/Mesa/docs/RELNOTES-6.2.1
-diff -N extras/Mesa/docs/RELNOTES-6.2.1
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/docs/RELNOTES-6.2.1    15 Dec 2004 01:50:56 -0000      1.1.1.1.2.1
-@@ -0,0 +1,50 @@
-+
-+                           Mesa 6.2.1 release notes
-+
-+                              December 9, 2004
-+
-+                              PLEASE READ!!!!
-+
-+
-+
-+Introduction
-+------------
-+
-+Mesa uses an even/odd version number scheme like the Linux kernel.
-+Odd numbered versions (such as 6.1) designate new developmental releases.
-+Even numbered versions (such as 6.2.x) designate stable releases.
-+
-+
-+This release primarily just fixes bugs found in the Mesa 6.2 release.
-+See the VERSIONS file for details.
-+
-+
-+
-+Known Issues
-+------------
-+
-+The GL_EXT_pixel_buffer_object extension isn't fully implemented for
-+functions like glPolygonStipple, glConvolutionFilter, glColorTable,
-+etc.  The important functions like glRead/DrawPixels, glTex[Sub]Image,
-+and glBitmap work with PBOs.  This has been fixed for Mesa 6.3.
-+
-+
-+
-+
-+Driver                        Status
-+----------------------        ---------------------
-+XMesa (Xlib)          implements OpenGL 1.5
-+OSMesa (off-screen)   implements OpenGL 1.5
-+Glide (3dfx Voodoo1/2)        implements OpenGL 1.3
-+SVGA                  implements OpenGL 1.3
-+Wind River UGL                implements OpenGL 1.3
-+Windows/Win32         implements OpenGL 1.5
-+DJGPP                 implements OpenGL 1.5
-+GGI                   implements OpenGL 1.3
-+BeOS                  implements OpenGL 1.5
-+Allegro                       needs updating
-+D3D                   needs updating
-+
-+
-+----------------------------------------------------------------------
-+$Id$
-Index: extras/Mesa/docs/VERSIONS
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/VERSIONS,v
-retrieving revision 1.1.1.7
-retrieving revision 1.1.1.7.2.1
-diff -u -u -r1.1.1.7 -r1.1.1.7.2.1
---- extras/Mesa/docs/VERSIONS  28 Aug 2004 04:27:00 -0000      1.1.1.7
-+++ extras/Mesa/docs/VERSIONS  15 Dec 2004 01:50:56 -0000      1.1.1.7.2.1
-@@ -1274,3 +1274,41 @@
-       - vertex program state references were broken
-       - fixed triangle color interpolation bug on AIX (Shane Blackett)
-       - fixed a number of minor memory leaks (bug #1002030)
-+
-+
-+6.2  October 2, 2004
-+    New:
-+      - enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle)
-+      - updated Doxygen support (Jose Fonseca)
-+    Changes:
-+      - some GGI driver updates (Christoph Egger, bug 1025977)
-+    Bug fixes:
-+      - Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features
-+      - fixed a few compilation issues on IRIX
-+      - fixed a matrix classification bug (reported by Wes Bethel)
-+      - we weren't reseting the vertex/fragment program error state
-+        before parsing (Dave Reveman)
-+      - adjust texcoords for sampling texture rectangles (Dave Reveman)
-+      - glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented
-+      - repeated calls to glDeleteTexture(t) could lead to a crash
-+      - fixed potential ref count bugs in VBOs and vertex/fragment programs
-+      - spriteblast demo didn't handle window size changes correctly
-+      - glTexSubImage didn't handle pixels=NULL correctly for PBOs
-+      - fixed color index mode glDrawPixels bug (Karl Schultz)
-+
-+
-+6.2.1  December 9, 2004
-+    Bug fixes:
-+      - don't apply regular fog or color sum when using a fragment program
-+      - glProgramEnvParameter4fARB always generated an error on
-+        GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645)
-+      - glVertexAttrib3svNV and glVertexAttrib3svARB were broken
-+      - fixed width/height mix-up in glSeparableFilter2D()
-+      - fixed regression in glCopyPixels + convolution
-+      - glReadPixels from a clipped front color buffer didn't always work
-+      - glTexImage didn't accept GL_RED/GREEN/BLUE as the format
-+      - Attempting queries/accesses of VBO 0 weren't detected as errors
-+      - paletted textures failed if the palette had fewer that 256 entries
-+    Changes:
-+      - fixed a bunch of compiler warnings found with gcc 3.4
-+      - bug reports should to go bugzilla.freedesktop.org
-Index: extras/Mesa/docs/bugs.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/bugs.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/bugs.html 12 Aug 2004 23:43:28 -0000      1.1.1.3
-+++ extras/Mesa/docs/bugs.html 15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -7,9 +7,20 @@
- <H1>Bug Database</H1>
- <p>
--Bug reports can be filed in the <a
--href="http://sourceforge.net/bugs/?group_id=3" target="_parent">Bug
--Database</a> on sourceforge.net. Please follow these guidelines:
-+The Mesa bug database is now hosted on
-+<a href="http://freedesktop.org" target="_parent">freedesktop.org</a>
-+instead of SourceForge.
-+</p>
-+
-+<p>
-+To file a Mesa bug, go to
-+<a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"
-+target="_parent">
-+Bugzilla on freedesktop.org</a>
-+</p>
-+
-+<p>
-+Please follow these bug reporting guidelines:
- </p>
- <ul>
-@@ -21,7 +32,8 @@
- </ul>
- <p>
--Bug reports will automatically be forwarded to the Mesa developer's list.
-+Bug reports will automatically be forwarded to the Mesa developer's mailing
-+list.
- </p>
- <p>
-Index: extras/Mesa/docs/contents.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/contents.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/contents.html     12 Aug 2004 23:43:28 -0000      1.1.1.3
-+++ extras/Mesa/docs/contents.html     15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -20,7 +20,7 @@
- <b>Download / Install</b>
- <ul>
--<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Stable Release (6.0.1)</a>
-+<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Stable Release (6.2)</a>
- <li><a href="download.html" target="MainFrame">Downloading/Unpacking</a>
- <li><a href="install.html" target="MainFrame">Compilation/Installation</a>
- <li><a href="glu.html" target="MainFrame">SGI's GLU</a>
-Index: extras/Mesa/docs/cvs_branches.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/cvs_branches.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/cvs_branches.html 12 Aug 2004 23:43:28 -0000      1.1.1.3
-+++ extras/Mesa/docs/cvs_branches.html 15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -15,25 +15,25 @@
- </p>
- <p>
--Currently (Nov 2003), the trunk is the Mesa 5.1 development code
--while the mesa_5_0_branch branch has the stable Mesa 5.0.x code.
-+Currently (Oct 2004), the trunk is the Mesa 6.3 development code
-+while the mesa_6_2_branch branch has the stable Mesa 6.2.x code.
- </p>
- <p>
- Mesa releases use an even/odd numbering scheme to represent stable/development
- releases.
--For example, Mesa 5.0.x (0 is considered even) is a stable release while
--Mesa 5.1.x is a development release.
-+For example, Mesa 6.2 (0 is considered even) is a stable release while
-+Mesa 6.3 is a development release.
- </p>
- <p>
- To checkout a specific CVS branch pass <code>-r</code> and
- the branch tag after your CVS command.
--For example <code>cvs checkout -r mesa_5_0_branch Mesa</code> will
--checkout the 5.0.x branch and <code>cvs update -r
--mesa_5_0_branch</code> will convert your current CVS tree to the 5.0.x
-+For example <code>cvs checkout -r mesa_6_2_branch Mesa</code> will
-+checkout the 6.2 branch and <code>cvs update -r
-+mesa_6_2_branch</code> will convert your current CVS tree to the 6.2
- branch.
- Consult <a href="http://www.durak.org/cvswebsites/doc/cvs_5.php3#SEC54"
-Index: extras/Mesa/docs/intro.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/intro.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/intro.html        12 Aug 2004 23:43:29 -0000      1.1.1.3
-+++ extras/Mesa/docs/intro.html        15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -156,7 +156,6 @@
- <ul>
- <li>GL_ARB_occlusion_query
- <li>GL_ARB_vertex_buffer_object
--<li>GL_ARB_texture_non_power_of_two
- <li>GL_EXT_shadow_funcs
- </ul>
- <p>
-Index: extras/Mesa/docs/libraries.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/libraries.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/libraries.html    12 Aug 2004 23:43:29 -0000      1.1.1.3
-+++ extras/Mesa/docs/libraries.html    15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -36,7 +36,7 @@
- </a> - a scene-graph library
- <li><a href="http://www.openvrml.org/" target="_parent">OpenVRML</a>
- - a VRML parsing/display library with "lookat" - an example VRML browser
--<li><a href="http://www.woodsoup.org/projs/plib" target="_parent">PLIB</a> - A collection of portable games libraries, including an OpenGL GUI and a simple Scene Graph API
-+<li><a href="http://plib.sourceforge.net/" target="_parent">PLIB</a> - A collection of portable games libraries, including an OpenGL GUI and a simple Scene Graph API
- <li><a href="ftp://ftp.troll.no/contest/Pryan-1.2.tar.gz" target="_parent">Pryan</a> - an OpenInventor-like toolkit
- <li><a href="http://starship.python.net:9673/crew/da/Code/PyOpenGL" target="_parent">PyOpenGL</a> - OpenGL interface for Python
- <li><a href="http://www.quesa.org/" target="_parent">Quesa</a> - QuickDraw3D-compatible library based on OpenGL, Mesa or Direct3D
-Index: extras/Mesa/docs/news.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/news.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/news.html 12 Aug 2004 23:43:30 -0000      1.1.1.3
-+++ extras/Mesa/docs/news.html 15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -7,6 +7,128 @@
- <H1>News</H1>
-+<h2>December 9, 2004</h2>
-+<p>
-+Mesa 6.2.1 has been released.
-+This is a stable release which just fixes bugs since the 6.2 release.
-+</p>
-+<pre>
-+    Bug fixes:
-+      - don't apply regular fog or color sum when using a fragment program
-+      - glProgramEnvParameter4fARB always generated an error on
-+        GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645)
-+      - glVertexAttrib3svNV and glVertexAttrib3svARB were broken
-+      - fixed width/height mix-up in glSeparableFilter2D()
-+      - fixed regression in glCopyPixels + convolution
-+      - glReadPixels from a clipped front color buffer didn't always work
-+      - glTexImage didn't accept GL_RED/GREEN/BLUE as the format
-+      - Attempting queries/accesses of VBO 0 weren't detected as errors
-+      - paletted textures failed if the palette had fewer that 256 entries
-+    Changes:
-+      - fixed a bunch of compiler warnings found with gcc 3.4
-+      - bug reports should to go bugzilla.freedesktop.org
-+</pre>
-+<p>
-+The MD5 checksums are:
-+</p>
-+<pre>
-+tbd
-+</pre>
-+
-+
-+<h2>October 2, 2004</h2>
-+<p>
-+Mesa 6.2 has been released.
-+This is a stable release which just fixes bugs since the 6.1 release.
-+</p>
-+<pre>
-+    New:
-+      - enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle)
-+      - updated Doxygen support (Jose Fonseca)
-+    Changes:
-+      - some GGI driver updates (Christoph Egger, bug 1025977)
-+    Bug fixes:
-+      - Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features
-+      - fixed a few compilation issues on IRIX
-+      - fixed a matrix classification bug (reported by Wes Bethel)
-+      - we weren't reseting the vertex/fragment program error state
-+        before parsing (Dave Reveman)
-+      - adjust texcoords for sampling texture rectangles (Dave Reveman)
-+      - glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented
-+      - repeated calls to glDeleteTexture(t) could lead to a crash
-+      - fixed potential ref count bugs in VBOs and vertex/fragment programs
-+      - spriteblast demo didn't handle window size changes correctly
-+      - glTexSubImage didn't handle pixels=NULL correctly for PBOs
-+      - fixed color index mode glDrawPixels bug (Karl Schultz)
-+</pre>
-+<p>
-+The MD5 checksums are:
-+</p>
-+<pre>
-+9e8f34b059272dbb8e1f2c968b33bbf0  MesaLib-6.2.tar.gz
-+3d6a6362390b6a37d3cb2e615f3ac7db  MesaLib-6.2.tar.bz2
-+6cfd7895d28e695c0dbbed9469564091  MesaLib-6.2.zip
-+3e06e33b0809f09855cb60883b8bdfef  MesaDemos-6.2.tar.gz
-+9d160009c3dfdb35fe7e4088c9ba8f85  MesaDemos-6.2.tar.bz2
-+856f7ec947122eb3c8985ebc2f654dcd  MesaDemos-6.2.zip
-+</pre>
-+
-+
-+<h2>August 18, 2004</h2>
-+<p>
-+Mesa 6.1 has been released.
-+This is a new development release (version 6.2 will be a stabilization
-+release).
-+</p>
-+<pre>
-+    New:
-+      - Revamped Makefile system
-+      - glXUseRotatedXFont() utility (see xdemos/xuserotfont.c)
-+      - internal driver interface changes related to texture object
-+        allocation, vertex/fragment programs, BlendEquationSeparate, etc.
-+      - option to walk triangle edges with double-precision floats
-+        (Justin Novosad of Discreet) (see config.h file)
-+      - support for AUX buffers in software GLX driver
-+      - updated glext.h to version 24 and glxext.h to version 6
-+      - new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars
-+      - updated BeOS support (Philippe Houdoin)
-+    Changes:
-+      - fragment fog interpolation is perspective corrected now
-+      - new glTexImage code, much cleaner, may be a bit faster
-+    Bug fixes:
-+      - glArrayElement in display lists didn't handle generic vertex attribs
-+      - glFogCoord didn't always work properly
-+      - ARB_fragment_program fog options didn't work
-+      - frag prog TEX instruction no longer incorrectly divides s,t,r by q
-+      - ARB frag prog TEX and TEXP instructions now use LOD=0
-+      - glTexEnviv in display lists didn't work
-+      - glRasterPos didn't do texgen or apply texture matrix
-+      - GL_DOUBLE-valued vertex arrays were broken in some cases
-+      - fixed texture rectangle edge/border sampling bugs
-+      - sampling an incomplete texture in a fragment program would segfault
-+      - glTexImage was missing a few error checks
-+      - fixed some minor glGetTexParameter glitches
-+      - GL_INTENSITY was mistakenly accepted as a <format> to glTexImage
-+      - fragment program writes to RC/HC register were broken
-+      - fixed a few glitches in GL_HP_occlusion_test extension
-+      - glBeginQueryARB and glEndQueryARB didn't work inside display lists
-+      - vertex program state references were broken
-+      - fixed triangle color interpolation bug on AIX (Shane Blackett)
-+      - fixed a number of minor memory leaks (bug #1002030)
-+</pre>
-+The MD5 checksums are:
-+</p>
-+<pre>
-+c9284d295ebcd2e0486cc3cd54e5863c  MesaLib-6.1.tar.gz
-+5de1f53ec0709f60fc68fdfed57351f3  MesaLib-6.1.tar.bz2
-+483e77cac4789a5d36c42f3c0136d6d8  MesaLib-6.1.zip
-+8c46cfa6f9732acc6f6c25724aad0246  MesaDemos-6.1.tar.gz
-+89bfe0f6c69b39fd0ebd9fff481a4e9b  MesaDemos-6.1.tar.bz2
-+161268531fcc6f0c5a056430ee97e0c1  MesaDemos-6.1.zip
-+</pre>
-+
-+
-+
- <h2>April 2, 2004</h2>
- <p>
-@@ -831,6 +953,6 @@
- <hr>
--$Id$
-+$Id$
- </body>
- </html>
-\ No newline at end of file
-Index: extras/Mesa/docs/osmesa.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/osmesa.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/osmesa.html       12 Aug 2004 23:43:30 -0000      1.1.1.3
-+++ extras/Mesa/docs/osmesa.html       15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -43,16 +43,14 @@
- <p>
-    To build Mesa/OSMesa with 16-bit color channels:
- <pre>
--      cd Mesa-5.x/src
--      make -f Makefile.X11 clean
--      make -f Makefile.OSMesa16 linux-osmesa16
-+      make realclean
-+      make linux-osmesa16
- </pre>
-    For 32-bit channels:
- <pre>
--      cd Mesa-5.x/src
--      make -f Makefile.X11 clean
--      make -f Makefile.OSMesa16 linux-osmesa32
-+      make realclean
-+      make linux-osmesa32
- </pre>
- <p>
-@@ -60,13 +58,12 @@
- </p>
- <p>
--If you're not using Linux, you can easily edit Make-config and add
--an appropriate configuration.
--</p>
--<p>
--The Mesa/tests/osdemo16.c file (available via CVS) demonstrates how
--to use this feature.
-+If you need to compile on a non-Linux platform, copy Mesa/configs/linux-osmesa16
-+to a new config file and edit it as needed.  Then, add the new config name to
-+the top-level Makefile.  Send a patch to the Mesa developers too, if you're
-+inclined.
- </p>
-+
- <p>
- BE WARNED: 16 and 32-bit channel support has not been exhaustively
- tested and there may be some bugs.  However, a number of people have
-Index: extras/Mesa/docs/relnotes.html
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/docs/relnotes.html,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/docs/relnotes.html     12 Aug 2004 23:43:30 -0000      1.1.1.3
-+++ extras/Mesa/docs/relnotes.html     15 Dec 2004 01:50:56 -0000      1.1.1.3.2.1
-@@ -11,6 +11,8 @@
- </p>
- <UL>
-+<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>
-+<LI><A HREF="RELNOTES-6.2">RELNOTES-6.2</A>
- <LI><A HREF="RELNOTES-6.1">RELNOTES-6.1</A>
- <LI><A HREF="RELNOTES-6.0">RELNOTES-6.0</A>
- <LI><A HREF="RELNOTES-5.1">RELNOTES-5.1</A>
-Index: extras/Mesa/include/GL/gl.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/gl.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- extras/Mesa/include/GL/gl.h        21 Jun 2004 13:35:05 -0000      1.2
-+++ extras/Mesa/include/GL/gl.h        15 Dec 2004 01:50:56 -0000      1.2.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-Index: extras/Mesa/include/GL/gl_mangle.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/gl_mangle.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/include/GL/gl_mangle.h 16 Jun 2004 09:16:30 -0000      1.1.1.1
-+++ extras/Mesa/include/GL/gl_mangle.h 15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -30,6 +30,7 @@
- /* Internal symbols which may collide with other OpenGL implementations. */
- #define __glCoreCreateContext __mglCoreCreateContext
- #define __glCoreNopDispatch   __mglCoreNopDispatch
-+#define gl__unused413 MANGLE(__unused413)
- /*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
-Index: extras/Mesa/include/GL/glut.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/glut.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/include/GL/glut.h      16 Jun 2004 09:16:32 -0000      1.1.1.1
-+++ extras/Mesa/include/GL/glut.h      15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -75,7 +75,7 @@
-    To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
- /* XXX This is from Win32's <process.h> */
--# if !defined(_MSC_VER) && !defined(__cdecl)
-+# if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__cdecl)
-    /* Define __cdecl for non-Microsoft compilers. */
- #  define __cdecl
- #  define GLUT_DEFINED___CDECL
-@@ -108,7 +108,7 @@
-    and redifinition of Windows system defs, also removes requirement of
-    pretty much any standard windows header from this file */
--#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
-+#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
- #     define GLUTAPIENTRY __stdcall
- #else
- #     define GLUTAPIENTRY
-@@ -664,7 +664,8 @@
- GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type);
- #endif
- #if (GLUT_API_VERSION >= 5)
--GLUTAPI void * GLUTAPIENTRY glutGetProcAddress(const char *procName);
-+typedef void (*GLUTproc)();
-+GLUTAPI GLUTproc GLUTAPIENTRY glutGetProcAddress(const char *procName);
- #endif
- /* GLUT font sub-API */
-Index: extras/Mesa/include/GL/glx.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/glx.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/include/GL/glx.h       16 Jun 2004 09:16:33 -0000      1.1.1.1
-+++ extras/Mesa/include/GL/glx.h       15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -1,8 +1,8 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  * 
-- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  * 
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -46,7 +46,7 @@
- #if defined(USE_MGL_NAMESPACE)
--#include <GL/glx_mangle.h>
-+#include "glx_mangle.h"
- #endif
-Index: extras/Mesa/include/GL/wmesa.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/wmesa.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/include/GL/wmesa.h     16 Jun 2004 09:16:34 -0000      1.1.1.1
-+++ extras/Mesa/include/GL/wmesa.h     15 Dec 2004 01:50:56 -0000      1.1.1.1.4.1
-@@ -52,15 +52,17 @@
- #include "gl\gl.h"
--#pragma warning (disable:4273)
--#pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
--#pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
--#pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
--#pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
--#pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
--#pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
--#if (MESA_WARNQUIET>1)
--#     pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
-+#if defined(_MSV_VER) && !defined(__GNUC__)
-+#  pragma warning (disable:4273)
-+#  pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-+#  pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-+#  pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-+#  pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
-+#  pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-+#  pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
-+#  if (MESA_WARNQUIET>1)
-+#    pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
-+#  endif
- #endif
- /*
-Index: extras/Mesa/include/GL/internal/dri_interface.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/include/GL/internal/dri_interface.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/include/GL/internal/dri_interface.h    22 Jul 2004 06:49:46 -0000      1.1.1.2
-+++ extras/Mesa/include/GL/internal/dri_interface.h    15 Dec 2004 01:50:57 -0000      1.1.1.2.4.1
-@@ -149,6 +149,8 @@
-     int * backX, int * backY,
-     int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
-+/* Test for the xf86dri.h header file */
-+#ifndef _XF86DRI_H_
- extern GLboolean XF86DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
-     __DRIid context_id );
-@@ -157,6 +159,7 @@
- extern GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen, 
-     __DRIid drawable);
-+#endif
- /*@}*/
-Index: extras/Mesa/src/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/Makefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/Makefile   16 Jun 2004 09:17:09 -0000      1.1.1.1
-+++ extras/Mesa/src/Makefile   15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -7,7 +7,11 @@
- SUBDIRS = $(SRC_DIRS)
--default: $(LIB_DIR) subdirs
-+default: message $(LIB_DIR) subdirs
-+
-+
-+message:
-+      @echo "Making sources for" $(CONFIG_NAME)
- subdirs:
-Index: extras/Mesa/src/glx/mini/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/glx/mini/Makefile,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/glx/mini/Makefile  22 Jul 2004 06:51:13 -0000      1.1.1.2
-+++ extras/Mesa/src/glx/mini/Makefile  15 Dec 2004 01:50:57 -0000      1.1.1.2.4.1
-@@ -18,7 +18,10 @@
-         miniglx.c \
-         miniglx_events.c
--OBJECTS = $(C_SOURCES:.c=.o)
-+X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S
-+
-+OBJECTS = $(C_SOURCES:.c=.o) \
-+        $(ASM_SOURCES:.S=.o)
- INCLUDES = -I. $(INCLUDE_DIRS)
-Index: extras/Mesa/src/glx/mini/miniglx.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/glx/mini/miniglx.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/glx/mini/miniglx.c 12 Aug 2004 23:04:47 -0000      1.1.1.3
-+++ extras/Mesa/src/glx/mini/miniglx.c 15 Dec 2004 01:50:57 -0000      1.1.1.3.2.1
-@@ -1711,7 +1711,7 @@
-    GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits = 0;
-    GLint indexBits = 0, depthBits = 0, stencilBits = 0;
-    GLint numSamples = 0;
--   int i;
-+   int i=0;
-    /*
-     * XXX in the future, <screen> might be interpreted as a VT
-@@ -1805,6 +1805,7 @@
-    (void) alphaBits;
-    (void) stereoFlag;
-    for ( mode = dpy->driver_modes ; mode != NULL ; mode = mode->next ) {
-+     i++;
-       if (mode->rgbMode == rgbFlag &&
-           mode->doubleBufferMode == dbFlag &&
-           mode->redBits >= redBits &&
-@@ -2149,7 +2150,8 @@
- {
-     GLXDrawable drawable = (GLXDrawable) draw;
-     drm_clip_rect_t * cliprect;
--
-+    Display* display = (Display*)dpy;
-+    __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private;
-     if (drawable == 0) {
-         return GL_FALSE;
-     }
-@@ -2159,15 +2161,20 @@
-     cliprect->y1 = drawable->y;
-     cliprect->x2 = drawable->x + drawable->w;
-     cliprect->y2 = drawable->y + drawable->h;
-+    
-+    /* the drawable index is by client id */
-+    *index = display->clientID;
-+    *stamp = pcp->driScreenPriv->pSAREA->drawableTable[display->clientID].stamp;
-     *x = drawable->x;
-     *y = drawable->y;
-     *width = drawable->w;
-     *height = drawable->h;
-     *numClipRects = 1;
-     *pClipRects = cliprect;
--    *backX = 0;
--    *backY = 0;
-+    
-+    *backX = drawable->x;
-+    *backY = drawable->y;
-     *numBackClipRects = 0;
-     *pBackClipRects = 0;
-Index: extras/Mesa/src/mesa/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/Makefile,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/Makefile      28 Aug 2004 04:27:07 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/Makefile      15 Dec 2004 01:50:57 -0000      1.1.1.3.2.1
-@@ -176,7 +176,7 @@
- clean:
-       -rm -f */*.o
--      -rm -f depend mesa.a
-+      -rm -f depend depend.bak mesa.a
-       -rm -f drivers/*/*.o
-       (cd drivers/dri ; $(MAKE) clean)
-Index: extras/Mesa/src/mesa/Makefile.BeOS
-===================================================================
-RCS file: extras/Mesa/src/mesa/Makefile.BeOS
-diff -N extras/Mesa/src/mesa/Makefile.BeOS
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/Makefile.BeOS 15 Dec 2004 01:50:57 -0000      1.2.2.1
-@@ -0,0 +1,303 @@
-+# Mesa 3-D graphics library
-+# Version:  5.1
-+# 
-+# Copyright (C) 1995-2003  Brian Paul   All Rights Reserved.
-+# 
-+# Permission is hereby granted, free of charge, to any person obtaining a
-+# copy of this software and associated documentation files (the "Software"),
-+# to deal in the Software without restriction, including without limitation
-+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+# and/or sell copies of the Software, and to permit persons to whom the
-+# Software is furnished to do so, subject to the following conditions:
-+# 
-+# The above copyright notice and this permission notice shall be included
-+# in all copies or substantial portions of the Software.
-+# 
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-+# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+#
-+# BeOS driver makefile v1.0 for Mesa 5.1.x
-+#
-+#  Copyright (C) 2002-2003 - Philippe Houdoin
-+#  Email : philippe.houdoin@free.fr
-+#  Web   : http://philippe.houdoin.free.fr/phil/beos/index-en.html
-+#
-+# -------------------------------------------------------------------
-+
-+## BeOS Generic Makefile v2.0 ##
-+
-+## Fill in this file to specify the project being created, and the referenced
-+## makefile-engine will do all of the hard work for you.  This handles both
-+## Intel and PowerPC builds of the BeOS.
-+
-+## Application Specific Settings ---------------------------------------------
-+
-+# specify the name of the binary
-+NAME= libGL.so
-+
-+# specify the type of binary
-+#     APP:    Application
-+#     SHARED: Shared library or add-on
-+#     STATIC: Static library archive
-+#     DRIVER: Kernel Driver
-+TYPE= SHARED
-+
-+#     specify the source files to use
-+#     full paths or paths relative to the makefile can be included
-+#     all files, regardless of directory, will have their object
-+#     files created in the common object directory.
-+#     Note that this means this makefile will not work correctly
-+#     if two source files with the same name (source.c or source.cpp)
-+#     are included from different directories.  Also note that spaces
-+#     in folder names do not work well with this makefile.
-+
-+
-+include sources
-+
-+
-+BEOS_DRIVER_SOURCES = \
-+      drivers/beos/GLView.cpp
-+              
-+MESA_DEFINES =
-+ASM_SOURCES =
-+
-+# To use GAS assembler, uncomment this line instead:
-+MESA_DEFINES += GNU_ASSEMBLER
-+# To use NASM assembler, uncomment this line instead:
-+# MESA_DEFINES += NASM_ASSEMBLER
-+# To build a DEBUG version of Mesa, uncomment this line instead:
-+# MESA_DEFINES += DEBUG
-+
-+# x86-optimized code
-+MACHINE=$(shell uname -m)
-+ifeq ($(MACHINE), BePC)
-+      MESA_DEFINES += USE_X86_ASM USE_SSE_ASM USE_MMX_ASM
-+      MESA_DEFINES += USE_3DNOW_ASM
-+      ASM_SOURCES = $(X86_SOURCES)
-+else
-+      # No assembly optimization for PowerPC...
-+      # HAVE_ALTIVEC=1
-+endif
-+
-+# FIXME: SI-GLU version support currently broken
-+# USE_SI_GLU=1
-+ifdef USE_SI_GLU
-+      GLU_SOURCES = \
-+      ../si-glu/libutil/error.c               \
-+      ../si-glu/libutil/glue.c                \
-+      ../si-glu/libutil/mipmap.c      \
-+      ../si-glu/libutil/project.c     \
-+      ../si-glu/libutil/quad.c                \
-+      ../si-glu/libutil/registry.c    \
-+      ../si-glu/libtess/dict.c                \
-+      ../si-glu/libtess/geom.c                \
-+      ../si-glu/libtess/memalloc.c    \
-+      ../si-glu/libtess/mesh.c                \
-+      ../si-glu/libtess/normal.c      \
-+      ../si-glu/libtess/priorityq.c   \
-+      ../si-glu/libtess/render.c      \
-+      ../si-glu/libtess/sweep.c               \
-+      ../si-glu/libtess/tess.c                \
-+      ../si-glu/libtess/tessmono.c    \
-+      ../si-glu/libnurbs/interface/bezierEval.cc              \
-+      ../si-glu/libnurbs/interface/bezierPatch.cc             \
-+      ../si-glu/libnurbs/interface/bezierPatchMesh.cc         \
-+      ../si-glu/libnurbs/interface/glcurveval.cc              \
-+      ../si-glu/libnurbs/interface/glinterface.cc             \
-+      ../si-glu/libnurbs/interface/glrenderer.cc              \
-+      ../si-glu/libnurbs/interface/glsurfeval.cc              \
-+      ../si-glu/libnurbs/interface/incurveeval.cc             \
-+      ../si-glu/libnurbs/interface/insurfeval.cc              \
-+      ../si-glu/libnurbs/internals/arc.cc                     \
-+      ../si-glu/libnurbs/internals/arcsorter.cc                       \
-+      ../si-glu/libnurbs/internals/arctess.cc                 \
-+      ../si-glu/libnurbs/internals/backend.cc                 \
-+      ../si-glu/libnurbs/internals/basiccrveval.cc            \
-+      ../si-glu/libnurbs/internals/basicsurfeval.cc           \
-+      ../si-glu/libnurbs/internals/bin.cc                     \
-+      ../si-glu/libnurbs/internals/bufpool.cc                 \
-+      ../si-glu/libnurbs/internals/cachingeval.cc             \
-+      ../si-glu/libnurbs/internals/ccw.cc                     \
-+      ../si-glu/libnurbs/internals/coveandtiler.cc            \
-+      ../si-glu/libnurbs/internals/curve.cc                   \
-+      ../si-glu/libnurbs/internals/curvelist.cc                       \
-+      ../si-glu/libnurbs/internals/curvesub.cc                        \
-+      ../si-glu/libnurbs/internals/dataTransform.cc           \
-+      ../si-glu/libnurbs/internals/displaylist.cc             \
-+      ../si-glu/libnurbs/internals/flist.cc                   \
-+      ../si-glu/libnurbs/internals/flistsorter.cc             \
-+      ../si-glu/libnurbs/internals/hull.cc                    \
-+      ../si-glu/libnurbs/internals/intersect.cc                       \
-+      ../si-glu/libnurbs/internals/knotvector.cc              \
-+      ../si-glu/libnurbs/internals/mapdesc.cc                 \
-+      ../si-glu/libnurbs/internals/mapdescv.cc                        \
-+      ../si-glu/libnurbs/internals/maplist.cc                 \
-+      ../si-glu/libnurbs/internals/mesher.cc                  \
-+      ../si-glu/libnurbs/internals/monoTriangulationBackend.cc        \
-+      ../si-glu/libnurbs/internals/monotonizer.cc             \
-+      ../si-glu/libnurbs/internals/mycode.cc                  \
-+      ../si-glu/libnurbs/internals/nurbsinterfac.cc           \
-+      ../si-glu/libnurbs/internals/nurbstess.cc                       \
-+      ../si-glu/libnurbs/internals/patch.cc                   \
-+      ../si-glu/libnurbs/internals/patchlist.cc                       \
-+      ../si-glu/libnurbs/internals/quilt.cc                   \
-+      ../si-glu/libnurbs/internals/reader.cc                  \
-+      ../si-glu/libnurbs/internals/renderhints.cc             \
-+      ../si-glu/libnurbs/internals/slicer.cc                  \
-+      ../si-glu/libnurbs/internals/sorter.cc                  \
-+      ../si-glu/libnurbs/internals/splitarcs.cc                       \
-+      ../si-glu/libnurbs/internals/subdivider.cc              \
-+      ../si-glu/libnurbs/internals/tobezier.cc                        \
-+      ../si-glu/libnurbs/internals/trimline.cc                        \
-+      ../si-glu/libnurbs/internals/trimregion.cc              \
-+      ../si-glu/libnurbs/internals/trimvertpool.cc            \
-+      ../si-glu/libnurbs/internals/uarray.cc                  \
-+      ../si-glu/libnurbs/internals/varray.cc                  \
-+      ../si-glu/libnurbs/nurbtess/directedLine.cc             \
-+      ../si-glu/libnurbs/nurbtess/gridWrap.cc                 \
-+      ../si-glu/libnurbs/nurbtess/monoChain.cc                        \
-+      ../si-glu/libnurbs/nurbtess/monoPolyPart.cc             \
-+      ../si-glu/libnurbs/nurbtess/monoTriangulation.cc                \
-+      ../si-glu/libnurbs/nurbtess/partitionX.cc                       \
-+      ../si-glu/libnurbs/nurbtess/partitionY.cc                       \
-+      ../si-glu/libnurbs/nurbtess/polyDBG.cc                  \
-+      ../si-glu/libnurbs/nurbtess/polyUtil.cc                 \
-+      ../si-glu/libnurbs/nurbtess/primitiveStream.cc          \
-+      ../si-glu/libnurbs/nurbtess/quicksort.cc                        \
-+      ../si-glu/libnurbs/nurbtess/rectBlock.cc                        \
-+      ../si-glu/libnurbs/nurbtess/sampleComp.cc                       \
-+      ../si-glu/libnurbs/nurbtess/sampleCompBot.cc            \
-+      ../si-glu/libnurbs/nurbtess/sampleCompRight.cc          \
-+      ../si-glu/libnurbs/nurbtess/sampleCompTop.cc            \
-+      ../si-glu/libnurbs/nurbtess/sampleMonoPoly.cc           \
-+      ../si-glu/libnurbs/nurbtess/sampledLine.cc              \
-+      ../si-glu/libnurbs/nurbtess/searchTree.cc
-+else
-+      GLU_SOURCES = \
-+      ../glu/mesa/glu.c \
-+      ../glu/mesa/mipmap.c \
-+      ../glu/mesa/project.c \
-+      ../glu/mesa/quadric.c \
-+      ../glu/mesa/tess.c \
-+      ../glu/mesa/tesselat.c \
-+      ../glu/mesa/polytest.c \
-+      ../glu/mesa/nurbs.c \
-+      ../glu/mesa/nurbscrv.c \
-+      ../glu/mesa/nurbssrf.c \
-+      ../glu/mesa/nurbsutl.c
-+endif
-+
-+MESA_SOURCES =        $(CORE_SOURCES) $(ASM_SOURCES)
-+
-+SRCS =  $(MESA_SOURCES) $(GLU_SOURCES) $(BEOS_DRIVER_SOURCES) 
-+              
-+#     specify the resource files to use
-+#     full path or a relative path to the resource file can be used.
-+RSRCS = 
-+
-+#     specify additional libraries to link against
-+#     there are two acceptable forms of library specifications
-+#     -       if your library follows the naming pattern of:
-+#             libXXX.so or libXXX.a you can simply specify XXX
-+#             library: libbe.so entry: be
-+#             
-+#     -       if your library does not follow the standard library
-+#             naming scheme you need to specify the path to the library
-+#             and it's name
-+#             library: my_lib.a entry: my_lib.a or path/my_lib.a
-+LIBS = be
-+              
-+#     specify additional paths to directories following the standard
-+#     libXXX.so or libXXX.a naming scheme.  You can specify full paths
-+#     or paths relative to the makefile.  The paths included may not
-+#     be recursive, so include all of the paths where libraries can
-+#     be found.  Directories where source files are found are
-+#     automatically included.
-+LIBPATHS =
-+
-+#     additional paths to look for system headers
-+#     thes use the form: #include <header>
-+#     source file directories are NOT auto-included here
-+SYSTEM_INCLUDE_PATHS = ../../include 
-+
-+ifdef USE_SI_GLU
-+      SYSTEM_INCLUDE_PATHS += ../glu/sgi/include
-+endif
-+
-+#     additional paths to look for local headers
-+#     thes use the form: #include "header"
-+#     source file directories are automatically included
-+LOCAL_INCLUDE_PATHS = \
-+      . \
-+      ./main \
-+      ./glapi \
-+      ./math \
-+      ./transform \
-+      ./swrast \
-+      ./swrast_setup \
-+      ./tnl \
-+      ./tnl_dd
-+
-+#     specify the level of optimization that you desire
-+#     NONE, SOME, FULL
-+OPTIMIZE = FULL
-+
-+#     specify any preprocessor symbols to be defined.  The symbols
-+#     will be set to a value of 1.  For example specify DEBUG if you want
-+#     DEBUG=1 to be set when compiling.
-+DEFINES = $(MESA_DEFINES)
-+
-+#     specify special warning levels
-+#     if unspecified default warnings will be used
-+#     NONE = suppress all warnings
-+#     ALL = enable all warnings
-+WARNINGS = ALL
-+
-+#     specify whether image symbols will be created
-+#     so that stack crawls in the debugger are meaningful
-+#     if TRUE symbols will be created
-+SYMBOLS = TRUE 
-+
-+#     specify debug settings
-+#     if TRUE will allow application to be run from
-+#     a source-level debugger
-+# DEBUGGER = TRUE
-+DEBUGGER = FALSE
-+
-+#     specify additional compiler flags for all files
-+COMPILER_FLAGS = 
-+
-+#     specify additional linker flags
-+LINKER_FLAGS =
-+
-+
-+
-+## include the makefile-engine
-+include /boot/develop/etc/makefile-engine
-+
-+
-+
-+# x86/matypes.h include file is *generated*!
-+# Rules to (re)generate it as needed:
-+
-+x86/common_x86_asm.S : x86/matypes.h
-+
-+x86/matypes.h : x86/gen_matypes.c
-+      @echo "(Re-)Generating $@ ..."
-+      $(CC) $< $(INCLUDES) $(CFLAGS)  -o x86/gen_matypes
-+      x86/gen_matypes > $@
-+      rm -f x86/gen_matypes
-+
-+## Add NASM support for assembly code compilation...
-+# $(OBJ_DIR)/%.o : %.nasm
-+#     nasm -f elf $(MESA_DEFINES) -o $@ $<
-+
-+$(OBJ_DIR)/%.o : %.S
-+      gcc -c $< $(INCLUDES) $(CFLAGS) -o $@
-+#     gcc $(INCLUDES) $(CFLAGS) -E $< | grep -v '^$$' > $(addsuffix .nasm, $(basename $<))
-+#     nasm -f elf $(MESA_DEFINES) -o $@ $(addsuffix .nasm, $(basename $<))
-+
-Index: extras/Mesa/src/mesa/Makefile.mgw
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/Makefile.mgw,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/Makefile.mgw  22 Jul 2004 06:51:14 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/Makefile.mgw  15 Dec 2004 01:50:57 -0000      1.1.1.2.4.1
-@@ -40,6 +40,9 @@
- #                     As a consequence, you'll need the Win32 Glide3
- #                     library to build any application.
- #                     default = no
-+#     ICD=1           build the installable client driver interface
-+#                     (windows opengl driver interface)
-+#                     default = no
- #     X86=1           optimize for x86 (if possible, use MMX, SSE, 3DNow).
- #                     default = no
- #
-@@ -57,8 +60,13 @@
- TOP = ../..
- GLIDE ?= $(TOP)/glide3
- LIBDIR = $(TOP)/lib
--GL_DLL = opengl32.dll
--GL_IMP = libopengl32.a
-+ifeq ($(ICD),1)
-+  GL_DLL = mesa32.dll
-+  GL_IMP = libmesa32.a
-+else
-+  GL_DLL = opengl32.dll
-+  GL_IMP = libopengl32.a
-+endif
- LDLIBS = -lgdi32
-@@ -66,12 +74,17 @@
- CFLAGS += -DBUILD_GL32 -D_OPENGL32_ -D_MSC_VER
- CFLAGS += $(INCLUDE_DIRS)
- ifeq ($(FX),1)
--CFLAGS += -I$(GLIDE)/include -DFX
--LDLIBS += -L$(GLIDE)/lib -lglide3x
--GL_DEF = drivers/glide/fxopengl.def
--GL_RES = drivers/glide/fx.rc
-+  CFLAGS += -I$(GLIDE)/include -DFX
-+  LDLIBS += -L$(GLIDE)/lib -lglide3x
-+  GL_DEF = drivers/glide/fxopengl.def
-+  GL_RES = drivers/glide/fx.rc
- else
--GL_DEF = drivers/windows/gdi/mesa.def
-+  ifeq ($(ICD),1)
-+    CFLAGS += -DUSE_MGL_NAMESPACE
-+    GL_DEF = drivers/windows/icd/mesa.def
-+  else    
-+    GL_DEF = drivers/windows/gdi/mesa.def
-+  endif
- endif
- AR = ar
-@@ -100,10 +113,16 @@
-       $(GLIDE_DRIVER_SOURCES) \
-       drivers/glide/fxwgl.c
- else
-+ifeq ($(ICD),1)
-+DRIVER_SOURCES = \
-+      drivers/windows/gdi/wmesa.c \
-+      drivers/windows/icd/icd.c
-+else
- DRIVER_SOURCES = \
-       drivers/windows/gdi/wmesa.c \
-       drivers/windows/gdi/wgl.c
- endif
-+endif
- SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES)
-@@ -138,10 +157,18 @@
- # [dBorca]
- # glapi_x86.S needs some adjustments
- # in order to generate correct entrypoints
-+# Trick: change the following condition to
-+# be always false if you need C entrypoints
-+# with USE_X86_ASM (useful for trace/debug)
-+ifeq (1,1)
- x86/glapi_x86.o: x86/glapi_x86.S
-       $(CC) -o $@ $(CFLAGS) -U__WIN32__ -DSTDCALL_API -c $<
--#main/dispatch.o: main/dispatch.c
--#     $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<
-+else
-+main/dispatch.o: main/dispatch.c
-+      $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<
-+glapi/glapi.o: glapi/glapi.c
-+      $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<
-+endif
- # [dBorca]
- # if we want codegen, we have to stdcall
-@@ -161,5 +188,6 @@
-       -$(call UNLINK,x86/*.o)
-       -$(call UNLINK,drivers/common/*.o)
-       -$(call UNLINK,drivers/windows/gdi/*.o)
-+      -$(call UNLINK,drivers/windows/icd/*.o)
-       -$(call UNLINK,drivers/glide/*.o)
-       -$(call UNLINK,drivers/glide/*.res)
-Index: extras/Mesa/src/mesa/array_cache/ac_import.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/array_cache/ac_import.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/array_cache/ac_import.c       22 Jul 2004 06:51:21 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/array_cache/ac_import.c       15 Dec 2004 01:50:57 -0000      1.1.1.2.4.1
-@@ -276,6 +276,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.TexCoord[unit];
-    struct gl_client_array *to = &ac->Cache.TexCoord[unit];
-+   (void) type; (void) stride;
-    ASSERT(unit < ctx->Const.MaxTextureCoordUnits);
-@@ -305,6 +306,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.Vertex;
-    struct gl_client_array *to = &ac->Cache.Vertex;
-+   (void) type; (void) stride;
-    /* Limited choices at this stage:
-     */
-@@ -331,6 +333,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.Normal;
-    struct gl_client_array *to = &ac->Cache.Normal;
-+   (void) type; (void) stride;
-    /* Limited choices at this stage:
-     */
-@@ -355,6 +358,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.Color;
-    struct gl_client_array *to = &ac->Cache.Color;
-+   (void) stride;
-    import( ctx, type, to, from );
-    
-@@ -367,6 +371,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.Index;
-    struct gl_client_array *to = &ac->Cache.Index;
-+   (void) type; (void) stride;
-    /* Limited choices at this stage:
-     */
-@@ -391,6 +396,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.SecondaryColor;
-    struct gl_client_array *to = &ac->Cache.SecondaryColor;
-+   (void) stride;
-    import( ctx, type, to, from );
-@@ -403,6 +409,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.FogCoord;
-    struct gl_client_array *to = &ac->Cache.FogCoord;
-+   (void) type; (void) stride;
-    /* Limited choices at this stage:
-     */
-@@ -427,6 +434,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.EdgeFlag;
-    struct gl_client_array *to = &ac->Cache.EdgeFlag;
-+   (void) type; (void) stride;
-    /* Limited choices at this stage:
-     */
-@@ -451,6 +459,7 @@
-    ACcontext *ac = AC_CONTEXT(ctx);
-    const struct gl_client_array *from = &ac->Raw.Attrib[index];
-    struct gl_client_array *to = &ac->Cache.Attrib[index];
-+   (void) type; (void) stride;
-    ASSERT(index < VERT_ATTRIB_MAX);
-Index: extras/Mesa/src/mesa/drivers/beos/GLView.h
-===================================================================
-RCS file: extras/Mesa/src/mesa/drivers/beos/GLView.h
-diff -N extras/Mesa/src/mesa/drivers/beos/GLView.h
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/drivers/beos/GLView.h 15 Dec 2004 01:50:57 -0000      1.2.2.1
-@@ -0,0 +1,196 @@
-+/*******************************************************************************
-+/
-+/     File:           GLView.h
-+/
-+/     Copyright 1993-98, Be Incorporated, All Rights Reserved.
-+/
-+*******************************************************************************/
-+
-+#ifndef BGLVIEW_H
-+#define BGLVIEW_H
-+
-+// added by Brian Paul:
-+#ifndef BGL_RGB
-+#define BGL_RGB                       0
-+#define BGL_INDEX             1 
-+#define BGL_SINGLE            0
-+#define BGL_DOUBLE            2
-+#define BGL_DIRECT            0
-+#define BGL_INDIRECT          4
-+#define BGL_ACCUM             8
-+#define BGL_ALPHA             16
-+#define BGL_DEPTH             32
-+#define BGL_OVERLAY           64
-+#define BGL_UNDERLAY          128
-+#define BGL_STENCIL           512
-+#endif
-+
-+
-+#include <GL/gl.h>
-+#include <AppKit.h>
-+#include <interface/Window.h>
-+#include <interface/View.h>
-+#include <interface/Bitmap.h>
-+#include <game/WindowScreen.h>
-+#include <game/DirectWindow.h>
-+
-+class BGLView : public BView {
-+public:
-+
-+      BGLView(BRect rect, char *name,
-+                      ulong resizingMode, ulong mode,
-+                      ulong options);
-+      virtual ~BGLView();
-+
-+      void            LockGL();
-+      void            UnlockGL();
-+      void            SwapBuffers();
-+
-+        // Added for Mesa (can't be virtual!)
-+        void CopySubBufferMESA(GLint x, GLint y, GLuint width, GLuint height);
-+
-+      BView *     EmbeddedView();
-+      status_t    CopyPixelsOut(BPoint source, BBitmap *dest);
-+      status_t    CopyPixelsIn(BBitmap *source, BPoint dest);
-+
-+      virtual void        ErrorCallback(unsigned long errorCode); // GLenum errorCode);
-+              
-+      virtual void            Draw(BRect updateRect);
-+
-+      virtual void            AttachedToWindow();
-+      virtual void        AllAttached();
-+      virtual void        DetachedFromWindow();
-+      virtual void        AllDetached();
-+ 
-+      virtual void            FrameResized(float width, float height);
-+      virtual status_t    Perform(perform_code d, void *arg);
-+
-+      /* The public methods below, for the moment,
-+         are just pass-throughs to BView */
-+
-+      virtual status_t    Archive(BMessage *data, bool deep = true) const;
-+
-+      virtual void        MessageReceived(BMessage *msg);
-+      virtual void        SetResizingMode(uint32 mode);
-+
-+      virtual void        Show();
-+      virtual void        Hide();
-+
-+      virtual BHandler   *ResolveSpecifier(BMessage *msg, int32 index,
-+                                                      BMessage *specifier, int32 form,
-+                                                      const char *property);
-+      virtual status_t    GetSupportedSuites(BMessage *data);
-+
-+      /* New public functions */
-+      void            DirectConnected( direct_buffer_info *info );
-+      void            EnableDirectMode( bool enabled );
-+
-+private:
-+
-+      virtual void        _ReservedGLView1();
-+      virtual void        _ReservedGLView2(); 
-+      virtual void        _ReservedGLView3(); 
-+      virtual void        _ReservedGLView4(); 
-+      virtual void        _ReservedGLView5(); 
-+      virtual void        _ReservedGLView6(); 
-+      virtual void        _ReservedGLView7(); 
-+      virtual void        _ReservedGLView8(); 
-+
-+    BGLView(const BGLView &);
-+    BGLView     &operator=(const BGLView &);
-+
-+      void        dither_front();
-+      bool        confirm_dither();
-+      void        draw(BRect r);
-+              
-+      void *          m_gc;
-+      uint32          m_options;
-+      uint32      m_ditherCount;
-+      BLocker         m_drawLock;
-+      BLocker     m_displayLock;
-+#if OLD_GLVIEW
-+      BView *         m_embeddedFront;
-+      BView *     m_embeddedBack;
-+#else
-+      void *          m_clip_info;
-+      void *          _reserved1;
-+#endif
-+      BBitmap *   m_ditherMap;
-+      BRect       m_bounds;
-+      int16 *     m_errorBuffer[2];
-+      uint64      _reserved[8];
-+
-+      /* Direct Window stuff */
-+private:      
-+      void drawScanline( int x1, int x2, int y, void *data );
-+      static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2);
-+      void            lock_draw();
-+      void            unlock_draw();
-+      bool            validateView();
-+};
-+
-+
-+
-+class BGLScreen : public BWindowScreen {
-+public:
-+      BGLScreen(char *name,
-+                      ulong screenMode, ulong options,
-+                      status_t *error, bool debug=false);
-+      ~BGLScreen();
-+
-+      void            LockGL();
-+      void            UnlockGL();
-+      void            SwapBuffers();
-+      virtual void        ErrorCallback(GLenum errorCode);
-+
-+      virtual void            ScreenConnected(bool connected);
-+      virtual void            FrameResized(float width, float height);
-+      virtual status_t    Perform(perform_code d, void *arg);
-+
-+      /* The public methods below, for the moment,
-+         are just pass-throughs to BWindowScreen */
-+
-+      virtual status_t    Archive(BMessage *data, bool deep = true) const;
-+      virtual void        MessageReceived(BMessage *msg);
-+
-+      virtual void        Show();
-+      virtual void        Hide();
-+
-+      virtual BHandler   *ResolveSpecifier(BMessage *msg,
-+                        int32 index,
-+                                              BMessage *specifier,
-+                                              int32 form,
-+                                              const char *property);
-+      virtual status_t    GetSupportedSuites(BMessage *data);
-+
-+private:
-+
-+      virtual void        _ReservedGLScreen1();
-+      virtual void        _ReservedGLScreen2();
-+      virtual void        _ReservedGLScreen3();
-+      virtual void        _ReservedGLScreen4();
-+      virtual void        _ReservedGLScreen5();
-+      virtual void        _ReservedGLScreen6();
-+      virtual void        _ReservedGLScreen7();
-+      virtual void        _ReservedGLScreen8(); 
-+
-+      BGLScreen(const BGLScreen &);
-+      BGLScreen   &operator=(const BGLScreen &);
-+
-+      void *          m_gc;
-+      long            m_options;
-+      BLocker         m_drawLock;
-+              
-+      int32           m_colorSpace;
-+      uint32          m_screen_mode;
-+              
-+      uint64      _reserved[7];
-+};
-+
-+
-+#endif
-+
-+
-+
-+
-+
-Index: extras/Mesa/src/mesa/drivers/dri/Makefile.template
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/Makefile.template,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/Makefile.template 22 Jul 2004 06:51:24 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/Makefile.template 15 Dec 2004 01:50:57 -0000      1.1.1.2.4.1
-@@ -37,6 +37,7 @@
-       -I$(TOP)/src/mesa/drivers/dri/common \
-       -Iserver \
-       -I$(DRM_SOURCE_PATH)/shared \
-+      -I$(DRM_SOURCE_PATH)/linux \
-       -I$(TOP)/include \
-       -I$(TOP)/include/GL/internal \
-       -I$(TOP)/src/mesa \
-@@ -94,6 +95,7 @@
- # Remove .o and backup files
- clean:
--      -rm -f *.o */*.o *~ *.o *~ *.so server/*.o $(SYMLINKS) depend
-+      -rm -f *.o */*.o *~ *.o *~ *.so server/*.o $(SYMLINKS)
-+      -rm -f depend depend.bak
- include depend
-Index: extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h 16 Jun 2004 09:17:56 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h 15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -64,6 +64,42 @@
-    HW_WRITE_UNLOCK();
- }
-+static void TAG(WriteMonoDepthSpan)( GLcontext *ctx,
-+                                 GLuint n, GLint x, GLint y,
-+                               const GLdepth depth,
-+                               const GLubyte mask[] )
-+{
-+   HW_WRITE_LOCK()
-+      {
-+       GLint x1;
-+       GLint n1;
-+       LOCAL_DEPTH_VARS;
-+
-+       y = Y_FLIP( y );
-+
-+       HW_CLIPLOOP()
-+          {
-+             GLint i = 0;
-+             CLIPSPAN( x, y, n, x1, n1, i );
-+
-+             if ( DBG ) fprintf( stderr, "%s %d..%d (x1 %d) = %u\n",
-+                                 __FUNCTION__, (int)i, (int)n1, (int)x1, (GLuint)depth );
-+
-+             if ( mask ) {
-+                for ( ; i < n1 ; i++, x1++ ) {
-+                   if ( mask[i] ) WRITE_DEPTH( x1, y, depth );
-+                }
-+             } else {
-+                for ( ; i < n1 ; i++, x1++ ) {
-+                   WRITE_DEPTH( x1, y, depth );
-+                }
-+             }
-+          }
-+       HW_ENDCLIPLOOP();
-+      }
-+   HW_WRITE_UNLOCK();
-+}
-+
- static void TAG(WriteDepthPixels)( GLcontext *ctx,
-                                  GLuint n,
-                                  const GLint x[],
-Index: extras/Mesa/src/mesa/drivers/dri/common/dri_util.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.2
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.2
---- extras/Mesa/src/mesa/drivers/dri/common/dri_util.c 12 Aug 2004 23:05:42 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/common/dri_util.c 15 Dec 2004 01:50:57 -0000      1.1.1.3.2.2
-@@ -141,6 +141,26 @@
-     }
- }
-+/*
-+ * fd.o bug #1713: Some rare libGL's have __glXFindDRIScreen defined but do not
-+ * export it via glXGetProcAddress.  These are not supported anymore, so print
-+ * an error message to that effect.  - ajax 2004-10-26
-+ */
-+typedef __DRIscreen *(*PFNGLXFINDDRISCREEN)(__DRInativeDisplay *, int);
-+
-+static __DRIscreen *glx_find_dri_screen(__DRInativeDisplay *d, int i)
-+{
-+    PFNGLXFINDDRISCREEN findscreen = 
-+        (PFNGLXFINDDRISCREEN)glXGetProcAddress("__glXFindDRIScreen");
-+
-+    if (!findscreen)
-+    {
-+        __driUtilMessage("glXGetProcAddress(\"__glXFindDRIScreen\") failed!");
-+        __driUtilMessage("Your libGL is too old, please upgrade.");
-+        return NULL;
-+    }
-+    else return findscreen(d, i);
-+}
- /*****************************************************************/
- /** \name Visual utility functions                               */
-@@ -212,23 +232,33 @@
- static __DRIdrawable *__driFindDrawable(void *drawHash, __DRIid draw)
- {
-     int retcode;
--    __DRIdrawable *pdraw;
-+    union 
-+    {
-+      __DRIdrawable *pdraw;
-+      void *ptr;
-+    } p;
--    retcode = drmHashLookup(drawHash, draw, (void **)&pdraw);
-+    retcode = drmHashLookup(drawHash, draw, &p.ptr);
-     if (retcode)
-       return NULL;
--    return pdraw;
-+    return p.pdraw;
- }
- static void __driRemoveDrawable(void *drawHash, __DRIdrawable *pdraw)
- {
-     int retcode;
--    __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private;
-+    union 
-+    {
-+      __DRIdrawablePrivate *pdp;
-+      void *ptr;
-+    } p;
--    retcode = drmHashLookup(drawHash, pdp->draw, (void **)&pdraw);
-+    p.pdp = (__DRIdrawablePrivate *)pdraw->private;
-+
-+    retcode = drmHashLookup(drawHash, p.pdp->draw, &p.ptr);
-     if (!retcode) { /* Found */
--      drmHashDelete(drawHash, pdp->draw);
-+      drmHashDelete(drawHash, p.pdp->draw);
-     }
- }
-@@ -286,21 +316,25 @@
- static void __driGarbageCollectDrawables(void *drawHash)
- {
-     __DRIid draw;
--    __DRIdrawable *pdraw;
-     __DRInativeDisplay *dpy;
-+    union 
-+    {
-+      __DRIdrawable *pdraw;
-+      void *ptr;
-+    } p;
--    if (drmHashFirst(drawHash, &draw, (void **)&pdraw)) {
-+    if (drmHashFirst(drawHash, &draw, &p.ptr)) {
-       do {
--          __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private;
-+          __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)p.pdraw->private;
-           dpy = pdp->driScreenPriv->display;
-           if (! (*window_exists)(dpy, draw)) {
-               /* Destroy the local drawable data in the hash table, if the
-                  drawable no longer exists in the Xserver */
--              __driRemoveDrawable(drawHash, pdraw);
--              (*pdraw->destroyDrawable)(dpy, pdraw->private);
--              _mesa_free(pdraw);
-+              __driRemoveDrawable(drawHash, p.pdraw);
-+              (*p.pdraw->destroyDrawable)(dpy, p.pdraw->private);
-+              _mesa_free(p.pdraw);
-           }
--      } while (drmHashNext(drawHash, &draw, (void **)&pdraw));
-+      } while (drmHashNext(drawHash, &draw, &p.ptr));
-     }
- }
-@@ -353,7 +387,7 @@
-       return GL_FALSE;
-     }
--    pDRIScreen = __glXFindDRIScreen(dpy, scrn);
-+    pDRIScreen = glx_find_dri_screen(dpy, scrn);
-     if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
-       /* ERROR!!! */
-       return GL_FALSE;
-@@ -529,7 +563,7 @@
-       return GL_FALSE;
-     }
--    pDRIScreen = __glXFindDRIScreen(dpy, scrn);
-+    pDRIScreen = glx_find_dri_screen(dpy, scrn);
-     if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
-       /* ERROR!!! */
-       return GL_FALSE;
-@@ -563,7 +597,7 @@
-       return GL_FALSE;
-     }
--    pDRIScreen = __glXFindDRIScreen(dpy, scrn);
-+    pDRIScreen = glx_find_dri_screen(dpy, scrn);
-     modes = (driCompareGLXAPIVersion( 20040317 ) >= 0)
-       ? gc->driContext.mode
-       : findConfigMode( dpy, scrn, gc->vid, pDRIScreen );
-@@ -793,7 +827,7 @@
-                                 int renderType,
-                                 const int *attrs)
- {
--    __DRIscreen * const pDRIScreen = __glXFindDRIScreen(dpy, modes->screen);
-+    __DRIscreen * const pDRIScreen = glx_find_dri_screen(dpy, modes->screen);
-     __DRIscreenPrivate *psp;
-     __DRIdrawablePrivate *pdp;
-@@ -848,7 +882,7 @@
-       _mesa_free(pdp);
-       return NULL;
- #else
--      pdp->getInfo = XF86DRIGetDrawableInfo;
-+      pdp->getInfo = (PFNGLXGETDRAWABLEINFOPROC) XF86DRIGetDrawableInfo;
- #endif /* DRI_NEW_INTERFACE_ONLY */
-     }
-@@ -988,7 +1022,7 @@
-     __DRIscreenPrivate *psp;
-     void * const shareCtx = (pshare != NULL) ? pshare->driverPrivate : NULL;
--    pDRIScreen = __glXFindDRIScreen(dpy, modes->screen);
-+    pDRIScreen = glx_find_dri_screen(dpy, modes->screen);
-     if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
-       /* ERROR!!! */
-       return NULL;
-@@ -1033,16 +1067,16 @@
-     pctx->bindContext3   = driBindContext3;
-     pctx->unbindContext3 = driUnbindContext3;
- #else
--    pctx->bindContext    = driBindContext;
--    pctx->unbindContext  = driUnbindContext;
-+    pctx->bindContext    = (void *)driBindContext;
-+    pctx->unbindContext  = (void *)driUnbindContext;
-     if ( driCompareGLXAPIVersion( 20030606 ) >= 0 ) {
--        pctx->bindContext2   = driBindContext2;
--        pctx->unbindContext2 = driUnbindContext2;
-+        pctx->bindContext2   = (void *)driBindContext2;
-+        pctx->unbindContext2 = (void *)driUnbindContext2;
-     }
-     if ( driCompareGLXAPIVersion( 20040415 ) >= 0 ) {
--        pctx->bindContext3   = driBindContext3;
--        pctx->unbindContext3 = driUnbindContext3;
-+        pctx->bindContext3   = (void *)driBindContext3;
-+        pctx->unbindContext3 = (void *)driUnbindContext3;
-     }
- #endif
-@@ -1088,7 +1122,7 @@
-     __DRIscreen *pDRIScreen;
-     const __GLcontextModes *modes;
--    pDRIScreen = __glXFindDRIScreen(dpy, vis->screen);
-+    pDRIScreen = glx_find_dri_screen(dpy, vis->screen);
-     if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
-       /* ERROR!!! */
-       return NULL;
-@@ -1347,7 +1381,7 @@
-     int directCapable;
-     __DRIscreenPrivate *psp = NULL;
-     drm_handle_t hSAREA;
--    drmAddress pSAREA;
-+    drmAddress pSAREA = MAP_FAILED;
-     char *BusID;
-     __GLcontextModes *modes;
-     __GLcontextModes *temp;
-@@ -1360,8 +1394,9 @@
-     int   status;
-     const char * err_msg;
-     const char * err_extra;
--
--
-+    memset (&framebuffer, 0, sizeof (framebuffer));
-+    framebuffer.base = MAP_FAILED;
-+    
-     if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)
-       || !directCapable) {
-       return NULL;
-Index: extras/Mesa/src/mesa/drivers/dri/common/dri_util.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/common/dri_util.h 22 Jul 2004 06:51:27 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/common/dri_util.h 15 Dec 2004 01:50:57 -0000      1.1.1.2.4.1
-@@ -558,8 +558,11 @@
- driCalculateSwapUsage( __DRIdrawablePrivate *dPriv,
-                      int64_t last_swap_ust, int64_t current_ust );
-+/* Test for the GLX header glx.h */
-+#ifndef GLX
- extern void 
- (*glXGetProcAddress(const GLubyte *procname))( void );
-+#endif
- #endif /* GLX_DIRECT_RENDERING */
-Index: extras/Mesa/src/mesa/drivers/dri/common/mmio.h
-===================================================================
-RCS file: extras/Mesa/src/mesa/drivers/dri/common/mmio.h
-diff -N extras/Mesa/src/mesa/drivers/dri/common/mmio.h
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/drivers/dri/common/mmio.h     15 Dec 2004 01:50:57 -0000      1.1.1.1.2.1
-@@ -0,0 +1,63 @@
-+/*
-+ * (C) Copyright IBM Corporation 2004
-+ * All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * on the rights to use, copy, modify, merge, publish, distribute, sub
-+ * license, and/or sell copies of the Software, and to permit persons to whom
-+ * the Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-+ * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/**
-+ * \file mmio.h
-+ * Functions for properly handling memory mapped IO on various platforms.
-+ *
-+ * \author Ian Romanick <idr@us.ibm.com>
-+ */
-+
-+
-+#ifndef MMIO_H
-+#define MMIO_H
-+
-+#include <inttypes.h>
-+
-+#if defined( __powerpc__ )
-+
-+static __inline__ uint32_t
-+read_MMIO_LE32( volatile void * base, unsigned long offset )
-+{
-+   volatile void * p = ((volatile char *) base) + offset;
-+   uint32_t val;
-+   
-+   __asm__ __volatile__( "lwbrx       %0, %1, %2 ; eieio"
-+                       : "=r" (val)
-+                       : "b" (base), "r" (offset), "m" (p) );
-+   return val;
-+}
-+
-+#else
-+
-+static __inline__ uint32_t
-+read_MMIO_LE32( volatile void * base, unsigned long offset )
-+{
-+   volatile uint32_t * p = (volatile uint32_t *) (((volatile char *) base) + offset);
-+   return LE32_TO_CPU( p[0] );
-+}
-+
-+#endif
-+
-+#endif /* MMIO_H */
-Index: extras/Mesa/src/mesa/drivers/dri/common/spantmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/spantmp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/common/spantmp.h  16 Jun 2004 09:17:56 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/common/spantmp.h  15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -123,15 +123,29 @@
-        HW_WRITE_CLIPLOOP()
-           {
--             for (i=0;i<n;i++)
-+             if (mask)
-              {
--                if (mask[i]) {
-+                for (i=0;i<n;i++)
-+                {
-+                   if (mask[i]) {
-+                      const int fy = Y_FLIP(y[i]);
-+                      if (CLIPPIXEL(x[i],fy))
-+                         WRITE_RGBA( x[i], fy,
-+                                     rgba[i][0], rgba[i][1],
-+                                     rgba[i][2], rgba[i][3] );
-+                   }
-+                }
-+             }
-+             else
-+             {
-+                for (i=0;i<n;i++)
-+                {
-                    const int fy = Y_FLIP(y[i]);
-                    if (CLIPPIXEL(x[i],fy))
-                       WRITE_RGBA( x[i], fy,
-                                   rgba[i][0], rgba[i][1],
-                                   rgba[i][2], rgba[i][3] );
--                }
-+                }
-              }
-           }
-        HW_ENDCLIPLOOP();
-@@ -160,9 +174,17 @@
-           {
-              GLint i = 0;
-              CLIPSPAN(x,y,n,x1,n1,i);
--             for (;n1>0;i++,x1++,n1--)
--                if (mask[i])
-+             if (mask)
-+             {
-+                for (;n1>0;i++,x1++,n1--)
-+                   if (mask[i])
-+                      WRITE_PIXEL( x1, y, p );
-+             }
-+             else
-+             {
-+                for (;n1>0;i++,x1++,n1--)
-                    WRITE_PIXEL( x1, y, p );
-+             }
-           }
-        HW_ENDCLIPLOOP();
-       }
-@@ -186,12 +208,23 @@
-        HW_WRITE_CLIPLOOP()
-           {
--             for (i=0;i<n;i++)
--                if (mask[i]) {
-+             if (mask)
-+             {
-+                for (i=0;i<n;i++)
-+                   if (mask[i]) {
-+                      int fy = Y_FLIP(y[i]);
-+                      if (CLIPPIXEL( x[i], fy ))
-+                         WRITE_PIXEL( x[i], fy, p );
-+                   }
-+             }
-+             else
-+             {
-+                for (i=0;i<n;i++) {
-                    int fy = Y_FLIP(y[i]);
-                    if (CLIPPIXEL( x[i], fy ))
-                       WRITE_PIXEL( x[i], fy, p );
-                 }
-+             }
-           }
-        HW_ENDCLIPLOOP();
-       }
-@@ -238,12 +271,23 @@
-        HW_READ_CLIPLOOP()
-           {
--             for (i=0;i<n;i++)
--                if (mask[i]) {
-+             if (mask)
-+             {
-+                for (i=0;i<n;i++)
-+                   if (mask[i]) {
-+                      int fy = Y_FLIP( y[i] );
-+                      if (CLIPPIXEL( x[i], fy ))
-+                         READ_RGBA( rgba[i], x[i], fy );
-+                   }
-+             }
-+             else
-+             {
-+                for (i=0;i<n;i++) {
-                    int fy = Y_FLIP( y[i] );
-                    if (CLIPPIXEL( x[i], fy ))
-                       READ_RGBA( rgba[i], x[i], fy );
-                 }
-+             }
-           }
-        HW_ENDCLIPLOOP();
-       }
-Index: extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c        12 Aug 2004 23:05:42 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c        15 Dec 2004 01:50:57 -0000      1.1.1.3.2.1
-@@ -49,6 +49,10 @@
- #undef GET_PROGRAM_NAME
- #if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__)
-+#    if !defined(__GLIBC__) || (__GLIBC__ < 2)
-+/* These aren't declared in any libc5 header */
-+extern char *program_invocation_name, *program_invocation_short_name;
-+#    endif
- #    define GET_PROGRAM_NAME() program_invocation_short_name
- #elif defined(__FreeBSD__) && (__FreeBSD__ >= 2)
- #    include <osreldate.h>
-@@ -256,7 +260,7 @@
-     string = numStart;
-     /* scale of the first digit */
--    scale = sign * powf (10.0f, (GLfloat)(pointPos-1 + exponent));
-+    scale = sign * (GLfloat)pow (10.0, (GLdouble)(pointPos-1 + exponent));
-     /* second pass: parse digits */
-     do {
-Index: extras/Mesa/src/mesa/drivers/dri/common/xmlpool.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/common/xmlpool.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/common/xmlpool.h  16 Jun 2004 09:17:57 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/common/xmlpool.h  15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -273,4 +273,25 @@
-         DRI_CONF_DESC(de,"Anzahl der Textureinheiten") \
- DRI_CONF_OPT_END
-+/* Options for features that are not done in hardware by the driver (like GL_ARB_vertex_program
-+   On cards where there is no documentation (r200) or on rasterization-only hardware). */
-+#define DRI_CONF_SECTION_SOFTWARE \
-+DRI_CONF_SECTION_BEGIN \
-+        DRI_CONF_DESC(de,"Funktionalität, die nicht durch die Hardware beschleunigt wird") \
-+        DRI_CONF_DESC(en,"Features that are not hardware-accelerated")
-+
-+#define DRI_CONF_ARB_VERTEX_PROGRAM(def) \
-+DRI_CONF_OPT_BEGIN(arb_vertex_program,bool,def) \
-+        DRI_CONF_DESC(de,"GL_ARB_vertex_program aktivieren") \
-+        DRI_CONF_DESC(en,"Enable GL_ARB_vertex_program") \
-+        DRI_CONF_DESC(fr,"Activer GL_ARB_vertex_program") \
-+DRI_CONF_OPT_END
-+
-+#define DRI_CONF_NV_VERTEX_PROGRAM(def) \
-+DRI_CONF_OPT_BEGIN(nv_vertex_program,bool,def) \
-+        DRI_CONF_DESC(de,"GL_NV_vertex_program aktivieren") \
-+        DRI_CONF_DESC(en,"Enable GL_NV_vertex_program") \
-+        DRI_CONF_DESC(fr,"Activer GL_NV_vertex_program") \
-+DRI_CONF_OPT_END
-+
- #endif
-Index: extras/Mesa/src/mesa/drivers/dri/dri_client/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/dri_client/Makefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/dri_client/Makefile       16 Jun 2004 09:18:31 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/dri_client/Makefile       15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -53,6 +53,6 @@
- # Remove .o and backup files
- clean:
--      -rm -f *.o */*.o *~ *.so *.a
-+      -rm -f *.o */*.o *~ *.so *.a depend depend.bak
- include depend
-Index: extras/Mesa/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c  16 Jun 2004 09:18:00 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c  15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -161,13 +161,13 @@
- static void ffb_choose_Normal3f(GLfloat x, GLfloat y, GLfloat z)
- {
-       choose_normals();
--      glNormal3f(x, y, z);
-+      GL_CALL(Normal3f)(x, y, z);
- }
- static void ffb_choose_Normal3fv(const GLfloat *v)
- {
-       choose_normals();
--      glNormal3fv(v);
-+      GL_CALL(Normal3fv)(v);
- }
- /* Vertex functions: */
-@@ -267,13 +267,13 @@
-        * correctly:
-        */
-       if (fmesa->imm.prim != PRIM_OUTSIDE_BEGIN_END )
--              glBegin(fmesa->imm.prim);
-+              GL_CALL(Begin)(fmesa->imm.prim);
-       if (ctx->Light.Enabled) {
--              glColor4fv(ctx->Current.Color); /* Catch ColorMaterial */
--              glNormal3fv(current->normal);
-+              GL_CALL(Color4fv)(ctx->Current.Color);  /* Catch ColorMaterial */
-+              GL_CALL(Normal3fv)(current->normal);
-       } else {
--              glColor4fv(current->color);
-+              GL_CALL(Color4fv)(current->color);
-       }
- }
-Index: extras/Mesa/src/mesa/drivers/dri/i810/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i810/Makefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/i810/Makefile     16 Jun 2004 09:18:05 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/i810/Makefile     15 Dec 2004 01:50:57 -0000      1.1.1.1.4.1
-@@ -15,7 +15,8 @@
-         ../common/texmem.c \
-         ../common/vblank.c \
-       ../common/dri_util.c \
--      ../common/glcontextmodes.c
-+      ../common/glcontextmodes.c \
-+      ../common/xmlconfig.c
- DRIVER_SOURCES = \
-       i810context.c \
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_context.c       22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_context.c       15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -38,54 +38,12 @@
-  * Mesa's Driver Functions
-  ***************************************/
--/* This is the extension list explicitly enabled by the client and
-- * excludes functionality available in Mesa and also excludes legacy
-- * extensions.  It is recognized that in an open source driver, those
-- * extensions will probably be re-enabled.
-- */
--static const GLubyte *i830GetString( GLcontext *ctx, GLenum name )
-+static const char * const card_extensions[] =
- {
--#if 0
--   if (name == GL_EXTENSIONS)
--      return 
--       "GL_ARB_multitexture "
--       "GL_ARB_texture_border_clamp "
--       "GL_ARB_texture_compression "
--       "GL_ARB_texture_env_add "
--       "GL_ARB_texture_env_combine "
--       "GL_ARB_texture_env_dot3 "
--       "GL_ARB_texture_mirrored_repeat "
--       "GL_ARB_transpose_matrix "
--       "GL_ARB_vertex_buffer_object "
--       "GL_ARB_vertex_program "
--       "GL_ARB_window_pos "
--       "GL_EXT_abgr "
--       "GL_EXT_bgra "
--       "GL_EXT_blend_color "
--       "GL_EXT_blend_func_separate "
--       "GL_EXT_blend_minmax "
--       "GL_EXT_blend_subtract "
--       "GL_EXT_clip_volume_hint "
--       "GL_EXT_compiled_vertex_array "
--       "GL_EXT_draw_range_elements "
--       "GL_EXT_fog_coord "
--       "GL_EXT_multi_draw_arrays "
--       "GL_EXT_packed_pixels "
--       "GL_EXT_rescale_normal "
--       "GL_EXT_secondary_color "
--       "GL_EXT_separate_specular_color "
--       "GL_EXT_stencil_wrap "
--       "GL_EXT_texture_env_add "
--       "GL_EXT_texture_env_combine "
--       "GL_EXT_texture_filter_anisotropic "
--       "GL_IBM_texture_mirrored_repeat "
--       "GL_MESA_ycbcr_texture "
--       "GL_MESA_window_pos "
--       "GL_NV_texgen_reflection "
--       "GL_SGIS_generate_mipmap ";
--#endif 
--   return intelGetString( ctx, name );
--}
-+   "GL_ARB_texture_env_crossbar",
-+   "GL_NV_blend_square",
-+   NULL
-+};
- static void i830InitDriverFunctions( struct dd_function_table *functions )
-@@ -93,7 +51,6 @@
-    intelInitDriverFunctions( functions );
-    i830InitStateFuncs( functions );
-    i830InitTextureFuncs( functions );
--   functions->GetString = i830GetString;
- }
-@@ -142,7 +99,7 @@
-                                4,
-                                11, /* max 2D texture size is 2048x2048 */
-                                8,  /* max 3D texture size is 256^3 */
--                               0,  /* max CUBE. not supported */
-+                               10, /* max CUBE texture size is 1024x1024 */
-                                11, /* max RECT. supported */
-                                12,
-                                GL_FALSE );
-@@ -153,6 +110,8 @@
-    intel->verts = TNL_CONTEXT(ctx)->clipspace.vertex_buf;
-+   driInitExtensions( ctx, card_extensions, GL_FALSE );
-+
-    i830InitState( i830 );
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_context.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_context.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_context.h       22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_context.h       15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -89,8 +89,9 @@
- #define I830_TEXREG_TM0S2      3
- #define I830_TEXREG_TM0S3      4
- #define I830_TEXREG_TM0S4      5
--#define I830_TEXREG_MCS             6 /* _3DSTATE_MAP_COORD_SETS */
--#define I830_TEX_SETUP_SIZE    7
-+#define I830_TEXREG_MCS              6        /* _3DSTATE_MAP_COORD_SETS */
-+#define I830_TEXREG_CUBE       7      /* _3DSTATE_MAP_SUBE */
-+#define I830_TEX_SETUP_SIZE    8
- #define I830_TEXBLEND_SIZE    12      /* (4 args + op) * 2 + COLOR_FACTOR */
-@@ -169,12 +170,9 @@
- /* i830_texblend.c
-  */
--extern GLuint 
--i830SetBlend_GL1_2(i830ContextPtr i830, int unit, 
--                 GLenum envMode, GLenum format,
--                 GLuint texel_op,
--                 GLuint *state,
--                 const GLfloat *envcolor );
-+extern GLuint i830SetTexEnvCombine(i830ContextPtr i830,
-+    const struct gl_tex_env_combine_state * combine, GLint blendUnit,
-+     GLuint texel_op, GLuint *state, const GLfloat *factor );
- extern void 
- i830EmitTextureBlend( i830ContextPtr i830 );
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_metaops.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_metaops.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_metaops.c       22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_metaops.c       15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -163,10 +163,17 @@
-  */
- static void set_no_texture( i830ContextPtr i830 )
- {
--   i830->meta.TexBlendWordsUsed[0] = 
--      i830SetBlend_GL1_2( i830, 0, GL_NONE, 0, 
--                        TEXBLENDARG_TEXEL0,
--                        i830->meta.TexBlend[0], 0 );
-+   static const struct gl_tex_env_combine_state comb = {
-+      GL_NONE, GL_NONE,
-+      { GL_TEXTURE, 0, 0, }, { GL_TEXTURE, 0, 0, },
-+      { GL_SRC_COLOR, 0, 0 }, { GL_SRC_ALPHA, 0, 0 },
-+      0, 0, 0, 0
-+   };
-+
-+   i830->meta.TexBlendWordsUsed[0] =
-+     i830SetTexEnvCombine( i830, & comb, 0, TEXBLENDARG_TEXEL0,
-+                         i830->meta.TexBlend[0], NULL);
-+
-    i830->meta.TexBlend[0][0] |= TEXOP_LAST_STAGE;
-    i830->meta.emitted &= ~I830_UPLOAD_TEXBLEND(0);
- }
-@@ -177,10 +184,17 @@
- static void enable_texture_blend_replace( i830ContextPtr i830,
-                                         GLenum format )
- {
--   i830->meta.TexBlendWordsUsed[0] = 
--      i830SetBlend_GL1_2( i830, 0, GL_REPLACE, format, 
--                        TEXBLENDARG_TEXEL0,
--                        i830->meta.TexBlend[0], 0 );
-+   static const struct gl_tex_env_combine_state comb = {
-+      GL_REPLACE, GL_REPLACE,
-+      { GL_TEXTURE, 0, 0, }, { GL_TEXTURE, 0, 0, },
-+      { GL_SRC_COLOR, 0, 0 }, { GL_SRC_ALPHA, 0, 0 },
-+      0, 0, 1, 1
-+   };
-+
-+   i830->meta.TexBlendWordsUsed[0] =
-+     i830SetTexEnvCombine( i830, & comb, 0, TEXBLENDARG_TEXEL0,
-+                         i830->meta.TexBlend[0], NULL);
-+
-    i830->meta.TexBlend[0][0] |= TEXOP_LAST_STAGE;
-    i830->meta.emitted &= ~I830_UPLOAD_TEXBLEND(0);
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_reg.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_reg.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_reg.h   22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_reg.h   15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -637,6 +637,7 @@
- #define TM0S2_PITCH_SHIFT               21
- #define TM0S2_CUBE_FACE_ENA_SHIFT       15
-+#define TM0S2_CUBE_FACE_ENA_MASK        (1<<15)
- #define TM0S2_MAP_FORMAT                (1<<14)
- #define TM0S2_VERTICAL_LINE_STRIDE      (1<<13)
- #define TM0S2_VERITCAL_LINE_STRIDE_OFF  (1<<12)
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_state.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_state.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_state.c 22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_state.c 15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -263,11 +263,15 @@
-                                       ALPHA_REF_VALUE(refInt));
- }
--/* This function makes sure that the proper enables are
-- * set for LogicOp, Independant Alpha Blend, and Blending.
-- * It needs to be called from numerous places where we
-+/**
-+ * Makes sure that the proper enables are set for LogicOp, Independant Alpha
-+ * Blend, and Blending.  It needs to be called from numerous places where we
-  * could change the LogicOp or Independant Alpha Blend without subsequent
-  * calls to glEnable.
-+ * 
-+ * \todo
-+ * This function is substantially different from the old i830-specific driver.
-+ * I'm not sure which is correct.
-  */
- static void i830EvalLogicOpBlendState(GLcontext *ctx)
- {
-@@ -310,48 +314,16 @@
-    i830->state.Ctx[I830_CTXREG_BLENDCOLOR1] = (a<<24) | (r<<16) | (g<<8) | b;
- }
--static void i830BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB,
--                                    GLenum modeA) 
--{
--   i830ContextPtr i830 = I830_CONTEXT(ctx);
--   int func = ENABLE_ALPHA_BLENDFUNC;
--
--   assert( modeRGB == modeA );
--
--   if (INTEL_DEBUG&DEBUG_DRI)
--     fprintf(stderr, "%s %s\n", __FUNCTION__,
--           _mesa_lookup_enum_by_nr(modeRGB));
--
--   /* This will catch a logicop blend equation */
--   i830EvalLogicOpBlendState(ctx);
--
--   switch(modeRGB) {
--   case GL_FUNC_ADD: 
--      func |= BLENDFUNC_ADD; 
--      break;
--   case GL_MIN: 
--      func |= BLENDFUNC_MIN; 
--      break;
--   case GL_MAX: 
--      func |= BLENDFUNC_MAX; 
--      break;
--   case GL_FUNC_SUBTRACT: 
--      func |= BLENDFUNC_SUB; 
--      break;
--   case GL_FUNC_REVERSE_SUBTRACT: 
--      func |= BLENDFUNC_RVRSE_SUB; 
--      break;
--   case GL_LOGIC_OP:
--   default: return;
--   }
--
--   I830_STATECHANGE(i830, I830_UPLOAD_CTX);
--   i830->state.Ctx[I830_CTXREG_STATE1] &= ~BLENDFUNC_MASK;
--   i830->state.Ctx[I830_CTXREG_STATE1] |= func;
--}
--
--
-+/**
-+ * Calculate the hardware blend factor setting.  This same function is used
-+ * for source and destination of both alpha and RGB.  
-+ *
-+ * \returns
-+ * The hardware register value for the specified blend factor.  This value
-+ * will need to be shifted into the correct position for either source or
-+ * destination factor.
-+ */
- static int translate_blend_factor( GLenum factor )
- {
-    switch(factor) {
-@@ -390,35 +362,89 @@
-    }
- }
--static void i830BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, 
--                                GLenum dfactorRGB, GLenum sfactorA,
--                                GLenum dfactorA )
-+
-+/**
-+ * Sets both the blend equation (called "function" in i830 docs) and the
-+ * blend function (called "factor" in i830 docs).  This is done in a single
-+ * function because some blend equations (i.e., \c GL_MIN and \c GL_MAX)
-+ * change the interpretation of the blend function.
-+ */
-+static void i830_set_blend_state( GLcontext * ctx )
- {
-    i830ContextPtr i830 = I830_CONTEXT(ctx);
--   int iab = i830->state.Ctx[I830_CTXREG_IALPHAB];
--   int s1 = i830->state.Ctx[I830_CTXREG_STATE1];
-+   int funcA;
-+   int funcRGB;
-+   int eqnA;
-+   int eqnRGB;
-+   int iab;
-+   int s1;
--   if (INTEL_DEBUG&DEBUG_DRI)
--      fprintf(stderr, "%s\n", __FUNCTION__);
-+   funcRGB = SRC_BLND_FACT( translate_blend_factor( ctx->Color.BlendSrcRGB ) )
-+       | DST_BLND_FACT( translate_blend_factor( ctx->Color.BlendDstRGB ) );
--   iab &= ~(SRC_DST_ABLEND_MASK|ENABLE_INDPT_ALPHA_BLEND);
--   s1 &= ~SRC_DST_BLND_MASK;
--      
--   iab |= (ENABLE_SRC_ABLEND_FACTOR|ENABLE_DST_ABLEND_FACTOR);
--   s1 |= (ENABLE_SRC_BLND_FACTOR|ENABLE_DST_BLND_FACTOR);
-+   switch(ctx->Color.BlendEquationRGB) {
-+   case GL_FUNC_ADD:
-+      eqnRGB = BLENDFUNC_ADD; 
-+      break;
-+   case GL_MIN:
-+      eqnRGB = BLENDFUNC_MIN;
-+      funcRGB = SRC_BLND_FACT(BLENDFACT_ONE) | DST_BLND_FACT(BLENDFACT_ONE);
-+      break;
-+   case GL_MAX: 
-+      eqnRGB = BLENDFUNC_MAX;
-+      funcRGB = SRC_BLND_FACT(BLENDFACT_ONE) | DST_BLND_FACT(BLENDFACT_ONE);
-+      break;
-+   case GL_FUNC_SUBTRACT: 
-+      eqnRGB = BLENDFUNC_SUB; 
-+      break;
-+   case GL_FUNC_REVERSE_SUBTRACT:
-+      eqnRGB = BLENDFUNC_RVRSE_SUB; 
-+      break;
-+   default:
-+      fprintf( stderr, "[%s:%u] Invalid RGB blend equation (0x%04x).\n",
-+             __func__, __LINE__, ctx->Color.BlendEquationRGB );
-+      return;
-+   }
-+
-+
-+   funcA = SRC_ABLEND_FACT( translate_blend_factor( ctx->Color.BlendSrcA ) )
-+       | DST_ABLEND_FACT( translate_blend_factor( ctx->Color.BlendDstA ) );
--   if (ctx->Color.BlendEquationRGB == GL_MIN ||
--       ctx->Color.BlendEquationRGB == GL_MAX) {
--      sfactorA = sfactorRGB = dfactorA = dfactorRGB = GL_ONE;
-+   switch(ctx->Color.BlendEquationA) {
-+   case GL_FUNC_ADD:
-+      eqnA = BLENDFUNC_ADD; 
-+      break;
-+   case GL_MIN: 
-+      eqnA = BLENDFUNC_MIN;
-+      funcA = SRC_BLND_FACT(BLENDFACT_ONE) | DST_BLND_FACT(BLENDFACT_ONE);
-+      break;
-+   case GL_MAX: 
-+      eqnA = BLENDFUNC_MAX;
-+      funcA = SRC_BLND_FACT(BLENDFACT_ONE) | DST_BLND_FACT(BLENDFACT_ONE);
-+      break;
-+   case GL_FUNC_SUBTRACT: 
-+      eqnA = BLENDFUNC_SUB; 
-+      break;
-+   case GL_FUNC_REVERSE_SUBTRACT:
-+      eqnA = BLENDFUNC_RVRSE_SUB; 
-+      break;
-+   default:
-+      fprintf( stderr, "[%s:%u] Invalid alpha blend equation (0x%04x).\n",
-+             __func__, __LINE__, ctx->Color.BlendEquationA );
-+      return;
-    }
--   iab |= SRC_ABLEND_FACT(translate_blend_factor(sfactorA)); 
--   iab |= DST_ABLEND_FACT(translate_blend_factor(dfactorA)); 
--   s1 |= SRC_BLND_FACT(translate_blend_factor(sfactorRGB)); 
--   s1 |= DST_BLND_FACT(translate_blend_factor(dfactorRGB)); 
-+   iab = eqnA | funcA
-+       | _3DSTATE_INDPT_ALPHA_BLEND_CMD
-+       | ENABLE_SRC_ABLEND_FACTOR | ENABLE_DST_ABLEND_FACTOR
-+       | ENABLE_ALPHA_BLENDFUNC;
-+   s1 = eqnRGB | funcRGB
-+       | _3DSTATE_MODES_1_CMD
-+       | ENABLE_SRC_BLND_FACTOR | ENABLE_DST_BLND_FACTOR
-+       | ENABLE_COLR_BLND_FUNC;
--   if (sfactorA != sfactorRGB || dfactorA != dfactorRGB) 
-+   if ( (eqnA | funcA) != (eqnRGB | funcRGB) )
-       iab |= ENABLE_INDPT_ALPHA_BLEND;
-    else
-       iab |= DISABLE_INDPT_ALPHA_BLEND;
-@@ -429,6 +455,54 @@
-       i830->state.Ctx[I830_CTXREG_IALPHAB] = iab;
-       i830->state.Ctx[I830_CTXREG_STATE1] = s1;
-    }
-+
-+   /* This will catch a logicop blend equation.  It will also ensure
-+    * independant alpha blend is really in the correct state (either enabled
-+    * or disabled) if blending is already enabled.
-+    */
-+
-+   i830EvalLogicOpBlendState(ctx);
-+
-+   if (0) {
-+      fprintf(stderr, "[%s:%u] STATE1: 0x%08x IALPHAB: 0x%08x blend is %sabled\n",
-+            __func__, __LINE__,
-+            i830->state.Ctx[I830_CTXREG_STATE1],
-+            i830->state.Ctx[I830_CTXREG_IALPHAB],
-+            (ctx->Color.BlendEnabled) ? "en" : "dis");
-+   }
-+}
-+
-+
-+static void i830BlendEquationSeparate(GLcontext *ctx, GLenum modeRGB,
-+                                    GLenum modeA) 
-+{
-+   if (INTEL_DEBUG&DEBUG_DRI)
-+     fprintf(stderr, "%s -> %s, %s\n", __FUNCTION__,
-+           _mesa_lookup_enum_by_nr(modeRGB),
-+           _mesa_lookup_enum_by_nr(modeA));
-+
-+   (void) modeRGB;
-+   (void) modeA;
-+   i830_set_blend_state( ctx );
-+}
-+
-+
-+static void i830BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, 
-+                                GLenum dfactorRGB, GLenum sfactorA,
-+                                GLenum dfactorA )
-+{
-+   if (INTEL_DEBUG&DEBUG_DRI)
-+     fprintf(stderr, "%s -> RGB(%s, %s) A(%s, %s)\n", __FUNCTION__,
-+           _mesa_lookup_enum_by_nr(sfactorRGB),
-+           _mesa_lookup_enum_by_nr(dfactorRGB),
-+           _mesa_lookup_enum_by_nr(sfactorA),
-+           _mesa_lookup_enum_by_nr(dfactorA));
-+
-+   (void) sfactorRGB;
-+   (void) dfactorRGB;
-+   (void) sfactorA;
-+   (void) dfactorA;
-+   i830_set_blend_state( ctx );
- }
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_texblend.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_texblend.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_texblend.c      22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_texblend.c      15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -113,640 +113,35 @@
- }
--GLuint i830SetBlend_GL1_2(i830ContextPtr i830, int blendUnit, 
--                        GLenum envMode, GLenum format, GLuint texel_op,
--                        GLuint *state, const GLfloat *factor)
-+/**
-+ * Calculate the hardware instuctions to setup the current texture enviromnemt
-+ * settings.  Since \c gl_texture_unit::_CurrentCombine is used, both
-+ * "classic" texture enviroments and GL_ARB_texture_env_combine type texture
-+ * environments are treated identically.
-+ *
-+ * \todo
-+ * This function should return \c GLboolean.  When \c GL_FALSE is returned,
-+ * it means that an environment is selected that the hardware cannot do.  This
-+ * is the way the Radeon and R200 drivers work.
-+ * 
-+ * \todo
-+ * Looking at i830_3d_regs.h, it seems the i830 can do part of
-+ * GL_ATI_texture_env_combine3.  It can handle using \c GL_ONE and
-+ * \c GL_ZERO as combine inputs (which the code already supports).  It can
-+ * also handle the \c GL_MODULATE_ADD_ATI mode.  Is it worth investigating
-+ * partial support for the extension?
-+ */
-+GLuint
-+i830SetTexEnvCombine(i830ContextPtr i830,
-+                   const struct gl_tex_env_combine_state * combine,
-+                   GLint blendUnit,
-+                   GLuint texel_op,
-+                   GLuint *state,
-+                   const GLfloat *factor )
- {
--   if(INTEL_DEBUG&DEBUG_TEXTURE)
--      fprintf(stderr, "%s %s %s texel_op(0x%x)\n",
--            __FUNCTION__,
--            _mesa_lookup_enum_by_nr(format),
--            _mesa_lookup_enum_by_nr(envMode),
--            texel_op);
--
--   switch(envMode) {
--   case GL_REPLACE:
--      switch(format) {
--      case GL_ALPHA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       return 4;
--
--      case GL_LUMINANCE:
--      case GL_RGB:
--      case GL_YCBCR_MESA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 4;
--
--      case GL_INTENSITY:
--      case GL_LUMINANCE_ALPHA:
--      case GL_RGBA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       return 4;
--
--      default:
--       /* Always set to passthru if something is funny */
--       return pass_through( state, blendUnit );
--      }
--
--   case GL_MODULATE:
--      switch(format) {
--      case GL_ALPHA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 5;
--
--      case GL_LUMINANCE:
--      case GL_RGB:
--      case GL_YCBCR_MESA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 5;
--
--      case GL_INTENSITY:
--      case GL_LUMINANCE_ALPHA:
--      case GL_RGBA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 6;
--
--      default:
--       /* Always set to passthru if something is funny */
--       return pass_through( state, blendUnit );
--      }
--
--   case GL_DECAL:
--      switch(format) {
--      case GL_RGB:
--      case GL_YCBCR_MESA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 4;
--
--      case GL_RGBA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_BLEND);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG0 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_REPLICATE_ALPHA |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 6;
--      default:
--       /* Always set to passthru if something is funny */
--       return pass_through( state, blendUnit );
--      }
-+   const GLuint numColorArgs = combine->_NumArgsRGB;
-+   const GLuint numAlphaArgs = combine->_NumArgsA;
--   case GL_BLEND:
--      switch(format) {
--      case GL_ALPHA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 5;
--
--      case GL_LUMINANCE:
--      case GL_RGB:
--      case GL_YCBCR_MESA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_BLEND);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG0 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_FACTOR_N);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return emit_factor( blendUnit, state, 6, factor );
--
--      case GL_INTENSITY:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_BLEND);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_BLEND);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG0 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_FACTOR_N);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG0 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[6] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_FACTOR_N);
--       state[7] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return emit_factor( blendUnit, state, 8, factor );
--
--
--      case GL_LUMINANCE_ALPHA:
--      case GL_RGBA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_BLEND);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG0 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_FACTOR_N);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[6] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return emit_factor( blendUnit, state, 7, factor );
--
--      default:
--       /* Always set to passthru if something is funny */
--       return pass_through( state, blendUnit );
--      }
--
--   case GL_ADD:
--      switch(format) {
--      case GL_ALPHA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 5;
--
--      case GL_LUMINANCE:
--      case GL_RGB:
--      case GL_YCBCR_MESA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ADD);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ARG1);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 5;
--
--      case GL_INTENSITY:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ADD);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ADD);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 6;
--
--      case GL_LUMINANCE_ALPHA:
--      case GL_RGBA:
--       state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   DISABLE_TEX_CNTRL_STAGE |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_ADD);
--       state[1] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   ENABLE_TEXOUTPUT_WRT_SEL |
--                   TEXOP_OUTPUT_CURRENT |
--                   TEXOP_SCALE_1X |
--                   TEXOP_MODIFY_PARMS |
--                   TEXBLENDOP_MODULATE);
--       state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_COLOR |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       state[4] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG1 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   texel_op);
--       state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--                   TEXPIPE_ALPHA |
--                   TEXBLEND_ARG2 |
--                   TEXBLENDARG_MODIFY_PARMS |
--                   TEXBLENDARG_CURRENT);
--       return 6;
--
--      default:
--       /* Always set to passthru if something is funny */
--       return pass_through( state, blendUnit );
--      }
--
--   default:
--      /* Always set to passthru if something is funny */
--      return pass_through( state, blendUnit );
--   }
--}
--
--static GLuint i830SetTexEnvCombine(i830ContextPtr i830,
--                                 const struct gl_texture_unit *texUnit, 
--                                 GLint blendUnit,
--                                 GLuint texel_op,
--                                 GLuint *state,
--                                 const GLfloat *factor )
--{
-    GLuint blendop;
-    GLuint ablendop;
-    GLuint args_RGB[3];
-@@ -755,6 +150,23 @@
-    GLuint alpha_shift;
-    GLboolean need_factor = 0;
-    int i;
-+   unsigned used;
-+   static const GLuint tex_blend_rgb[3] = {
-+      TEXPIPE_COLOR | TEXBLEND_ARG1 | TEXBLENDARG_MODIFY_PARMS,
-+      TEXPIPE_COLOR | TEXBLEND_ARG2 | TEXBLENDARG_MODIFY_PARMS,
-+      TEXPIPE_COLOR | TEXBLEND_ARG0 | TEXBLENDARG_MODIFY_PARMS,
-+   };
-+   static const GLuint tex_blend_a[3] = {
-+      TEXPIPE_ALPHA | TEXBLEND_ARG1 | TEXBLENDARG_MODIFY_PARMS,
-+      TEXPIPE_ALPHA | TEXBLEND_ARG2 | TEXBLENDARG_MODIFY_PARMS,
-+      TEXPIPE_ALPHA | TEXBLEND_ARG0 | TEXBLENDARG_MODIFY_PARMS,
-+   };
-+   static const GLuint op_rgb[4] = {
-+      0,
-+      TEXBLENDARG_INV_ARG,
-+      TEXBLENDARG_REPLICATE_ALPHA,
-+      TEXBLENDARG_REPLICATE_ALPHA | TEXBLENDARG_INV_ARG,
-+   };
-    if(INTEL_DEBUG&DEBUG_TEXTURE)
-       fprintf(stderr, "%s\n", __FUNCTION__);
-@@ -764,9 +176,9 @@
-     * scale factor, but the ARB version (and the version in OpenGL
-     * 1.3) does.
-     */
--   switch (texUnit->Combine.ModeRGB) {
-+   switch (combine->ModeRGB) {
-    case GL_DOT3_RGB_EXT:
--      alpha_shift = texUnit->Combine.ScaleShiftA;
-+      alpha_shift = combine->ScaleShiftA;
-       rgb_shift = 0;
-       break;
-@@ -776,13 +188,13 @@
-       break;
-    default:
--      rgb_shift = texUnit->Combine.ScaleShiftRGB;
--      alpha_shift = texUnit->Combine.ScaleShiftA;
-+      rgb_shift = combine->ScaleShiftRGB;
-+      alpha_shift = combine->ScaleShiftA;
-       break;
-    }
--   switch(texUnit->Combine.ModeRGB) {
-+   switch(combine->ModeRGB) {
-    case GL_REPLACE: 
-       blendop = TEXBLENDOP_ARG1;
-       break;
-@@ -818,10 +230,16 @@
-    /* Handle RGB args */
-    for(i = 0; i < 3; i++) {
--      switch(texUnit->Combine.SourceRGB[i]) {
-+      switch(combine->SourceRGB[i]) {
-       case GL_TEXTURE: 
-        args_RGB[i] = texel_op;
-        break;
-+      case GL_TEXTURE0:
-+      case GL_TEXTURE1:
-+      case GL_TEXTURE2:
-+      case GL_TEXTURE3:
-+       args_RGB[i] = GetTexelOp( combine->SourceRGB[i] - GL_TEXTURE0 );
-+       break;
-       case GL_CONSTANT:
-        args_RGB[i] = TEXBLENDARG_FACTOR_N; 
-        need_factor = 1;
-@@ -836,7 +254,7 @@
-        return pass_through( state, blendUnit );
-       }
--      switch(texUnit->Combine.OperandRGB[i]) {
-+      switch(combine->OperandRGB[i]) {
-       case GL_SRC_COLOR: 
-        args_RGB[i] |= 0;
-        break;
-@@ -863,15 +281,15 @@
-     * Note - the global factor is set up with alpha == .5, so 
-     * the alpha part of the DOT4 calculation should be zero.
-     */
--   if ( texUnit->Combine.ModeRGB == GL_DOT3_RGBA_EXT || 
--      texUnit->Combine.ModeRGB == GL_DOT3_RGBA ) {
-+   if ( combine->ModeRGB == GL_DOT3_RGBA_EXT || 
-+      combine->ModeRGB == GL_DOT3_RGBA ) {
-       ablendop = TEXBLENDOP_DOT4;
-       args_A[0] = TEXBLENDARG_FACTOR; /* the global factor */
-       args_A[1] = TEXBLENDARG_FACTOR;
-       args_A[2] = TEXBLENDARG_FACTOR;
-    }
-    else {
--      switch(texUnit->Combine.ModeA) {
-+      switch(combine->ModeA) {
-       case GL_REPLACE: 
-        ablendop = TEXBLENDOP_ARG1;
-        break;
-@@ -899,10 +317,16 @@
-       /* Handle A args */
-       for(i = 0; i < 3; i++) {
--       switch(texUnit->Combine.SourceA[i]) {
-+       switch(combine->SourceA[i]) {
-        case GL_TEXTURE: 
-           args_A[i] = texel_op;
-           break;
-+       case GL_TEXTURE0:
-+       case GL_TEXTURE1:
-+       case GL_TEXTURE2:
-+       case GL_TEXTURE3:
-+          args_A[i] = GetTexelOp( combine->SourceA[i] - GL_TEXTURE0 );
-+          break;
-        case GL_CONSTANT:
-           args_A[i] = TEXBLENDARG_FACTOR_N; 
-           need_factor = 1;
-@@ -917,7 +341,7 @@
-           return pass_through( state, blendUnit );
-        }
--       switch(texUnit->Combine.OperandA[i]) {
-+       switch(combine->OperandA[i]) {
-        case GL_SRC_ALPHA: 
-           args_A[i] |= 0;
-           break;
-@@ -941,59 +365,38 @@
-     */
--   /* Build color pipeline */
-+   /* Build color & alpha pipelines */
--   state[0] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--             TEXPIPE_COLOR |
--             ENABLE_TEXOUTPUT_WRT_SEL |
--             TEXOP_OUTPUT_CURRENT |
--             DISABLE_TEX_CNTRL_STAGE |
--             TEXOP_MODIFY_PARMS |
--             blendop);
--   state[1] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--             TEXPIPE_COLOR |
--             TEXBLEND_ARG1 |
--             TEXBLENDARG_MODIFY_PARMS |
--             args_RGB[0]);
--   state[2] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--             TEXPIPE_COLOR |
--             TEXBLEND_ARG2 |
--             TEXBLENDARG_MODIFY_PARMS |
--             args_RGB[1]);
--   state[3] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--             TEXPIPE_COLOR |
--             TEXBLEND_ARG0 |
--             TEXBLENDARG_MODIFY_PARMS |
--             args_RGB[2]);
--
--   /* Build Alpha pipeline */
--   state[4] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
--             TEXPIPE_ALPHA |
--             ENABLE_TEXOUTPUT_WRT_SEL |
--             TEXOP_OUTPUT_CURRENT |
--             TEXOP_MODIFY_PARMS |
--             ablendop);
--   state[5] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--             TEXPIPE_ALPHA |
--             TEXBLEND_ARG1 |
--             TEXBLENDARG_MODIFY_PARMS |
--             args_A[0]);
--   state[6] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--             TEXPIPE_ALPHA |
--             TEXBLEND_ARG2 |
--             TEXBLENDARG_MODIFY_PARMS |
--             args_A[1]);
--   state[7] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
--             TEXPIPE_ALPHA |
--             TEXBLEND_ARG0 |
--             TEXBLENDARG_MODIFY_PARMS |
--             args_A[2]);
-+   used = 0;
-+   state[used++] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
-+                  TEXPIPE_COLOR |
-+                  ENABLE_TEXOUTPUT_WRT_SEL |
-+                  TEXOP_OUTPUT_CURRENT |
-+                  DISABLE_TEX_CNTRL_STAGE |
-+                  TEXOP_MODIFY_PARMS |
-+                  blendop);
-+   state[used++] = (_3DSTATE_MAP_BLEND_OP_CMD(blendUnit) |
-+                  TEXPIPE_ALPHA |
-+                  ENABLE_TEXOUTPUT_WRT_SEL |
-+                  TEXOP_OUTPUT_CURRENT |
-+                  TEXOP_MODIFY_PARMS |
-+                  ablendop);
-+
-+   for ( i = 0 ; i < numColorArgs ; i++ ) {
-+      state[used++] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
-+                     tex_blend_rgb[i] | args_RGB[i]);
-+   }
-+
-+   for ( i = 0 ; i < numAlphaArgs ; i++ ) {
-+      state[used++] = (_3DSTATE_MAP_BLEND_ARG_CMD(blendUnit) |
-+                     tex_blend_a[i] | args_A[i]);
-+   }
-    if (need_factor) 
--      return emit_factor( blendUnit, state, 8, factor );
-+      return emit_factor( blendUnit, state, used, factor );
-    else 
--      return 8;
-+      return used;
- }
-@@ -1010,17 +413,9 @@
-    /* Update i830->state.TexBlend
-     */ 
--   if (texUnit->EnvMode == GL_COMBINE) {
--      tmp_sz = i830SetTexEnvCombine(i830, texUnit, blendUnit, 
--                                  GetTexelOp(unit), tmp,
--                                  texUnit->EnvColor );
--   } 
--   else {
--      tmp_sz = i830SetBlend_GL1_2(i830, blendUnit, texUnit->EnvMode,
--                                t->intel.image[0][0].internalFormat, 
--                                GetTexelOp(unit), tmp,
--                                texUnit->EnvColor );
--   }
-+   tmp_sz = i830SetTexEnvCombine(i830, texUnit->_CurrentCombine, blendUnit, 
-+                               GetTexelOp(unit), tmp,
-+                               texUnit->EnvColor );
-    if (last_stage) 
-       tmp[0] |= TEXOP_LAST_STAGE;
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_texstate.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_texstate.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_texstate.c      22 Jul 2004 06:52:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_texstate.c      15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -42,6 +42,19 @@
- #include "i830_context.h"
- #include "i830_reg.h"
-+static const GLint initial_offsets[6][2] = { {0,0},
-+                                     {0,2},
-+                                     {1,0},
-+                                     {1,2},
-+                                     {1,1},
-+                                     {1,3} };
-+
-+static const GLint step_offsets[6][2] = { {0,2},
-+                                  {0,2},
-+                                  {-1,2},
-+                                  {-1,2},
-+                                  {-1,1},
-+                                  {-1,1} };
- #define I830_TEX_UNIT_ENABLED(unit)           (1<<unit)
-@@ -133,39 +146,72 @@
-    lastLevel = t->intel.base.lastLevel;
-    numLevels = lastLevel - firstLevel + 1;
--   /* Pitch would be subject to additional rules if texture memory were
--    * tiled.  Currently it isn't. 
--    */
--   if (0) {
--      pitch = 128;
--      while (pitch < tObj->Image[0][firstLevel]->Width * t->intel.texelBytes)
--       pitch *= 2;
--   }
--   else {
--      pitch = tObj->Image[0][firstLevel]->Width * t->intel.texelBytes;
--      pitch = (pitch + 3) & ~3;
--   }
--
-    /* All images must be loaded at this pitch.  Count the number of
-     * lines required:
-     */
--   for ( total_height = i = 0 ; i < numLevels ; i++ ) {
--      t->intel.image[0][i].image = tObj->Image[0][firstLevel + i];
--      if (!t->intel.image[0][i].image) 
--       break;
-+   switch (tObj->Target) {
-+   case GL_TEXTURE_CUBE_MAP: {
-+      const GLuint dim = tObj->Image[0][firstLevel]->Width;
-+      GLuint face;
-+
-+      pitch = dim * t->intel.texelBytes;
-+      pitch *= 2;             /* double pitch for cube layouts */
-+      pitch = (pitch + 3) & ~3;
-       
--      t->intel.image[0][i].offset = total_height * pitch;
--      t->intel.image[0][i].internalFormat = baseImage->Format;
--      if (t->intel.image[0][i].image->IsCompressed)
--      {
--        if (t->intel.image[0][i].image->Height > 4)
--          total_height += t->intel.image[0][i].image->Height/4;
--        else
--          total_height += 1;
--      }
--      else
--      total_height += MAX2(2, t->intel.image[0][i].image->Height);
-+      total_height = dim * 4;
-+
-+      for ( face = 0 ; face < 6 ; face++) {
-+       GLuint x = initial_offsets[face][0] * dim;
-+       GLuint y = initial_offsets[face][1] * dim;
-+       GLuint d = dim;
-+       
-+       t->intel.base.dirty_images[face] = ~0;
-+
-+       assert(tObj->Image[face][firstLevel]->Width == dim);
-+       assert(tObj->Image[face][firstLevel]->Height == dim);
-+
-+       for (i = 0; i < numLevels; i++) {
-+          t->intel.image[face][i].image = tObj->Image[face][firstLevel + i];
-+          if (!t->intel.image[face][i].image) {
-+             fprintf(stderr, "no image %d %d\n", face, i);
-+             break;           /* can't happen */
-+          }
-+       
-+          t->intel.image[face][i].offset = 
-+             y * pitch + x * t->intel.texelBytes;
-+          t->intel.image[face][i].internalFormat = baseImage->Format;
-+
-+          d >>= 1;
-+          x += step_offsets[face][0] * d;
-+          y += step_offsets[face][1] * d;
-+       }
-+      }
-+      break;
-+   }
-+   default:
-+      pitch = tObj->Image[0][firstLevel]->Width * t->intel.texelBytes;
-+      pitch = (pitch + 3) & ~3;
-+      t->intel.base.dirty_images[0] = ~0;
-+
-+      for ( total_height = i = 0 ; i < numLevels ; i++ ) {
-+       t->intel.image[0][i].image = tObj->Image[0][firstLevel + i];
-+       if (!t->intel.image[0][i].image) 
-+          break;
-+       
-+       t->intel.image[0][i].offset = total_height * pitch;
-+       t->intel.image[0][i].internalFormat = baseImage->Format;
-+       if (t->intel.image[0][i].image->IsCompressed)
-+       {
-+         if (t->intel.image[0][i].image->Height > 4)
-+           total_height += t->intel.image[0][i].image->Height/4;
-+         else
-+           total_height += 1;
-+       }
-+       else
-+         total_height += MAX2(2, t->intel.image[0][i].image->Height);
-+      }
-+      break;
-    }
-    t->intel.Pitch = pitch;
-@@ -176,7 +222,8 @@
-        ((tObj->Image[0][firstLevel]->Width - 1) << TM0S1_WIDTH_SHIFT) |
-        textureFormat);
-    t->Setup[I830_TEXREG_TM0S2] = 
--      (((pitch / 4) - 1) << TM0S2_PITCH_SHIFT);
-+      (((pitch / 4) - 1) << TM0S2_PITCH_SHIFT) |
-+      TM0S2_CUBE_FACE_ENA_MASK;
-    t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MAX_MIP_MASK;
-    t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MIN_MIP_MASK;
-    t->Setup[I830_TEXREG_TM0S3] |= ((numLevels - 1)*4) << TM0S3_MIN_MIP_SHIFT;
-@@ -216,6 +263,7 @@
-    i830->state.Tex[unit][I830_TEXREG_TM0S4] = t->Setup[I830_TEXREG_TM0S4];
-    i830->state.Tex[unit][I830_TEXREG_MCS] = (t->Setup[I830_TEXREG_MCS] & 
-                                            ~MAP_UNIT_MASK);   
-+   i830->state.Tex[unit][I830_TEXREG_CUBE] = t->Setup[I830_TEXREG_CUBE];
-    i830->state.Tex[unit][I830_TEXREG_MCS] |= MAP_UNIT(unit);
-    t->intel.dirty &= ~I830_UPLOAD_TEX(unit);
-@@ -267,9 +315,11 @@
-    mcs &= ~TEXCOORDS_ARE_NORMAL;
-    mcs |= TEXCOORDS_ARE_IN_TEXELUNITS;
--   if (mcs != i830->state.Tex[unit][I830_TEXREG_MCS]) {
-+   if ((mcs != i830->state.Tex[unit][I830_TEXREG_MCS])
-+       || (0 != i830->state.Tex[unit][I830_TEXREG_CUBE])) {
-       I830_STATECHANGE(i830, I830_UPLOAD_TEX(unit));
-       i830->state.Tex[unit][I830_TEXREG_MCS] = mcs;
-+      i830->state.Tex[unit][I830_TEXREG_CUBE] = 0;
-    }
-    return GL_TRUE;
-@@ -284,15 +334,61 @@
-    mcs &= ~TEXCOORDS_ARE_IN_TEXELUNITS;
-    mcs |= TEXCOORDS_ARE_NORMAL;
--   if (mcs != i830->state.Tex[unit][I830_TEXREG_MCS]) {
-+   if ((mcs != i830->state.Tex[unit][I830_TEXREG_MCS])
-+       || (0 != i830->state.Tex[unit][I830_TEXREG_CUBE])) {
-       I830_STATECHANGE(i830, I830_UPLOAD_TEX(unit));
-       i830->state.Tex[unit][I830_TEXREG_MCS] = mcs;
-+      i830->state.Tex[unit][I830_TEXREG_CUBE] = 0;
-    }
-    return GL_TRUE;
- }
-  
-+static GLboolean enable_tex_cube( GLcontext *ctx, GLuint unit )
-+{
-+   i830ContextPtr i830 = I830_CONTEXT(ctx);
-+   struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
-+   struct gl_texture_object *tObj = texUnit->_Current;
-+   i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData;
-+   GLuint mcs = i830->state.Tex[unit][I830_TEXREG_MCS];
-+   const GLuint cube = CUBE_NEGX_ENABLE | CUBE_POSX_ENABLE
-+     | CUBE_NEGY_ENABLE | CUBE_POSY_ENABLE
-+     | CUBE_NEGZ_ENABLE | CUBE_POSZ_ENABLE;
-+   GLuint face;
-+
-+   mcs &= ~TEXCOORDS_ARE_IN_TEXELUNITS;
-+   mcs |= TEXCOORDS_ARE_NORMAL;
-+
-+   if ((mcs != i830->state.Tex[unit][I830_TEXREG_MCS])
-+       || (cube != i830->state.Tex[unit][I830_TEXREG_CUBE])) {
-+      I830_STATECHANGE(i830, I830_UPLOAD_TEX(unit));
-+      i830->state.Tex[unit][I830_TEXREG_MCS] = mcs;
-+      i830->state.Tex[unit][I830_TEXREG_CUBE] = cube;
-+   }
-+
-+   /* Upload teximages (not pipelined)
-+    */
-+   if ( t->intel.base.dirty_images[0] || t->intel.base.dirty_images[1] ||
-+        t->intel.base.dirty_images[2] || t->intel.base.dirty_images[3] ||
-+        t->intel.base.dirty_images[4] || t->intel.base.dirty_images[5] ) {
-+      i830SetTexImages( i830, tObj );
-+   }
-+
-+   /* upload (per face) */
-+   for (face = 0; face < 6; face++) {
-+      if (t->intel.base.dirty_images[face]) {
-+       if (!intelUploadTexImages( &i830->intel, &t->intel, face )) {
-+          return GL_FALSE;
-+       }
-+      }
-+   }
-+
-+
-+   return GL_TRUE;
-+}
-+
-+
- static GLboolean disable_tex( GLcontext *ctx, GLuint unit )
- {
-    i830ContextPtr i830 = I830_CONTEXT(ctx);
-@@ -324,20 +420,21 @@
-        INTEL_CONTEXT(ctx)->intelScreen->textureSize < 2048 * 1024)
-       return GL_FALSE;
--   if (texUnit->_ReallyEnabled == TEXTURE_1D_BIT ||
--       texUnit->_ReallyEnabled == TEXTURE_2D_BIT) {
-+   switch(texUnit->_ReallyEnabled) {
-+   case TEXTURE_1D_BIT:
-+   case TEXTURE_2D_BIT:
-       return (enable_tex_common( ctx, unit ) &&
-             enable_tex_2d( ctx, unit ));
--   }
--   else if (texUnit->_ReallyEnabled == TEXTURE_RECT_BIT) {      
-+   case TEXTURE_RECT_BIT:
-       return (enable_tex_common( ctx, unit ) &&
-             enable_tex_rect( ctx, unit ));
--   }
--   else if (texUnit->_ReallyEnabled) {
--      return GL_FALSE;
--   }
--   else {
-+   case TEXTURE_CUBE_BIT:
-+      return (enable_tex_common( ctx, unit ) &&
-+            enable_tex_cube( ctx, unit ));
-+   case 0:
-       return disable_tex( ctx, unit );
-+   default:
-+      return GL_FALSE;
-    }
- }
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i830_vtbl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i830_vtbl.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i830_vtbl.c  2 Sep 2004 02:06:03 -0000       1.4
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i830_vtbl.c  15 Dec 2004 01:50:58 -0000      1.4.2.1
-@@ -87,6 +87,10 @@
-       intel->coloroffset = 3;
-    }
-+   if (index & _TNL_BIT_POINTSIZE) {
-+      EMIT_ATTR( _TNL_ATTRIB_POINTSIZE, EMIT_1F, VFT0_POINT_WIDTH );
-+   }
-+
-    EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_BGRA, VFT0_DIFFUSE );
-       
-    intel->specoffset = 0;
-@@ -117,11 +121,15 @@
-           switch (sz) {
-           case 1: 
-           case 2: 
--          case 3:             /* XXX: fix for CUBE/VOLUME textures */
-              emit = EMIT_2F; 
-              sz = 2; 
-              mcs |= TEXCOORDTYPE_CARTESIAN; 
-              break;
-+          case 3:
-+             emit = EMIT_3F; 
-+             sz = 3;
-+             mcs |= TEXCOORDTYPE_VECTOR;
-+             break;
-           case 4: 
-              emit = EMIT_3F_XYW; 
-              sz = 3;     
-Index: extras/Mesa/src/mesa/drivers/dri/i915/i915_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/i915_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/i915_context.c       22 Jul 2004 06:52:16 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/i915_context.c       15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -45,14 +45,9 @@
-  * Mesa's Driver Functions
-  ***************************************/
--
- static const char * const card_extensions[] =
- {
-    "GL_ARB_fragment_program",
--   "GL_ARB_texture_cube_map",
--   "GL_EXT_blend_equation_separate",
--   "GL_ATI_blend_equation_separate",
--   "GL_ARB_point_parameters",
-    NULL
- };
-Index: extras/Mesa/src/mesa/drivers/dri/i915/intel_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/i915/intel_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/i915/intel_context.c      22 Jul 2004 06:52:17 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/i915/intel_context.c      15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -72,7 +72,7 @@
-  * Mesa's Driver Functions
-  ***************************************/
--#define DRIVER_DATE                     "20040528"
-+#define DRIVER_DATE                     "20040919"
- const GLubyte *intelGetString( GLcontext *ctx, GLenum name )
- {
-@@ -125,58 +125,60 @@
--/* Extension strings exported by the intel driver.
-+/**
-+ * Extension strings exported by the intel driver.
-  *
-- * NOTE: See implementation of glGetString in each hw_context.c file:
-+ * \note
-+ * It appears that ARB_texture_env_crossbar and NV_blend_square have
-+ * "disappeared" compared to the old i830-specific driver.
-+ *
-+ * \note
-+ * See implementation of \c glGetString in each hw_context.c file:
-  * This set of extensions is overridden and many are not actually
-  * exported to the driver.  They are however enabled internally as
-  * Mesa requires this when calculating things like GL version number.
-  */
- static const char * const card_extensions[] =
- {
--   "GL_APPLE_client_storage",
-    "GL_ARB_multisample",
-    "GL_ARB_multitexture",
-+   "GL_ARB_point_parameters",
-    "GL_ARB_texture_border_clamp",
-+   "GL_ARB_texture_cube_map",
-    "GL_ARB_texture_compression",
-    "GL_ARB_texture_env_add",
-    "GL_ARB_texture_env_combine",
-    "GL_ARB_texture_env_dot3",
-    "GL_ARB_texture_mirrored_repeat",
-+   "GL_ARB_texture_rectangle",
-+   "GL_ARB_vertex_buffer_object",
-    "GL_ARB_vertex_program",
-+   "GL_ARB_window_pos",
-+
-+   "GL_EXT_abgr",
-+   "GL_EXT_bgra",
-    "GL_EXT_blend_color",
-+   "GL_EXT_blend_equation_separate",
-    "GL_EXT_blend_func_separate",
-    "GL_EXT_blend_minmax",
-    "GL_EXT_blend_subtract",
-    "GL_EXT_fog_coord",
-+   "GL_EXT_multi_draw_arrays",
-    "GL_EXT_secondary_color",
-    "GL_EXT_stencil_wrap",
-    "GL_EXT_texture_edge_clamp",
--   "GL_EXT_texture_env_add",
-    "GL_EXT_texture_env_combine",
-    "GL_EXT_texture_env_dot3",
-    "GL_EXT_texture_filter_anisotropic",
-    "GL_EXT_texture_lod_bias",
--   "GL_IBM_texture_mirrored_repeat",
--   "GL_INGR_blend_func_separate",
-+
-+   "GL_3DFX_texture_compression_FXT1",
-+   "GL_APPLE_client_storage",
-    "GL_MESA_pack_invert",
-    "GL_MESA_ycbcr_texture",
--   "GL_NV_texture_rectangle",
-    "GL_NV_vertex_program",
--
--/* New in final:
-- */
--   "GL_ARB_vertex_buffer_object",
--   "GL_ARB_window_pos",
--   "GL_EXT_multi_draw_arrays",
--   "GL_EXT_abgr",
--   "GL_EXT_bgra",
--
--
-+   "GL_NV_vertex_program1_1",
-    "GL_SGIS_generate_mipmap",
--   "GL_SGIS_texture_border_clamp",
--   "GL_SGIS_texture_edge_clamp",
--   "GL_3DFX_texture_compression_FXT1",
-    NULL
- };
-Index: extras/Mesa/src/mesa/drivers/dri/mga/mga_xmesa.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/mga/mga_xmesa.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/mga/mga_xmesa.c   22 Jul 2004 06:51:39 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/mga/mga_xmesa.c   15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -59,6 +59,8 @@
- #include "utils.h"
- #include "vblank.h"
-+#include "extensions.h"
-+
- #include "GL/internal/dri_interface.h"
- /* MGA configuration
-@@ -74,8 +76,12 @@
-         DRI_CONF_TEXTURE_DEPTH(DRI_CONF_TEXTURE_DEPTH_FB)
-         DRI_CONF_COLOR_REDUCTION(DRI_CONF_COLOR_REDUCTION_DITHER)
-     DRI_CONF_SECTION_END
-+    DRI_CONF_SECTION_SOFTWARE
-+        DRI_CONF_ARB_VERTEX_PROGRAM(true)
-+        DRI_CONF_NV_VERTEX_PROGRAM(true)
-+    DRI_CONF_SECTION_END
- DRI_CONF_END;
--static const GLuint __driNConfigOptions = 3;
-+static const GLuint __driNConfigOptions = 5;
- #ifdef USE_NEW_INTERFACE
- static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
-@@ -420,6 +426,8 @@
-    &_tnl_fog_coordinate_stage,
-    &_tnl_texgen_stage, 
-    &_tnl_texture_transform_stage, 
-+   &_tnl_vertex_program_stage,
-+
-                               /* REMOVE: point attenuation stage */
- #if 0
-    &_mga_render_stage,                /* ADD: unclipped rastersetup-to-dma */
-@@ -449,8 +457,10 @@
- {
-    "GL_ARB_multisample",
-    "GL_ARB_texture_compression",
-+   "GL_ARB_texture_rectangle",
-    "GL_EXT_blend_logic_op",
-    "GL_EXT_fog_coord",
-+   "GL_EXT_multi_draw_arrays",
-    /* paletted_textures currently doesn't work, but we could fix them later */
- #if 0
-    "GL_EXT_shared_texture_palette",
-@@ -458,10 +468,8 @@
- #endif
-    "GL_EXT_secondary_color",
-    "GL_EXT_stencil_wrap",
--   "GL_EXT_texture_rectangle",
-    "GL_MESA_ycbcr_texture",
-    "GL_SGIS_generate_mipmap",
--   "GL_SGIS_texture_lod",
-    NULL
- };
-@@ -666,6 +674,16 @@
-       driInitExtensions( ctx, g400_extensions, GL_FALSE );
-    }
-+   if ( driQueryOptionb( &mmesa->optionCache, "arb_vertex_program" ) ) {
-+      _mesa_enable_extension( ctx, "GL_ARB_vertex_program" );
-+   }
-+   
-+   if ( driQueryOptionb( &mmesa->optionCache, "nv_vertex_program" ) ) {
-+      _mesa_enable_extension( ctx, "GL_NV_vertex_program" );
-+      _mesa_enable_extension( ctx, "GL_NV_vertex_program1_1" );
-+   }
-+
-+      
-    /* XXX these should really go right after _mesa_init_driver_functions() */
-    mgaDDInitStateFuncs( ctx );
-    mgaDDInitSpanFuncs( ctx );
-Index: extras/Mesa/src/mesa/drivers/dri/r128/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/Makefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/Makefile     16 Jun 2004 09:18:13 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/Makefile     15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -28,8 +28,7 @@
-       r128_tris.c \
-       r128_ioctl.c \
-       r128_span.c \
--      r128_texmem.c \
--      r128_vb.c
-+      r128_texmem.c
- C_SOURCES = \
-       $(COMMON_SOURCES) \
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_context.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_context.c       16 Jun 2004 09:18:11 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_context.c       15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -56,7 +56,6 @@
- #include "r128_span.h"
- #include "r128_tex.h"
- #include "r128_tris.h"
--#include "r128_vb.h"
- #include "vblank.h"
- #include "utils.h"
-@@ -180,6 +179,7 @@
-    rmesa->RenderIndex = -1;           /* Impossible value */
-    rmesa->vert_buf = NULL;
-    rmesa->num_verts = 0;
-+   rmesa->tnl_state = ~0;
-    /* Set the maximum texture size small enough that we can guarentee that
-     * all texture units can bind a maximal texture and have them both in
-@@ -243,7 +243,6 @@
-    if (sPriv->drmMinor >= 4)
-       _mesa_enable_extension( ctx, "GL_MESA_ycbcr_texture" );
--   r128InitVB( ctx );
-    r128InitTriFuncs( ctx );
-    r128DDInitStateFuncs( ctx );
-    r128DDInitSpanFuncs( ctx );
-@@ -280,8 +279,6 @@
-       _ac_DestroyContext( rmesa->glCtx );
-       _swrast_DestroyContext( rmesa->glCtx );
--      r128FreeVB( rmesa->glCtx );
--
-       /* free the Mesa context */
-       rmesa->glCtx->DriverCtx = NULL;
-       _mesa_destroy_context(rmesa->glCtx);
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_context.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_context.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_context.h       16 Jun 2004 09:18:11 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_context.h       15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -43,6 +43,7 @@
- #include "r128_drm.h"
- #include "mtypes.h"
-+#include "tnl/t_vertex.h"
- #include "r128_reg.h"
-@@ -81,6 +82,7 @@
- #define R128_FALLBACK_SEP_SPECULAR    0x0080
- #define R128_FALLBACK_BLEND_EQ                0x0100
- #define R128_FALLBACK_BLEND_FUNC      0x0200
-+#define R128_FALLBACK_PROJTEX         0x0400
- /* Use the templated vertex format:
-@@ -122,18 +124,21 @@
-    GLuint dirty;                      /* Hardware state to be updated */
-    drm_r128_context_regs_t setup;
-+   /* Vertex state */
-+   GLuint vertex_size;
-+   GLuint vertex_format;
-+   struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX];
-+   GLuint vertex_attr_count;
-+   char *verts;                       /* points to tnl->clipspace.vertex_buf */
-+   GLuint num_verts;
-+   int coloroffset, specoffset;
-+   int tnl_state;     /* tnl->render_inputs for this _tnl_install_attrs */
-+
-    GLuint NewGLState;
-    GLuint Fallback;
--   GLuint SetupIndex;
--   GLuint SetupNewInputs;
-    GLuint RenderIndex;
-    GLfloat hw_viewport[16];
-    GLfloat depth_scale;
--   GLuint vertex_size;
--   GLuint vertex_stride_shift;
--   GLuint vertex_format;
--   GLuint num_verts;
--   GLubyte *verts;            
-    uint32_t ClearColor;                       /* Color used to clear color buffer */
-    uint32_t ClearDepth;                       /* Value used to clear depth buffer */
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_dd.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_dd.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_dd.c    16 Jun 2004 09:18:11 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_dd.c    15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -36,14 +36,14 @@
- #include "r128_context.h"
- #include "r128_ioctl.h"
- #include "r128_state.h"
--#include "r128_vb.h"
- #include "r128_dd.h"
-+#include "swrast/swrast.h"
- #include "context.h"
- #include "utils.h"
--#define DRIVER_DATE   "20030328"
-+#define DRIVER_DATE   "20041001"
- /* Return the width and height of the current color buffer.
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.c 16 Jun 2004 09:18:12 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.c 15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -43,6 +43,7 @@
- #include "swrast/swrast.h"
- #include "vblank.h"
-+#include "mmio.h"
- #define R128_TIMEOUT        2048
- #define R128_IDLE_RETRY       32
-@@ -225,12 +226,11 @@
- static int r128WaitForFrameCompletion( r128ContextPtr rmesa )
- {
-    unsigned char *R128MMIO = rmesa->r128Screen->mmio.map;
--   uint32_t frame;
-    int i;
-    int wait = 0;
-    while ( 1 ) {
--      frame = *(volatile unsigned int *)(R128MMIO + R128_LAST_FRAME_REG);
-+      uint32_t frame = read_MMIO_LE32( R128MMIO, R128_LAST_FRAME_REG );
-       if ( rmesa->sarea->last_frame - frame <= R128_MAX_OUTSTANDING ) {
-        break;
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.h 16 Jun 2004 09:18:12 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_ioctl.h 15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -47,9 +47,11 @@
- extern drmBufPtr r128GetBufferLocked( r128ContextPtr rmesa );
- extern void r128FlushVerticesLocked( r128ContextPtr rmesa );
--static __inline void *r128AllocDmaLow( r128ContextPtr rmesa, int bytes )
-+static __inline void *r128AllocDmaLow( r128ContextPtr rmesa, int count,
-+                                     int vert_size )
- {
-    uint32_t *head;
-+   int bytes = count * vert_size;
-    if ( !rmesa->vert_buf ) {
-       LOCK_HARDWARE( rmesa );
-@@ -64,6 +66,8 @@
-    head = (uint32_t *)((char *)rmesa->vert_buf->address + rmesa->vert_buf->used);
-    rmesa->vert_buf->used += bytes;
-+   rmesa->num_verts += count;
-+   
-    return head;
- }
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_lock.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_lock.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_lock.c  16 Jun 2004 09:18:12 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_lock.c  15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -104,7 +104,7 @@
-       r128UpdatePageFlipping( rmesa );
-       rmesa->lastStamp = dPriv->lastStamp;
-       rmesa->new_state |= R128_NEW_CLIP;
--      rmesa->SetupNewInputs = ~0;
-+      rmesa->tnl_state = ~0;
-    }
-    rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_CLIPRECTS;
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_screen.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_screen.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_screen.c        22 Jul 2004 06:51:42 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_screen.c        15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -38,7 +38,6 @@
- #include "r128_context.h"
- #include "r128_ioctl.h"
- #include "r128_tris.h"
--#include "r128_vb.h"
- #include "context.h"
- #include "imports.h"
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_state.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_state.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_state.c 16 Jun 2004 09:18:12 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_state.c 15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -38,7 +38,6 @@
- #include "r128_state.h"
- #include "r128_ioctl.h"
- #include "r128_tris.h"
--#include "r128_vb.h"
- #include "r128_tex.h"
- #include "context.h"
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_tex.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_tex.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_tex.c   22 Jul 2004 06:51:43 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_tex.c   15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -36,7 +36,6 @@
- #include "r128_context.h"
- #include "r128_state.h"
- #include "r128_ioctl.h"
--#include "r128_vb.h"
- #include "r128_tris.h"
- #include "r128_tex.h"
- #include "r128_texobj.h"
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_texmem.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_texmem.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_texmem.c        16 Jun 2004 09:18:12 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_texmem.c        15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -36,7 +36,6 @@
- #include "r128_context.h"
- #include "r128_state.h"
- #include "r128_ioctl.h"
--#include "r128_vb.h"
- #include "r128_tris.h"
- #include "r128_tex.h"
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_texstate.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_texstate.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_texstate.c      28 Aug 2004 04:27:25 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_texstate.c      15 Dec 2004 01:50:58 -0000      1.1.1.3.2.1
-@@ -42,7 +42,6 @@
- #include "r128_context.h"
- #include "r128_state.h"
- #include "r128_ioctl.h"
--#include "r128_vb.h"
- #include "r128_tris.h"
- #include "r128_tex.h"
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_tris.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_tris.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_tris.c  22 Jul 2004 06:51:43 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_tris.c  15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -47,7 +47,6 @@
- #include "r128_tris.h"
- #include "r128_state.h"
- #include "r128_tex.h"
--#include "r128_vb.h"
- #include "r128_ioctl.h"
- static const GLuint hw_prim[GL_POLYGON+1] = {
-@@ -70,84 +69,27 @@
- /***********************************************************************
-  *                    Emit primitives as inline vertices               *
-  ***********************************************************************/
-+      
-+#define HAVE_QUADS 0
-+#define HAVE_LINES 1
-+#define HAVE_POINTS 1
-+#define HAVE_LE32_VERTS 1
-+#define CTX_ARG r128ContextPtr rmesa
-+#define CTX_ARG2 rmesa
-+#define GET_VERTEX_DWORDS() rmesa->vertex_size
-+#define ALLOC_VERTS( n, size ) r128AllocDmaLow( rmesa, (n), (size) * 4 )
-+#undef LOCAL_VARS
-+#define LOCAL_VARS                                            \
-+   r128ContextPtr rmesa = R128_CONTEXT(ctx);                  \
-+   const char *vertptr = rmesa->verts;
-+#define VERT(x) (r128Vertex *)(vertptr + ((x) * vertsize * 4))
-+#define VERTEX r128Vertex
-+#undef TAG
-+#define TAG(x) r128_##x
-+#include "tnl_dd/t_dd_triemit.h"
-+#undef TAG
-+#undef LOCAL_VARS
--#if defined(USE_X86_ASM)
--#define COPY_DWORDS( j, vb, vertsize, v )                             \
--do {                                                                  \
--      int __tmp;                                                      \
--      __asm__ __volatile__( "rep ; movsl"                             \
--                            : "=%c" (j), "=D" (vb), "=S" (__tmp)      \
--                            : "0" (vertsize),                         \
--                              "D" ((long)vb),                         \
--                              "S" ((long)v) );                        \
--} while (0)
--#else
--#define COPY_DWORDS( j, vb, vertsize, v )                             \
--do {                                                                  \
--   for ( j = 0 ; j < vertsize ; j++ )                                 \
--      vb[j] = CPU_TO_LE32(((GLuint *)v)[j]);                          \
--   vb += vertsize;                                                    \
--} while (0)
--#endif
--
--static __inline void r128_draw_quad( r128ContextPtr rmesa,
--                                   r128VertexPtr v0,
--                                   r128VertexPtr v1,
--                                   r128VertexPtr v2,
--                                   r128VertexPtr v3 )
--{
--   GLuint vertsize = rmesa->vertex_size;
--   GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, 6 * vertsize * 4 );
--   GLuint j;
--
--   rmesa->num_verts += 6;
--   COPY_DWORDS( j, vb, vertsize, v0 );
--   COPY_DWORDS( j, vb, vertsize, v1 );
--   COPY_DWORDS( j, vb, vertsize, v3 );
--   COPY_DWORDS( j, vb, vertsize, v1 );
--   COPY_DWORDS( j, vb, vertsize, v2 );
--   COPY_DWORDS( j, vb, vertsize, v3 );
--}
--
--
--static __inline void r128_draw_triangle( r128ContextPtr rmesa,
--                                       r128VertexPtr v0,
--                                       r128VertexPtr v1,
--                                       r128VertexPtr v2 )
--{
--   GLuint vertsize = rmesa->vertex_size;
--   GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, 3 * vertsize * 4 );
--   GLuint j;
--
--   rmesa->num_verts += 3;
--   COPY_DWORDS( j, vb, vertsize, v0 );
--   COPY_DWORDS( j, vb, vertsize, v1 );
--   COPY_DWORDS( j, vb, vertsize, v2 );
--}
--
--static __inline void r128_draw_line( r128ContextPtr rmesa,
--                                   r128VertexPtr v0,
--                                   r128VertexPtr v1 )
--{
--   GLuint vertsize = rmesa->vertex_size;
--   GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, 2 * vertsize * 4 );
--   GLuint j;
--
--   rmesa->num_verts += 2;
--   COPY_DWORDS( j, vb, vertsize, v0 );
--   COPY_DWORDS( j, vb, vertsize, v1 );
--}
--
--static __inline void r128_draw_point( r128ContextPtr rmesa,
--                                    r128VertexPtr v0 )
--{
--   int vertsize = rmesa->vertex_size;
--   GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, vertsize * 4 );
--   int j;
--
--   rmesa->num_verts += 1;
--   COPY_DWORDS( j, vb, vertsize, v0 );
--}
- /***********************************************************************
-  *          Macros for t_dd_tritmp.h to draw basic primitives          *
-@@ -158,7 +100,7 @@
-    if (DO_FALLBACK)                           \
-       rmesa->draw_tri( rmesa, a, b, c );      \
-    else                                               \
--      r128_draw_triangle( rmesa, a, b, c );   \
-+      r128_triangle( rmesa, a, b, c );                \
- } while (0)
- #define QUAD( a, b, c, d )                    \
-@@ -167,7 +109,7 @@
-       rmesa->draw_tri( rmesa, a, b, d );      \
-       rmesa->draw_tri( rmesa, b, c, d );      \
-    } else                                     \
--      r128_draw_quad( rmesa, a, b, c, d );    \
-+      r128_quad( rmesa, a, b, c, d );         \
- } while (0)
- #define LINE( v0, v1 )                                \
-@@ -175,7 +117,7 @@
-    if (DO_FALLBACK)                           \
-       rmesa->draw_line( rmesa, v0, v1 );      \
-    else                                       \
--      r128_draw_line( rmesa, v0, v1 );        \
-+      r128_line( rmesa, v0, v1 );             \
- } while (0)
- #define POINT( v0 )                           \
-@@ -183,7 +125,7 @@
-    if (DO_FALLBACK)                           \
-       rmesa->draw_point( rmesa, v0 );         \
-    else                                       \
--      r128_draw_point( rmesa, v0 );           \
-+      r128_point( rmesa, v0 );                        \
- } while (0)
-@@ -247,35 +189,40 @@
- #define VERT_SET_SPEC( v0, c )                                        \
- do {                                                          \
-    if (havespec) {                                            \
--      UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.red, (c)[0]);   \
--      UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.green, (c)[1]); \
--      UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.blue, (c)[2]);  \
-+      r128_color_t *spec = (r128_color_t *)&((v0)->ui[specoffset]); \
-+      UNCLAMPED_FLOAT_TO_UBYTE(spec->red, (c)[0]);            \
-+      UNCLAMPED_FLOAT_TO_UBYTE(spec->green, (c)[1]);          \
-+      UNCLAMPED_FLOAT_TO_UBYTE(spec->blue, (c)[2]);           \
-    }                                                          \
- } while (0)
- #define VERT_COPY_SPEC( v0, v1 )                      \
- do {                                                  \
-    if (havespec) {                                    \
--      v0->v.specular.red   = v1->v.specular.red;      \
--      v0->v.specular.green = v1->v.specular.green;    \
--      v0->v.specular.blue  = v1->v.specular.blue;     \
-+      r128_color_t *spec0 = (r128_color_t *)&((v0)->ui[specoffset]); \
-+      r128_color_t *spec1 = (r128_color_t *)&((v1)->ui[specoffset]); \
-+      spec0->red   = spec1->red;                      \
-+      spec0->green = spec1->green;                    \
-+      spec0->blue  = spec1->blue;                     \
-    }                                                  \
- } while (0)
--/* These don't need LE32_TO_CPU() as they used to save and restore
-+/* These don't need LE32_TO_CPU() as they are used to save and restore
-  * colors which are already in the correct format.
-  */
- #define VERT_SAVE_RGBA( idx )    color[idx] = v[idx]->ui[coloroffset]
- #define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx]
--#define VERT_SAVE_SPEC( idx )    if (havespec) spec[idx] = v[idx]->ui[5]
--#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = spec[idx]
-+#define VERT_SAVE_SPEC( idx )    if (havespec) spec[idx] = v[idx]->ui[specoffset]
-+#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[specoffset] = spec[idx]
- #define LOCAL_VARS(n)                                         \
-    r128ContextPtr rmesa = R128_CONTEXT(ctx);                  \
-    GLuint color[n], spec[n];                                  \
--   GLuint coloroffset = (rmesa->vertex_size == 4 ? 3 : 4);    \
--   GLboolean havespec = (rmesa->vertex_size == 4 ? 0 : 1);    \
--   (void) color; (void) spec; (void) coloroffset; (void) havespec;
-+   GLuint coloroffset = rmesa->coloroffset;                   \
-+   GLuint specoffset = rmesa->specoffset;                     \
-+   GLboolean havespec = (rmesa->specoffset != 0);             \
-+   (void) color; (void) spec; (void) specoffset;              \
-+   (void) coloroffset; (void) havespec;
- /***********************************************************************
-  *                Helpers for rendering unfilled primitives            *
-@@ -400,9 +347,10 @@
- {
-    GLcontext *ctx = rmesa->glCtx;
-    SWvertex v[3];
--   r128_translate_vertex( ctx, v0, &v[0] );
--   r128_translate_vertex( ctx, v1, &v[1] );
--   r128_translate_vertex( ctx, v2, &v[2] );
-+   _swsetup_Translate( ctx, v0, &v[0] );
-+   _swsetup_Translate( ctx, v1, &v[1] );
-+   _swsetup_Translate( ctx, v2, &v[2] );
-+   /* XXX: SpanRenderStart */
-    _swrast_Triangle( ctx, &v[0], &v[1], &v[2] );
- }
-@@ -414,8 +362,8 @@
- {
-    GLcontext *ctx = rmesa->glCtx;
-    SWvertex v[2];
--   r128_translate_vertex( ctx, v0, &v[0] );
--   r128_translate_vertex( ctx, v1, &v[1] );
-+   _swsetup_Translate( ctx, v0, &v[0] );
-+   _swsetup_Translate( ctx, v1, &v[1] );
-    _swrast_Line( ctx, &v[0], &v[1] );
- }
-@@ -426,7 +374,7 @@
- {
-    GLcontext *ctx = rmesa->glCtx;
-    SWvertex v[1];
--   r128_translate_vertex( ctx, v0, &v[0] );
-+   _swsetup_Translate( ctx, v0, &v[0] );
-    _swrast_Point( ctx, &v[0] );
- }
-@@ -436,16 +384,15 @@
- /*               Render unclipped begin/end objects                   */
- /**********************************************************************/
--#define VERT(x) (r128Vertex *)(r128verts + (x * vertsize * sizeof(int)))
- #define RENDER_POINTS( start, count )         \
-    for ( ; start < count ; start++)           \
--      r128_draw_point( rmesa, VERT(start) )
-+      r128_point( rmesa, VERT(start) )
- #define RENDER_LINE( v0, v1 ) \
--   r128_draw_line( rmesa, VERT(v0), VERT(v1) )
-+   r128_line( rmesa, VERT(v0), VERT(v1) )
- #define RENDER_TRI( v0, v1, v2 )  \
--   r128_draw_triangle( rmesa, VERT(v0), VERT(v1), VERT(v2) )
-+   r128_triangle( rmesa, VERT(v0), VERT(v1), VERT(v2) )
- #define RENDER_QUAD( v0, v1, v2, v3 ) \
--   r128_draw_quad( rmesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) )
-+   r128_quad( rmesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) )
- #define INIT(x) do {                                  \
-    if (0) fprintf(stderr, "%s\n", __FUNCTION__);      \
-    r128RenderPrimitive( ctx, x );                     \
-@@ -454,7 +401,7 @@
- #define LOCAL_VARS                                            \
-     r128ContextPtr rmesa = R128_CONTEXT(ctx);         \
-     const GLuint vertsize = rmesa->vertex_size;               \
--    const char *r128verts = (char *)rmesa->verts;             \
-+    const char *vertptr = (char *)rmesa->verts;               \
-     const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts;     \
-     (void) elt;
- #define RESET_STIPPLE
-@@ -471,72 +418,15 @@
- /**********************************************************************/
--/*                    Render clipped primitives                       */
--/**********************************************************************/
--
--static void r128RenderClippedPoly( GLcontext *ctx, const GLuint *elts,
--                                   GLuint n )
--{
--   TNLcontext *tnl = TNL_CONTEXT(ctx);
--   struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
--
--   /* Render the new vertices as an unclipped polygon.
--    */
--   {
--      GLuint *tmp = VB->Elts;
--      VB->Elts = (GLuint *)elts;
--      tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, PRIM_BEGIN|PRIM_END );
--      VB->Elts = tmp;
--   }
--}
--
--static void r128RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
--{
--   TNLcontext *tnl = TNL_CONTEXT(ctx);
--   tnl->Driver.Render.Line( ctx, ii, jj );
--}
--
--static void r128FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
--                                       GLuint n )
--{
--   r128ContextPtr rmesa = R128_CONTEXT( ctx );
--   GLuint vertsize = rmesa->vertex_size;
--   GLuint *vb = r128AllocDmaLow( rmesa, (n-2) * 3 * 4 * vertsize );
--   GLubyte *r128verts = (GLubyte *)rmesa->verts;
--   const GLuint *start = (const GLuint *)VERT(elts[0]);
--   int i,j;
--
--   rmesa->num_verts += (n-2) * 3;
--
--   for (i = 2 ; i < n ; i++) {
--      COPY_DWORDS( j, vb, vertsize, (r128VertexPtr) VERT(elts[i-1]) );
--      COPY_DWORDS( j, vb, vertsize, (r128VertexPtr) VERT(elts[i]) );
--      COPY_DWORDS( j, vb, vertsize, (r128VertexPtr) start );
--   }
--}
--
--
--
--
--/**********************************************************************/
- /*                    Choose render functions                         */
- /**********************************************************************/
--#define _R128_NEW_RENDER_STATE (_DD_NEW_LINE_STIPPLE |        \
--                                _DD_NEW_LINE_SMOOTH |         \
--                                _DD_NEW_POINT_SMOOTH |        \
--                                _DD_NEW_TRI_SMOOTH |          \
--                                _DD_NEW_TRI_UNFILLED |        \
--                                _DD_NEW_TRI_LIGHT_TWOSIDE |   \
--                                _DD_NEW_TRI_OFFSET)           \
--
--
- #define POINT_FALLBACK (DD_POINT_SMOOTH)
- #define LINE_FALLBACK (DD_LINE_STIPPLE|DD_LINE_SMOOTH)
- #define TRI_FALLBACK (DD_TRI_SMOOTH)
- #define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK)
- #define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
--
-+#define _R128_NEW_RENDER_STATE (ANY_FALLBACK_FLAGS | ANY_RASTER_FLAGS)
- static void r128ChooseRenderState(GLcontext *ctx)
- {
-@@ -545,9 +435,9 @@
-    GLuint index = 0;
-    if (flags & (ANY_RASTER_FLAGS|ANY_FALLBACK_FLAGS)) {
--      rmesa->draw_point = r128_draw_point;
--      rmesa->draw_line = r128_draw_line;
--      rmesa->draw_tri = r128_draw_triangle;
-+      rmesa->draw_point = r128_point;
-+      rmesa->draw_line = r128_line;
-+      rmesa->draw_tri = r128_triangle;
-       if (flags & ANY_RASTER_FLAGS) {
-        if (flags & DD_TRI_LIGHT_TWOSIDE) index |= R128_TWOSIDE_BIT;
-@@ -569,19 +459,18 @@
-       TNLcontext *tnl = TNL_CONTEXT(ctx);
-       tnl->Driver.Render.Points = rast_tab[index].points;
-       tnl->Driver.Render.Line = rast_tab[index].line;
-+      tnl->Driver.Render.ClippedLine = rast_tab[index].line;
-       tnl->Driver.Render.Triangle = rast_tab[index].triangle;
-       tnl->Driver.Render.Quad = rast_tab[index].quad;
-       if (index == 0) {
-        tnl->Driver.Render.PrimTabVerts = r128_render_tab_verts;
-        tnl->Driver.Render.PrimTabElts = r128_render_tab_elts;
--       tnl->Driver.Render.ClippedLine = rast_tab[index].line;
--       tnl->Driver.Render.ClippedPolygon = r128FastRenderClippedPoly;
-+       tnl->Driver.Render.ClippedPolygon = r128_fast_clipped_poly;
-       } else {
-        tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts;
-        tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts;
--       tnl->Driver.Render.ClippedLine = r128RenderClippedLine;
--       tnl->Driver.Render.ClippedPolygon = r128RenderClippedPoly;
-+       tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon;
-       }
-       rmesa->RenderIndex = index;
-@@ -600,9 +489,6 @@
-       r128DDUpdateHWState( ctx );
-    if (!rmesa->Fallback && rmesa->NewGLState) {
--      if (rmesa->NewGLState & _R128_NEW_VERTEX_STATE)
--       r128ChooseVertexState( ctx );
--
-       if (rmesa->NewGLState & _R128_NEW_RENDER_STATE)
-        r128ChooseRenderState( ctx );
-@@ -657,13 +543,120 @@
-    r128RasterPrimitive( ctx, hw );
- }
-+#define EMIT_ATTR( ATTR, STYLE, VF, SIZE )                            \
-+do {                                                                  \
-+   rmesa->vertex_attrs[rmesa->vertex_attr_count].attrib = (ATTR);     \
-+   rmesa->vertex_attrs[rmesa->vertex_attr_count].format = (STYLE);    \
-+   rmesa->vertex_attr_count++;                                                \
-+   vc_frmt |= (VF);                                                   \
-+   offset += (SIZE);                                                  \
-+} while (0)
-+
-+#define EMIT_PAD( SIZE )                                              \
-+do {                                                                  \
-+   rmesa->vertex_attrs[rmesa->vertex_attr_count].attrib = 0;          \
-+   rmesa->vertex_attrs[rmesa->vertex_attr_count].format = EMIT_PAD;   \
-+   rmesa->vertex_attrs[rmesa->vertex_attr_count].offset = (SIZE);     \
-+   rmesa->vertex_attr_count++;                                                \
-+   offset += (SIZE);                                                  \
-+} while (0)
- static void r128RenderStart( GLcontext *ctx )
- {
--   /* Check for projective texturing.  Make sure all texcoord
--    * pointers point to something.  (fix in mesa?)
-+   r128ContextPtr rmesa = R128_CONTEXT(ctx);
-+   TNLcontext *tnl = TNL_CONTEXT(ctx);
-+   struct vertex_buffer *VB = &tnl->vb;
-+   GLuint index = tnl->render_inputs;
-+   GLuint vc_frmt = 0;
-+   GLboolean fallback_projtex = GL_FALSE;
-+   GLuint offset = 0;
-+
-+   /* Important: */
-+   VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr;
-+   rmesa->vertex_attr_count = 0;
-+   rmesa->specoffset = 0;
-+
-+   /* EMIT_ATTR's must be in order as they tell t_vertex.c how to
-+    * build up a hardware vertex.
-     */
--   r128CheckTexSizes( ctx );
-+   if ( index & _TNL_BITS_TEX_ANY )
-+      EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, R128_CCE_VC_FRMT_RHW, 16 );
-+   else
-+      EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_3F_VIEWPORT, 0, 12 );
-+
-+   rmesa->coloroffset = offset;
-+#if MESA_LITTLE_ENDIAN 
-+   EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_BGRA,
-+      R128_CCE_VC_FRMT_DIFFUSE_ARGB, 4 );
-+#else
-+   EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_ARGB,
-+      R128_CCE_VC_FRMT_DIFFUSE_ARGB, 4 );
-+#endif
-+
-+   if ( index & (_TNL_BIT_COLOR1|_TNL_BIT_FOG) ) {
-+#if MESA_LITTLE_ENDIAN
-+      if ( index & _TNL_BIT_COLOR1) {
-+       rmesa->specoffset = offset;
-+       EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB,
-+          R128_CCE_VC_FRMT_SPEC_FRGB, 3 );
-+      } else 
-+       EMIT_PAD( 3 );
-+
-+      if (index & _TNL_BIT_FOG)
-+       EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, R128_CCE_VC_FRMT_SPEC_FRGB,
-+                  1 );
-+      else
-+       EMIT_PAD( 1 );
-+#else
-+      if (index & _TNL_BIT_FOG)
-+       EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, R128_CCE_VC_FRMT_SPEC_FRGB,
-+                  1 );
-+      else
-+       EMIT_PAD( 1 );
-+
-+      if ( index & _TNL_BIT_COLOR1) {
-+       rmesa->specoffset = offset;
-+       EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB,
-+          R128_CCE_VC_FRMT_SPEC_FRGB, 3 );
-+      } else 
-+       EMIT_PAD( 3 );
-+#endif
-+   }
-+
-+   if ( index & _TNL_BIT_TEX(0) ) {
-+      if ( VB->TexCoordPtr[0]->size > 2 )
-+       fallback_projtex = GL_TRUE;
-+      EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_2F, R128_CCE_VC_FRMT_S_T, 8 );
-+      if ( index & _TNL_BIT_TEX(1) ) {
-+       if ( VB->TexCoordPtr[1]->size > 2 )
-+          fallback_projtex = GL_TRUE;
-+       EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, R128_CCE_VC_FRMT_S2_T2, 8 );
-+      }
-+   } else if ( index & _TNL_BIT_TEX(1) ) {
-+      if ( VB->TexCoordPtr[1]->size > 2 )
-+       fallback_projtex = GL_TRUE;
-+      EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, R128_CCE_VC_FRMT_S_T, 8 );
-+   }
-+
-+   /* projective textures are not supported by the hardware */
-+   FALLBACK( rmesa, R128_FALLBACK_TEXTURE, fallback_projtex );
-+
-+   /* Only need to change the vertex emit code if there has been a
-+    * statechange to a TNL index.
-+    */
-+   if ( index != rmesa->tnl_state ) {
-+      FLUSH_BATCH( rmesa );
-+      rmesa->dirty |= R128_UPLOAD_CONTEXT;
-+
-+      rmesa->vertex_size = 
-+       _tnl_install_attrs( ctx, 
-+                           rmesa->vertex_attrs, 
-+                           rmesa->vertex_attr_count,
-+                           rmesa->hw_viewport, 0 );
-+      rmesa->vertex_size >>= 2;
-+
-+      rmesa->vertex_format = vc_frmt;
-+   }
- }
- static void r128RenderFinish( GLcontext *ctx )
-@@ -698,9 +691,19 @@
-        tnl->Driver.Render.Start = r128RenderStart;
-        tnl->Driver.Render.PrimitiveNotify = r128RenderPrimitive;
-        tnl->Driver.Render.Finish = r128RenderFinish;
--       tnl->Driver.Render.BuildVertices = r128BuildVertices;
--       rmesa->NewGLState |= (_R128_NEW_RENDER_STATE|
--                             _R128_NEW_VERTEX_STATE);
-+
-+       tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
-+       tnl->Driver.Render.CopyPV = _tnl_copy_pv;
-+       tnl->Driver.Render.Interp = _tnl_interp;
-+
-+       _tnl_invalidate_vertex_state( ctx, ~0 );
-+       _tnl_invalidate_vertices( ctx, ~0 );
-+       _tnl_install_attrs( ctx, 
-+                           rmesa->vertex_attrs, 
-+                           rmesa->vertex_attr_count,
-+                           rmesa->hw_viewport, 0 ); 
-+
-+       rmesa->NewGLState |= _R128_NEW_RENDER_STATE;
-       }
-    }
- }
-@@ -726,9 +729,16 @@
-    tnl->Driver.Render.Finish = r128RenderFinish;
-    tnl->Driver.Render.PrimitiveNotify = r128RenderPrimitive;
-    tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
--   tnl->Driver.Render.BuildVertices = r128BuildVertices;
--   rmesa->NewGLState |= (_R128_NEW_RENDER_STATE|
--                       _R128_NEW_VERTEX_STATE);
-+   tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
-+   tnl->Driver.Render.CopyPV = _tnl_copy_pv;
-+   tnl->Driver.Render.Interp = _tnl_interp;
-+
-+   _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, 
-+                     (6 + 2 * ctx->Const.MaxTextureUnits) * sizeof(GLfloat) );
-+   rmesa->verts = (char *)tnl->clipspace.vertex_buf;
-+   rmesa->tnl_state = -1;
-+
-+   rmesa->NewGLState |= _R128_NEW_RENDER_STATE;
- /*     r128Fallback( ctx, 0x100000, 1 ); */
- }
-Index: extras/Mesa/src/mesa/drivers/dri/r128/r128_vb.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r128/r128_vb.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r128/r128_vb.h    16 Jun 2004 09:18:13 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r128/r128_vb.h    15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -1,74 +0,0 @@
--/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.h,v 1.8 2002/10/30 12:51:46 alanh Exp $ */
--/**************************************************************************
--
--Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
--                     VA Linux Systems Inc., Fremont, California.
--
--All Rights Reserved.
--
--Permission is hereby granted, free of charge, to any person obtaining a
--copy of this software and associated documentation files (the "Software"),
--to deal in the Software without restriction, including without limitation
--on the rights to use, copy, modify, merge, publish, distribute, sub
--license, and/or sell copies of the Software, and to permit persons to whom
--the Software is furnished to do so, subject to the following conditions:
--
--The above copyright notice and this permission notice (including the next
--paragraph) shall be included in all copies or substantial portions of the
--Software.
--
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
--IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
--FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
--ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
--DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
--OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
--USE OR OTHER DEALINGS IN THE SOFTWARE.
--
--**************************************************************************/
--
--/*
-- * Authors:
-- *   Keith Whitwell <keith@tungstengraphics.com>
-- *
-- */
--
--#ifndef R128VB_INC
--#define R128VB_INC
--
--#include "mtypes.h"
--#include "swrast/swrast.h"
--#include "r128_context.h"
--
--#define _R128_NEW_VERTEX_STATE (_DD_NEW_SEPARATE_SPECULAR |           \
--                              _DD_NEW_TRI_LIGHT_TWOSIDE |             \
--                              _DD_NEW_TRI_UNFILLED |                  \
--                              _NEW_TEXTURE |                          \
--                              _NEW_FOG)
--
--extern void r128CheckTexSizes( GLcontext *ctx );
--extern void r128ChooseVertexState( GLcontext *ctx );
--
--extern void r128BuildVertices( GLcontext *ctx, GLuint start, GLuint count,
--                               GLuint newinputs );
--
--extern void r128PrintSetupFlags(char *msg, GLuint flags );
--
--extern void r128InitVB( GLcontext *ctx );
--extern void r128FreeVB( GLcontext *ctx );
--
--extern void r128_emit_contiguous_verts( GLcontext *ctx,
--                                        GLuint start,
--                                        GLuint count );
--
--extern void r128_emit_indexed_verts( GLcontext *ctx,
--                                     GLuint start,
--                                     GLuint count );
--
--extern void r128_translate_vertex( GLcontext *ctx,
--                                   const r128Vertex *src,
--                                   SWvertex *dst );
--
--extern void r128_print_vertex( GLcontext *ctx, const r128Vertex *v );
--
--#endif
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_cmdbuf.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_cmdbuf.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_cmdbuf.c        17 Aug 2004 20:17:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_cmdbuf.c        15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -58,113 +58,139 @@
- }
--static void r200_emit_state_list( r200ContextPtr rmesa, 
--                                  struct r200_state_atom *list )
-+/* The state atoms will be emitted in the order they appear in the atom list,
-+ * so this step is important.
-+ */
-+void r200SetUpAtomList( r200ContextPtr rmesa )
- {
--   struct r200_state_atom *state, *tmp;
--   char *dest;
--   int i, size, mtu;
-+   int i, mtu;
--   size = 0;
--   foreach_s( state, tmp, list ) {
--      if (state->check( rmesa->glCtx, state->idx )) {
--/*     dest = r200AllocCmdBuf( rmesa, state->cmd_size * 4, __FUNCTION__);
--       memcpy( dest, state->cmd, state->cmd_size * 4);*/
--         size += state->cmd_size;
--         state->dirty = GL_TRUE;
--       move_to_head( &(rmesa->hw.clean), state );
--       if (R200_DEBUG & DEBUG_STATE) 
--          print_state_atom( state );
--      }
--      else if (R200_DEBUG & DEBUG_STATE)
--       fprintf(stderr, "skip state %s\n", state->name);
--   }
-+   mtu = rmesa->glCtx->Const.MaxTextureUnits;
--   if (!size)
--      return;
-+   make_empty_list(&rmesa->hw.atomlist);
-+   rmesa->hw.atomlist.name = "atom-list";
--   dest = r200AllocCmdBuf( rmesa, size * 4, __FUNCTION__);
--   mtu = rmesa->glCtx->Const.MaxTextureUnits;
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.ctx );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.set );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.lin );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.msk );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vpt );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vtx );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vap );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.vte );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.msc );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.cst );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.zbs );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tcl );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.msl );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tcg );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.grd );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.fog );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tam );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tf );
-+   for (i = 0; i < mtu; ++i)
-+       insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.tex[i] );
-+   for (i = 0; i < mtu; ++i)
-+       insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.cube[i] );
-+   for (i = 0; i < 6; ++i)
-+       insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.pix[i] );
--#define EMIT_ATOM(ATOM) \
--do { \
--   if (rmesa->hw.ATOM.dirty) { \
--      rmesa->hw.ATOM.dirty = GL_FALSE; \
--      memcpy( dest, rmesa->hw.ATOM.cmd, rmesa->hw.ATOM.cmd_size * 4); \
--      dest += rmesa->hw.ATOM.cmd_size * 4; \
--   } \
--} while (0)
--
--   EMIT_ATOM (ctx);
--   EMIT_ATOM (set);
--   EMIT_ATOM (lin);
--   EMIT_ATOM (msk);
--   EMIT_ATOM (vpt);
--   EMIT_ATOM (vtx);
--   EMIT_ATOM (vap);
--   EMIT_ATOM (vte);
--   EMIT_ATOM (msc);
--   EMIT_ATOM (cst);
--   EMIT_ATOM (zbs);
--   EMIT_ATOM (tcl);
--   EMIT_ATOM (msl);
--   EMIT_ATOM (tcg);
--   EMIT_ATOM (grd);
--   EMIT_ATOM (fog);
--   EMIT_ATOM (tam);
--   EMIT_ATOM (tf);
--   for (i = 0; i < mtu; ++i) {
--       EMIT_ATOM (tex[i]);
--   }
--   for (i = 0; i < mtu; ++i) {
--       EMIT_ATOM (cube[i]);
--   }
--   for (i = 0; i < 3 + mtu; ++i)
--       EMIT_ATOM (mat[i]);
--   EMIT_ATOM (eye);
--   EMIT_ATOM (glt);
--   for (i = 0; i < 2; ++i) {
--      EMIT_ATOM (mtl[i]);
--   }
-    for (i = 0; i < 8; ++i)
--       EMIT_ATOM (lit[i]);
--   for (i = 0; i < 6; ++i)
--       EMIT_ATOM (ucp[i]);
-+       insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.lit[i] );
-+   for (i = 0; i < 3 + mtu; ++i)
-+       insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.mat[i] );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.eye );
-+   insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.glt );
-+   for (i = 0; i < 2; ++i)
-+      insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.mtl[i] );
-    for (i = 0; i < 6; ++i)
--       EMIT_ATOM (pix[i]);
-+       insert_at_tail( &rmesa->hw.atomlist, &rmesa->hw.ucp[i] );
-+}
--#undef EMIT_ATOM
-+static void r200SaveHwState( r200ContextPtr rmesa )
-+{
-+   struct r200_state_atom *atom;
-+   char * dest = rmesa->backup_store.cmd_buf;
--}
-+   if (R200_DEBUG & DEBUG_STATE)
-+      fprintf(stderr, "%s\n", __FUNCTION__);
-+   rmesa->backup_store.cmd_used = 0;
-+
-+   foreach( atom, &rmesa->hw.atomlist ) {
-+      if ( atom->check( rmesa->glCtx, atom->idx ) ) {
-+       int size = atom->cmd_size * 4;
-+       memcpy( dest, atom->cmd, size);
-+       dest += size;
-+       rmesa->backup_store.cmd_used += size;
-+       if (R200_DEBUG & DEBUG_STATE)
-+          print_state_atom( atom );
-+      }
-+   }
-+
-+   assert( rmesa->backup_store.cmd_used <= R200_CMD_BUF_SZ );
-+   if (R200_DEBUG & DEBUG_STATE)
-+      fprintf(stderr, "Returning to r200EmitState\n");
-+}
- void r200EmitState( r200ContextPtr rmesa )
- {
--   struct r200_state_atom *state, *tmp;
-+   char *dest;
-+   int mtu;
-+   struct r200_state_atom *atom;
-    if (R200_DEBUG & (DEBUG_STATE|DEBUG_PRIMS))
-       fprintf(stderr, "%s\n", __FUNCTION__);
--   /* Somewhat overkill:
--    */
--   if ( rmesa->lost_context) {
--      if (R200_DEBUG & (DEBUG_STATE|DEBUG_PRIMS|DEBUG_IOCTL))
--       fprintf(stderr, "%s - lost context\n", __FUNCTION__); 
-+   if (rmesa->save_on_next_emit) {
-+      r200SaveHwState(rmesa);
-+      rmesa->save_on_next_emit = GL_FALSE;
-+   }
-+
-+   if (!rmesa->hw.is_dirty && !rmesa->hw.all_dirty)
-+      return;
--      foreach_s( state, tmp, &(rmesa->hw.clean) ) 
--       move_to_tail(&(rmesa->hw.dirty), state );
-+   mtu = rmesa->glCtx->Const.MaxTextureUnits;
--      rmesa->lost_context = 0;
-+   /* To avoid going across the entire set of states multiple times, just check
-+    * for enough space for the case of emitting all state, and inline the
-+    * r200AllocCmdBuf code here without all the checks.
-+    */
-+   r200EnsureCmdBufSpace( rmesa, rmesa->hw.max_state_size );
-+
-+   /* we need to calculate dest after EnsureCmdBufSpace
-+      as we may flush the buffer - airlied */
-+   dest = rmesa->store.cmd_buf + rmesa->store.cmd_used;
-+   if (R200_DEBUG & DEBUG_STATE) {
-+      foreach( atom, &rmesa->hw.atomlist ) {
-+       if ( atom->dirty || rmesa->hw.all_dirty ) {
-+          if ( atom->check( rmesa->glCtx, atom->idx ) )
-+             print_state_atom( atom );
-+          else
-+             fprintf(stderr, "skip state %s\n", atom->name);
-+       }
-+      }
-    }
--/*   else {
--      move_to_tail( &rmesa->hw.dirty, &rmesa->hw.mtl[0] );*/
--      /* odd bug? -- isosurf, cycle between reflect & lit */
--/*   }*/
--   r200_emit_state_list( rmesa, &rmesa->hw.dirty );
--}
-+   foreach( atom, &rmesa->hw.atomlist ) {
-+      if ( rmesa->hw.all_dirty )
-+       atom->dirty = GL_TRUE;
-+      if ( atom->dirty ) {
-+       if ( atom->check( rmesa->glCtx, atom->idx ) ) {
-+          int size = atom->cmd_size * 4;
-+          memcpy( dest, atom->cmd, size);
-+          dest += size;
-+          rmesa->store.cmd_used += size;
-+          atom->dirty = GL_FALSE;
-+       }
-+      }
-+   }
-+   assert( rmesa->store.cmd_used <= R200_CMD_BUF_SZ );
-+   rmesa->hw.is_dirty = GL_FALSE;
-+   rmesa->hw.all_dirty = GL_FALSE;
-+}
- /* Fire a section of the retained (indexed_verts) buffer as a regular
-  * primtive.  
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_context.c       22 Jul 2004 06:51:45 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_context.c       15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -62,7 +62,7 @@
- #include "r200_vtxfmt.h"
- #include "r200_maos.h"
--#define DRIVER_DATE   "20030328"
-+#define DRIVER_DATE   "20040929"
- #include "vblank.h"
- #include "utils.h"
-@@ -143,7 +143,6 @@
-     "GL_ATI_texture_env_combine3",
-     "GL_ATI_texture_mirror_once",
-     "GL_MESA_pack_invert",
--    "GL_MESA_ycbcr_texture",
-     "GL_NV_blend_square",
-     "GL_SGIS_generate_mipmap",
-     NULL
-@@ -166,6 +165,7 @@
-    &_tnl_fog_coordinate_stage,
-    &_tnl_texgen_stage,
-    &_tnl_texture_transform_stage,
-+   &_tnl_vertex_program_stage,
-    /* Try again to go to tcl? 
-     *     - no good for asymmetric-twoside (do with multipass)
-@@ -322,7 +322,7 @@
-        DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
-    rmesa->swtcl.RenderIndex = ~0;
--   rmesa->lost_context = 1;
-+   rmesa->hw.all_dirty = 1;
-    /* Set the maximum texture size small enough that we can guarentee that
-     * all texture units can bind a maximal texture and have them both in
-@@ -400,12 +400,21 @@
-    _math_matrix_set_identity( &rmesa->tmpmat );
-    driInitExtensions( ctx, card_extensions, GL_TRUE );
-+   if (rmesa->r200Screen->chipset & R200_CHIPSET_REAL_R200) {
-+   /* yuv textures only work with r200 chips for unknown reasons, the
-+      others get the bit ordering right but don't actually do YUV-RGB conversion */
-+      _mesa_enable_extension( ctx, "GL_MESA_ycbcr_texture" );
-+   }
-    if (rmesa->r200Screen->drmSupportsCubeMaps)
-       _mesa_enable_extension( ctx, "GL_ARB_texture_cube_map" );
-    if (rmesa->r200Screen->drmSupportsBlendColor) {
-       _mesa_enable_extension( ctx, "GL_EXT_blend_equation_separate" );
-       _mesa_enable_extension( ctx, "GL_EXT_blend_func_separate" );
-    }
-+   if(driQueryOptionb(&rmesa->optionCache, "arb_vertex_program"))
-+      _mesa_enable_extension( ctx, "GL_ARB_vertex_program");
-+   if(driQueryOptionb(&rmesa->optionCache, "nv_vertex_program"))
-+      _mesa_enable_extension( ctx, "GL_NV_vertex_program");
- #if 0
-    r200InitDriverFuncs( ctx );
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_context.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_context.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_context.h       17 Aug 2004 20:17:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_context.h       15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -491,10 +491,8 @@
- struct r200_hw_state {
--   /* All state should be on one of these lists:
--    */
--   struct r200_state_atom dirty; /* dirty list head placeholder */
--   struct r200_state_atom clean; /* clean list head placeholder */
-+   /* Head of the linked list of state atoms. */
-+   struct r200_state_atom atomlist;
-    /* Hardware state, stored as cmdbuf commands:  
-     *   -- Need to doublebuffer for
-@@ -530,6 +528,7 @@
-    struct r200_state_atom glt; 
-    int max_state_size;        /* Number of bytes necessary for a full state emit. */
-+   GLboolean is_dirty, all_dirty;
- };
- struct r200_state {
-@@ -825,8 +824,6 @@
- };
--
--
- struct r200_context {
-    GLcontext *glCtx;                  /* Mesa context */
-@@ -854,6 +851,10 @@
-    struct r200_ioctl ioctl;
-    struct r200_dma dma;
-    struct r200_store store;
-+   /* A full state emit as of the first state emit in the main store, in case
-+    * the context is lost.
-+    */
-+   struct r200_store backup_store;
-    /* Page flipping
-     */
-@@ -876,6 +877,7 @@
-    drm_clip_rect_t *pClipRects;
-    unsigned int lastStamp;
-    GLboolean lost_context;
-+   GLboolean save_on_next_emit;
-    r200ScreenPtr r200Screen;  /* Screen private DRI data */
-    drm_radeon_sarea_t *sarea;         /* Private SAREA data */
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.c 17 Aug 2004 20:17:58 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.c 15 Dec 2004 01:50:58 -0000      1.1.1.3.2.1
-@@ -59,11 +59,41 @@
- static void r200WaitForIdle( r200ContextPtr rmesa );
-+/* At this point we were in FlushCmdBufLocked but we had lost our context, so
-+ * we need to unwire our current cmdbuf, hook the one with the saved state in
-+ * it, flush it, and then put the current one back.  This is so commands at the
-+ * start of a cmdbuf can rely on the state being kept from the previous one.
-+ */
-+static void r200BackUpAndEmitLostStateLocked( r200ContextPtr rmesa )
-+{
-+   GLuint nr_released_bufs;
-+   struct r200_store saved_store;
-+
-+   if (rmesa->backup_store.cmd_used == 0)
-+      return;
-+
-+   if (R200_DEBUG & DEBUG_STATE)
-+      fprintf(stderr, "Emitting backup state on lost context\n");
-+
-+   rmesa->lost_context = GL_FALSE;
-+
-+   nr_released_bufs = rmesa->dma.nr_released_bufs;
-+   saved_store = rmesa->store;
-+   rmesa->dma.nr_released_bufs = 0;
-+   rmesa->store = rmesa->backup_store;
-+   r200FlushCmdBufLocked( rmesa, __FUNCTION__ );
-+   rmesa->dma.nr_released_bufs = nr_released_bufs;
-+   rmesa->store = saved_store;
-+}
-+
- int r200FlushCmdBufLocked( r200ContextPtr rmesa, const char * caller )
- {
-    int ret, i;
-    drm_radeon_cmd_buffer_t cmd;
-+   if (rmesa->lost_context)
-+      r200BackUpAndEmitLostStateLocked( rmesa );
-+
-    if (R200_DEBUG & DEBUG_IOCTL) {
-       fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); 
-@@ -132,18 +162,7 @@
-    rmesa->store.statenr = 0;
-    rmesa->store.cmd_used = 0;
-    rmesa->dma.nr_released_bufs = 0;
--   /* Set lost_context so that the first state emit on the new buffer is a full
--    * one.  This is because the context might get lost while preparing the next
--    * buffer, and when we lock and find out, we don't have the information to
--    * recreate the state.  This function should always be called before the new
--    * buffer is begun, so it's sufficient to just set lost_context here.
--    *
--    * The alternative to this would be to copy out the state on unlock
--    * (approximately) and if we did lose the context, dispatch a cmdbuf to reset
--    * the state to that old copy before continuing with the accumulated command
--    * buffer.
--    */
--   rmesa->lost_context = 1;
-+   rmesa->save_on_next_emit = 1;
-    return ret;
- }
-@@ -464,7 +483,7 @@
-    }
-    UNLOCK_HARDWARE( rmesa );
--   rmesa->lost_context = 1;
-+   rmesa->hw.all_dirty = GL_TRUE;
-    rmesa->swap_count++;
-    (*rmesa->get_ust)( & ust );
-@@ -576,7 +595,7 @@
-        return;
-    }
--   R200_FIREVERTICES( rmesa ); 
-+   r200Flush( ctx );
-    if ( mask & DD_FRONT_LEFT_BIT ) {
-       flags |= RADEON_FRONT;
-@@ -613,13 +632,6 @@
-    cx += dPriv->x;
-    cy  = dPriv->y + dPriv->h - cy - ch;
--   /* We have to emit state along with the clear, since the kernel relies on
--    * some of it.  The EmitState that was above R200_FIREVERTICES was an
--    * attempt to do that, except that another context may come in and cause us
--    * to lose our context while we're unlocked.
--    */
--   r200EmitState( rmesa );
--
-    LOCK_HARDWARE( rmesa );
-    /* Throttle the number of clear ioctls we do.
-@@ -722,7 +734,7 @@
-    }
-    UNLOCK_HARDWARE( rmesa );
--   rmesa->lost_context = 1;
-+   rmesa->hw.all_dirty = GL_TRUE;
- }
-@@ -763,8 +775,7 @@
-    if (rmesa->dma.flush)
-       rmesa->dma.flush( rmesa );
--   if (!is_empty_list(&rmesa->hw.dirty)) 
--      r200EmitState( rmesa );
-+   r200EmitState( rmesa );
-    
-    if (rmesa->store.cmd_used)
-       r200FlushCmdBuf( rmesa, __FUNCTION__ );
-@@ -847,7 +858,7 @@
- {
-    GET_CURRENT_CONTEXT(ctx);
-    r200ContextPtr rmesa;
--   int region_offset;
-+   ptrdiff_t region_offset;
-    drm_radeon_mem_free_t memfree;
-    int ret;
-@@ -908,7 +919,7 @@
- GLboolean r200IsGartMemory( r200ContextPtr rmesa, const GLvoid *pointer,
-                          GLint size )
- {
--   int offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map;
-+   ptrdiff_t offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map;
-    int valid = (size >= 0 &&
-               offset >= 0 &&
-               offset + size < rmesa->r200Screen->gartTextures.size);
-@@ -922,7 +933,7 @@
- GLuint r200GartOffsetFromVirtual( r200ContextPtr rmesa, const GLvoid *pointer )
- {
--   int offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map;
-+   ptrdiff_t offset = (char *)pointer - (char *)rmesa->r200Screen->gartTextures.map;
-    if (offset < 0 || offset > rmesa->r200Screen->gartTextures.size)
-       return ~0;
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.h,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.h 17 Aug 2004 20:17:58 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_ioctl.h 15 Dec 2004 01:50:58 -0000      1.1.1.3.2.1
-@@ -117,6 +117,8 @@
- extern GLuint r200GartOffsetFromVirtual( r200ContextPtr rmesa, 
-                                        const GLvoid *pointer );
-+void r200SetUpAtomList( r200ContextPtr rmesa );
-+
- /* ================================================================
-  * Helper macros:
-  */
-@@ -135,7 +137,8 @@
- #define R200_STATECHANGE( rmesa, ATOM )                       \
- do {                                                          \
-    R200_NEWPRIM( rmesa );                                     \
--   move_to_head( &(rmesa->hw.dirty), &(rmesa->hw.ATOM));      \
-+   rmesa->hw.ATOM.dirty = GL_TRUE;                            \
-+   rmesa->hw.is_dirty = GL_TRUE;                              \
- } while (0)
- #define R200_DB_STATE( ATOM )                         \
-@@ -149,7 +152,8 @@
-    if (memcmp(atom->cmd, atom->lastcmd, atom->cmd_size*4)) {
-       int *tmp;
-       R200_NEWPRIM( rmesa );
--      move_to_head( &(rmesa->hw.dirty), atom );
-+      atom->dirty = GL_TRUE;
-+      rmesa->hw.is_dirty = GL_TRUE;
-       tmp = atom->cmd; 
-       atom->cmd = atom->lastcmd;
-       atom->lastcmd = tmp;
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_lock.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_lock.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_lock.c  16 Jun 2004 09:18:15 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_lock.c  15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -116,4 +116,6 @@
-    for ( i = 0 ; i < rmesa->nr_heaps ; i++ ) {
-       DRI_AGE_TEXTURES( rmesa->texture_heaps[ i ] );
-    }
-+
-+   rmesa->lost_context = GL_TRUE;
- }
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_screen.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_screen.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_screen.c        22 Jul 2004 06:51:46 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_screen.c        15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -75,8 +75,12 @@
-     DRI_CONF_SECTION_DEBUG
-         DRI_CONF_NO_RAST(false)
-     DRI_CONF_SECTION_END
-+    DRI_CONF_SECTION_SOFTWARE
-+        DRI_CONF_ARB_VERTEX_PROGRAM(true)
-+        DRI_CONF_NV_VERTEX_PROGRAM(false)
-+    DRI_CONF_SECTION_END
- DRI_CONF_END;
--static const GLuint __driNConfigOptions = 11;
-+static const GLuint __driNConfigOptions = 13;
- #if 1
- /* Including xf86PciInfo.h introduces a bunch of errors...
-@@ -87,7 +91,8 @@
- #define PCI_CHIP_R200_QG      0x5147
- #define PCI_CHIP_R200_QY      0x5159
- #define PCI_CHIP_R200_QZ      0x515A
--#define PCI_CHIP_R200_LW      0x4C57 
-+#define PCI_CHIP_R200_LW      0x4C57
-+#define PCI_CHIP_R200_LX      0x4C58
- #define PCI_CHIP_R200_LY      0x4C59
- #define PCI_CHIP_R200_LZ      0x4C5A
- #define PCI_CHIP_RV200_QW     0x5157 /* Radeon 7500 - not an R200 at all */
-@@ -112,8 +117,14 @@
- #define PCI_CHIP_R200_QM        0x514D
- #define PCI_CHIP_R200_QN        0x514E
- #define PCI_CHIP_R200_QO        0x514F /* r200 (non-derived) end */
--/* are the R200 Qh (0x5168) and following needed too? They are not in xf86PciInfo.h
--   but in the pci database. Maybe just secondary ports or something ? */
-+/* are the R200 Qh (0x5168) and following needed too? They are not in
-+   xf86PciInfo.h but in the pci database. Maybe just secondary ports or
-+   something ? Ah well, better be safe than sorry */
-+#define PCI_CHIP_R200_Qh        0x5168
-+#define PCI_CHIP_R200_Qi        0x5169
-+#define PCI_CHIP_R200_Qj        0x516A
-+#define PCI_CHIP_R200_Qk        0x516B
-+#define PCI_CHIP_R200_Ql        0x516C
- #endif
-@@ -237,6 +248,7 @@
-    case PCI_CHIP_RV200_QW:
-    case PCI_CHIP_RV200_QX:
-    case PCI_CHIP_R200_LW:
-+   case PCI_CHIP_R200_LX:
-    case PCI_CHIP_R200_LY:
-    case PCI_CHIP_R200_LZ:
-    case PCI_CHIP_RS100_4136:
-@@ -265,6 +277,11 @@
-    case PCI_CHIP_R200_QM:
-    case PCI_CHIP_R200_QN:
-    case PCI_CHIP_R200_QO:
-+   case PCI_CHIP_R200_Qh:
-+   case PCI_CHIP_R200_Qi:
-+   case PCI_CHIP_R200_Qj:
-+   case PCI_CHIP_R200_Qk:
-+   case PCI_CHIP_R200_Ql:
-       screen->chipset |= R200_CHIPSET_REAL_R200;
-    /* fallthrough */
-    default:
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_span.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_span.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_span.c  16 Jun 2004 09:18:17 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_span.c  15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -195,7 +195,7 @@
-                                      GLint x, GLint y )
- {
-    GLuint pitch = rmesa->r200Screen->frontPitch;
--   GLuint b = ((y & 0x3FF) >> 4) * ((pitch & 0xFFF) >> 5) + ((x & 0x3FF) >> 5);
-+   GLuint b = ((y & 0x7FF) >> 4) * ((pitch & 0xFFF) >> 5) + ((x & 0x7FF) >> 5);
-    GLuint a = 
-       (BIT(x,0) << 2) |
-       (BIT(y,0) << 3) |
-@@ -214,7 +214,7 @@
- static GLuint r200_mba_z16( r200ContextPtr rmesa, GLint x, GLint y )
- {
-    GLuint pitch = rmesa->r200Screen->frontPitch;
--   GLuint b = ((y & 0x3FF) >> 4) * ((pitch & 0xFFF) >> 6) + ((x & 0x3FF) >> 6);
-+   GLuint b = ((y & 0x7FF) >> 4) * ((pitch & 0xFFF) >> 6) + ((x & 0x7FF) >> 6);
-    GLuint a = 
-       (BIT(x,0) << 1) |
-       (BIT(y,0) << 2) |
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_state.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_state.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_state.c 16 Jun 2004 09:18:17 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_state.c 15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -2043,6 +2043,10 @@
-       r200UpdateSpecular ( ctx );
-       break;
-+   case GL_VERTEX_PROGRAM_ARB:
-+      TCL_FALLBACK(rmesa->glCtx, R200_TCL_FALLBACK_TCL_DISABLE, state);
-+      break;
-+
-    default:
-       return;
-    }
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_state_init.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_state_init.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_state_init.c    17 Aug 2004 20:17:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_state_init.c    15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -65,8 +65,9 @@
-    fprintf(stderr, msg);
-    fprintf(stderr, ": ");
--   foreach(l, &(rmesa->hw.dirty)) {
--      fprintf(stderr, "%s, ", l->name);
-+   foreach(l, &rmesa->hw.atomlist) {
-+      if (l->dirty || rmesa->hw.all_dirty)
-+       fprintf(stderr, "%s, ", l->name);
-    }
-    fprintf(stderr, "\n");
-@@ -200,11 +201,6 @@
-    rmesa->state.pixel.readOffset = rmesa->state.color.drawOffset;
-    rmesa->state.pixel.readPitch  = rmesa->state.color.drawPitch;
--   /* Initialize lists:
--    */
--   make_empty_list(&(rmesa->hw.dirty)); rmesa->hw.dirty.name = "DIRTY";
--   make_empty_list(&(rmesa->hw.clean)); rmesa->hw.clean.name = "CLEAN";
--
-    rmesa->hw.max_state_size = 0;
- #define ALLOC_STATE( ATOM, CHK, SZ, NM, IDX )                         \
-@@ -214,8 +210,8 @@
-       rmesa->hw.ATOM.lastcmd = (int *)CALLOC(SZ * sizeof(int));       \
-       rmesa->hw.ATOM.name = NM;                                       \
-       rmesa->hw.ATOM.idx = IDX;                                       \
--      rmesa->hw.ATOM.check = check_##CHK;                             \
--      insert_at_head(&(rmesa->hw.dirty), &(rmesa->hw.ATOM));  \
-+      rmesa->hw.ATOM.check = check_##CHK;                     \
-+      rmesa->hw.ATOM.dirty = GL_FALSE;                                \
-       rmesa->hw.max_state_size += SZ * sizeof(int);           \
-    } while (0)
-       
-@@ -308,6 +304,7 @@
-    ALLOC_STATE( pix[4], tex, PIX_STATE_SIZE, "PIX/pixstage-4", 4 );
-    ALLOC_STATE( pix[5], tex, PIX_STATE_SIZE, "PIX/pixstage-5", 5 );
-+   r200SetUpAtomList( rmesa );
-    /* Fill in the packet headers:
-     */
-@@ -772,5 +769,5 @@
-    r200LightingSpaceChange( ctx );
-    
--   rmesa->lost_context = 1;
-+   rmesa->hw.all_dirty = GL_TRUE;
- }
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_swtcl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_swtcl.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_swtcl.c 17 Aug 2004 20:17:58 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_swtcl.c 15 Dec 2004 01:50:58 -0000      1.1.1.3.2.1
-@@ -117,12 +117,17 @@
-    }
-    rmesa->swtcl.coloroffset = offset;
-+#if MESA_LITTLE_ENDIAN 
-    EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_RGBA, (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT) );
-+#else
-+   EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_ABGR, (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT) );
-+#endif
-    offset += 1;
-    rmesa->swtcl.specoffset = 0;
-    if (index & (_TNL_BIT_COLOR1|_TNL_BIT_FOG)) {
-+#if MESA_LITTLE_ENDIAN 
-       if (index & _TNL_BIT_COLOR1) {
-        rmesa->swtcl.specoffset = offset;
-        EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB, (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT) );
-@@ -137,6 +142,22 @@
-       else {
-        EMIT_PAD( 1 );
-       }
-+#else
-+      if (index & _TNL_BIT_FOG) {
-+       EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT) );
-+      }
-+      else {
-+       EMIT_PAD( 1 );
-+      }
-+
-+      if (index & _TNL_BIT_COLOR1) {
-+       rmesa->swtcl.specoffset = offset;
-+       EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_BGR, (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT) );
-+      }
-+      else {
-+       EMIT_PAD( 3 );
-+      }
-+#endif
-    }
-    if (index & _TNL_BITS_TEX_ANY) {
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.c   17 Aug 2004 20:17:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.c   15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -101,7 +101,7 @@
- };
-    
--#define LOCAL_VARS r200ContextPtr rmesa = R200_CONTEXT(ctx)
-+#define LOCAL_VARS r200ContextPtr rmesa = R200_CONTEXT(ctx); (void)rmesa
- #define ELT_TYPE  GLushort
- #define ELT_INIT(prim, hw_prim) \
-@@ -140,32 +140,48 @@
- static GLushort *r200AllocElts( r200ContextPtr rmesa, GLuint nr ) 
- {
--   if (rmesa->dma.flush)
--      rmesa->dma.flush( rmesa );
-+   if (rmesa->dma.flush == r200FlushElts &&
-+       rmesa->store.cmd_used + nr*2 < R200_CMD_BUF_SZ) {
--   r200EnsureCmdBufSpace( rmesa, AOS_BUFSZ(rmesa->tcl.nr_aos_components) +
--                        rmesa->hw.max_state_size + ELTS_BUFSZ(nr) );
--   
--   r200EmitAOS( rmesa,
--              rmesa->tcl.aos_components,
--              rmesa->tcl.nr_aos_components, 0 );
-+      GLushort *dest = (GLushort *)(rmesa->store.cmd_buf +
-+                                  rmesa->store.cmd_used);
--   return r200AllocEltsOpenEnded( rmesa, rmesa->tcl.hw_primitive, nr );
-+      rmesa->store.cmd_used += nr*2;
-+
-+      return dest;
-+   }
-+   else {
-+      if (rmesa->dma.flush)
-+       rmesa->dma.flush( rmesa );
-+
-+      r200EnsureCmdBufSpace( rmesa, AOS_BUFSZ(rmesa->tcl.nr_aos_components) +
-+                           rmesa->hw.max_state_size + ELTS_BUFSZ(nr) );
-+
-+      r200EmitAOS( rmesa,
-+                 rmesa->tcl.aos_components,
-+                 rmesa->tcl.nr_aos_components, 0 );
-+
-+      return r200AllocEltsOpenEnded( rmesa, rmesa->tcl.hw_primitive, nr );
-+   }
- }
--#define CLOSE_ELTS()  R200_NEWPRIM( rmesa )
-+#define CLOSE_ELTS()                          \
-+do {                                          \
-+   if (0) R200_NEWPRIM( rmesa );              \
-+}                                             \
-+while (0)
- /* TODO: Try to extend existing primitive if both are identical,
-  * discrete and there are no intervening state changes.  (Somewhat
-  * duplicates changes to DrawArrays code)
-  */
--static void EMIT_PRIM( GLcontext *ctx, 
--                     GLenum prim, 
--                     GLuint hwprim, 
--                     GLuint start, 
--                     GLuint count)    
-+static void r200EmitPrim( GLcontext *ctx, 
-+                        GLenum prim, 
-+                        GLuint hwprim, 
-+                        GLuint start, 
-+                        GLuint count) 
- {
-    r200ContextPtr rmesa = R200_CONTEXT( ctx );
-    r200TclPrimitive( ctx, prim, hwprim );
-@@ -185,7 +201,9 @@
-                    count - start );
- }
--
-+#define EMIT_PRIM(ctx, prim, hwprim, start, count) do {         \
-+   r200EmitPrim( ctx, prim, hwprim, start, count );             \
-+   (void) rmesa; } while (0)
- /* Try & join small primitives
-  */
-@@ -205,9 +223,12 @@
- #define EMIT_ELT(dest, offset, x) do {                                \
-         int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 );     \
-         GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 );    \
--        (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0)
-+        (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x);   \
-+      (void)rmesa; } while (0)
- #else
--#define EMIT_ELT(dest, offset, x) (dest)[offset] = (GLushort) (x)
-+#define EMIT_ELT(dest, offset, x) do {                                \
-+      (dest)[offset] = (GLushort) (x);                        \
-+      (void)rmesa; } while (0)
- #endif
- #define EMIT_TWO_ELTS(dest, offset, x, y)  *(GLuint *)((dest)+offset) = ((y)<<16)|(x);
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.h   16 Jun 2004 09:18:18 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_tcl.h   15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -60,6 +60,7 @@
- #define R200_TCL_FALLBACK_TEXGEN_5          0x200 /* texgen, unit 5 */
- #define R200_TCL_FALLBACK_TCL_DISABLE       0x400 /* user disable */
- #define R200_TCL_FALLBACK_BITMAP            0x800 /* draw bitmap with points */
-+#define R200_TCL_FALLBACK_VERTEX_PROGRAM    0x1000/* vertex program active */
- #define TCL_FALLBACK( ctx, bit, mode )        r200TclFallback( ctx, bit, mode )
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_tex.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_tex.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_tex.c   22 Jul 2004 06:51:49 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_tex.c   15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -421,7 +421,9 @@
-          return &_mesa_texformat_ycbcr_rev;
-    default:
--      _mesa_problem(ctx, "unexpected texture format in %s", __FUNCTION__);
-+      _mesa_problem(ctx,
-+         "unexpected internalFormat 0x%x in r200ChooseTextureFormat",
-+         (int) internalFormat);
-       return NULL;
-    }
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_texmem.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_texmem.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_texmem.c        16 Jun 2004 09:18:19 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_texmem.c        15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -43,7 +43,6 @@
- #include "context.h"
- #include "colormac.h"
- #include "macros.h"
--#include "simple_list.h"
- #include "radeon_reg.h" /* gets definition for usleep */
- #include "r200_context.h"
- #include "r200_state.h"
-@@ -73,10 +72,8 @@
-       for ( i = 0 ; i < rmesa->glCtx->Const.MaxTextureUnits ; i++ ) {
-        if ( t == rmesa->state.texture.unit[i].texobj ) {
-           rmesa->state.texture.unit[i].texobj = NULL;
--          remove_from_list( &rmesa->hw.tex[i] );
--          make_empty_list( &rmesa->hw.tex[i] );
--          remove_from_list( &rmesa->hw.cube[i] );
--          make_empty_list( &rmesa->hw.cube[i] );
-+          rmesa->hw.tex[i].dirty = GL_FALSE;
-+          rmesa->hw.cube[i].dirty = GL_FALSE;
-        }
-       }
-    }
-@@ -385,6 +382,14 @@
-    /* copy (x,y,width,height,data) */
-    memcpy( &tmp, &t->image[face][hwlevel], sizeof(tmp) );
-+   /* Adjust the base offset to account for the Y-offset.  This is done,
-+    * instead of just letting the Y-offset automatically take care of it,
-+    * because it is possible, for very large textures, for the Y-offset
-+    * to exceede the [-8192,+8191] range.
-+    */
-+   tex.offset += tmp.y * 1024;
-+   tmp.y = 0;
-+    
-    LOCK_HARDWARE( rmesa );
-    do {
-       ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_TEXTURE,
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_texstate.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_texstate.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_texstate.c      22 Jul 2004 06:51:49 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_texstate.c      15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -999,7 +999,7 @@
-                                          R200_TEX_BLEND_0_ENABLE) << unit);
-       rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_BLEND_0_ENABLE; 
-        
--      R200_STATECHANGE( rmesa, tcl );
-+      R200_STATECHANGE( rmesa, vtx );
-       rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] &= ~(7 << (unit * 3));
-        
-       if (rmesa->TclFallback & (R200_TCL_FALLBACK_TEXGEN_0<<unit)) {
-@@ -1272,7 +1272,6 @@
-    r200ContextPtr rmesa = R200_CONTEXT(ctx);
-    GLboolean ok;
-    GLuint dbg;
--   int i;
-    ok = (r200UpdateTextureUnit( ctx, 0 ) &&
-        r200UpdateTextureUnit( ctx, 1 ) &&
-@@ -1336,8 +1335,14 @@
-        * Texture cache LRU hang workaround -------------
-        * not needed for r200 derivatives?
-        */
--      dbg = 0x0;
-+      /* While the cases below attempt to only enable the workaround in the
-+       * specific cases necessary, they were insufficient.  See bugzilla #1519,
-+       * #729, #814.  Tests with quake3 showed no impact on performance.
-+       */
-+      dbg = 0x6;
-+
-+      /*
-       if (((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & (R200_TEX_0_ENABLE )) &&
-          ((((rmesa->hw.tex[0].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) &
-          0x04) == 0)) ||
-@@ -1362,7 +1367,7 @@
-          0x04) == 0)))
-       {
-          dbg |= 0x04;
--      }
-+      }*/
-       if (dbg != rmesa->hw.tam.cmd[TAM_DEBUG3]) {
-          R200_STATECHANGE( rmesa, tam );
-Index: extras/Mesa/src/mesa/drivers/dri/r200/r200_vtxfmt_c.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/r200/r200_vtxfmt_c.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/r200/r200_vtxfmt_c.c      16 Jun 2004 09:18:19 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/r200/r200_vtxfmt_c.c      15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -122,6 +122,7 @@
- /* Color for ubyte (packed) color formats:
-  */
-+#if 0
- static void r200_Color3ub_ub( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -161,7 +162,7 @@
-    r200ContextPtr rmesa = R200_CONTEXT(ctx);
-    *(GLuint *)rmesa->vb.colorptr = LE32_TO_CPU(*(GLuint *)v);
- }
--
-+#endif /* 0 */
- static void r200_Color3f_ub( GLfloat r, GLfloat g, GLfloat b )
- {
-@@ -210,6 +211,7 @@
- /* Color for float color+alpha formats:
-  */
-+#if 0
- static void r200_Color3ub_4f( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -253,6 +255,7 @@
-    dest[2] = UBYTE_TO_FLOAT(v[2]);
-    dest[3] = UBYTE_TO_FLOAT(v[3]);
- }
-+#endif /* 0 */
- static void r200_Color3f_4f( GLfloat r, GLfloat g, GLfloat b )
-@@ -302,6 +305,7 @@
- /* Color for float color formats:
-  */
-+#if 0
- static void r200_Color3ub_3f( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -343,6 +347,7 @@
-    dest[2] = UBYTE_TO_FLOAT(v[2]);
-    ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3] = UBYTE_TO_FLOAT(v[3]);
- }
-+#endif /* 0 */
- static void r200_Color3f_3f( GLfloat r, GLfloat g, GLfloat b )
-@@ -390,6 +395,7 @@
- /* Secondary Color:
-  */
-+#if 0
- static void r200_SecondaryColor3ubEXT_ub( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -411,6 +417,7 @@
-    dest->blue = v[2];
-    dest->alpha        = 0xff;
- }
-+#endif /* 0 */
- static void r200_SecondaryColor3fEXT_ub( GLfloat r, GLfloat g, GLfloat b )
- {
-@@ -434,6 +441,7 @@
-    dest->alpha = 255;
- }
-+#if 0
- static void r200_SecondaryColor3ubEXT_3f( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -455,6 +463,7 @@
-    dest[2] = UBYTE_TO_FLOAT(v[2]);
-    dest[3] = 1.0;
- }
-+#endif /* 0 */
- static void r200_SecondaryColor3fEXT_3f( GLfloat r, GLfloat g, GLfloat b )
- {
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_compat.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_compat.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_compat.c    16 Jun 2004 09:18:19 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_compat.c    15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -202,30 +202,28 @@
- static void radeonCompatEmitStateLocked( radeonContextPtr rmesa )
- {
--   struct radeon_state_atom *state, *tmp;
-+   struct radeon_state_atom *atom;
-    if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS))
-       fprintf(stderr, "%s\n", __FUNCTION__);
--   if (rmesa->lost_context) {
--      if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS|DEBUG_IOCTL))
--       fprintf(stderr, "%s - lost context\n", __FUNCTION__); 
-+   if (!rmesa->hw.is_dirty && !rmesa->hw.all_dirty)
-+      return;
--      foreach_s( state, tmp, &(rmesa->hw.clean) ) 
--       move_to_tail(&(rmesa->hw.dirty), state );
--
--      rmesa->lost_context = 0;
--   }
--
--   foreach_s( state, tmp, &(rmesa->hw.dirty) ) {
--      if (!state->is_tcl)
--       radeonCompatEmitPacket( rmesa, state );
--      move_to_head( &(rmesa->hw.clean), state );
-+   foreach(atom, &rmesa->hw.atomlist) {
-+      if (rmesa->hw.all_dirty)
-+       atom->dirty = GL_TRUE;
-+      if (atom->is_tcl)
-+       atom->dirty = GL_FALSE;
-+      if (atom->dirty)
-+       radeonCompatEmitPacket(rmesa, atom);
-    }
-+ 
-+   rmesa->hw.is_dirty = GL_FALSE;
-+   rmesa->hw.all_dirty = GL_FALSE;
- }
--
- static void radeonCompatEmitPrimitiveLocked( radeonContextPtr rmesa,
-                                            GLuint hw_primitive,
-                                            GLuint nverts,
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.c   22 Jul 2004 06:51:51 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.c   15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -62,7 +62,7 @@
- #include "radeon_vtxfmt.h"
- #include "radeon_maos.h"
--#define DRIVER_DATE   "20030328"
-+#define DRIVER_DATE   "20040929"
- #include "vblank.h"
- #include "utils.h"
-@@ -306,7 +306,7 @@
-        DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
-    rmesa->swtcl.RenderIndex = ~0;
--   rmesa->lost_context = 1;
-+   rmesa->hw.all_dirty = GL_TRUE;
-    /* Set the maximum texture size small enough that we can guarentee that
-     * all texture units can bind a maximal texture and have them both in
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.h   17 Aug 2004 20:17:59 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_context.h   15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -398,14 +398,11 @@
- struct radeon_hw_state {
--   /* All state should be on one of these lists:
--    */
--   struct radeon_state_atom dirty; /* dirty list head placeholder */
--   struct radeon_state_atom clean; /* clean list head placeholder */
-+   /* Head of the linked list of state atoms. */
-+   struct radeon_state_atom atomlist;
-    /* Hardware state, stored as cmdbuf commands:  
-     *   -- Need to doublebuffer for
--    *           - reviving state after loss of context
-     *           - eliding noop statechange loops? (except line stipple count)
-     */
-    struct radeon_state_atom ctx;
-@@ -428,6 +425,7 @@
-    struct radeon_state_atom txr[2]; /* for NPOT */
-    int max_state_size;        /* Number of bytes necessary for a full state emit. */
-+   GLboolean is_dirty, all_dirty;
- };
- struct radeon_state {
-@@ -715,6 +713,10 @@
-    struct radeon_ioctl ioctl;
-    struct radeon_dma dma;
-    struct radeon_store store;
-+   /* A full state emit as of the first state emit in the main store, in case
-+    * the context is lost.
-+    */
-+   struct radeon_store backup_store;
-    /* Page flipping
-     */
-@@ -733,6 +735,7 @@
-    drm_clip_rect_t *pClipRects;
-    unsigned int lastStamp;
-    GLboolean lost_context;
-+   GLboolean save_on_next_emit;
-    radeonScreenPtr radeonScreen;      /* Screen private DRI data */
-    drm_radeon_sarea_t *sarea;         /* Private SAREA data */
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.c     17 Aug 2004 20:17:59 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.c     15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -59,10 +59,8 @@
- static void radeonWaitForIdle( radeonContextPtr rmesa );
--
--/* =============================================================
-- * Kernel command buffer handling
-- */
-+static int radeonFlushCmdBufLocked( radeonContextPtr rmesa, 
-+                                  const char * caller );
- static void print_state_atom( struct radeon_state_atom *state )
- {
-@@ -76,115 +74,155 @@
- }
--static void radeon_emit_state_list( radeonContextPtr rmesa, 
--                                  struct radeon_state_atom *list )
-+static void radeonSaveHwState( radeonContextPtr rmesa )
- {
--   struct radeon_state_atom *state, *tmp;
--   char *dest;
--   int i, size, texunits;
-+   struct radeon_state_atom *atom;
-+   char * dest = rmesa->backup_store.cmd_buf;
--   /* It appears that some permutations of state atoms lock up the
--    * chip.  Therefore we make sure that state atoms are emitted in a
--    * fixed order. First mark all dirty state atoms and then go
--    * through all state atoms in a well defined order and emit only
--    * the marked ones.
--    * FIXME: This requires knowledge of which state atoms exist.
--    * FIXME: Is the zbs hack below still needed?
--    */
--   size = 0;
--   foreach_s( state, tmp, list ) {
--      if (state->check( rmesa->glCtx )) {
--       size += state->cmd_size;
--       state->dirty = GL_TRUE;
--       move_to_head( &(rmesa->hw.clean), state );
--       if (RADEON_DEBUG & DEBUG_STATE) 
--          print_state_atom( state );
--      }
--      else if (RADEON_DEBUG & DEBUG_STATE)
--       fprintf(stderr, "skip state %s\n", state->name);
--   }
--   /* short cut */
--   if (!size)
--       return;
--
--   dest = radeonAllocCmdBuf( rmesa, size * 4, __FUNCTION__);
--   texunits = rmesa->glCtx->Const.MaxTextureUnits;
--
--#define EMIT_ATOM(ATOM) \
--do { \
--   if (rmesa->hw.ATOM.dirty) { \
--      rmesa->hw.ATOM.dirty = GL_FALSE; \
--      memcpy( dest, rmesa->hw.ATOM.cmd, rmesa->hw.ATOM.cmd_size * 4); \
--      dest += rmesa->hw.ATOM.cmd_size * 4; \
--   } \
--} while (0)
--
--   EMIT_ATOM (ctx);
--   EMIT_ATOM (set);
--   EMIT_ATOM (lin);
--   EMIT_ATOM (msk);
--   EMIT_ATOM (vpt);
--   EMIT_ATOM (tcl);
--   EMIT_ATOM (msc);
--   for (i = 0; i < texunits; ++i) {
--       EMIT_ATOM (tex[i]);
--       EMIT_ATOM (txr[i]);
--   }
--   EMIT_ATOM (zbs);
--   EMIT_ATOM (mtl);
--   for (i = 0; i < 3 + texunits; ++i)
--       EMIT_ATOM (mat[i]);
--   for (i = 0; i < 8; ++i)
--       EMIT_ATOM (lit[i]);
--   for (i = 0; i < 6; ++i)
--       EMIT_ATOM (ucp[i]);
--   EMIT_ATOM (eye);
--   EMIT_ATOM (grd);
--   EMIT_ATOM (fog);
--   EMIT_ATOM (glt);
-+   if (RADEON_DEBUG & DEBUG_STATE)
-+      fprintf(stderr, "%s\n", __FUNCTION__);
-+   
-+   rmesa->backup_store.cmd_used = 0;
-+
-+   foreach( atom, &rmesa->hw.atomlist ) {
-+      if ( atom->check( rmesa->glCtx ) ) {
-+       int size = atom->cmd_size * 4;
-+       memcpy( dest, atom->cmd, size);
-+       dest += size;
-+       rmesa->backup_store.cmd_used += size;
-+       if (RADEON_DEBUG & DEBUG_STATE)
-+          print_state_atom( atom );
-+      }
-+   }
-+
-+   assert( rmesa->backup_store.cmd_used <= RADEON_CMD_BUF_SZ );
-+   if (RADEON_DEBUG & DEBUG_STATE)
-+      fprintf(stderr, "Returning to radeonEmitState\n");
-+}
-+
-+/* At this point we were in FlushCmdBufLocked but we had lost our context, so
-+ * we need to unwire our current cmdbuf, hook the one with the saved state in
-+ * it, flush it, and then put the current one back.  This is so commands at the
-+ * start of a cmdbuf can rely on the state being kept from the previous one.
-+ */
-+static void radeonBackUpAndEmitLostStateLocked( radeonContextPtr rmesa )
-+{
-+   GLuint nr_released_bufs;
-+   struct radeon_store saved_store;
-+
-+   if (rmesa->backup_store.cmd_used == 0)
-+      return;
-+
-+   if (RADEON_DEBUG & DEBUG_STATE)
-+      fprintf(stderr, "Emitting backup state on lost context\n");
-+
-+   rmesa->lost_context = GL_FALSE;
--#undef EMIT_ATOM
-+   nr_released_bufs = rmesa->dma.nr_released_bufs;
-+   saved_store = rmesa->store;
-+   rmesa->dma.nr_released_bufs = 0;
-+   rmesa->store = rmesa->backup_store;
-+   radeonFlushCmdBufLocked( rmesa, __FUNCTION__ );
-+   rmesa->dma.nr_released_bufs = nr_released_bufs;
-+   rmesa->store = saved_store;
- }
-+/* =============================================================
-+ * Kernel command buffer handling
-+ */
-+
-+/* The state atoms will be emitted in the order they appear in the atom list,
-+ * so this step is important.
-+ */
-+void radeonSetUpAtomList( radeonContextPtr rmesa )
-+{
-+   int i, mtu = rmesa->glCtx->Const.MaxTextureUnits;
-+
-+   make_empty_list(&rmesa->hw.atomlist);
-+   rmesa->hw.atomlist.name = "atom-list";
-+
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.ctx);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.set);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.lin);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.msk);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.vpt);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.tcl);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.msc);
-+   for (i = 0; i < mtu; ++i) {
-+       insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.tex[i]);
-+       insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.txr[i]);
-+   }
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.zbs);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.mtl);
-+   for (i = 0; i < 3 + mtu; ++i)
-+      insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.mat[i]);
-+   for (i = 0; i < 8; ++i)
-+      insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.lit[i]);
-+   for (i = 0; i < 6; ++i)
-+      insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.ucp[i]);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.eye);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.grd);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.fog);
-+   insert_at_tail(&rmesa->hw.atomlist, &rmesa->hw.glt);
-+}
- void radeonEmitState( radeonContextPtr rmesa )
- {
--   struct radeon_state_atom *state, *tmp;
-+   struct radeon_state_atom *atom;
-+   char *dest;
-    if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS))
-       fprintf(stderr, "%s\n", __FUNCTION__);
--   /* Somewhat overkill:
-+   if (rmesa->save_on_next_emit) {
-+      radeonSaveHwState(rmesa);
-+      rmesa->save_on_next_emit = GL_FALSE;
-+   }
-+
-+   if (!rmesa->hw.is_dirty && !rmesa->hw.all_dirty)
-+      return;
-+
-+   /* To avoid going across the entire set of states multiple times, just check
-+    * for enough space for the case of emitting all state, and inline the
-+    * radeonAllocCmdBuf code here without all the checks.
-     */
--   if (rmesa->lost_context) {
--      if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS|DEBUG_IOCTL))
--       fprintf(stderr, "%s - lost context\n", __FUNCTION__); 
--
--      foreach_s( state, tmp, &(rmesa->hw.clean) ) 
--       move_to_tail(&(rmesa->hw.dirty), state );
--
--      rmesa->lost_context = 0;
--   }
--   else if (1) {
--      /* This is a darstardly kludge to work around a lockup that I
--       * haven't otherwise figured out.
--       */
--      move_to_tail(&(rmesa->hw.dirty), &(rmesa->hw.zbs) );
-+   radeonEnsureCmdBufSpace(rmesa, rmesa->hw.max_state_size);
-+   dest = rmesa->store.cmd_buf + rmesa->store.cmd_used;
-+
-+   if (RADEON_DEBUG & DEBUG_STATE) {
-+      foreach(atom, &rmesa->hw.atomlist) {
-+       if (atom->dirty || rmesa->hw.all_dirty) {
-+          if (atom->check(rmesa->glCtx))
-+             print_state_atom(atom);
-+          else
-+             fprintf(stderr, "skip state %s\n", atom->name);
-+       }
-+      }
-    }
--   if (!(rmesa->radeonScreen->chipset & RADEON_CHIPSET_TCL)) {
--     foreach_s( state, tmp, &(rmesa->hw.dirty) ) {
--       if (state->is_tcl) {
--       move_to_head( &(rmesa->hw.clean), state );
--       }
--     }
-+   foreach(atom, &rmesa->hw.atomlist) {
-+      if (rmesa->hw.all_dirty)
-+       atom->dirty = GL_TRUE;
-+      if (!(rmesa->radeonScreen->chipset & RADEON_CHIPSET_TCL) &&
-+         atom->is_tcl)
-+       atom->dirty = GL_FALSE;
-+      if (atom->dirty) {
-+       if (atom->check(rmesa->glCtx)) {
-+          int size = atom->cmd_size * 4;
-+          memcpy(dest, atom->cmd, size);
-+          dest += size;
-+          rmesa->store.cmd_used += size;
-+          atom->dirty = GL_FALSE;
-+       }
-+      }
-    }
--   radeon_emit_state_list( rmesa, &rmesa->hw.dirty );
-+   assert(rmesa->store.cmd_used <= RADEON_CMD_BUF_SZ);
-+ 
-+   rmesa->hw.is_dirty = GL_FALSE;
-+   rmesa->hw.all_dirty = GL_FALSE;
- }
--
--
- /* Fire a section of the retained (indexed_verts) buffer as a regular
-  * primtive.  
-  */
-@@ -376,7 +414,7 @@
-       (component[0]->aos_start + offset * component[0]->aos_stride * 4);
- #else
-    drm_radeon_cmd_header_t *cmd;
--   int sz = AOS_BUFSZ;
-+   int sz = AOS_BUFSZ(nr);
-    int i;
-    int *tmp;
-@@ -491,6 +529,9 @@
-    int ret, i;
-    drm_radeon_cmd_buffer_t cmd;
-+   if (rmesa->lost_context)
-+      radeonBackUpAndEmitLostStateLocked(rmesa);
-+
-    if (RADEON_DEBUG & DEBUG_IOCTL) {
-       fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); 
-@@ -544,18 +585,7 @@
-    rmesa->store.statenr = 0;
-    rmesa->store.cmd_used = 0;
-    rmesa->dma.nr_released_bufs = 0;
--   /* Set lost_context so that the first state emit on the new buffer is a full
--    * one.  This is because the context might get lost while preparing the next
--    * buffer, and when we lock and find out, we don't have the information to
--    * recreate the state.  This function should always be called before the new
--    * buffer is begun, so it's sufficient to just set lost_context here.
--    *
--    * The alternative to this would be to copy out the state on unlock
--    * (approximately) and if we did lose the context, dispatch a cmdbuf to reset
--    * the state to that old copy before continuing with the accumulated command
--    * buffer.
--    */
--   rmesa->lost_context = 1;
-+   rmesa->save_on_next_emit = 1;
-    return ret;
- }
-@@ -897,6 +927,7 @@
-    }
-    rmesa->swap_ust = ust;
-+   rmesa->hw.all_dirty = GL_TRUE;
- }
- void radeonPageFlip( const __DRIdrawablePrivate *dPriv )
-@@ -990,7 +1021,14 @@
-              __FUNCTION__, all, cx, cy, cw, ch );
-    }
--   RADEON_FIREVERTICES( rmesa ); 
-+   {
-+      LOCK_HARDWARE( rmesa );
-+      UNLOCK_HARDWARE( rmesa );
-+      if ( dPriv->numClipRects == 0 ) 
-+       return;
-+   }
-+   
-+   radeonFlush( ctx ); 
-    if ( mask & DD_FRONT_LEFT_BIT ) {
-       flags |= RADEON_FRONT;
-@@ -1028,13 +1066,6 @@
-    cx += dPriv->x;
-    cy  = dPriv->y + dPriv->h - cy - ch;
--   /* We have to emit state along with the clear, since the kernel relies on
--    * some of it.  The EmitState that was above RADEON_FIREVERTICES was an
--    * attempt to do that, except that another context may come in and cause us
--    * to lose our context while we're unlocked.
--    */
--   radeonEmitState( rmesa );
--
-    LOCK_HARDWARE( rmesa );
-    /* Throttle the number of clear ioctls we do.
-@@ -1146,6 +1177,7 @@
-    }
-    UNLOCK_HARDWARE( rmesa );
-+   rmesa->hw.all_dirty = GL_TRUE;
- }
-@@ -1189,8 +1221,7 @@
-    if (rmesa->dma.flush)
-       rmesa->dma.flush( rmesa );
--   if (!is_empty_list(&rmesa->hw.dirty)) 
--      radeonEmitState( rmesa );
-+   radeonEmitState( rmesa );
-    
-    if (rmesa->store.cmd_used)
-       radeonFlushCmdBuf( rmesa, __FUNCTION__ );
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.h     17 Aug 2004 20:17:59 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_ioctl.h     15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -103,6 +103,7 @@
- extern void radeonWaitForVBlank( radeonContextPtr rmesa );
- extern void radeonInitIoctlFuncs( GLcontext *ctx );
- extern void radeonGetAllParams( radeonContextPtr rmesa );
-+extern void radeonSetUpAtomList( radeonContextPtr rmesa );
- /* radeon_compat.c:
-  */
-@@ -111,7 +112,6 @@
-                                      GLuint hw_primitive,
-                                      GLuint nrverts );
--
- /* ================================================================
-  * Helper macros:
-  */
-@@ -130,7 +130,8 @@
- #define RADEON_STATECHANGE( rmesa, ATOM )                     \
- do {                                                          \
-    RADEON_NEWPRIM( rmesa );                                   \
--   move_to_head( &(rmesa->hw.dirty), &(rmesa->hw.ATOM));      \
-+   rmesa->hw.ATOM.dirty = GL_TRUE;                            \
-+   rmesa->hw.is_dirty = GL_TRUE;                              \
- } while (0)
- #define RADEON_DB_STATE( ATOM )                               \
-@@ -144,7 +145,8 @@
-    if (memcmp(atom->cmd, atom->lastcmd, atom->cmd_size*4)) {
-       int *tmp;
-       RADEON_NEWPRIM( rmesa );
--      move_to_head( &(rmesa->hw.dirty), atom );
-+      atom->dirty = GL_TRUE;
-+      rmesa->hw.is_dirty = GL_TRUE;
-       tmp = atom->cmd; 
-       atom->cmd = atom->lastcmd;
-       atom->lastcmd = tmp;
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_lock.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_lock.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_lock.c      16 Jun 2004 09:18:20 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_lock.c      15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -124,4 +124,6 @@
-        DRI_AGE_TEXTURES( rmesa->texture_heaps[ i ] );
-       }
-    }
-+
-+   rmesa->lost_context = GL_TRUE;
- }
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c    22 Jul 2004 06:51:52 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c    15 Dec 2004 01:50:58 -0000      1.1.1.2.4.1
-@@ -87,11 +87,14 @@
- #define PCI_CHIP_RADEON_QZ    0x515A
- #define PCI_CHIP_RADEON_LW    0x4C57 /* mobility 7 - has tcl */
-+#define PCI_CHIP_RADEON_LX    0x4C58 /* mobility FireGL 7800 m7 */
- #define PCI_CHIP_RADEON_LY    0x4C59
- #define PCI_CHIP_RADEON_LZ    0x4C5A
- #define PCI_CHIP_RV200_QW     0x5157 /* Radeon 7500 - not an R200 at all */
-+#define PCI_CHIP_RV200_QX     0x5158
-+
- /* IGP Chipsets */
- #define PCI_CHIP_RS100_4136     0x4136
- #define PCI_CHIP_RS200_4137     0x4137
-@@ -309,7 +312,9 @@
-    case PCI_CHIP_RADEON_QF:
-    case PCI_CHIP_RADEON_QG:
-    case PCI_CHIP_RV200_QW:
-+   case PCI_CHIP_RV200_QX:
-    case PCI_CHIP_RADEON_LW:
-+   case PCI_CHIP_RADEON_LX:
-       screen->chipset |= RADEON_CHIPSET_TCL;
-    case PCI_CHIP_RADEON_QY:
-    case PCI_CHIP_RADEON_QZ:
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_state_init.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_state_init.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_state_init.c        17 Aug 2004 20:17:59 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_state_init.c        15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -59,8 +59,9 @@
-    fprintf(stderr, msg);
-    fprintf(stderr, ": ");
--   foreach(l, &(rmesa->hw.dirty)) {
--      fprintf(stderr, "%s, ", l->name);
-+   foreach(l, &rmesa->hw.atomlist) {
-+      if (l->dirty || rmesa->hw.all_dirty)
-+       fprintf(stderr, "%s, ", l->name);
-    }
-    fprintf(stderr, "\n");
-@@ -197,11 +198,6 @@
-    rmesa->state.pixel.readOffset = rmesa->state.color.drawOffset;
-    rmesa->state.pixel.readPitch  = rmesa->state.color.drawPitch;
--   /* Initialize lists:
--    */
--   make_empty_list(&(rmesa->hw.dirty));
--   make_empty_list(&(rmesa->hw.clean));
--
-    rmesa->hw.max_state_size = 0;
- #define ALLOC_STATE( ATOM, CHK, SZ, NM, FLAG )                                \
-@@ -212,7 +208,7 @@
-       rmesa->hw.ATOM.name = NM;                                       \
-       rmesa->hw.ATOM.is_tcl = FLAG;                                   \
-       rmesa->hw.ATOM.check = check_##CHK;                             \
--      insert_at_head(&(rmesa->hw.dirty), &(rmesa->hw.ATOM));  \
-+      rmesa->hw.ATOM.dirty = GL_TRUE;                         \
-       rmesa->hw.max_state_size += SZ * sizeof(int);           \
-    } while (0)
-       
-@@ -256,6 +252,7 @@
-    ALLOC_STATE( txr[0], txr0, TXR_STATE_SIZE, "TXR/txr-0", 0 );
-    ALLOC_STATE( txr[1], txr1, TXR_STATE_SIZE, "TXR/txr-1", 0 );
-+   radeonSetUpAtomList( rmesa );
-    /* Fill in the packet headers:
-     */
-@@ -552,4 +549,6 @@
-    rmesa->hw.eye.cmd[EYE_Y] = 0;
-    rmesa->hw.eye.cmd[EYE_Z] = IEEE_ONE;
-    rmesa->hw.eye.cmd[EYE_RESCALE_FACTOR] = IEEE_ONE;
-+   
-+   rmesa->hw.all_dirty = GL_TRUE;
- }
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_subset_tex.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_subset_tex.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_subset_tex.c        16 Jun 2004 09:18:22 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_subset_tex.c        15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -75,8 +75,7 @@
-    if ( rmesa ) {
-       if ( t == rmesa->state.texture.unit[0].texobj ) {
-          rmesa->state.texture.unit[0].texobj = NULL;
--       remove_from_list( &rmesa->hw.tex[0] );
--       make_empty_list( &rmesa->hw.tex[0] );
-+       rmesa->hw.tex[0].dirty = GL_FALSE;
-       }
-    }
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_swtcl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_swtcl.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_swtcl.c     17 Aug 2004 20:17:59 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_swtcl.c     15 Dec 2004 01:50:58 -0000      1.1.1.3.2.1
-@@ -508,7 +508,7 @@
--#define LOCAL_VARS radeonContextPtr rmesa = RADEON_CONTEXT(ctx)
-+#define LOCAL_VARS radeonContextPtr rmesa = RADEON_CONTEXT(ctx); (void)rmesa
- #define ELTS_VARS( buf )  GLushort *dest = buf
- #define INIT( prim ) radeonDmaPrimitive( rmesa, prim )
- #define ELT_INIT(prim) radeonEltPrimitive( rmesa, prim )
-@@ -564,9 +564,12 @@
- #define EMIT_ELT(offset, x) do {                              \
-       int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 );     \
-       GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 );    \
--      (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0)
-+      (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x);     \
-+      (void)rmesa; } while (0)
- #else
--#define EMIT_ELT(offset, x) (dest)[offset] = (GLushort) (x)
-+#define EMIT_ELT(offset, x) do {                              \
-+      (dest)[offset] = (GLushort) (x);                        \
-+      (void)rmesa; } while (0)
- #endif
- #define EMIT_TWO_ELTS(offset, x, y)  *(GLuint *)(dest+offset) = ((y)<<16)|(x);
- #define INCR_ELTS( nr ) dest += nr
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_tcl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_tcl.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_tcl.c       17 Aug 2004 20:17:59 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_tcl.c       15 Dec 2004 01:50:58 -0000      1.1.1.2.2.1
-@@ -105,7 +105,7 @@
- };
-    
--#define LOCAL_VARS radeonContextPtr rmesa = RADEON_CONTEXT(ctx)
-+#define LOCAL_VARS radeonContextPtr rmesa = RADEON_CONTEXT(ctx); (void)rmesa
- #define ELT_TYPE  GLushort
- #define ELT_INIT(prim, hw_prim) \
-@@ -169,7 +169,7 @@
-  * discrete and there are no intervening state changes.  (Somewhat
-  * duplicates changes to DrawArrays code)
-  */
--static void EMIT_PRIM( GLcontext *ctx, 
-+static void radeonEmitPrim( GLcontext *ctx, 
-                      GLenum prim, 
-                      GLuint hwprim, 
-                      GLuint start, 
-@@ -194,7 +194,9 @@
-                      count - start );
- }
--
-+#define EMIT_PRIM( ctx, prim, hwprim, start, count ) do {       \
-+   radeonEmitPrim( ctx, prim, hwprim, start, count );           \
-+   (void) rmesa; } while (0)
- /* Try & join small primitives
-  */
-@@ -214,9 +216,12 @@
- #define EMIT_ELT(dest, offset, x) do {                                \
-       int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 );     \
-       GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 );    \
--      (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0)
-+      (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x);     \
-+      (void)rmesa; } while (0)
- #else
--#define EMIT_ELT(dest, offset, x) (dest)[offset] = (GLushort) (x)
-+#define EMIT_ELT(dest, offset, x) do {                                \
-+      (dest)[offset] = (GLushort) (x);                        \
-+      (void)rmesa; } while (0)
- #endif
- #define EMIT_TWO_ELTS(dest, offset, x, y)  *(GLuint *)(dest+offset) = ((y)<<16)|(x);
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_texmem.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_texmem.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_texmem.c    16 Jun 2004 09:18:23 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_texmem.c    15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -41,7 +41,6 @@
- #include "imports.h"
- #include "context.h"
- #include "macros.h"
--#include "simple_list.h"
- #include "radeon_context.h"
- #include "radeon_ioctl.h"
-@@ -66,8 +65,7 @@
-       for ( i = 0 ; i < rmesa->glCtx->Const.MaxTextureUnits ; i++ ) {
-        if ( t == rmesa->state.texture.unit[i].texobj ) {
-           rmesa->state.texture.unit[i].texobj = NULL;
--          remove_from_list( &rmesa->hw.tex[i] );
--          make_empty_list( &rmesa->hw.tex[i] );
-+          rmesa->hw.tex[i].dirty = GL_FALSE;
-        }
-       }
-    }
-Index: extras/Mesa/src/mesa/drivers/dri/radeon/radeon_vtxfmt_c.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/radeon/radeon_vtxfmt_c.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/radeon/radeon_vtxfmt_c.c  16 Jun 2004 09:18:24 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/radeon/radeon_vtxfmt_c.c  15 Dec 2004 01:50:58 -0000      1.1.1.1.4.1
-@@ -117,7 +117,7 @@
- }
--
-+#if 0
- /* Color for ubyte (packed) color formats:
-  */
- static void radeon_Color3ub_ub( GLubyte r, GLubyte g, GLubyte b )
-@@ -159,7 +159,7 @@
-    radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-    *(GLuint *)rmesa->vb.colorptr = LE32_TO_CPU(*(GLuint *)v);
- }
--
-+#endif /* 0 */
- static void radeon_Color3f_ub( GLfloat r, GLfloat g, GLfloat b )
- {
-@@ -208,6 +208,7 @@
- /* Color for float color+alpha formats:
-  */
-+#if 0
- static void radeon_Color3ub_4f( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -251,6 +252,7 @@
-    dest[2] = UBYTE_TO_FLOAT(v[2]);
-    dest[3] = UBYTE_TO_FLOAT(v[3]);
- }
-+#endif /* 0 */
- static void radeon_Color3f_4f( GLfloat r, GLfloat g, GLfloat b )
-@@ -300,6 +302,7 @@
- /* Color for float color formats:
-  */
-+#if 0
- static void radeon_Color3ub_3f( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -341,6 +344,7 @@
-    dest[2] = UBYTE_TO_FLOAT(v[2]);
-    ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3] = UBYTE_TO_FLOAT(v[3]);
- }
-+#endif /* 0 */
- static void radeon_Color3f_3f( GLfloat r, GLfloat g, GLfloat b )
-@@ -388,6 +392,7 @@
- /* Secondary Color:
-  */
-+#if 0
- static void radeon_SecondaryColor3ubEXT_ub( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -409,6 +414,7 @@
-    dest->blue = v[2];
-    dest->alpha        = 0xff;
- }
-+#endif /* 0 */
- static void radeon_SecondaryColor3fEXT_ub( GLfloat r, GLfloat g, GLfloat b )
- {
-@@ -432,6 +438,7 @@
-    dest->alpha = 255;
- }
-+#if 0
- static void radeon_SecondaryColor3ubEXT_3f( GLubyte r, GLubyte g, GLubyte b )
- {
-    GET_CURRENT_CONTEXT(ctx);
-@@ -453,6 +460,7 @@
-    dest[2] = UBYTE_TO_FLOAT(v[2]);
-    dest[3] = 1.0;
- }
-+#endif /* 0 */
- static void radeon_SecondaryColor3fEXT_3f( GLfloat r, GLfloat g, GLfloat b )
- {
-@@ -768,6 +776,7 @@
- CHOOSE(Normal3fv, pfv, MASK_NORM, ACTIVE_NORM, 
-        (const GLfloat *v), (v))
-+#if 0
- CHOOSE_COLOR(Color4ub, p4ub, 4, MASK_COLOR, ACTIVE_COLOR,
-       (GLubyte a,GLubyte b, GLubyte c, GLubyte d), (a,b,c,d))
- CHOOSE_COLOR(Color4ubv, pubv, 4, MASK_COLOR, ACTIVE_COLOR, 
-@@ -776,6 +785,7 @@
-       (GLubyte a,GLubyte b, GLubyte c), (a,b,c))
- CHOOSE_COLOR(Color3ubv, pubv, 3, MASK_COLOR, ACTIVE_COLOR, 
-       (const GLubyte *v), (v))
-+#endif
- CHOOSE_COLOR(Color4f, p4f, 4, MASK_COLOR, ACTIVE_COLOR, 
-       (GLfloat a,GLfloat b, GLfloat c, GLfloat d), (a,b,c,d))
-@@ -787,10 +797,12 @@
-       (const GLfloat *v), (v))
-+#if 0
- CHOOSE_SECONDARY_COLOR(SecondaryColor3ubEXT, p3ub, MASK_SPEC, ACTIVE_SPEC,
-       (GLubyte a,GLubyte b, GLubyte c), (a,b,c))
- CHOOSE_SECONDARY_COLOR(SecondaryColor3ubvEXT, pubv, MASK_SPEC, ACTIVE_SPEC,
-       (const GLubyte *v), (v))
-+#endif
- CHOOSE_SECONDARY_COLOR(SecondaryColor3fEXT, p3f, MASK_SPEC, ACTIVE_SPEC,
-       (GLfloat a,GLfloat b, GLfloat c), (a,b,c))
- CHOOSE_SECONDARY_COLOR(SecondaryColor3fvEXT, pfv, MASK_SPEC, ACTIVE_SPEC,
-Index: extras/Mesa/src/mesa/drivers/dri/savage/Makefile
-===================================================================
-RCS file: extras/Mesa/src/mesa/drivers/dri/savage/Makefile
-diff -N extras/Mesa/src/mesa/drivers/dri/savage/Makefile
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/drivers/dri/savage/Makefile   15 Dec 2004 01:50:59 -0000      1.1.1.1.2.1
-@@ -0,0 +1,40 @@
-+# src/mesa/drivers/dri/r128/Makefile
-+
-+TOP = ../../../../..
-+include $(TOP)/configs/current
-+
-+LIBNAME = savage_dri.so
-+
-+# Doesn't exist yet.
-+#MINIGLX_SOURCES = server/savage_dri.c 
-+
-+COMMON_SOURCES = \
-+      ../../common/driverfuncs.c \
-+      ../common/mm.c \
-+      ../common/utils.c \
-+      ../common/texmem.c \
-+      ../common/vblank.c \
-+      ../common/xmlconfig.c \
-+      ../common/dri_util.c \
-+      ../common/glcontextmodes.c
-+
-+DRIVER_SOURCES = \
-+      savage_xmesa.c \
-+      savagedd.c \
-+      savagestate.c \
-+      savagetex.c \
-+      savagetris.c \
-+      savageioctl.c \
-+      savagespan.c \
-+      savagedma.c
-+
-+C_SOURCES = \
-+      $(COMMON_SOURCES) \
-+      $(DRIVER_SOURCES) 
-+
-+ASM_SOURCES = 
-+
-+
-+include ../Makefile.template
-+
-+symlinks:
-Index: extras/Mesa/src/mesa/drivers/dri/savage/savage_xmesa.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/savage/savage_xmesa.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/savage/savage_xmesa.c     16 Jun 2004 09:18:35 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/savage/savage_xmesa.c     15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -34,6 +34,8 @@
- #include "simple_list.h"
-+#include "utils.h"
-+
- #include "swrast/swrast.h"
- #include "swrast_setup/swrast_setup.h"
- #include "tnl/tnl.h"
-@@ -55,6 +57,10 @@
- #include "savagedma.h"
-+#ifdef USE_NEW_INTERFACE
-+static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
-+#endif /* USE_NEW_INTERFACE */
-+
- #ifndef SAVAGE_DEBUG
- int SAVAGE_DEBUG = (0
- /*                      | DEBUG_ALWAYS_SYNC  */
-@@ -88,31 +94,6 @@
-   SAVAGEDRIPtr         gDRIPriv = (SAVAGEDRIPtr)sPriv->pDevPriv;
--  /* Check the DRI version */
--   {
--      int major, minor, patch;
--      if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
--         if (major != 4 || minor < 0) {
--          __driUtilMessage("savage DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch);
--            return GL_FALSE;
--         }
--      }
--   }
--
--   /* Check that the DDX driver version is compatible */
--   if (sPriv->ddxMajor != 1 ||
--       sPriv->ddxMinor < 0) {
--      __driUtilMessage("savage DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
--      return GL_FALSE;
--   }
--
--   /* Check that the DRM driver version is compatible */
--   if (sPriv->drmMajor != 1 ||
--       sPriv->drmMinor < 0) {
--      __driUtilMessage("savage DRI driver expected DRM driver version 1.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
--      return GL_FALSE;
--   }
--      
-    /* Allocate the private area */
-    savageScreen = (savageScreenPrivate *)Xmalloc(sizeof(savageScreenPrivate));
-    if (!savageScreen)
-@@ -813,8 +794,9 @@
-+#ifndef DRI_NEW_INTERFACE_ONLY
- /*
-- * This is the bootstrap function for the driver.
-+ * This is the (old) bootstrap function for the driver.
-  * The __driCreateScreen name is the symbol that libGL.so fetches.
-  * Return:  pointer to a __DRIscreenPrivate.
-  */
-@@ -825,6 +807,147 @@
-    psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &savageAPI);
-    return (void *) psp;
- }
-+#endif /* DRI_NEW_INTERFACE_ONLY */
-+
-+
-+
-+#ifdef USE_NEW_INTERFACE
-+static __GLcontextModes *
-+savageFillInModes( unsigned pixel_bits, unsigned depth_bits,
-+                 unsigned stencil_bits, GLboolean have_back_buffer )
-+{
-+    __GLcontextModes * modes;
-+    __GLcontextModes * m;
-+    unsigned num_modes;
-+    unsigned depth_buffer_factor;
-+    unsigned back_buffer_factor;
-+    GLenum fb_format;
-+    GLenum fb_type;
-+
-+    /* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
-+     * enough to add support.  Basically, if a context is created with an
-+     * fbconfig where the swap method is GLX_SWAP_COPY_OML, pageflipping
-+     * will never be used.
-+     *
-+     * FK: What about drivers that don't use page flipping? Could they
-+     * just expose GLX_SWAP_COPY_OML?
-+     */
-+    static const GLenum back_buffer_modes[] = {
-+      GLX_NONE, GLX_SWAP_UNDEFINED_OML /*, GLX_SWAP_COPY_OML */
-+    };
-+
-+    uint8_t depth_bits_array[2];
-+    uint8_t stencil_bits_array[2];
-+
-+
-+    depth_bits_array[0] = depth_bits;
-+    depth_bits_array[1] = depth_bits;
-+    
-+    /* Just like with the accumulation buffer, always provide some modes
-+     * with a stencil buffer.  It will be a sw fallback, but some apps won't
-+     * care about that.
-+     */
-+    stencil_bits_array[0] = 0;
-+    stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
-+
-+    depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
-+    back_buffer_factor  = (have_back_buffer) ? 2 : 1;
-+
-+    num_modes = depth_buffer_factor * back_buffer_factor * 4;
-+
-+    if ( pixel_bits == 16 ) {
-+        fb_format = GL_RGB;
-+        fb_type = GL_UNSIGNED_SHORT_5_6_5;
-+    }
-+    else {
-+        fb_format = GL_BGR;
-+        fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
-+    }
-+
-+    modes = (*create_context_modes)( num_modes, sizeof( __GLcontextModes ) );
-+    m = modes;
-+    if ( ! driFillInModes( & m, fb_format, fb_type,
-+                         depth_bits_array, stencil_bits_array, depth_buffer_factor,
-+                         back_buffer_modes, back_buffer_factor,
-+                         GLX_TRUE_COLOR ) ) {
-+      fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
-+               __func__, __LINE__ );
-+      return NULL;
-+    }
-+
-+    if ( ! driFillInModes( & m, fb_format, fb_type,
-+                         depth_bits_array, stencil_bits_array, depth_buffer_factor,
-+                         back_buffer_modes, back_buffer_factor,
-+                         GLX_DIRECT_COLOR ) ) {
-+      fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
-+               __func__, __LINE__ );
-+      return NULL;
-+    }
-+
-+    /* Mark the visual as slow if there are "fake" stencil bits.
-+     */
-+    for ( m = modes ; m != NULL ; m = m->next ) {
-+      if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) {
-+          m->visualRating = GLX_SLOW_CONFIG;
-+      }
-+    }
-+
-+    return modes;
-+}
-+
-+
-+/**
-+ * This is the bootstrap function for the driver.  libGL supplies all of the
-+ * requisite information about the system, and the driver initializes itself.
-+ * This routine also fills in the linked list pointed to by \c driver_modes
-+ * with the \c __GLcontextModes that the driver can support for windows or
-+ * pbuffers.
-+ * 
-+ * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on 
-+ *         failure.
-+ */
-+void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
-+                           const __GLcontextModes * modes,
-+                           const __DRIversion * ddx_version,
-+                           const __DRIversion * dri_version,
-+                           const __DRIversion * drm_version,
-+                           const __DRIframebuffer * frame_buffer,
-+                           drmAddress pSAREA, int fd, 
-+                           int internal_api_version,
-+                           __GLcontextModes ** driver_modes )
-+                           
-+{
-+   __DRIscreenPrivate *psp;
-+   static const __DRIversion ddx_expected = { 1, 0, 0 };
-+   static const __DRIversion dri_expected = { 4, 0, 0 };
-+   static const __DRIversion drm_expected = { 1, 0, 0 };
-+   if ( ! driCheckDriDdxDrmVersions2( "Savage",
-+                                    dri_version, & dri_expected,
-+                                    ddx_version, & ddx_expected,
-+                                    drm_version, & drm_expected ) ) {
-+      return NULL;
-+   }
-+      
-+   psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
-+                                ddx_version, dri_version, drm_version,
-+                                frame_buffer, pSAREA, fd,
-+                                internal_api_version, &savageAPI);
-+   if ( psp != NULL ) {
-+      create_context_modes = (PFNGLXCREATECONTEXTMODES)
-+        glXGetProcAddress( (const GLubyte *) "__glXCreateContextModes" );
-+      if ( create_context_modes != NULL ) {
-+       SAVAGEDRIPtr dri_priv = (SAVAGEDRIPtr)psp->pDevPriv;
-+       *driver_modes = savageFillInModes( dri_priv->cpp*8,
-+                                          (dri_priv->cpp == 2) ? 16 : 24,
-+                                          (dri_priv->cpp == 2) ? 0  : 8,
-+                                          (dri_priv->backOffset != dri_priv->depthOffset) );
-+      }
-+   }
-+
-+   return (void *) psp;
-+}
-+#endif /* USE_NEW_INTERFACE */
-+
- #endif
-Index: extras/Mesa/src/mesa/drivers/dri/savage/savagecontext.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/savage/savagecontext.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/savage/savagecontext.h    16 Jun 2004 09:18:35 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/savage/savagecontext.h    15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -37,7 +37,6 @@
- #include "xf86drm.h"
- #include "drm.h"
- #include "savage_drm.h"
--#include "savage_sarea.h"
- #include "savage_init.h"
- #include "mm.h"
- #include "tnl/t_vertex.h"
-@@ -237,7 +236,7 @@
-     unsigned int texAge[SAVAGE_NR_TEX_HEAPS]; 
-     drm_context_t hHWContext;
--    drmLock *driHwLock;
-+    drm_hw_lock_t *driHwLock;
-     GLuint driFd;
-     __DRIdrawablePrivate *driDrawable;
-Index: extras/Mesa/src/mesa/drivers/dri/sis/sis_dd.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/sis/sis_dd.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/sis/sis_dd.c      16 Jun 2004 09:18:25 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/sis/sis_dd.c      15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -44,7 +44,7 @@
- #include "utils.h"
--#define DRIVER_DATE   "20040608"
-+#define DRIVER_DATE   "20040925"
- /* Return the width and height of the given buffer.
-  */
-Index: extras/Mesa/src/mesa/drivers/dri/sis/sis_reg.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/sis/sis_reg.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/sis/sis_reg.h     16 Jun 2004 09:18:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/sis/sis_reg.h     15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -640,13 +640,13 @@
- #define SiS_S_BOTH_ONE_MINUS_SRC_ALPHA        0x0000000c
- /*
-- * REG_3D_DstBlendMode                        (0x8A54 - 0x8A57)
-+ * REG_3D_ClipTopBottom                       (0x8A54 - 0x8A57)
-  */
- #define MASK_BottomClip                       0x00001FFF
- #define MASK_TopClip                  0x03FFE000
- /*
-- * REG_3D_DstBlendMode                        (0x8A58 - 0x8A5B)
-+ * REG_3D_ClipLeftRight                       (0x8A58 - 0x8A5B)
-  */
- #define MASK_RightClip                        0x00001FFF
- #define MASK_LeftClip                 0x03FFE000
-Index: extras/Mesa/src/mesa/drivers/dri/sis/sis_screen.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/sis/sis_screen.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/sis/sis_screen.c  22 Jul 2004 06:51:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/sis/sis_screen.c  15 Dec 2004 01:50:59 -0000      1.1.1.2.4.1
-@@ -46,7 +46,7 @@
- const char __driConfigOptions[] =
- DRI_CONF_BEGIN
-       DRI_CONF_SECTION_DEBUG
--              DRI_CONF_OPT_BEGIN(agp_disable,bool,true)
-+              DRI_CONF_OPT_BEGIN(agp_disable,bool,false)
-               DRI_CONF_DESC(en,"Disable AGP vertex dispatch")
-               DRI_CONF_OPT_END
-               DRI_CONF_OPT_BEGIN(fallback_force,bool,false)
-Index: extras/Mesa/src/mesa/drivers/dri/sis/sis_state.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/sis/sis_state.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/sis/sis_state.c   16 Jun 2004 09:18:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/sis/sis_state.c   15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -441,9 +441,6 @@
-    __GLSiSHardware *prev = &smesa->prev;
-    __GLSiSHardware *current = &smesa->current;
--   if (!ctx->Color.ColorLogicOpEnabled)
--      return;
--
-    current->hwDstSet &= ~MASK_ROP2;
-    switch (opcode)
-    {
-Index: extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.c    22 Jul 2004 06:51:59 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.c    15 Dec 2004 01:50:59 -0000      1.1.1.2.4.1
-@@ -611,7 +611,7 @@
- #define POINT_FALLBACK (DD_POINT_SMOOTH)
- #define LINE_FALLBACK (DD_LINE_STIPPLE|DD_LINE_SMOOTH)
--#define TRI_FALLBACK (DD_TRI_SMOOTH)
-+#define TRI_FALLBACK (DD_TRI_STIPPLE|DD_TRI_SMOOTH)
- #define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK)
- #define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
- #define _SIS_NEW_RENDER_STATE (ANY_RASTER_FLAGS | ANY_FALLBACK_FLAGS)
-@@ -889,7 +889,8 @@
- void
- sisFlushPrimsLocked(sisContextPtr smesa)
- {
--   GLuint *start;
-+   if (smesa->vb_cur == smesa->vb_last)
-+      return;
-    sisUpdateHWState(smesa->glCtx);
-@@ -898,7 +899,7 @@
-       mEndPrimitive();
-       MMIO(REG_3D_AGPCmBase, (smesa->vb_last - smesa->vb) +
-          smesa->vb_agp_offset);
--      MMIO(REG_3D_AGPTtDwNum, (smesa->vb_cur - smesa->vb_last) / 4 |
-+      MMIO(REG_3D_AGPTtDwNum, ((smesa->vb_cur - smesa->vb_last) / 4) |
-        0x50000000);
-       MMIO(REG_3D_ParsingSet, smesa->AGPParseSet);
-       MMIO(REG_3D_AGPCmFire, (GLint)(-1));
-Index: extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.h    16 Jun 2004 09:18:27 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/sis/sis_tris.h    15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -51,6 +51,7 @@
- static __inline GLuint *sisAllocDmaLow(sisContextPtr smesa, int bytes)
- {
-    GLuint *start;
-+
-    if (smesa->vb_cur + bytes >= smesa->vb_end) {
-       LOCK_HARDWARE();
-       sisFlushPrimsLocked(smesa);
-Index: extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_context.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_context.c       12 Aug 2004 23:06:08 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_context.c       15 Dec 2004 01:50:59 -0000      1.1.1.3.2.1
-@@ -75,6 +75,7 @@
-    _mesa_enable_extension( ctx, "GL_EXT_texture_lod_bias" );
-    _mesa_enable_extension( ctx, "GL_EXT_blend_func_separate" );
-    _mesa_enable_extension( ctx, "GL_EXT_fog_coord" );
-+   _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" );
- #if 0
-    _mesa_enable_extension(ctx, "GL_EXT_secondary_color");
-@@ -83,7 +84,6 @@
- #endif
-    if ( fxMesa->haveTwoTMUs ) {
--      _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" );
-       _mesa_enable_extension( ctx, "GL_ARB_multitexture" );
-    }
-@@ -97,9 +97,7 @@
-       _mesa_enable_extension( ctx, "GL_EXT_blend_subtract" );
-       _mesa_enable_extension( ctx, "GL_EXT_blend_equation_separate" );
-    } else {
--#if 0 /*[dBorca] cannot handle 565. badbad! revise*/
-       _mesa_enable_extension( ctx, "GL_SGIS_generate_mipmap" );
--#endif
-    }
-    if (fxMesa->haveHwStencil) {
-@@ -112,6 +110,7 @@
-    if (TDFX_IS_NAPALM(fxMesa)/*fxMesa->Glide.HaveCombineExt - JJJ*/) {
-       _mesa_enable_extension( ctx, "GL_EXT_texture_env_combine" );
-+      _mesa_enable_extension( ctx, "GL_ARB_texture_env_combine" );
-    }
-    /* core-level extensions */
-Index: extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_render.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_render.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_render.c        12 Aug 2004 23:06:10 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_render.c        15 Dec 2004 01:50:59 -0000      1.1.1.3.2.1
-@@ -501,7 +501,7 @@
-       fxMesa->Glide.grTexClampMode(GR_TMU0 + unit, p->sClamp, p->tClamp);
-       fxMesa->Glide.grTexFilterMode(GR_TMU0 + unit, p->minFilt, p->magFilt);
-       fxMesa->Glide.grTexMipMapMode(GR_TMU0 + unit, p->mmMode, p->LODblend);
--      fxMesa->Glide.grTexLodBiasValue(GR_TMU0 + unit, p->LodBias);
-+      fxMesa->Glide.grTexLodBiasValue(GR_TMU0 + unit, CLAMP(p->LodBias, -8, 7.75));
-    }
- }
-Index: extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_tex.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_tex.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_tex.c   22 Jul 2004 06:52:01 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_tex.c   15 Dec 2004 01:50:59 -0000      1.1.1.2.4.1
-@@ -49,19 +49,56 @@
- #include "tdfx_texman.h"
-+/* no borders! can't halve 1x1! (stride > width * comp) not allowed */
- void
--_mesa_halve2x2_teximage2d ( GLuint bytesPerPixel,
-+_mesa_halve2x2_teximage2d ( GLcontext *ctx,
-+                          struct gl_texture_image *texImage,
-+                          GLuint bytesPerPixel,
-                           GLint srcWidth, GLint srcHeight,
-                           const GLvoid *srcImage, GLvoid *dstImage )
- {
-    GLint i, j, k;
--   const GLint dstWidth = srcWidth / 2;
--   const GLint dstHeight = srcHeight / 2;
--   const GLint srcRowStride = srcWidth * bytesPerPixel;
--   const GLubyte *src = srcImage;
-+   GLint dstWidth = srcWidth / 2;
-+   GLint dstHeight = srcHeight / 2;
-+   GLint srcRowStride = srcWidth * bytesPerPixel;
-+   GLubyte *src = (GLubyte *)srcImage;
-    GLubyte *dst = dstImage;
--   /* no borders! can't halve 1x1! (stride > width * comp) not allowed */
-+   GLuint bpt = 0;
-+   GLubyte *_s = NULL;
-+   GLubyte *_d = NULL;
-+   GLenum _t;
-+
-+   if (texImage->TexFormat->MesaFormat == MESA_FORMAT_RGB565) {
-+      _t = GL_UNSIGNED_SHORT_5_6_5_REV;
-+      bpt = bytesPerPixel;
-+   } else if (texImage->TexFormat->MesaFormat == MESA_FORMAT_ARGB4444) {
-+      _t = GL_UNSIGNED_SHORT_4_4_4_4_REV;
-+      bpt = bytesPerPixel;
-+   } else if (texImage->TexFormat->MesaFormat == MESA_FORMAT_ARGB1555) {
-+      _t = GL_UNSIGNED_SHORT_1_5_5_5_REV;
-+      bpt = bytesPerPixel;
-+   }
-+   if (bpt) {
-+      bytesPerPixel = 4;
-+      srcRowStride = srcWidth * bytesPerPixel;
-+      if (dstWidth == 0) {
-+         dstWidth = 1;
-+      }
-+      if (dstHeight == 0) {
-+         dstHeight = 1;
-+      }
-+      _s = src = MALLOC(srcRowStride * srcHeight);
-+      _d = dst = MALLOC(dstWidth * bytesPerPixel * dstHeight);
-+      _mesa_texstore_rgba8888(ctx, 2, GL_RGBA,
-+                              &_mesa_texformat_rgba8888_rev, src,
-+                              0, 0, 0, /* dstX/Y/Zoffset */
-+                              srcRowStride, /* dstRowStride */
-+                              0, /* dstImageStride */
-+                              srcWidth, srcHeight, 1,
-+                              texImage->Format, _t, srcImage, &ctx->DefaultPacking);
-+   }
-+
-    if (srcHeight == 1) {
-       for (i = 0; i < dstWidth; i++) {
-          for (k = 0; k < bytesPerPixel; k++) {
-@@ -96,6 +133,20 @@
-          src += srcRowStride;
-       }
-    }
-+
-+   if (bpt) {
-+      src = _s;
-+      dst = _d;
-+      texImage->TexFormat->StoreImage(ctx, 2, texImage->Format,
-+                                      texImage->TexFormat, dstImage,
-+                                      0, 0, 0, /* dstX/Y/Zoffset */
-+                                      dstWidth * bpt,
-+                                      0, /* dstImageStride */
-+                                      dstWidth, dstHeight, 1,
-+                                      GL_BGRA, CHAN_TYPE, dst, &ctx->DefaultPacking);
-+      FREE(dst);
-+      FREE(src);
-+   }
- }
-@@ -1363,7 +1414,9 @@
-                              NULL);
-             mipImage = _mesa_select_tex_image(ctx, texUnit, target, level);
-             mip = TDFX_TEXIMAGE_DATA(mipImage);
--            _mesa_halve2x2_teximage2d(texelBytes,
-+            _mesa_halve2x2_teximage2d(ctx,
-+                                      texImage,
-+                                      texelBytes,
-                                       mml->width, mml->height,
-                                       texImage->Data, mipImage->Data);
-             texImage = mipImage;
-@@ -1470,7 +1523,9 @@
-          ++level;
-          mipImage = _mesa_select_tex_image(ctx, texUnit, target, level);
-          mip = TDFX_TEXIMAGE_DATA(mipImage);
--         _mesa_halve2x2_teximage2d(texelBytes,
-+         _mesa_halve2x2_teximage2d(ctx,
-+                                   texImage,
-+                                   texelBytes,
-                                    mml->width, mml->height,
-                                    texImage->Data, mipImage->Data);
-          texImage = mipImage;
-Index: extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_vb.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_vb.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_vb.c    22 Jul 2004 06:52:03 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/tdfx/tdfx_vb.c    15 Dec 2004 01:50:59 -0000      1.1.1.2.4.1
-@@ -300,6 +300,8 @@
-    } else if (ctx->Texture._EnabledUnits & 0x1) {
-       /* unit 0 enabled */
-       ind |= TDFX_W_BIT|TDFX_TEX0_BIT;
-+   } else if (fxMesa->Fog.Mode != GR_FOG_DISABLE) {
-+      ind |= TDFX_W_BIT;
-    }
-    if (fxMesa->Fog.Mode == GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT) {
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/unichrome/Makefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/unichrome/Makefile        16 Jun 2004 09:18:36 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/Makefile        15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -30,6 +30,7 @@
-       via_texstate.c \
-       via_tris.c \
-       via_vb.c \
-+      via_texcombine.c \
-       xf86drmVIA.c
- C_SOURCES = \
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.c   22 Jul 2004 06:52:10 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.c   15 Dec 2004 01:50:59 -0000      1.1.1.2.4.1
-@@ -59,7 +59,7 @@
- #include <stdio.h>
- #include "macros.h"
--#define DRIVER_DATE   "20020221"
-+#define DRIVER_DATE   "20040923"
- #include "utils.h"
-@@ -136,6 +136,110 @@
-    }
- }
-+
-+/**
-+ * Calculate a width that satisfies the hardware's alignment requirements.
-+ * On the Unichrome hardware, each scanline must be aligned to a multiple of
-+ * 16 pixels.
-+ *
-+ * \param width  Minimum buffer width, in pixels.
-+ * 
-+ * \returns A pixel width that meets the alignment requirements.
-+ */
-+static __inline__ unsigned
-+buffer_align( unsigned width )
-+{
-+    return (width + 0x0f) & ~0x0f;
-+}
-+
-+
-+/**
-+ * Calculate the framebuffer parameters for all buffers (front, back, depth,
-+ * and stencil) associated with the specified context.
-+ * 
-+ * \warning
-+ * This function also calls \c AllocateBuffer to actually allocate the
-+ * buffers.
-+ * 
-+ * \sa AllocateBuffer
-+ */
-+static GLboolean
-+calculate_buffer_parameters( viaContextPtr vmesa )
-+{
-+    const unsigned shift = vmesa->viaScreen->bitsPerPixel / 16;
-+    const unsigned extra = (vmesa->drawType == GLX_PBUFFER_BIT) ? 0 : 32;
-+    unsigned w;
-+    unsigned h;
-+
-+    if (vmesa->drawType == GLX_PBUFFER_BIT) {
-+      w = vmesa->driDrawable->w;
-+      h = vmesa->driDrawable->h;
-+    }
-+    else { 
-+      w = vmesa->viaScreen->width;
-+      h = vmesa->viaScreen->height;
-+
-+      vmesa->front.offset = 0;
-+      vmesa->front.map = (char *) vmesa->driScreen->pFB;
-+    }
-+
-+    vmesa->front.pitch = buffer_align( w ) << shift;
-+    vmesa->front.size = vmesa->front.pitch * h;
-+
-+
-+    /* Allocate back-buffer */
-+
-+    vmesa->back.pitch = (buffer_align( vmesa->driDrawable->w ) << shift) 
-+      + extra;
-+    vmesa->back.size = vmesa->back.pitch * vmesa->driDrawable->h;
-+
-+#ifdef DEBUG
-+    if (VIA_DEBUG) fprintf(stderr, "viaMakeCurrent backbuffer: w = %d h = %d bpp = %d sizs = %d\n",
-+                         vmesa->back.pitch, 
-+                         vmesa->driDrawable->h,
-+                         8 << shift,
-+                         vmesa->back.size);
-+#endif
-+
-+    /* Allocate depth-buffer */
-+    if ( vmesa->hasStencil || vmesa->hasDepth ) {
-+      const unsigned dShift = (vmesa->hasStencil)
-+        ? 2 : (vmesa->depthBits / 16);
-+
-+      vmesa->depth.pitch = (buffer_align( vmesa->driDrawable->w ) << dShift)
-+        + extra;
-+      vmesa->depth.bpp = 8 << dShift;
-+      vmesa->depth.size = vmesa->depth.pitch * vmesa->driDrawable->h;
-+    }
-+    else {
-+      (void) memset( & vmesa->depth, 0, sizeof( vmesa->depth ) );
-+    }
-+
-+#ifdef DEBUG
-+    if (VIA_DEBUG) fprintf(stderr, "viaMakeCurrent depthbuffer: w = %d h = %d bpp = %d sizs = %d\n", 
-+                         vmesa->depth.pitch,
-+                         vmesa->driDrawable->h,
-+                         vmesa->depth.bpp,
-+                         vmesa->depth.size);
-+#endif
-+
-+    /*=* John Sheng [2003.5.31] flip *=*/
-+    if( (vmesa->viaScreen->width == vmesa->driDrawable->w)
-+      && (vmesa->viaScreen->height == vmesa->driDrawable->h) ) {
-+      vmesa->doPageFlip = GL_FALSE;
-+      vmesa->currentPage = 0;
-+      vmesa->back.pitch = vmesa->front.pitch;
-+    }
-+
-+    if (!AllocateBuffer(vmesa)) {
-+      FREE(vmesa);
-+      return GL_FALSE;
-+    }
-+    
-+    return GL_TRUE;
-+}
-+
-+
- void viaReAllocateBuffers(GLframebuffer *drawbuffer)
- {
-     GLcontext *ctx;
-@@ -152,95 +256,11 @@
-      
-     vmesa->driDrawable->w = ctx->DrawBuffer->Width;
-     vmesa->driDrawable->h = ctx->DrawBuffer->Height;
-+
-     LOCK_HARDWARE(vmesa);
--    
--    /* Allocate back & depth buffer */
--    {
--      int w, h, bpp;      
--      w = vmesa->driDrawable->w;
--      h = vmesa->driDrawable->h;
--      /* back buffer */
--      bpp = vmesa->viaScreen->bitsPerPixel;
--#ifdef DEBUG      
--      if (VIA_DEBUG) fprintf(stderr, "driScreen->fbBPP = %d\n", bpp);     
--#endif            
--      if (bpp == 32) {
--          w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--          vmesa->back.size = w * h * bpp / 8;
--          vmesa->back.pitch = w << 2;
--      }
--      else {
--          w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2 + 16;
--          vmesa->back.size = w * h * bpp / 8;
--          vmesa->back.pitch = w << 1;        
--      }
--#ifdef DEBUG
--      if (VIA_DEBUG) fprintf(stderr, "resizebuffer backbuffer: w = %d h = %d bpp = %d sizs = %d\n", 
--                          w, h, bpp, vmesa->back.size);
--#endif
--      /* depth buffer */
--      w = vmesa->driDrawable->w;
--      if (vmesa->hasDepth && vmesa->hasStencil) {
--          w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--          vmesa->depth.size = w * h * 4;
--          vmesa->depth.pitch = w << 2;
--          vmesa->depth.bpp = 32;
--#ifdef DEBUG
--          if (VIA_DEBUG) fprintf(stderr, "depthBits = 24\n");
--          if (VIA_DEBUG) fprintf(stderr, "StencilBits = 8\n");
--#endif
--      }
--      else if (vmesa->hasDepth) {
--          /*=* John Sheng [2003.6.16] patch viewperf drv-08 draw nothing */
--          /*if(vmesa->viaScreen->bitsPerPixel == 32)*/
--              /*vmesa->depthBits = 16;*/
--              
--          if (vmesa->depthBits == 16) {
--              w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2 + 16;
--              vmesa->depth.size = w * h * 2;         
--              vmesa->depth.pitch = w << 1;
--              vmesa->depth.bpp = 16;
--#ifdef DEBUG
--              if (VIA_DEBUG) fprintf(stderr, "depthBits = 16\n");
--#endif
--          }
--          else {
--              w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--              vmesa->depth.size = w * h * 4;
--              vmesa->depth.pitch = w << 2;
--              vmesa->depth.bpp = 32;
--#ifdef DEBUG
--              if (VIA_DEBUG) fprintf(stderr, "depthBits = 32\n");
--#endif
--          }
--      }
--      else if (vmesa->hasStencil) {
--          w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--          vmesa->depth.size = w * h * 4;
--          vmesa->depth.pitch = w << 2;
--          vmesa->depth.bpp = 32;
--#ifdef DEBUG          
--          if (VIA_DEBUG) fprintf(stderr, "StencilBits = 8\n");
--#endif
--      }
--#ifdef DEBUG
--      if (VIA_DEBUG) fprintf(stderr, "resizebuffer depthbuffer: w = %d h = %d bpp = %d sizs = %d\n", 
--                                  w, h, vmesa->depth.bpp, vmesa->depth.size);
--#endif        
--      /*=* John Sheng [2003.5.31] flip *=*/
--      {
--          if(vmesa->viaScreen->width == vmesa->driDrawable->w &&
--              vmesa->viaScreen->height == vmesa->driDrawable->h) {
--              vmesa->back.pitch = vmesa->front.pitch;
--              vmesa->back.size = vmesa->front.size;
--          }
--      }
--    
--      if (!AllocateBuffer(vmesa)) {
--          FREE(vmesa);
--      }
--    }
-+    calculate_buffer_parameters( vmesa );
-     UNLOCK_HARDWARE(vmesa);
-+
- #ifdef DEBUG
-     if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__);
- #endif
-@@ -263,12 +283,12 @@
-    "GL_ARB_texture_env_add",
-    "GL_ARB_texture_env_combine",     /* John Sheng [2003.7.18] tex combine */
-    "GL_ARB_texture_env_dot3",        /* John Sheng [2003.7.18] tex dot3 */
--   "GL_EXT_point_parameters",        /* John Sheng [2003.7.18] point param. */
-+   "GL_ARB_texture_mirrored_repeat",
-    "GL_EXT_stencil_wrap",
--   "GL_EXT_texture_env_add",
-    "GL_EXT_texture_env_combine",     /* John Sheng [2003.7.18] tex combine */
-    "GL_EXT_texture_env_dot3",        /* John Sheng [2003.7.18] tex dot3 */
-    "GL_EXT_texture_lod_bias",
-+   "GL_NV_blend_square",
-    NULL
- };
-@@ -440,6 +460,8 @@
-     ctx->Const.MaxTextureLevels = 11;
-     
-     ctx->Const.MaxTextureUnits = 2;
-+    ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
-+    ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureUnits;
-     ctx->Const.MinLineWidth = 1.0;
-     ctx->Const.MinLineWidthAA = 1.0;
-@@ -567,12 +589,12 @@
-     if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__);    
- #endif
-     {
--      GLboolean saam;
--      int count = 0, fbSize;
- #ifndef USE_XINERAMA
-         vmesa->saam = 0;
- #else
--      saam = XineramaIsActive(vmesa->display);
-+      GLboolean saam = XineramaIsActive(vmesa->display);
-+      int count = 0, fbSize;
-+
-       if (saam && vmesa->viaScreen->drixinerama) {
-           vmesa->xsi = XineramaQueryScreens(vmesa->display, &count);
-           /* Test RightOf or Down */
-@@ -716,8 +738,10 @@
- void viaXMesaWindowMoved(viaContextPtr vmesa)
- {
-     GLuint bytePerPixel = vmesa->viaScreen->bitsPerPixel >> 3;
-+#ifdef USE_XINERAMA
-     GLuint side = 0;
-     __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
-+#endif
-     
-     switch (vmesa->glCtx->Color._DrawDestMask) {
-     case __GL_FRONT_BUFFER_MASK: 
-@@ -904,178 +928,22 @@
-       fprintf(stderr, "driContextPriv = %08x\n", (GLuint)driReadPriv);
-     } 
- #endif    
--    
-+
-     if (driContextPriv) {
-         viaContextPtr vmesa = (viaContextPtr)driContextPriv->driverPrivate;
--      current_mesa = vmesa;
--      
--      vmesa->driDrawable = driDrawPriv;
--      if (vmesa->drawType == GLX_PBUFFER_BIT) {
--          int w, h, bpp;
--          
--          w = vmesa->driDrawable->w;
--          h = vmesa->driDrawable->h;
--          bpp = vmesa->viaScreen->bitsPerPixel;
--          if (bpp == 32) {
--              w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4;
--              vmesa->front.size = w * h * bpp / 8;
--              vmesa->front.pitch = w << 2;
--          }
--          else {
--              w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2;
--              vmesa->front.size = w * h * bpp / 8;
--              vmesa->front.pitch = w << 1;           
--          }   
--      }
--      /*=* John Sheng [2003.6.20] fix resolution 720x480/720x576 front pitch error *=*/
--      else { 
--          GLuint w;
--          GLuint h;
--          GLuint bpp;
--          bpp = vmesa->viaScreen->bitsPerPixel;
--          h = vmesa->viaScreen->height;
--          w = vmesa->viaScreen->width;
--          if (bpp == 0x20) {
--              w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4;
--              vmesa->front.size = w * h * bpp / 8;
--              vmesa->front.pitch = w << 2;
--#ifdef DEBUG
--              if (VIA_DEBUG) fprintf(stderr, "viaScreen->bitsPerPixel = %d\n", 32);       
--#endif
--          } 
--          else if (bpp == 0x10) {
--              w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2;
--              vmesa->front.size = w * h * bpp / 8;
--              vmesa->front.pitch = w << 1;           
--#ifdef DEBUG
--              if (VIA_DEBUG) fprintf(stderr, "viaScreen->bitsPerPixel = %d\n", 16);       
--#endif
--          }
--          vmesa->front.offset = 0;
--          vmesa->front.map = (char *) vmesa->driScreen->pFB;
--          vmesa->front.size = w * h * vmesa->viaScreen->bitsPerPixel /8;
--      }
--      
--      /* Allocate back & depth buffer */
--      {
--          int w, h, bpp;
--          
--          w = vmesa->driDrawable->w;
--#ifdef DEBUG
--          if (VIA_DEBUG) fprintf(stderr, "viaMakeCurrent: w = %d\n", w);          
--#endif            
--          h = vmesa->driDrawable->h;
--          
--          /* back buffer */
--          bpp = vmesa->viaScreen->bitsPerPixel;
--#ifdef DEBUG      
--          if (VIA_DEBUG) fprintf(stderr, "driScreen->fbBPP = %d\n", bpp);         
--#endif            
--          if (bpp == 32) {
--              if (vmesa->drawType == GLX_PBUFFER_BIT)
--                  w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4;
--              else
--                  w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--              
--              vmesa->back.size = w * h * bpp / 8;
--              vmesa->back.pitch = w << 2;
--          }
--          else {
--              if (vmesa->drawType == GLX_PBUFFER_BIT)
--                  w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2;
--              else
--                  w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2 + 16;
--              
--              vmesa->back.size = w * h * bpp / 8;
--              vmesa->back.pitch = w << 1;            
--          }
--#ifdef DEBUG
--          if (VIA_DEBUG) fprintf(stderr, "viaMakeCurrent backbuffer: w = %d h = %d bpp = %d sizs = %d\n", 
--                                  w, h, bpp, vmesa->back.size);
--#endif
--          /* depth buffer */
--          w = vmesa->driDrawable->w;
--          if (vmesa->hasDepth && vmesa->hasStencil) {
--              if (vmesa->drawType == GLX_PBUFFER_BIT)
--                  w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4;
--              else
--                  w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--
--              vmesa->depth.size = w * h * 4;
--              vmesa->depth.pitch = w << 2;
--              vmesa->depth.bpp = 32;
--#ifdef DEBUG
--              if (VIA_DEBUG) fprintf(stderr, "depthBits = 24\n");
--              if (VIA_DEBUG) fprintf(stderr, "StencilBits = 8\n");
--#endif
--          }
--          else if (vmesa->hasDepth) {
-+      current_mesa = vmesa;
--              /*=* John Sheng [2003.6.16] patch viewperf drv-08 draw nothing */
--              /*if(vmesa->viaScreen->bitsPerPixel == 32)*/
--                  /*vmesa->depthBits = 16;*/
--                  
--              if (vmesa->depthBits == 16) {
--                  if (vmesa->drawType == GLX_PBUFFER_BIT)
--                      w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2;
--                  else
--                      w = BUFFER_ALIGN_WIDTH(w * 2, BUFFER_ALIGNMENT) / 2 + 16;
--
--                  vmesa->depth.size = w * h * 2;             
--                  vmesa->depth.pitch = w << 1;
--                  vmesa->depth.bpp = 16;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "depthBits = 16\n");
--#endif
--              }
--              else {
--                  if (vmesa->drawType == GLX_PBUFFER_BIT)
--                      w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4;
--                  else
--                      w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--
--                  vmesa->depth.size = w * h * 4;
--                  vmesa->depth.pitch = w << 2;
--                  vmesa->depth.bpp = 32;
- #ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "depthBits = 32\n");
--#endif
--              }
--          }
--          else if (vmesa->hasStencil) {
--              if (vmesa->drawType == GLX_PBUFFER_BIT)
--                  w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4;
--              else
--                  w = BUFFER_ALIGN_WIDTH(w * 4, BUFFER_ALIGNMENT) / 4 + 8;
--
--              vmesa->depth.size = w * h * 4;
--              vmesa->depth.pitch = w << 2;
--              vmesa->depth.bpp = 32;
--#ifdef DEBUG          
--              if (VIA_DEBUG) fprintf(stderr, "StencilBits = 8\n");
-+      if (VIA_DEBUG) fprintf(stderr, "viaScreen->bitsPerPixel = %d\n", viaScreen->bitsPerPixel);
-+      if (VIA_DEBUG) fprintf(stderr, "viaMakeCurrent: w = %d\n", vmesa->driDrawable->w);
- #endif
--          }
--#ifdef DEBUG
--          if (VIA_DEBUG) fprintf(stderr, "viaMakeCurrent depthbuffer: w = %d h = %d bpp = %d sizs = %d\n", 
--                                 w, h, vmesa->depth.bpp, vmesa->depth.size);
--#endif            
--          /*=* John Sheng [2003.5.31] flip *=*/
--          {
--              viaContextPtr vmesa = (viaContextPtr)driContextPriv->driverPrivate;     
--              if(vmesa->viaScreen->width == vmesa->driDrawable->w &&
--                  vmesa->viaScreen->height == vmesa->driDrawable->h) {
--                  vmesa->doPageFlip = GL_FALSE;
--                  vmesa->currentPage = 0;
--                  vmesa->back.pitch = vmesa->front.pitch;
--              }
--          }
--          if (!AllocateBuffer(vmesa)) {
--              FREE(vmesa);
--              return GL_FALSE;
--          }
-+      vmesa->driDrawable = driDrawPriv;
-+      if ( ! calculate_buffer_parameters( vmesa ) ) {
-+          return GL_FALSE;
-       }
-+
-         _mesa_make_current2(vmesa->glCtx,
-                             (GLframebuffer *)driDrawPriv->driverPrivate,
-                             (GLframebuffer *)driReadPriv->driverPrivate);
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.h   22 Jul 2004 06:52:11 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/via_context.h   15 Dec 2004 01:50:59 -0000      1.1.1.2.4.1
-@@ -75,10 +75,7 @@
- #define TAG(x) via##x
- #include "tnl_dd/t_dd_vertex.h"
- #undef TAG
--#define BUFFER_ALIGNMENT 32
--#define BUFFER_ALIGN_WIDTH1(w, a)   (((w) + ((a) - 1)) & ~((a) - 1))
--#define BUFFER_ALIGN_WIDTH(w, a)    (((w) & ((a) - 1)) ? BUFFER_ALIGN_WIDTH1(w, a) : (w))
--#define BUFFER_ALIGN_ADDRESS(p, a)  ((GLvoid *)(((GLint)(p)) + ((a)-1) & ~((a)-1)))
-+
- #define RightOf 1
- #define LeftOf 2
- #define Down 4
-@@ -451,6 +448,9 @@
- extern void viaReAllocateBuffers(GLframebuffer *drawbuffer);
- extern void viaXMesaWindowMoved(viaContextPtr vmesa);
-+extern void viaTexCombineState(viaContextPtr vmesa,
-+    const struct gl_tex_env_combine_state * combine, unsigned unit );
-+
- #define SUBPIXEL_X -.5
- #define SUBPIXEL_Y -.5
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.c     16 Jun 2004 09:18:37 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.c     15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -313,7 +313,6 @@
- #ifdef DEBUG    
-         if (VIA_DEBUG) fprintf(stderr, "%s SwapPBuffers\n", __FUNCTION__);    
- #endif        /*=* [DBG] for pbuffer *=*/
--      /*viaDoSwapBufferSoftFront(vmesa);*/
-     }
-     else {
-       GLuint scrn = 0;
-@@ -1436,83 +1435,7 @@
- #endif
- }
--void viaDoSwapBufferSoft(viaContextPtr vmesa)
--{    
--    GLuint nFrontPitch;
--    GLuint nBackPitch;
--    GLuint nFrontBase, nBackBase;
--    GLuint i, j;
--    GLubyte *by, *fy;
--    GLuint w;
--    
--    w = vmesa->viaScreen->width;
--    w = BUFFER_ALIGN_WIDTH(w, BUFFER_ALIGNMENT);
--    
--    if (vmesa->viaScreen->bitsPerPixel == 0x20)
--      nFrontPitch = w << 2;
--    else
--      nFrontPitch = w << 1;
--    
--    nBackPitch = vmesa->back.pitch;
--    
--    /* Caculate Base */
--    nFrontBase = (GLuint) vmesa->driScreen->pFB;
--    nBackBase = ((GLuint) vmesa->back.offset) + ((GLuint) vmesa->driScreen->pFB);
--    by = (GLubyte *) nBackBase;
--    fy = (GLubyte *) nFrontBase;
--    
--    viaFlushPrimsLocked(vmesa);
--    
--    for (i = 0; i < vmesa->driDrawable->h; i++) {
--      fy = (GLubyte *)(nFrontBase + i * nFrontPitch);
--      for (j = 0; j < nBackPitch; j++) {
--          *((GLubyte*)fy) = *((GLubyte*)by);
--          fy = fy + 1;
--          by = by + 1;
--      }
--      
--    }
--
--}
--void viaDoSwapBufferSoftFront(viaContextPtr vmesa)
--{    
--    GLuint nFrontPitch;
--    GLuint nBackPitch;
--    GLuint nFrontBase, nBackBase;
--    GLuint i, j;
--    GLubyte *by, *fy;
--    GLuint w;
--    
--    w = vmesa->viaScreen->width;
--    w = BUFFER_ALIGN_WIDTH(w, BUFFER_ALIGNMENT);
--    
--    if (vmesa->viaScreen->bitsPerPixel == 0x20)
--      nFrontPitch = w << 2;
--    else
--      nFrontPitch = w << 1;
--      
--    nBackPitch = vmesa->front.pitch;
--    
--    /* Caculate Base */
--    nFrontBase = (GLuint) vmesa->driScreen->pFB;
--    nBackBase = ((GLuint) vmesa->front.offset) + ((GLuint) vmesa->driScreen->pFB);
--    by = (GLubyte *) nBackBase;
--    fy = (GLubyte *) nFrontBase;
--    
--    viaFlushPrimsLocked(vmesa);
--    
--    for (i = 0; i < vmesa->driDrawable->h; i++) {
--      fy = (GLubyte *)(nFrontBase + i * nFrontPitch);
--      for (j = 0; j < nBackPitch; j++) {
--          *((GLubyte*)fy) = *((GLubyte*)by);
--          fy = fy + 1;
--          by = by + 1;
--      }
--      
--    }
--
--}
- int flush_agp(viaContextPtr vmesa, drm_via_flush_agp_t* agpCmd) 
- {   
-     GLuint *pnAGPCurrentPhysStart;
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.h     16 Jun 2004 09:18:38 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/via_ioctl.h     15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -47,8 +47,6 @@
- void viaFillStencilDepthBuffer(viaContextPtr vmesa, GLuint pixel);
- void viaDoSwapBuffers(viaContextPtr vmesa);
- void viaDoSwapBuffersSaam(viaContextPtr vmesa);
--void viaDoSwapBufferSoft(viaContextPtr vmesa);
--void viaDoSwapBufferSoftFront(viaContextPtr vmesa);
- void viaDoSwapPBuffers(viaContextPtr vmesa);
- int flush_agp(viaContextPtr vmesa, drm_via_flush_agp_t* agpCmd); 
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/via_state.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/unichrome/via_state.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/dri/unichrome/via_state.c     16 Jun 2004 09:18:39 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/via_state.c     15 Dec 2004 01:50:59 -0000      1.1.1.1.4.1
-@@ -46,6 +46,7 @@
- #include "tnl/t_pipeline.h"
-+
- static GLuint ROP[16] = {
-     HC_HROP_BLACK,    /* GL_CLEAR           0                         */
-     HC_HROP_DPa,      /* GL_AND             s & d                     */
-@@ -506,13 +507,52 @@
-     }
- }
-+/**
-+ * Convert S and T texture coordinate wrap modes to hardware bits.
-+ */
-+static uint32_t
-+get_wrap_mode( GLenum sWrap, GLenum tWrap )
-+{
-+    uint32_t v = 0;
-+
-+
-+    switch( sWrap ) {
-+    case GL_REPEAT:
-+      v |= HC_HTXnMPMD_Srepeat;
-+      break;
-+    case GL_CLAMP:
-+    case GL_CLAMP_TO_EDGE:
-+      v |= HC_HTXnMPMD_Sclamp;
-+      break;
-+    case GL_MIRRORED_REPEAT:
-+      v |= HC_HTXnMPMD_Smirror;
-+      break;
-+    }
-+
-+    switch( tWrap ) {
-+    case GL_REPEAT:
-+      v |= HC_HTXnMPMD_Trepeat;
-+      break;
-+    case GL_CLAMP:
-+    case GL_CLAMP_TO_EDGE:
-+      v |= HC_HTXnMPMD_Tclamp;
-+      break;
-+    case GL_MIRRORED_REPEAT:
-+      v |= HC_HTXnMPMD_Tmirror;
-+      break;
-+    }
-+    
-+    return v;
-+}
-+
-+
- void viaChooseTextureState(GLcontext *ctx) 
- {
-     viaContextPtr vmesa = VIA_CONTEXT(ctx);
-     struct gl_texture_unit *texUnit0 = &ctx->Texture.Unit[0];
-     struct gl_texture_unit *texUnit1 = &ctx->Texture.Unit[1];
-     /*=* John Sheng [2003.7.18] texture combine *=*/
--    GLboolean AlphaCombine[3];
-+
- #ifdef DEBUG
-     if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__);    
- #endif    
-@@ -524,10 +564,26 @@
-       }
- #endif
-+#ifdef DEBUG
-+      if (VIA_DEBUG) {
-+            struct gl_texture_object *texObj0 = texUnit0->_Current;
-+            struct gl_texture_object *texObj1 = texUnit1->_Current;
-+
-+          fprintf(stderr, "env mode: 0x%04x / 0x%04x\n", texUnit0->EnvMode, texUnit1->EnvMode);
-+
-+          if ( (texObj0 != NULL) && (texObj0->Image[0][0] != NULL) )
-+            fprintf(stderr, "format 0: 0x%04x\n", texObj0->Image[0][0]->Format);
-+                  
-+          if ( (texObj1 != NULL) && (texObj1->Image[0][0] != NULL) )
-+            fprintf(stderr, "format 1: 0x%04x\n", texObj1->Image[0][0]->Format);
-+      }
-+#endif
-+
-+
-         if (texUnit0->_ReallyEnabled) {
-             struct gl_texture_object *texObj = texUnit0->_Current;
-             struct gl_texture_image *texImage = texObj->Image[0][0];
--            GLint r, g, b, a;
-+
- #ifdef DEBUG
-           if (VIA_DEBUG) fprintf(stderr, "texUnit0->_ReallyEnabled\n");    
- #endif            
-@@ -580,2502 +636,15 @@
-                                       HC_HTXnFLTe_Nearest;
-             }
--            if (texObj->WrapS == GL_REPEAT)
--                vmesa->regHTXnMPMD_0 = HC_HTXnMPMD_Srepeat;
--            else
--                vmesa->regHTXnMPMD_0 = HC_HTXnMPMD_Sclamp;
-+          vmesa->regHTXnMPMD_0 &= ~(HC_HTXnMPMD_SMASK | HC_HTXnMPMD_TMASK);
-+          vmesa->regHTXnMPMD_0 |= get_wrap_mode( texObj->WrapS,
-+                                                 texObj->WrapT );
--            if (GL_TRUE) {
--                if (texObj->WrapT == GL_REPEAT)
--                    vmesa->regHTXnMPMD_0 |= HC_HTXnMPMD_Trepeat;
--                else
--                    vmesa->regHTXnMPMD_0 |= HC_HTXnMPMD_Tclamp;
--            }
- #ifdef DEBUG
-           if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode %x\n",texUnit0->EnvMode);    
- #endif
--            switch (texUnit0->EnvMode) {
--            case GL_MODULATE:
--              switch (texImage->Format) {
--                case GL_ALPHA:
--                    /* C = Cf, A = At*Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Adif | HC_HTXnTBLAb_TOPA |
--                        HC_HTXnTBLAb_Atex | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    break;
--                case GL_LUMINANCE:
--                    /* C = Lt*Cf, A = Af
--                     * RGB part.
--                     * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_LUMINANCE_ALPHA:
--                    /* C = Lt*Cf, A = At*Af
--                     * RGB part.
--                     * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    break;
--                case GL_INTENSITY:
--                    /* C = It*Cf, A = It*Af
--                     * RGB part.
--                     * Ca = It, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = It, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    break;
--                case GL_RGB:
--                    /* C = Ct*Cf, A = Af
--                     * RGB part.
--                     * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_MODULATE: GL_RGB\n");    
--#endif
--                    break;
--                case GL_RGBA:
--                    /* C = Ct*Cf, A = At*Af
--                     * RGB part.
--                     * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                      HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias
--                      | HC_HTXnTBLAshift_No;
--                    
--                  vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_MODULATE: GL_RGBA\n");        
--#endif
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                        /* C = Cf, A = At*Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex | HC_HTXnTBLAb_TOPA |
--                            HC_HTXnTBLAb_Adif | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        vmesa->regHTXnTBLRFog_0 = 0x0;
--                        break;
--                    case GL_LUMINANCE:
--                        /* C = Lt*Cf, A = Af
--                         * RGB part.
--                         * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_LUMINANCE_ALPHA:
--                        /* C = Lt*Cf, A = At*Af
--                         * RGB part.
--                         * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        vmesa->regHTXnTBLRFog_0 = 0x0;
--                        break;
--                    case GL_INTENSITY:
--                        /* C = It*Cf, A = It*Af
--                         * RGB part.
--                         * Ca = It, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = It, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        vmesa->regHTXnTBLRFog_0 = 0x0;
--                        break;
--                    case GL_RGB:
--                        /* C = Ct*Cf, A = Af
--                         * RGB part.
--                         * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        /* C = Ct*Cf, A = At*Af
--                         * RGB part.
--                         * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Dif | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        vmesa->regHTXnTBLRFog_0 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--            case GL_DECAL:
--              switch (texImage->Format) {
--                case GL_ALPHA:
--                case GL_LUMINANCE:
--                case GL_LUMINANCE_ALPHA:
--                case GL_INTENSITY:
--                    /* Undefined.
--                     */
--                    break;
--                case GL_RGB:
--                    /* C = Ct, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_DECAL: GL_RGB\n");
--#endif
--                    break;
--                case GL_RGBA:
--                    /* C = (1-At)*Cf+At*Ct, A = Af --> At*(Ct-Cf)+Cf
--                     * RGB part.
--                     * Ca = At, Cb = Ct, Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Atex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_Tex |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_DECAL: GL_RGBA\n");
--#endif
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                    case GL_LUMINANCE:
--                    case GL_LUMINANCE_ALPHA:
--                    case GL_INTENSITY:
--                        /* Undefined.
--                         */
--                        break;
--                    case GL_RGB:
--                        /* C = Ct, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                      if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_COLOR_INDEX: GL_RGB\n");    
--#endif
--                        break;
--                    case GL_RGBA:
--                        /* C = (1-At)*Cf+At*Ct, A = Af --> At*(Ct-Cf)+Cf
--                         * RGB part.
--                         * Ca = At, Cb = Ct, Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Atex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_Tex |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                      if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_COLOR_INDEX: GL_RGBA\n");    
--#endif
--                        break;
--                    }
--                    break;
--                }
--                break;
--            case GL_BLEND:
--              switch (texImage->Format) {
--                case GL_ALPHA:
--                    /* C = Cf, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_LUMINANCE:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    /* C = (1-Lt)*Cf+Lt*Cc, A = Af --> Lt*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_LUMINANCE_ALPHA:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    /* C = (1-Lt)*Cf+Lt*Cc, A = At*Af --> Lt*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    break;
--                case GL_INTENSITY:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                    /* C = (1-It)*Cf+It*Cc, A = (1-It)*Af+It*Ac
--                     * --> It*(Cc-Cf)+Cf, It*(Ac-Af)+Af
--                     * RGB part.
--                     * Ca = It, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = It, Ab = Ac(Reg), Cop = -, Ac = Af, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Adif;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = (a << 8);
--                    break;
--                case GL_RGB:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                    /* C = (1-Ct)*Cf+Ct*Cc, A = Af --> Ct*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_BLEND: GL_RGB\n");    
--#endif
--                    break;
--                case GL_RGBA:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                    /* C = (1-Ct)*Cf+Ct*Cc, A = At*Af --> Ct*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_BLEND: GL_RGBA\n");    
--#endif
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                        /* C = Cf, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_LUMINANCE:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        /* C = (1-Lt)*Cf+Lt*Cc, A = Af --> Lt*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_LUMINANCE_ALPHA:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        /* C = (1-Lt)*Cf+Lt*Cc, A = At*Af --> Lt*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        vmesa->regHTXnTBLRFog_0 = 0x0;
--                        break;
--                    case GL_INTENSITY:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        /* C = (1-It)*Cf+It*Cc, A = (1-It)*Af+It*Ac
--                         * --> It*(Cc-Cf)+Cf, It*(Ac-Af)+Af
--                         * RGB part.
--                         * Ca = It, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = It, Ab = Ac(Reg), Cop = -, Ac = Af, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Adif;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = (a << 8);
--                        break;
--                    case GL_RGB:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        /* C = (1-Ct)*Cf+Ct*Cc, A = Af --> Ct*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        /* C = (1-Ct)*Cf+Ct*Cc, A = At*Af --> Ct*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        vmesa->regHTXnTBLRFog_0 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--            case GL_REPLACE:
--              switch (texImage->Format) {
--                case GL_ALPHA:
--                    /* C = Cf, A = At
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_LUMINANCE:
--                    /* C = Lt, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_LUMINANCE_ALPHA:
--                    /* C = Lt, A = At
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_INTENSITY:
--                    /* C = It, A = It
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = It, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = It, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    break;
--                case GL_RGB:
--                    /* C = Ct, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_REPLACE: GL_RGB\n");    
--#endif
--                    break;
--                case GL_RGBA:
--                    /* C = Ct, A = At
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--#ifdef DEBUG
--                  if (VIA_DEBUG) fprintf(stderr, "texUnit0->EnvMode: GL_REPLACE: GL_RGBA\n");    
--#endif
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                        /* C = Cf, A = At
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_LUMINANCE:
--                        /* C = Lt, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_LUMINANCE_ALPHA:
--                        /* C = Lt, A = At
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_INTENSITY:
--                        /* C = It, A = It
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = It, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = It, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_RGB:
--                        /* C = Ct, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        /* C = Ct, A = At
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_0 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--          /*=* John Sheng [2003.7.18] texture combine *=*/
--          case GL_COMBINE:
--              switch (texUnit0->Combine.ModeRGB) {
--              case GL_REPLACE:
--                  switch (texUnit0->Combine.SourceRGB[0]) {
--                  case GL_TEXTURE:
--                      switch (texUnit0->Combine.OperandRGB[0]) {
--                      case GL_SRC_COLOR:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      case GL_ONE_MINUS_SRC_COLOR:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Tex;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      case GL_SRC_ALPHA:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Atex; 
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      case GL_ONE_MINUS_SRC_ALPHA:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Atex;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      }
--                      break;
--                  case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                      switch (texUnit0->Combine.OperandRGB[0]) {
--                      case GL_SRC_COLOR:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_HTXnTBLRC; 
--                        
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                          break;
--                      case GL_ONE_MINUS_SRC_COLOR:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_HTXnTBLRC;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                          break;
--                      case GL_SRC_ALPHA:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_HTXnTBLRC;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                          break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_HTXnTBLRC;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                            break;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                      switch (texUnit0->Combine.OperandRGB[0]) {
--                        case GL_SRC_COLOR:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_COLOR:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        }
--                        break;
--                    case GL_PREVIOUS :
--                        switch (texUnit0->Combine.OperandRGB[0]) {
--                        case GL_SRC_COLOR:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_COLOR:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        }
--                        break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftRGB)) {
--                    case 1:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                      break;
--                    case 2:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                    break;
--
--                case GL_MODULATE:
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    switch (texUnit0->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                        }
--                        else {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCa_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                      }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Adif;
--                        }
--                        break;
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Adif;
--                      }
--                      break;
--                    }
--                  switch (texUnit0->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                      if (AlphaCombine[1]==0) {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                      }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                      else {
--                          vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                      }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                      }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                        }
--                      break;
--                    case GL_PREVIOUS :
--                      if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                      }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                      }
--                      break;
--                  }
--                  switch ((GLint)(texUnit0->Combine.ScaleShiftRGB)) {
--                    case 1:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                      break;
--                  case 2:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                      break;
--                    case 4:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                      break;
--                  }
--                  break;
--              case GL_ADD:
--                case GL_SUBTRACT :
--                  if (texUnit0->Combine.ModeRGB==GL_ADD) {
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0;
--                    }
--                  else {
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0;
--                  }
--                  vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                  vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK | HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC;
--                    vmesa->regHTXnTBLRCa_0 = ( 255<<16 | 255<<8 |255 );
--                    switch (texUnit0->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                      AlphaCombine[0]=0;
--                        break;
--                  case GL_ONE_MINUS_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_TOPC; 
--                      AlphaCombine[1]=0;
--                      break;
--                  case GL_ONE_MINUS_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_InvTOPC;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_TOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_InvTOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                  }
--                    switch (texUnit0->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                      }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                      }
--                      break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                          vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                      }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                      }
--                      break;
--                    }
--                    switch (texUnit0->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Tex; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_HTXnTBLRC;
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLRCc_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCc_0 = (a << 16) | (a << 8) | a;
--                      }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Adif;
--                        }
--                      break;
--                  }
--                  switch ((GLint)(texUnit0->Combine.ScaleShiftRGB)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                    break;
--                case GL_ADD_SIGNED :
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub;
--                  vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                  vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                      HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC|
--                      HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_HTXnTBLRC;
--                  vmesa->regHTXnTBLRCa_0 = ( 255<<16 | 255<<8 |255 );
--                    vmesa->regHTXnTBLRCc_0 = ( 128<<16 | 128<<8 |128 );
--                    switch (texUnit0->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                      AlphaCombine[1]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                        }
--                        break;
--                    }
--                  switch (texUnit0->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Tex; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Atex; 
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_HTXnTBLRC; 
--                      if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLRCbias_0 = (r << 16) | (g << 8) | b;
--                        }
--                      else {
--                            vmesa->regHTXnTBLRCbias_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Dif; 
--                        }
--                      else {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Adif;
--                        }
--                        break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftRGB)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                  break;
--                case GL_INTERPOLATE :
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub;
--                  vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                  switch (texUnit0->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_TOPC; 
--                      AlphaCombine[0]=0;
--                      break;
--                  case GL_ONE_MINUS_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_TOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_InvTOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_TOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=1;
--                      break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_InvTOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                        AlphaCombine[1]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandRGB[2]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_TOPC; 
--                        AlphaCombine[2]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_InvTOPC;
--                        AlphaCombine[2]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_TOPC;
--                        AlphaCombine[2]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_InvTOPC;
--                        AlphaCombine[2]=1;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                      if (AlphaCombine[0]==0) {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                        }
--                        else {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                        }
--                      break;
--                  case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                        }
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Tex; 
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Tex;
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Atex;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_HTXnTBLRC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCc_0 = (r << 16) | (g << 8) | b;
--                            vmesa->regHTXnTBLRCbias_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCc_0 = (a << 16) | (a << 8) | a;
--                            vmesa->regHTXnTBLRCbias_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Dif; 
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Dif;
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Adif;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Adif;
--                        }
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceRGB[2]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                        }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCa_0 = (a << 16) | (a << 8) | a;
--                        }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Adif;
--                        }
--                        break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftRGB)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                    break;
--                }
--              switch (texUnit0->Combine.ModeA) {
--                case GL_REPLACE:
--                    switch (texUnit0->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        switch (texUnit0->Combine.OperandA[0]) {
--                      case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Inv | HC_HTXnTBLAbias_Atex;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        switch (texUnit0->Combine.OperandA[0]) {
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            vmesa->regHTXnTBLRFog_0 = a;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Inv | HC_HTXnTBLAbias_HTXnTBLRAbias;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            vmesa->regHTXnTBLRFog_0 = a;
--                            break;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        switch (texUnit0->Combine.OperandA[0]) {
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                          HC_HTXnTBLAbias_Adif;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Inv | HC_HTXnTBLAbias_Adif;
--                          vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                      }
--                  break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftA)) {
--                    case 1:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--                case GL_MODULATE:
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                     HC_HTXnTBLAbias_HTXnTBLRAbias;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                  vmesa->regHTXnTBLRAa_0= 0x0;
--                    switch (texUnit0->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_TOPA; 
--                      break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_TOPA; 
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Atex; 
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= a<<16;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Adif; 
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= a<<8;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftA)) {
--                  case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--                case GL_ADD:
--                case GL_SUBTRACT :
--                    if(texUnit0->Combine.ModeA==GL_ADD) {
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add | HC_HTXnTBLAbias_HTXnTBLRAbias;
--                  }
--                  else {
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub | HC_HTXnTBLAbias_HTXnTBLRAbias;
--                    }
--                    vmesa->regHTXnTBLRFog_0 = 0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA;
--                    vmesa->regHTXnTBLRAa_0 = 0x0 |  ( 255<<16 );
--                    switch (texUnit0->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_TOPA; 
--                      break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                  switch (texUnit0->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_TOPA;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_InvTOPA;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 8);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= a;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Adif;
--                        break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftA)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--                case GL_ADD_SIGNED :
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA|
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLRAa_0 = ( 255<<16 | 0<<8 |128 );
--                    switch (texUnit0->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_TOPA; 
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Inv;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 8);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[1]) {
--                  case GL_TEXTURE:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Atex; 
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_HTXnTBLRAbias; 
--                        vmesa->regHTXnTBLRFog_0 |= a;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Adif;
--                        break;
--                    }
--                    switch ((GLint)(texUnit0->Combine.ScaleShiftA)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--              case GL_INTERPOLATE :
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 =  0x0;
--                    switch (texUnit0->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAb_TOPA; 
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAc_TOPA;
--                        break;
--                  case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAc_InvTOPA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Inv;
--                        break;
--                    }
--                    switch (texUnit0->Combine.OperandA[2]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAa_TOPA;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAa_InvTOPA;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 8);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch (texUnit0->Combine.SourceA[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Atex;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_HTXnTBLRA;
--                      vmesa->regHTXnTBLRAa_0 |= a;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_HTXnTBLRAbias;
--                        vmesa->regHTXnTBLRFog_0 |= a;
--                        break;
--                  case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Adif;
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Adif;
--                        break;
--                  }
--                    switch (texUnit0->Combine.SourceA[2]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 16);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                  case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Adif;
--                        break;
--                  }
--                    switch (texUnit0->Combine.ScaleShiftA) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                  break;
--              case GL_DOT3_RGB :
--              case GL_DOT3_RGBA :
--                  break;
--              }
--              break;
--      /*=* John Sheng [2003.7.18] texture add *=*/
--        case GL_ADD:
--            switch(texImage->Format) {
--            case GL_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Adif | HC_HTXnTBLAb_TOPA |
--                    HC_HTXnTBLAb_Atex | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--            case GL_LUMINANCE:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--            case GL_LUMINANCE_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--            case GL_INTENSITY:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Atex |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Adif;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--              /*=* John Sheng [2003.7.18] texenv *=*/
--              /*vmesa->regHTXnTBLRAa_0 = 0x0;*/
--                vmesa->regHTXnTBLRAa_0 = (255<<16) | (255<<8) | 255;;
--                vmesa->regHTXnTBLRFog_0 = 0x0 | 255<<16;
--                break;
--            case GL_RGB:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--            case GL_RGBA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--            case GL_COLOR_INDEX:
--                switch(texObj->Palette.Format) {
--                case GL_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Adif | HC_HTXnTBLAb_TOPA |
--                    HC_HTXnTBLAb_Atex | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--                case GL_LUMINANCE:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--                case GL_LUMINANCE_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--                case GL_INTENSITY:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Atex |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Adif;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0 | 255<<16;
--                break;
--                case GL_RGB:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--                case GL_RGBA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--                }
--                break;
--            }
--            break;
--      /*=* John Sheng [2003.7.18] texture dot3 *=*/
--          case GL_DOT3_RGB :
--          case GL_DOT3_RGBA :
--              vmesa->regHTXnTBLCop_0 = HC_HTXnTBLDOT4 | HC_HTXnTBLCop_Add | 
--                                       HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 | 
--                                         HC_HTXnTBLCshift_2 | HC_HTXnTBLAop_Add |
--                                         HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                                       HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | 
--                                       HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                                       HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                                       HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                switch (texUnit0->Combine.OperandRGB[0]) {
--                case GL_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                  break;
--                case GL_ONE_MINUS_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                    break;
--                }
--                switch (texUnit0->Combine.OperandRGB[1]) {
--                case GL_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                    break;
--                case GL_ONE_MINUS_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                    break;
--                }
--                switch (texUnit0->Combine.SourceRGB[0]) {
--                case GL_TEXTURE:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                    break;
--                case GL_CONSTANT :
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                  CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                  CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                    vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                    break;
--              case GL_PRIMARY_COLOR :
--                case GL_PREVIOUS :
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                    break;
--                }
--                switch (texUnit0->Combine.SourceRGB[1]) {
--                case GL_TEXTURE:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                    break;
--                case GL_CONSTANT :
--                  CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit0->EnvColor[2], b);
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    break;
--                case GL_PRIMARY_COLOR :
--                case GL_PREVIOUS :
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                    break;
--                }
--              break;
--            default:
--              break;
--            }
-+
-+          viaTexCombineState( vmesa, texUnit0->_CurrentCombine, 0 );
-         }
-       else {
-       /* Should turn Cs off if actually no Cs */
-@@ -3084,7 +653,6 @@
-         if (texUnit1->_ReallyEnabled) {
-             struct gl_texture_object *texObj = texUnit1->_Current;
-             struct gl_texture_image *texImage = texObj->Image[0][0];
--            GLint r, g, b, a;
-             if (texImage->Border) {
-                 FALLBACK(vmesa, VIA_FALLBACK_TEXTURE, GL_TRUE);
-@@ -3135,2539 +703,28 @@
-                   break;
-           }
-           
--            if (texObj->WrapS == GL_REPEAT)
--                vmesa->regHTXnMPMD_1 = HC_HTXnMPMD_Srepeat;
--            else
--                vmesa->regHTXnMPMD_1 = HC_HTXnMPMD_Sclamp;
--
--            if (GL_TRUE) {
--                if (texObj->WrapT == GL_REPEAT)
--                    vmesa->regHTXnMPMD_1 |= HC_HTXnMPMD_Trepeat;
--                else
--                    vmesa->regHTXnMPMD_1 |= HC_HTXnMPMD_Tclamp;
--            }
--
--            switch (texUnit1->EnvMode) {
--            case GL_MODULATE:
--              switch (texImage->Format) {
--                case GL_ALPHA:
--                    /* C = Cf, A = At*Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex | HC_HTXnTBLAb_TOPA |
--                        HC_HTXnTBLAb_Acur | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    vmesa->regHTXnTBLRFog_1 = 0x0;
--                    break;
--                case GL_LUMINANCE:
--                    /* C = Lt*Cf, A = Af
--                     * RGB part.
--                     * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_LUMINANCE_ALPHA:
--                    /* C = Lt*Cf, A = At*Af
--                     * RGB part.
--                     * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    vmesa->regHTXnTBLRFog_1 = 0x0;
--                    break;
--                case GL_INTENSITY:
--                    /* C = It*Cf, A = It*Af
--                     * RGB part.
--                     * Ca = It, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = It, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    vmesa->regHTXnTBLRFog_1 = 0x0;
--                    break;
--                case GL_RGB:
--                    /* C = Ct*Cf, A = Af
--                     * RGB part.
--                     * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_RGBA:
--                    /* C = Ct*Cf, A = At*Af
--                     * RGB part.
--                     * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                        HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                      HC_HTXnTBLAbias_HTXnTBLRAbias
--                      | HC_HTXnTBLAshift_No;
--                    
--                  vmesa->regHTXnTBLRAa_1 = 0x0;
--                    vmesa->regHTXnTBLRFog_1 = 0x0;
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                        /* C = Cf, A = At*Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex | HC_HTXnTBLAb_TOPA |
--                            HC_HTXnTBLAb_Acur | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        vmesa->regHTXnTBLRFog_1 = 0x0;
--                        break;
--                    case GL_LUMINANCE:
--                        /* C = Lt*Cf, A = Af
--                         * RGB part.
--                         * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_LUMINANCE_ALPHA:
--                        /* C = Lt*Cf, A = At*Af
--                         * RGB part.
--                         * Ca = Lt, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        vmesa->regHTXnTBLRFog_1 = 0x0;
--                        break;
--                    case GL_INTENSITY:
--                        /* C = It*Cf, A = It*Af
--                         * RGB part.
--                         * Ca = It, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = It, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        vmesa->regHTXnTBLRFog_1 = 0x0;
--                        break;
--                    case GL_RGB:
--                        /* C = Ct*Cf, A = Af
--                         * RGB part.
--                         * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        /* C = Ct*Cf, A = At*Af
--                         * RGB part.
--                         * Ca = Ct, Cb = Cf, Cop = +, Cc = 0, Cbias = 0, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex | HC_HTXnTBLCb_TOPC |
--                            HC_HTXnTBLCb_Cur | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        vmesa->regHTXnTBLRFog_1 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--            case GL_DECAL:
--                switch (texImage->Format) {
--                case GL_ALPHA:
--                case GL_LUMINANCE:
--                case GL_LUMINANCE_ALPHA:
--                case GL_INTENSITY:
--                    /* Undefined.
--                     */
--                    break;
--                case GL_RGB:
--                    /* C = Ct, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_RGBA:
--                    /* C = (1-At)*Cf+At*Ct, A = Af --> At*(Ct-Cf)+Cf
--                     * RGB part.
--                     * Ca = At, Cb = Ct, Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Atex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_Tex |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                    case GL_LUMINANCE:
--                    case GL_LUMINANCE_ALPHA:
--                    case GL_INTENSITY:
--                        /* Undefined.
--                         */
--                        break;
--                    case GL_RGB:
--                        /* C = Ct, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        /* C = (1-At)*Cf+At*Ct, A = Af --> At*(Ct-Cf)+Cf
--                         * RGB part.
--                         * Ca = At, Cb = Ct, Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Atex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_Tex |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--            case GL_BLEND:
--                switch (texImage->Format) {
--                case GL_ALPHA:
--                    /* C = Cf, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_LUMINANCE:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    /* C = (1-Lt)*Cf+Lt*Cc, A = Af --> Lt*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_LUMINANCE_ALPHA:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    /* C = (1-Lt)*Cf+Lt*Cc, A = At*Af --> Lt*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    vmesa->regHTXnTBLRFog_1 = 0x0;
--                    break;
--                case GL_INTENSITY:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                    /* C = (1-It)*Cf+It*Cc, A = (1-It)*Af+It*Ac
--                     * --> It*(Cc-Cf)+Cf, It*(Ac-Af)+Af
--                     * RGB part.
--                     * Ca = It, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = It, Ab = Ac(Reg), Cop = -, Ac = Af, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Acur;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Sub |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = (a << 8);
--                    break;
--                case GL_RGB:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                    /* C = (1-Ct)*Cf+Ct*Cc, A = Af --> Ct*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_RGBA:
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                    /* C = (1-Ct)*Cf+Ct*Cc, A = At*Af --> Ct*(Cc-Cf)+Cf
--                     * RGB part.
--                     * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                    /* Alpha part.
--                     * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    vmesa->regHTXnTBLRFog_1 = 0x0;
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                        /* C = Cf, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_LUMINANCE:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        /* C = (1-Lt)*Cf+Lt*Cc, A = Af --> Lt*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_LUMINANCE_ALPHA:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        /* C = (1-Lt)*Cf+Lt*Cc, A = At*Af --> Lt*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Lt, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        vmesa->regHTXnTBLRFog_1 = 0x0;
--                        break;
--                    case GL_INTENSITY:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        /* C = (1-It)*Cf+It*Cc, A = (1-It)*Af+It*Ac
--                         * --> It*(Cc-Cf)+Cf, It*(Ac-Af)+Af
--                         * RGB part.
--                         * Ca = It, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = It, Ab = Ac(Reg), Cop = -, Ac = Af, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Acur;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Sub |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = (a << 8);
--                        break;
--                    case GL_RGB:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        /* C = (1-Ct)*Cf+Ct*Cc, A = Af --> Ct*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        /* C = (1-Ct)*Cf+Ct*Cc, A = At*Af --> Ct*(Cc-Cf)+Cf
--                         * RGB part.
--                         * Ca = Ct, Cb = Cc(Reg), Cop = -, Cc = Cf, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_Tex |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_HTXnTBLRC |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Cur;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Sub |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        vmesa->regHTXnTBLRCb_1 = (r << 16) | (g << 8) | b;
--                        /* Alpha part.
--                         * Aa = At, Ab = Af, Cop = +, Ac = 0, Abias = 0, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Acur |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        vmesa->regHTXnTBLRFog_1 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--            case GL_REPLACE:
--                switch (texImage->Format) {
--                case GL_ALPHA:
--                    /* C = Cf, A = At
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_LUMINANCE:
--                    /* C = Lt, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_LUMINANCE_ALPHA:
--                    /* C = Lt, A = At
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_INTENSITY:
--                    /* C = It, A = It
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = It, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = It, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_RGB:
--                    /* C = Ct, A = Af
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_RGBA:
--                    /* C = Ct, A = At
--                     * RGB part.
--                     * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                     */
--                    vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                        HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                        HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                        HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                        HC_HTXnTBLCshift_No;
--                    vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                    /* Alpha part.
--                     * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                     */
--                    vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                        HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                        HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLRAa_1 = 0x0;
--                    break;
--                case GL_COLOR_INDEX:
--                    switch (texObj->Palette.Format) {
--                    case GL_ALPHA:
--                        /* C = Cf, A = At
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Cf, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Cur |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_LUMINANCE:
--                        /* C = Lt, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_LUMINANCE_ALPHA:
--                        /* C = Lt, A = At
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Lt, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_INTENSITY:
--                        /* C = It, A = It
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = It, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = It, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_RGB:
--                        /* C = Ct, A = Af
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = Af, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Acur | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    case GL_RGBA:
--                        /* C = Ct, A = At
--                         * RGB part.
--                         * Ca = 0, Cb = 0, Cop = +, Cc = 0, Cbias = Ct, Cshift = No.
--                         */
--                        vmesa->regHTXnTBLCsat_1 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                        vmesa->regHTXnTBLCop_1 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex |
--                            HC_HTXnTBLCshift_No;
--                        vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
--                        /* Alpha part.
--                         * Aa = 0, Ab = 0, Cop = +, Ac = 0, Abias = At, Ashift = No.
--                         */
--                        vmesa->regHTXnTBLAsat_1 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLCop_1 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex | HC_HTXnTBLAshift_No;
--                        vmesa->regHTXnTBLRAa_1 = 0x0;
--                        break;
--                    }
--                    break;
--                }
--                break;
--          /*=* John Sheng [2003.7.18] texture combine *=*/
--          case GL_COMBINE:
--              switch (texUnit1->Combine.ModeRGB) {
--              case GL_REPLACE:
--                  switch (texUnit1->Combine.SourceRGB[0]) {
--                  case GL_TEXTURE:
--                      switch (texUnit1->Combine.OperandRGB[0]) {
--                      case GL_SRC_COLOR:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Tex;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      case GL_ONE_MINUS_SRC_COLOR:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Tex;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      case GL_SRC_ALPHA:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Atex; 
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      case GL_ONE_MINUS_SRC_ALPHA:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Atex;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          break;
--                      }
--                      break;
--                  case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                      switch (texUnit1->Combine.OperandRGB[0]) {
--                      case GL_SRC_COLOR:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_HTXnTBLRC; 
--                        
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                          break;
--                      case GL_ONE_MINUS_SRC_COLOR:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                          HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_HTXnTBLRC;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                          break;
--                      case GL_SRC_ALPHA:  
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                          HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                          vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                          HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_HTXnTBLRC;
--                          vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                          break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                          vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                          HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_HTXnTBLRC;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                          vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                            break;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                      switch (texUnit1->Combine.OperandRGB[0]) {
--                        case GL_SRC_COLOR:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_COLOR:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        }
--                        break;
--                    case GL_PREVIOUS :
--                        switch (texUnit1->Combine.OperandRGB[0]) {
--                        case GL_SRC_COLOR:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_COLOR:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Dif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                            HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 |
--                            HC_HTXnTBLCb_TOPC | HC_HTXnTBLCb_0 |
--                            HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                            vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                            HC_HTXnTBLCbias_InvCbias | HC_HTXnTBLCbias_Adif;
--                            vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                            break;
--                        }
--                        break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftRGB)) {
--                    case 1:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                      break;
--                    case 2:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                    break;
--
--                case GL_MODULATE:
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    switch (texUnit1->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                        }
--                        else {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCa_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                      }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Adif;
--                        }
--                        break;
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Adif;
--                      }
--                      break;
--                    }
--                  switch (texUnit1->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                      if (AlphaCombine[1]==0) {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                      }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                      else {
--                          vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                      }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                      }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                        }
--                      break;
--                    case GL_PREVIOUS :
--                      if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                      }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                      }
--                      break;
--                  }
--                  switch ((GLint)(texUnit1->Combine.ScaleShiftRGB)) {
--                    case 1:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                      break;
--                  case 2:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                      break;
--                    case 4:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                      break;
--                  }
--                  break;
--              case GL_ADD:
--                case GL_SUBTRACT :
--                  if (texUnit1->Combine.ModeRGB==GL_ADD) {
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0;
--                    }
--                  else {
--                        vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub |
--                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0;
--                  }
--                  vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                  vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK | HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC;
--                    vmesa->regHTXnTBLRCa_0 = ( 255<<16 | 255<<8 |255 );
--                    switch (texUnit1->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                      AlphaCombine[0]=0;
--                        break;
--                  case GL_ONE_MINUS_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_TOPC; 
--                      AlphaCombine[1]=0;
--                      break;
--                  case GL_ONE_MINUS_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_InvTOPC;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_TOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_InvTOPC;
--                        AlphaCombine[1]=1;
--                        break;
--                  }
--                    switch (texUnit1->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                      }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                      }
--                      break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                          vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                      }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                      }
--                      break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Tex; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_HTXnTBLRC;
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLRCc_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCc_0 = (a << 16) | (a << 8) | a;
--                      }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Adif;
--                        }
--                      break;
--                  }
--                  switch ((GLint)(texUnit1->Combine.ScaleShiftRGB)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                    break;
--                case GL_ADD_SIGNED :
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub;
--                  vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                  vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                      HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC|
--                      HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_HTXnTBLRC;
--                  vmesa->regHTXnTBLRCa_0 = ( 255<<16 | 255<<8 |255 );
--                    vmesa->regHTXnTBLRCc_0 = ( 128<<16 | 128<<8 |128 );
--                    switch (texUnit1->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                      AlphaCombine[1]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                        }
--                        break;
--                    }
--                  switch (texUnit1->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Tex; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Atex; 
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_HTXnTBLRC; 
--                      if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLRCbias_0 = (r << 16) | (g << 8) | b;
--                        }
--                      else {
--                            vmesa->regHTXnTBLRCbias_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[1]==0) {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Dif; 
--                        }
--                      else {
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Adif;
--                        }
--                        break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftRGB)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                  break;
--                case GL_INTERPOLATE :
--                    vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Sub;
--                  vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                  switch (texUnit1->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_TOPC; 
--                      AlphaCombine[0]=0;
--                      break;
--                  case GL_ONE_MINUS_SRC_COLOR:
--                      vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_TOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCb_InvTOPC; 
--                        AlphaCombine[0]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_TOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_InvTOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                        AlphaCombine[1]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_TOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Cbias;
--                        AlphaCombine[1]=1;
--                      break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCc_InvTOPC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_InvCbias;
--                        AlphaCombine[1]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandRGB[2]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_TOPC; 
--                        AlphaCombine[2]=0;
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_InvTOPC;
--                        AlphaCombine[2]=0;
--                        break;
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_TOPC;
--                        AlphaCombine[2]=1;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCa_InvTOPC;
--                        AlphaCombine[2]=1;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                      if (AlphaCombine[0]==0) {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                        }
--                        else {
--                          vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Atex;
--                        }
--                      break;
--                  case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCb_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Adif;
--                        }
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Tex; 
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Tex;
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Atex;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_HTXnTBLRC;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCc_0 = (r << 16) | (g << 8) | b;
--                            vmesa->regHTXnTBLRCbias_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCc_0 = (a << 16) | (a << 8) | a;
--                            vmesa->regHTXnTBLRCbias_0 = (a << 16) | (a << 8) | a;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Dif; 
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Dif;
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCc_Adif;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCbias_Adif;
--                        }
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[2]) {
--                    case GL_TEXTURE:
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                        }
--                      else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Atex;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                        }
--                        else {
--                            vmesa->regHTXnTBLRCa_0 = (a << 16) | (a << 8) | a;
--                        }
--                      break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        if (AlphaCombine[0]==0) {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                        }
--                        else {
--                            vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Adif;
--                        }
--                        break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftRGB)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLCshift_2;
--                        break;
--                    }
--                    break;
--
--              case GL_DOT3_RGB :
--              case GL_DOT3_RGBA :
--                  vmesa->regHTXnTBLCop_0 = HC_HTXnTBLDOT4 | HC_HTXnTBLCop_Add | 
--                                        HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 | 
--                                          HC_HTXnTBLCshift_2 | HC_HTXnTBLAop_Add |
--                                          HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                    vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                    vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                                           HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | 
--                                           HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                                           HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                                           HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    switch (texUnit1->Combine.OperandRGB[0]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                      break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandRGB[1]) {
--                    case GL_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                        break;
--                    case GL_ONE_MINUS_SRC_COLOR:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                        vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                        break;
--                  case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceRGB[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                        vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                        break;
--                    }
--                  break;
--                  
--                }
--              switch (texUnit1->Combine.ModeA) {
--                case GL_REPLACE:
--                    switch (texUnit1->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        switch (texUnit1->Combine.OperandA[0]) {
--                      case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Atex;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Inv | HC_HTXnTBLAbias_Atex;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                        }
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        switch (texUnit1->Combine.OperandA[0]) {
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_HTXnTBLRAbias;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            vmesa->regHTXnTBLRFog_0 = a;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Inv | HC_HTXnTBLAbias_HTXnTBLRAbias;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            vmesa->regHTXnTBLRFog_0 = a;
--                            break;
--                        }
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        switch (texUnit1->Combine.OperandA[0]) {
--                        case GL_SRC_ALPHA:  
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                          HC_HTXnTBLAbias_Adif;
--                            vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                        case GL_ONE_MINUS_SRC_ALPHA:
--                            vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                            HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                            HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                            HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                            vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                            HC_HTXnTBLAbias_Inv | HC_HTXnTBLAbias_Adif;
--                          vmesa->regHTXnTBLRAa_0 = 0x0;
--                            break;
--                      }
--                  break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftA)) {
--                    case 1:
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--                case GL_MODULATE:
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                     HC_HTXnTBLAbias_HTXnTBLRAbias;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                  vmesa->regHTXnTBLRAa_0= 0x0;
--                    switch (texUnit1->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_TOPA; 
--                      break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_TOPA; 
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Atex; 
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= a<<16;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Adif; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                      CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= a<<8;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftA)) {
--                  case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--                case GL_ADD:
--                case GL_SUBTRACT :
--                    if(texUnit1->Combine.ModeA==GL_ADD) {
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add | HC_HTXnTBLAbias_HTXnTBLRAbias;
--                  }
--                  else {
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub | HC_HTXnTBLAbias_HTXnTBLRAbias;
--                    }
--                    vmesa->regHTXnTBLRFog_0 = 0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA;
--                    vmesa->regHTXnTBLRAa_0 = 0x0 |  ( 255<<16 );
--                    switch (texUnit1->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_TOPA; 
--                      break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                  switch (texUnit1->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                      vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_TOPA;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_InvTOPA;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 8);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= a;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Adif;
--                        break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftA)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--                case GL_ADD_SIGNED :
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub;
--                    vmesa->regHTXnTBLRFog_0 = 0x0;
--                    vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                        HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA|
--                        HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                    vmesa->regHTXnTBLRAa_0 = ( 255<<16 | 0<<8 |128 );
--                    switch (texUnit1->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_TOPA; 
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Inv;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 8);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[1]) {
--                  case GL_TEXTURE:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Atex; 
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_HTXnTBLRAbias; 
--                        vmesa->regHTXnTBLRFog_0 |= a;
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Adif;
--                        break;
--                    }
--                    switch ((GLint)(texUnit1->Combine.ScaleShiftA)) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                    break;
--              case GL_INTERPOLATE :
--                    vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Sub;
--                    vmesa->regHTXnTBLRAa_0 = 0x0;
--                    vmesa->regHTXnTBLRFog_0 =  0x0;
--                    switch (texUnit1->Combine.OperandA[0]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAb_TOPA; 
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAb_InvTOPA; 
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandA[1]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAc_TOPA;
--                        break;
--                  case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAc_InvTOPA;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Inv;
--                        break;
--                    }
--                    switch (texUnit1->Combine.OperandA[2]) {
--                    case GL_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAa_TOPA;
--                        break;
--                    case GL_ONE_MINUS_SRC_ALPHA:
--                        vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAa_InvTOPA;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[0]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 8);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAb_Adif;
--                        break;
--                    }
--                    switch (texUnit1->Combine.SourceA[1]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Atex;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_HTXnTBLRA;
--                      vmesa->regHTXnTBLRAa_0 |= a;
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_HTXnTBLRAbias;
--                        vmesa->regHTXnTBLRFog_0 |= a;
--                        break;
--                  case GL_PRIMARY_COLOR :
--                    case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAc_Adif;
--                      vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAbias_Adif;
--                        break;
--                  }
--                    switch (texUnit1->Combine.SourceA[2]) {
--                    case GL_TEXTURE:
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Atex;
--                        break;
--                    case GL_CONSTANT :
--                        CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[3], a);
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_HTXnTBLRA;
--                        vmesa->regHTXnTBLRAa_0 |= (a << 16);
--                        break;
--                    case GL_PRIMARY_COLOR :
--                  case GL_PREVIOUS :
--                        vmesa->regHTXnTBLAsat_0 |= HC_HTXnTBLAa_Adif;
--                        break;
--                  }
--                    switch (texUnit1->Combine.ScaleShiftA) {
--                    case 1:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_No;
--                        break;
--                    case 2:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_1;
--                        break;
--                    case 4:
--                        vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAshift_2;
--                        break;
--                    }
--                  break;
--              case GL_DOT3_RGB :
--              case GL_DOT3_RGBA :
--                  break;
--              }
--              break;
-+          vmesa->regHTXnMPMD_1 &= ~(HC_HTXnMPMD_SMASK | HC_HTXnMPMD_TMASK);
-+          vmesa->regHTXnMPMD_1 |= get_wrap_mode( texObj->WrapS,
-+                                                 texObj->WrapT );
--      /*=* John Sheng [2003.7.18] texture add *=*/
--        case GL_ADD:
--            switch(texImage->Format) {
--            case GL_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Adif | HC_HTXnTBLAb_TOPA |
--                    HC_HTXnTBLAb_Atex | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--            case GL_LUMINANCE:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--            case GL_LUMINANCE_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--            case GL_INTENSITY:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Atex |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Adif;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--              /*=* John Sheng [2003.7.18] texenv *=*/
--              /*vmesa->regHTXnTBLRAa_0 = 0x0;*/
--                vmesa->regHTXnTBLRAa_0 = (255<<16) | (255<<8) | 255;;
--                vmesa->regHTXnTBLRFog_0 = 0x0 | 255<<16;
--                break;
--            case GL_RGB:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--            case GL_RGBA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--            case GL_COLOR_INDEX:
--                switch(texObj->Palette.Format) {
--                case GL_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_0 | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_0 | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_Dif |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Adif | HC_HTXnTBLAb_TOPA |
--                    HC_HTXnTBLAb_Atex | HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--                case GL_LUMINANCE:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--                case GL_LUMINANCE_ALPHA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--                case GL_INTENSITY:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Atex |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_Adif;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0 | 255<<16;
--                break;
--                case GL_RGB:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_Adif | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                break;
--                case GL_RGBA:
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                    HC_HTXnTBLCa_TOPC | HC_HTXnTBLCa_HTXnTBLRC | HC_HTXnTBLCb_TOPC |
--                    HC_HTXnTBLCb_Tex | HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_Dif;
--                vmesa->regHTXnTBLCop_0 = HC_HTXnTBLCop_Add |
--                    HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 |
--                    HC_HTXnTBLCshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLRCa_0 = (255<<16) | (255<<8) | 255;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK |
--                    HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_Atex |
--                    HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_Adif |
--                    HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLCop_0 |= HC_HTXnTBLAop_Add |
--                    HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                break;
--                }
--                break;
--            }
--            break;
--          /*=* John Sheng [2003.7.18] texture dot3 *=*/
--          case GL_DOT3_RGB :
--          case GL_DOT3_RGBA :
--              vmesa->regHTXnTBLCop_0 = HC_HTXnTBLDOT4 | HC_HTXnTBLCop_Add | 
--                                       HC_HTXnTBLCbias_Cbias | HC_HTXnTBLCbias_0 | 
--                                         HC_HTXnTBLCshift_2 | HC_HTXnTBLAop_Add |
--                                         HC_HTXnTBLAbias_HTXnTBLRAbias | HC_HTXnTBLAshift_No;
--                vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
--                vmesa->regHTXnTBLCsat_0 = HC_HTXnTBLCsat_MASK |
--                                       HC_HTXnTBLCc_TOPC | HC_HTXnTBLCc_0;
--                vmesa->regHTXnTBLRFog_0 = 0x0;
--                vmesa->regHTXnTBLAsat_0 = HC_HTXnTBLAsat_MASK | 
--                                       HC_HTXnTBLAa_TOPA | HC_HTXnTBLAa_HTXnTBLRA |
--                                       HC_HTXnTBLAb_TOPA | HC_HTXnTBLAb_HTXnTBLRA |
--                                       HC_HTXnTBLAc_TOPA | HC_HTXnTBLAc_HTXnTBLRA;
--                vmesa->regHTXnTBLRAa_0 = 0x0;
--                switch (texUnit1->Combine.OperandRGB[0]) {
--                case GL_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_TOPC; 
--                  break;
--                case GL_ONE_MINUS_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_InvTOPC; 
--                    break;
--                }
--                switch (texUnit1->Combine.OperandRGB[1]) {
--                case GL_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_TOPC; 
--                    break;
--                case GL_ONE_MINUS_SRC_COLOR:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_InvTOPC; 
--                    break;
--                }
--                switch (texUnit1->Combine.SourceRGB[0]) {
--                case GL_TEXTURE:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Tex; 
--                    break;
--                case GL_CONSTANT :
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                  CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                  CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_HTXnTBLRC;
--                    vmesa->regHTXnTBLRCa_0 = (r << 16) | (g << 8) | b;
--                    break;
--              case GL_PRIMARY_COLOR :
--                case GL_PREVIOUS :
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCa_Dif; 
--                    break;
--                }
--                switch (texUnit1->Combine.SourceRGB[1]) {
--                case GL_TEXTURE:
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Tex; 
--                    break;
--                case GL_CONSTANT :
--                  CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[0], r);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[1], g);
--                    CLAMPED_FLOAT_TO_UBYTE(texUnit1->EnvColor[2], b);
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_HTXnTBLRC;
--                    vmesa->regHTXnTBLRCb_0 = (r << 16) | (g << 8) | b;
--                    break;
--                case GL_PRIMARY_COLOR :
--                case GL_PREVIOUS :
--                    vmesa->regHTXnTBLCsat_0 |= HC_HTXnTBLCb_Dif; 
--                    break;
--                }
--              break;
--            default:
--                break;
--            }
-+          viaTexCombineState( vmesa, texUnit1->_CurrentCombine, 1 );
-         }
-         vmesa->dirty |= VIA_UPLOAD_TEXTURE;
-+      
-+#ifdef DEBUG
-+      if (VIA_DEBUG) {
-+          fprintf( stderr, "Csat_0 / Cop_0 = 0x%08x / 0x%08x\n",
-+                   vmesa->regHTXnTBLCsat_0, vmesa->regHTXnTBLCop_0 );
-+          fprintf( stderr, "Asat_0        = 0x%08x\n",
-+                   vmesa->regHTXnTBLAsat_0 );
-+          fprintf( stderr, "RCb_0 / RAa_0 = 0x%08x / 0x%08x\n",
-+                   vmesa->regHTXnTBLRCb_0, vmesa->regHTXnTBLRAa_0 );
-+          fprintf( stderr, "RCa_0 / RCc_0 = 0x%08x / 0x%08x\n",
-+                   vmesa->regHTXnTBLRCa_0, vmesa->regHTXnTBLRCc_0 );
-+          fprintf( stderr, "RCbias_0      = 0x%08x\n",
-+                   vmesa->regHTXnTBLRCbias_0 );
-+      }
-+#endif
-     }
-     else {
-       if (ctx->Fog.Enabled)
-Index: extras/Mesa/src/mesa/drivers/dri/unichrome/via_texcombine.c
-===================================================================
-RCS file: extras/Mesa/src/mesa/drivers/dri/unichrome/via_texcombine.c
-diff -N extras/Mesa/src/mesa/drivers/dri/unichrome/via_texcombine.c
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/drivers/dri/unichrome/via_texcombine.c        15 Dec 2004 01:51:00 -0000      1.1.1.1.2.1
-@@ -0,0 +1,386 @@
-+/*
-+ * (C) Copyright IBM Corporation 2004
-+ * All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * on the rights to use, copy, modify, merge, publish, distribute, sub
-+ * license, and/or sell copies of the Software, and to permit persons to whom
-+ * the Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-+ * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+/**
-+ * \file via_texcombine.c
-+ * Calculate texture combine hardware state.
-+ *
-+ * \author Ian Romanick <idr@us.ibm.com>
-+ */
-+
-+#include <stdio.h>
-+
-+#include "glheader.h"
-+#include "context.h"
-+#include "macros.h"
-+#include "colormac.h"
-+#include "enums.h"
-+#include "dd.h"
-+
-+#include "mm.h"
-+#include "via_context.h"
-+#include "via_state.h"
-+#include "via_tex.h"
-+#include "via_vb.h"
-+#include "via_tris.h"
-+#include "via_ioctl.h"
-+
-+#include "swrast/swrast.h"
-+#include "array_cache/acache.h"
-+#include "tnl/tnl.h"
-+#include "swrast_setup/swrast_setup.h"
-+
-+#include "tnl/t_pipeline.h"
-+
-+#define VIA_USE_ALPHA (HC_XTC_Adif - HC_XTC_Dif)
-+
-+#define INPUT_A_SHIFT     14
-+#define INPUT_B_SHIFT     7
-+#define INPUT_C_SHIFT     0
-+#define INPUT_BiasC_SHIFT 14
-+#define INPUT_BiasA_SHIFT 3
-+
-+#define CONST_ONE         (HC_XTC_0 | HC_XTC_InvTOPC)
-+
-+static const unsigned color_operand_modifier[4] = {
-+   0,
-+   HC_XTC_InvTOPC,
-+   VIA_USE_ALPHA,
-+   VIA_USE_ALPHA | HC_XTC_InvTOPC,
-+};
-+
-+static const unsigned alpha_operand_modifier[2] = {
-+   0, HC_XTA_InvTOPA
-+};
-+
-+static const unsigned c_shift_table[3] = {
-+   HC_HTXnTBLCshift_No, HC_HTXnTBLCshift_1, HC_HTXnTBLCshift_2
-+};
-+
-+static const unsigned  a_shift_table[3] = {
-+   HC_HTXnTBLAshift_No, HC_HTXnTBLAshift_1, HC_HTXnTBLAshift_2
-+};
-+
-+
-+/**
-+ * Calculate the hardware state for the specified texture combine mode
-+ *
-+ * \bug
-+ * For the alpha combine, \c GL_CONSTANT is still probably wrong.
-+ *
-+ * \bug
-+ * All forms of DOT3 bumpmapping are completely untested, and are most
-+ * likely wrong.
-+ *
-+ * \bug
-+ * This code still fails progs/demos/texenv for all modes with \c GL_ALPHA
-+ * textures.  This was also the case with the code that Via supplied.  It
-+ * also fails for \c GL_REPLACE with \c GL_RGBA textures.  Everything else
-+ * that texenv tests looks good.
-+ */
-+void
-+viaTexCombineState( viaContextPtr vmesa,
-+                  const struct gl_tex_env_combine_state * combine,
-+                  unsigned unit )
-+{
-+   unsigned color_arg[3];
-+   unsigned alpha_arg[3];
-+   unsigned color = 0;
-+   unsigned alpha = 0;
-+   unsigned bias = 0;
-+   unsigned op = 0;
-+   unsigned a_shift = combine->ScaleShiftA;
-+   unsigned c_shift = combine->ScaleShiftRGB;
-+   unsigned i;
-+   unsigned constant_color[3];
-+   unsigned ordered_constant_color[4];
-+   unsigned constant_alpha = 0;
-+   unsigned bias_alpha = 0;
-+   const struct gl_texture_unit const * texUnit = & vmesa->glCtx->Texture.Unit[unit];
-+   unsigned env_color[4];
-+
-+
-+   CLAMPED_FLOAT_TO_UBYTE(env_color[0], texUnit->EnvColor[0]);
-+   CLAMPED_FLOAT_TO_UBYTE(env_color[1], texUnit->EnvColor[1]);
-+   CLAMPED_FLOAT_TO_UBYTE(env_color[2], texUnit->EnvColor[2]);
-+   CLAMPED_FLOAT_TO_UBYTE(env_color[3], texUnit->EnvColor[3]);
-+
-+   (void) memset( constant_color, 0, sizeof( constant_color ) );
-+   (void) memset( ordered_constant_color, 0, sizeof( ordered_constant_color ) );
-+
-+   for ( i = 0 ; i < combine->_NumArgsRGB ; i++ ) {
-+      const GLint op = combine->OperandRGB[i] - GL_SRC_COLOR;
-+
-+      switch ( combine->SourceRGB[i] ) {
-+      case GL_TEXTURE:
-+       color_arg[i] = HC_XTC_Tex;
-+       color_arg[i] += color_operand_modifier[op];
-+       break;
-+      case GL_CONSTANT:
-+       color_arg[i] = HC_XTC_HTXnTBLRC;
-+
-+       switch( op ) {
-+       case 0:
-+          constant_color[i] = ((env_color[0] << 16) 
-+                               | (env_color[1] << 8) 
-+                               | env_color[2]);
-+          break;
-+       case 1:
-+          constant_color[i] = ~((env_color[0] << 16) 
-+                                | (env_color[1] << 8) 
-+                                | env_color[2]) & 0x00ffffff;
-+          break;
-+       case 2:
-+          constant_color[i] = ((env_color[3] << 16)
-+                               | (env_color[3] << 8)
-+                               | env_color[3]);
-+          break;
-+       case 3:
-+          constant_color[i] = ~((env_color[3] << 16) 
-+                                | (env_color[3] << 8) 
-+                                | env_color[3]) & 0x00ffffff;
-+          break;
-+       }
-+       break;
-+      case GL_PRIMARY_COLOR:
-+       color_arg[i] = HC_XTC_Dif;
-+       color_arg[i] += color_operand_modifier[op];
-+       break;
-+      case GL_PREVIOUS:
-+       color_arg[i] = (unit == 0) ? HC_XTC_Dif : HC_XTC_Cur;
-+       color_arg[i] += color_operand_modifier[op];
-+       break;
-+      }
-+   }
-+      
-+   for ( i = 0 ; i < combine->_NumArgsA ; i++ ) {
-+      const GLint op = combine->OperandA[i] - GL_SRC_ALPHA;
-+
-+      switch ( combine->SourceA[i] ) {
-+      case GL_TEXTURE:
-+       alpha_arg[i] = HC_XTA_Atex;
-+       alpha_arg[i] += alpha_operand_modifier[op];
-+       break;
-+      case GL_CONSTANT:
-+       alpha_arg[i] = HC_XTA_HTXnTBLRA;
-+       constant_alpha = (op == 0) 
-+         ? env_color[3] : ~(env_color[3]) & 0x000000ff;
-+       break;
-+      case GL_PRIMARY_COLOR:
-+       alpha_arg[i] = HC_XTA_Adif;
-+       alpha_arg[i] += alpha_operand_modifier[op];
-+       break;
-+      case GL_PREVIOUS:
-+       alpha_arg[i] = (unit == 0) ? HC_XTA_Adif : HC_XTA_Acur;
-+       alpha_arg[i] += alpha_operand_modifier[op];
-+       break;
-+      }
-+   }
-+
-+   
-+   /* On the Unichrome, all combine operations take on some form of:
-+    *
-+    *     A * (B op Bias) + C
-+    * 
-+    * 'op' can be selected as add, subtract, min, max, or mask.  The min, max
-+    * and mask modes are currently unused.  With the exception of DOT3, all
-+    * standard GL_COMBINE modes can be implemented simply by selecting the
-+    * correct inputs for A, B, C, and Bias and the correct operation for op.
-+    */
-+
-+   color = HC_HTXnTBLCsat_MASK;
-+   alpha = HC_HTXnTBLAsat_MASK;
-+
-+   switch( combine->ModeRGB ) {
-+   /* A = 0, B = 0, C = arg0, Bias = 0
-+    */
-+   case GL_REPLACE:
-+      bias |= (color_arg[0] << INPUT_BiasC_SHIFT);
-+      ordered_constant_color[3] = constant_color[0];
-+      break;
-+      
-+   /* A = arg[0], B = arg[1], C = 0, Bias = 0
-+    */
-+   case GL_MODULATE:
-+      color |= (color_arg[0] << INPUT_A_SHIFT)
-+      | (color_arg[1] << INPUT_B_SHIFT);
-+
-+      ordered_constant_color[0] = constant_color[0];
-+      ordered_constant_color[1] = constant_color[1];
-+      break;
-+
-+   /* A = 1.0, B = arg[0], C = 0, Bias = arg[1]
-+    */
-+   case GL_ADD:
-+   case GL_SUBTRACT:
-+      if ( combine->ModeRGB == GL_SUBTRACT ) {
-+       op |= HC_HTXnTBLCop_Sub;
-+      }
-+
-+      color |= (color_arg[0] << INPUT_B_SHIFT)
-+      | (CONST_ONE << INPUT_A_SHIFT);
-+      
-+      bias |= (color_arg[1] << INPUT_BiasC_SHIFT);
-+      ordered_constant_color[1] = constant_color[0];
-+      ordered_constant_color[3] = constant_color[1];
-+      break;
-+
-+   /* A = 0, B = arg[0], C = arg[1], Bias = 0.5
-+    */
-+   case GL_ADD_SIGNED:
-+      color |= (color_arg[0] << INPUT_B_SHIFT)
-+      | (color_arg[1] << INPUT_C_SHIFT);
-+      bias |= HC_HTXnTBLCbias_HTXnTBLRC;
-+      op |= HC_HTXnTBLCop_Sub;
-+
-+      ordered_constant_color[1] = constant_color[0];
-+      ordered_constant_color[2] = constant_color[1];
-+      ordered_constant_color[3] = 0x00808080;
-+      break;
-+
-+   /* A = arg[2], B = arg[0], C = arg[1], Bias = arg[1]
-+    */
-+   case GL_INTERPOLATE:
-+      op |= HC_HTXnTBLCop_Sub;
-+
-+      color |= (color_arg[2] << INPUT_A_SHIFT) |
-+      (color_arg[0] << INPUT_B_SHIFT) |
-+      (color_arg[1] << INPUT_C_SHIFT);
-+      bias |= (color_arg[1] << INPUT_BiasC_SHIFT);
-+
-+      ordered_constant_color[0] = constant_color[2];
-+      ordered_constant_color[1] = constant_color[0];
-+      ordered_constant_color[2] = constant_color[1];
-+      ordered_constant_color[3] = constant_color[1];
-+      break;
-+
-+   /* At this point this code is completely untested.  It appears that the
-+    * Unichrome has the same limitation as the Radeon R100.  The only
-+    * supported post-scale when doing DOT3 bumpmapping is 1x.
-+    */
-+   case GL_DOT3_RGB_EXT:
-+   case GL_DOT3_RGBA_EXT:
-+   case GL_DOT3_RGB:
-+   case GL_DOT3_RGBA:
-+      c_shift = 2;
-+      a_shift = 2;
-+      color |= (color_arg[0] << INPUT_A_SHIFT) |
-+      (color_arg[1] << INPUT_B_SHIFT);
-+      op |= HC_HTXnTBLDOT4;
-+      break;
-+   }
-+
-+
-+   /* The alpha blend stage has the annoying quirk of not having a
-+    * hard-wired 0 input, like the color stage.  As a result, we have
-+    * to program the constant register with 0 and use that as our
-+    * 0 input.
-+    */
-+
-+   switch( combine->ModeA ) {
-+   /* A = 0, B = 0, C = 0, Bias = arg0
-+    */
-+   case GL_REPLACE:
-+      bias |= (alpha_arg[0] << INPUT_BiasA_SHIFT);
-+
-+      alpha |= (HC_XTA_HTXnTBLRA << INPUT_A_SHIFT) |
-+      (HC_XTA_HTXnTBLRA << INPUT_B_SHIFT) |
-+      (HC_XTA_HTXnTBLRA << INPUT_C_SHIFT);
-+      break;
-+      
-+   /* A = arg[0], B = arg[1], C = 0, Bias = 0
-+    */
-+   case GL_MODULATE:
-+      alpha |= (alpha_arg[1] << INPUT_A_SHIFT)
-+      | (alpha_arg[0] << INPUT_B_SHIFT)
-+        | (HC_XTA_HTXnTBLRA << INPUT_C_SHIFT);
-+
-+      bias |= (HC_XTA_HTXnTBLRA << INPUT_BiasA_SHIFT);
-+      break;
-+
-+   /* A = 0, B = arg[0], C = 0, Bias = arg[1]
-+    */
-+   case GL_ADD:
-+   case GL_SUBTRACT:
-+      if ( combine->ModeA == GL_SUBTRACT ) {
-+       op |= HC_HTXnTBLAop_Sub;
-+      }
-+
-+      alpha |= (HC_XTA_HTXnTBLRA << INPUT_A_SHIFT) |
-+      (alpha_arg[0] << INPUT_B_SHIFT) |
-+      (HC_XTA_HTXnTBLRA << INPUT_C_SHIFT);
-+      bias |= (alpha_arg[1] << INPUT_BiasA_SHIFT);
-+      break;
-+
-+   /* A = 0, B = arg[0], C = arg[1], Bias = 0.5
-+    */
-+   case GL_ADD_SIGNED:
-+      op |= HC_HTXnTBLAop_Sub;
-+
-+      alpha |= (alpha_arg[0] << INPUT_B_SHIFT)
-+      | (alpha_arg[1] << INPUT_C_SHIFT);
-+      bias |= (HC_XTA_HTXnTBLRA << INPUT_BiasA_SHIFT);
-+
-+      bias_alpha = 0x00000080;
-+      break;
-+
-+   /* A = arg[2], B = arg[0], C = arg[1], Bias = arg[1]
-+    */
-+   case GL_INTERPOLATE:
-+      op |= HC_HTXnTBLAop_Sub;
-+
-+      alpha |= (alpha_arg[2] << INPUT_A_SHIFT) |
-+      (alpha_arg[0] << INPUT_B_SHIFT) |
-+      (alpha_arg[1] << INPUT_C_SHIFT);
-+      bias |= (alpha_arg[1] << INPUT_BiasA_SHIFT);
-+      break;
-+   }
-+   
-+
-+   op |= c_shift_table[ c_shift ] | a_shift_table[ a_shift ];
-+
-+
-+   if ( unit == 0 ) {
-+      vmesa->regHTXnTBLMPfog_0 = HC_HTXnTBLMPfog_Fog;
-+
-+      vmesa->regHTXnTBLCsat_0 = color;
-+      vmesa->regHTXnTBLAsat_0 = alpha;
-+      vmesa->regHTXnTBLCop_0 = op | bias;
-+      vmesa->regHTXnTBLRAa_0 = bias_alpha | (constant_alpha << 16);
-+
-+      vmesa->regHTXnTBLRCa_0 = ordered_constant_color[0];
-+      vmesa->regHTXnTBLRCb_0 = ordered_constant_color[1];
-+      vmesa->regHTXnTBLRCc_0 = ordered_constant_color[2];
-+      vmesa->regHTXnTBLRCbias_0 = ordered_constant_color[3];
-+   }
-+   else {
-+      vmesa->regHTXnTBLMPfog_1 = HC_HTXnTBLMPfog_Fog;
-+
-+      vmesa->regHTXnTBLCsat_1 = color;
-+      vmesa->regHTXnTBLAsat_1 = alpha;
-+      vmesa->regHTXnTBLCop_1 = op | bias;
-+      vmesa->regHTXnTBLRAa_1 = bias_alpha | (constant_alpha << 16);
-+   }
-+}
-+
-Index: extras/Mesa/src/mesa/drivers/ggi/ggimesa.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/ggi/ggimesa.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/ggi/ggimesa.c 16 Jun 2004 09:18:45 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/ggi/ggimesa.c 15 Dec 2004 01:51:00 -0000      1.1.1.1.4.1
-@@ -43,19 +43,56 @@
- #include "texformat.h"
- #include "texstore.h"
--ggi_extid ggiMesaID = -1;
-+/* We use LibGG to manage config files */
-+#include <ggi/gg.h>
-+
-+
-+/* XXX: Those #defines should be provided via 
-+ * config.h
-+ */
-+#define GGIMESAPATHTAG        "pAtHTAg"
-+#define GGIMESACONFDIR        "pAtHTAg/usr/local/etc/ggi"
-+#define GGIMESATAGLEN 7
-+#define GGIMESACONFFILE       "ggimesa.conf"
-+
-+
-+/* Static variables
-+ */
- static int _ggimesaLibIsUp = 0;
- static void *_ggimesaConfigHandle;
--
--static char ggimesaconffile[] = GGIMESACONFFILE;
-+static char _ggimesaconfstub[512] = GGIMESACONFDIR;
-+static char *_ggimesaconfdir = _ggimesaconfstub+GGIMESATAGLEN;
- int _ggimesaDebugSync = 0;
- uint32 _ggimesaDebugState = 0;
--static void gl_ggiUpdateState(GLcontext *ctx, GLuint new_state);
--static int changed(ggi_visual_t vis, int whatchanged);
-+/* Extension ID. Defaulting to -1 should make segfault on abuse more likely...
-+ */
-+ggi_extid _ggiMesaID = -1;
-+
-+
-+#define SUBLIB_PREFIX "MesaGGIdl_"
-+
-+
-+/*
-+ * Returns the directory where global config files are kept
-+ */
-+ 
-+const char *ggiMesaGetConfDir(void)
-+{
-+#ifdef __WIN32__
-+      /* On Win32 we allow overriding of the compiled in path. */
-+      const char *envdir = getenv("GGI_CONFDIR");
-+      if (envdir) return envdir;
-+#endif
-+      return _ggimesaconfdir;
-+}
-+
-+
-+/* Dummy function which returns -1
-+   We use this to reset the function pointers */
- static int _ggi_error(void)
- {
-       GGIMESADPRINT_CORE("_ggi_error() called\n");
-@@ -63,6 +100,147 @@
-       return -1;
- }
-+
-+static int changed(ggi_visual_t vis, int whatchanged)
-+{
-+      GLcontext *ctx;
-+      ctx = _mesa_get_current_context();
-+
-+      GGIMESADPRINT_CORE("changed() called\n");
-+              
-+      switch (whatchanged) {
-+      case GGI_CHG_APILIST:
-+      {
-+              char api[GGI_MAX_APILEN];
-+              char args[GGI_MAX_APILEN];
-+              int i;
-+              const char *fname;
-+              ggi_dlhandle *lib;
-+
-+              GLvisual *gl_vis = &(LIBGGI_MESAEXT(vis)->mesa_visual.gl_visual);
-+              GLframebuffer *gl_fb = &(LIBGGI_MESAEXT(vis)->mesa_buffer);
-+              
-+              /* Initialize the framebuffer to provide all necessary
-+                 buffers in software. The target libraries that are loaded
-+                 next are free to modify this according to their
-+                 capabilities. 
-+               */
-+               /* FIXME: if the target changes capabilities we'll leak 
-+                  swrast's memory !!! Need to deallocate first */
-+              _mesa_initialize_framebuffer(gl_fb, gl_vis,
-+                                       gl_vis->depthBits > 0,
-+                                       gl_vis->stencilBits > 0,
-+                                       gl_vis->accumRedBits > 0,
-+                                       gl_vis->alphaBits > 0);
-+
-+              for (i = 0; ggiGetAPI(vis, i, api, args) == 0; i++) {
-+                      strcat(api, "-mesa");
-+                      GGIMESADPRINT_CORE("GGIMesa: looking for"
-+                                      "a sublib named %s\n", api);
-+                      fname = ggMatchConfig(_ggimesaConfigHandle, api, NULL);
-+                      if (fname == NULL) {
-+                              /* No special implementation for this sublib */
-+                              continue;
-+                      }
-+                      lib = ggiExtensionLoadDL(vis, fname, args, NULL,
-+                                               SUBLIB_PREFIX);
-+              }
-+
-+              /* The targets have cleared everything they can do from 
-+                 the framebuffer structure so we provide the rest in sw
-+               */
-+              _swrast_alloc_buffers(gl_fb);
-+              
-+              break;
-+      } 
-+      }
-+      return 0;
-+}
-+
-+
-+int ggiMesaInit()
-+{
-+      int err;
-+      char *str;
-+      char *conffile;
-+      
-+      GGIMESADPRINT_CORE("ggiMesaInit() called\n");
-+      
-+      _ggimesaLibIsUp++;
-+      if (_ggimesaLibIsUp > 1) return 0; /* Initialize only at first call */
-+      
-+      str = getenv("GGIMESA_DEBUGSYNC");
-+      if (str != NULL) {
-+              _ggimesaDebugSync = 1;
-+      }
-+      
-+      str = getenv("GGIMESA_DEBUG");
-+      if (str != NULL) {
-+              _ggimesaDebugState = atoi(str);
-+              GGIMESADPRINT_CORE("%s Debugging=%d\n",
-+                      _ggimesaDebugSync ? "sync" : "async",
-+                      _ggimesaDebugState);
-+      }
-+      
-+
-+      conffile = malloc(strlen(ggiMesaGetConfDir()) + 1
-+                        + strlen(GGIMESACONFFILE) +1);
-+      if (conffile == NULL) {
-+              fprintf(stderr, "GGIMesa: unable to allocate memory for config filename.\n");
-+              return GGI_ENOMEM;
-+      }
-+      sprintf(conffile, "%s%c%s",
-+              ggiMesaGetConfDir(), '/', GGIMESACONFFILE);
-+      err = ggLoadConfig(conffile, &_ggimesaConfigHandle);
-+      if (err != GGI_OK) {
-+              fprintf(stderr, "GGIMesa: Couldn't open %s\n",
-+                      conffile);
-+              free(conffile);
-+              _ggimesaLibIsUp--;
-+              return err;
-+      }
-+      free(conffile);
-+      
-+      _ggiMesaID = ggiExtensionRegister("GGIMesa",
-+                                       sizeof(struct ggi_mesa_ext), changed);
-+      if (_ggiMesaID < 0) {
-+              fprintf(stderr, "GGIMesa: failed to register as extension\n");
-+              _ggimesaLibIsUp--;
-+              ggFreeConfig(_ggimesaConfigHandle);
-+              return _ggiMesaID;
-+      }
-+      
-+      return 0;
-+}
-+
-+int ggiMesaExit(void)
-+{
-+      int rc;
-+
-+      GGIMESADPRINT_CORE("ggiMesaExit() called\n");
-+
-+      if (!_ggimesaLibIsUp) return -1;
-+
-+      if (_ggimesaLibIsUp > 1) {
-+              /* Exit only at last call */
-+              _ggimesaLibIsUp--;
-+              return 0;
-+      }
-+      
-+      rc = ggiExtensionUnregister(_ggiMesaID);
-+      ggFreeConfig(_ggimesaConfigHandle);
-+
-+      _ggimesaLibIsUp = 0;
-+
-+      return rc;
-+}
-+
-+
-+
-+
-+static void gl_ggiUpdateState(GLcontext *ctx, GLuint new_state);
-+
-+
- static void gl_ggiGetSize(GLframebuffer *fb, GLuint *width, GLuint *height)
- {
-       /* FIXME: this is a hack to work around the new interface */
-@@ -73,8 +251,8 @@
-       
-       GGIMESADPRINT_CORE("gl_ggiGetSize() called\n");
-       
--      *width = LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.x; 
--      *height = LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.y;
-+      *width = LIBGGI_VIRTX(ggi_ctx->ggi_visual);
-+      *height = LIBGGI_VIRTY(ggi_ctx->ggi_visual);
-       printf("returning %d, %d\n", *width, *height);
- }
-@@ -91,9 +269,9 @@
- static void gl_ggiSetClearIndex(GLcontext *ctx, GLuint ci)
- {     
-       ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx;
--      
-+
-       GGIMESADPRINT_CORE("gl_ggiSetClearIndex() called\n");
--      
-+
-       ggiSetGCForeground(ggi_ctx->ggi_visual, ci);
-       ggi_ctx->clearcolor = (ggi_pixel)ci;
- }
-@@ -126,19 +304,15 @@
-       
-       GGIMESADPRINT_CORE("gl_ggiClear() called\n");
--      if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) 
--      {
-+      if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) {
-               ggiSetGCForeground(ggi_ctx->ggi_visual, ggi_ctx->clearcolor);
--              if (all)
--              {
-+              if (all) {
-                       int w, h;
--                      w = LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.x;
--                      h = LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.y;
-+                      w = LIBGGI_VIRTX(ggi_ctx->ggi_visual);
-+                      h = LIBGGI_VIRTX(ggi_ctx->ggi_visual);
-                       ggiDrawBox(ggi_ctx->ggi_visual, 0, 0, w, h);
--              }
--              else
--              {
-+              } else {
-                       ggiDrawBox(ggi_ctx->ggi_visual, x, y, //FLIP(y),
-                                  width, height);
-               }
-@@ -156,7 +330,7 @@
- static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit)
- {
-       ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx;
--      
-+
-       printf("set read %d\n", bufferBit);
-       GGIMESADPRINT_CORE("gl_ggiSetBuffer() called\n");
-@@ -184,11 +358,12 @@
- static const GLubyte * gl_ggiGetString(GLcontext *ctx, GLenum name)
- {
-       GGIMESADPRINT_CORE("gl_ggiGetString() called\n");
--      
--      if (name == GL_RENDERER)
--              return (GLubyte *) "Mesa GGI";
--      else
-+
-+      if (name == GL_RENDERER) {
-+              return (GLubyte *) "Mesa GGI";
-+      } else {
-               return NULL;
-+      }
- }
- static void gl_ggiFlush(GLcontext *ctx)
-@@ -219,7 +394,7 @@
- static void gl_ggiSetupPointers(GLcontext *ctx)
- {
-       TNLcontext *tnl;
--  
-+
-       GGIMESADPRINT_CORE("gl_ggiSetupPointers() called\n");
-       /* General information */
-@@ -293,13 +468,13 @@
-       *g = 0;
-       *b = 0;
--      for(i = 0; i < sizeof(ggi_pixel)*8; ++i){
-+      for(i = 0; i < sizeof(ggi_pixel)*8; ++i) {
-               int mask = 1 << i;
--              if(LIBGGI_PIXFMT(vis)->red_mask & mask)
-+              if (LIBGGI_PIXFMT(vis)->red_mask & mask)
-                       ++(*r);
--              if(LIBGGI_PIXFMT(vis)->green_mask & mask)
-+              if (LIBGGI_PIXFMT(vis)->green_mask & mask)
-                       ++(*g);
--              if(LIBGGI_PIXFMT(vis)->blue_mask & mask)
-+              if (LIBGGI_PIXFMT(vis)->blue_mask & mask)
-                       ++(*b);
-       }
-@@ -310,84 +485,14 @@
-       printf("rgb (%d, %d, %d) db %d, rgb %d ci %d\n",*r,*g,*b,*db,*rgb,*ci);
- }
-       
--int ggiMesaInit()
--{
--      int err;
--      char *str;
--      
--      GGIMESADPRINT_CORE("ggiMesaInit() called\n");
--      
--        str = getenv("GGIMESA_DEBUG");
--      if (str != NULL) {
--              _ggimesaDebugState = atoi(str);
--              GGIMESADPRINT_CORE("Debugging=%d\n", _ggimesaDebugState);
--      }
--      
--      str = getenv("GGIMESA_DEBUGSYNC");
--      if (str != NULL) {
--              _ggimesaDebugSync = 1;
--      }
--      
--      GGIMESADPRINT_CORE("ggiMesaInit()\n");
--      
--      _ggimesaLibIsUp++;
--      if (_ggimesaLibIsUp > 1)
--              return 0; /* Initialize only at first call */
--      
--      err = ggLoadConfig(ggimesaconffile, &_ggimesaConfigHandle);
--      if (err != GGI_OK)
--      {
--              GGIMESADPRINT_CORE("GGIMesa: Couldn't open %s\n",
--                                 ggimesaconffile);
--              _ggimesaLibIsUp--;
--              return err;
--      }
--      
--      ggiMesaID = ggiExtensionRegister("GGIMesa",
--                                       sizeof(struct ggi_mesa_ext), changed);
--      
--      if (ggiMesaID < 0)
--      {
--              GGIMESADPRINT_CORE("GGIMesa: failed to register as extension\n");
--              _ggimesaLibIsUp--;
--              ggFreeConfig(_ggimesaConfigHandle);
--              return ggiMesaID;
--      }
--      
--      return 0;
--}
--
--int ggiMesaExit(void)
--{
--      int rc;
--      
--      GGIMESADPRINT_CORE("ggiMesaExit() called\n");
--      
--      if (!_ggimesaLibIsUp)
--              return -1;
--      
--      if (_ggimesaLibIsUp > 1)
--      {
--              /* Exit only at last call */
--              _ggimesaLibIsUp--;
--              return 0;
--      }
--      
--      rc = ggiExtensionUnregister(ggiMesaID);
--      ggFreeConfig(_ggimesaConfigHandle);
--      
--      _ggimesaLibIsUp = 0;
--      
--      return rc;
--}
- int ggiMesaAttach(ggi_visual_t vis)
- {
-       int rc;
--      
-+
-       GGIMESADPRINT_CORE("ggiMesaAttach() called\n");
--      
--      rc = ggiExtensionAttach(vis, ggiMesaID);
-+
-+      rc = ggiExtensionAttach(vis, _ggiMesaID);
-       if (rc == 0)
-       {
-               int r, g, b, ci;
-@@ -419,7 +524,7 @@
- {
-       GGIMESADPRINT_CORE("ggiMesaDetach() called\n");
-       
--      return ggiExtensionDetach(vis, ggiMesaID);
-+      return ggiExtensionDetach(vis, _ggiMesaID);
- }
-  
- int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
-@@ -531,10 +636,10 @@
-       if (ctx->gl_ctx->Viewport.Width == 0)
-       {
-               _mesa_Viewport(0, 0,
--                             LIBGGI_MODE(vis)->visible.x,
--                             LIBGGI_MODE(vis)->visible.y);
--              ctx->gl_ctx->Scissor.Width = LIBGGI_MODE(vis)->visible.x;
--              ctx->gl_ctx->Scissor.Height = LIBGGI_MODE(vis)->visible.y;
-+                             LIBGGI_VIRTX(vis),
-+                             LIBGGI_VIRTY(vis));
-+              ctx->gl_ctx->Scissor.Width = LIBGGI_VIRTX(vis);
-+              ctx->gl_ctx->Scissor.Height = LIBGGI_VIRTY(vis);
-       }
- }
-@@ -579,6 +684,7 @@
-       _swsetup_InvalidateState(ctx, new_state);
-       _tnl_InvalidateState(ctx, new_state);
-       
-+      /* XXX: Better use an assertion that bails out here on failure */
-       if (!LIBGGI_MESAEXT(ggi_ctx->ggi_visual)->update_state) {
-               GGIMESADPRINT_CORE("update_state == NULL!\n");
-               GGIMESADPRINT_CORE("Please check your config files!\n");
-@@ -588,59 +694,3 @@
-       LIBGGI_MESAEXT(ggi_ctx->ggi_visual)->update_state(ggi_ctx);
- }
--static int changed(ggi_visual_t vis, int whatchanged)
--{
--      GLcontext *ctx;
--      ctx = _mesa_get_current_context();
--
--      GGIMESADPRINT_CORE("changed() called\n");
--              
--      switch (whatchanged)
--      {
--      case GGI_CHG_APILIST:
--      {
--              char api[256];
--              char args[256];
--              int i;
--              const char *fname;
--              ggi_dlhandle *lib;
--              GLvisual *gl_vis=&(LIBGGI_MESAEXT(vis)->mesa_visual.gl_visual);
--              GLframebuffer *gl_fb = &(LIBGGI_MESAEXT(vis)->mesa_buffer);
--              
--              /* Initialize the framebuffer to provide all necessary
--                 buffers in software. The target libraries that are loaded
--                 next are free to modify this according to their
--                 capabilities. 
--               */
--               /* FIXME: if the target changes capabilities we'll leak 
--                  swrast's memory !!! Need to deallocate first */
--              _mesa_initialize_framebuffer(gl_fb, gl_vis,
--                                       gl_vis->depthBits > 0,
--                                       gl_vis->stencilBits > 0,
--                                       gl_vis->accumRedBits > 0,
--                                       gl_vis->alphaBits > 0);
--
--              for (i = 0; ggiGetAPI(vis, i, api, args) == 0; i++)
--              {
--                      strcat(api, "-mesa");
--                      fname = ggMatchConfig(_ggimesaConfigHandle, api, NULL);
--                      if (fname == NULL)
--                      {
--                              /* No special implementation for this sublib */
--                              continue;
--                      }
--                      lib = ggiExtensionLoadDL(vis, fname, args, NULL,
--                                               GGI_SYMNAME_PREFIX);
--              }
--
--              /* The targets have cleared everything they can do from 
--                 the framebuffer structure so we provide the rest in sw
--               */
--              _swrast_alloc_buffers(gl_fb);
--              
--              break;
--      } 
--      }
--      return 0;
--}
--
-Index: extras/Mesa/src/mesa/drivers/ggi/default/linear.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/ggi/default/linear.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/ggi/default/linear.c  16 Jun 2004 09:18:45 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/ggi/default/linear.c  15 Dec 2004 01:51:00 -0000      1.1.1.1.4.1
-@@ -39,7 +39,7 @@
-                      ((color[GCOMP]>>GS) << B)     |  \
-                      ((color[BCOMP]>>BS)))
--#define FLIP(coord) (LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.y-(coord) - 1)
-+#define FLIP(coord) (LIBGGI_VIRTY(ggi_ctx->ggi_visual) - (coord) - 1)
- /**********************************************************************/
-Index: extras/Mesa/src/mesa/drivers/ggi/display/fbdev_mode.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/ggi/display/fbdev_mode.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/ggi/display/fbdev_mode.c      16 Jun 2004 09:18:46 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/ggi/display/fbdev_mode.c      15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -50,15 +50,13 @@
- int GGIMesa_fbdev_getapi(ggi_visual *vis, int num, char *apiname, char *arguments)
- {
--      struct fbdev_priv_mesa *priv = GGIMESA_PRIVATE(vis);
-+      struct fbdev_priv_mesa *priv = GGIMESA_PRIV(vis);
-       
--      strcpy(arguments, "");
-+      arguments = '\0';
--      switch(num) 
--      {
--              case 0:
--              if (priv->oldpriv->have_accel) 
--              {
-+      switch(num) {
-+      case 0:
-+              if (priv->oldpriv->have_accel) {
-                       strcpy(apiname, priv->oldpriv->accel);
-                       return 0;
-               }
-@@ -70,35 +68,33 @@
- static int do_setmode(ggi_visual *vis)
- {
--      struct fbdev_priv_mesa *priv = GGIMESA_PRIVATE(vis);
-+      struct fbdev_priv_mesa *priv = GGIMESA_PRIV(vis);
-       int err, id;
--      char libname[256], libargs[256];
-+      char libname[GGI_API_MAXLEN], libargs[GGI_API_MAXLEN];
-       ggi_graphtype gt;
-       _ggiZapMode(vis, ~GGI_DL_OPDISPLAY);
-       priv->have_accel = 0;
--      for (id = 1; GGIMesa_fbdev_getapi(vis, id, libname, libargs) == 0; id++) 
--      {
--              if (_ggiOpenDL(vis, libname, libargs, NULL) == 0) 
--              {
--                      fprintf(stderr, "display-fbdev-mesa: Error opening the "
-+
-+      for (id = 1; GGIMesa_fbdev_getapi(vis, id, libname, libargs) == 0; id++) {
-+              if (_ggiOpenDL(vis, libname, libargs, NULL) == 0) {
-+                      GGIMESADPRINT_LIBS(stderr, "display-fbdev-mesa: Error opening the "
-                               "%s (%s) library.\n", libname, libargs);
-                       return GGI_EFATAL;
-               }
--              GGIMESADPRINT_CORE("Success in loading %s (%s)\n", libname, libargs);
-+              GGIMESADPRINT_CORE("Success in loading %s (%s)\n",
-+                      libname, libargs);
-       }
-       if (priv->oldpriv->accel &&
-           _ggiOpenDL(vis, priv->accel, NULL, NULL) != 0) {
-               priv->have_accel = 1;
--      } 
--      else 
--      {
-+      } else {
-               priv->have_accel = 0;
-       }
-       vis->accelactive = 0;
--      
-+
-       ggiIndicateChange(vis, GGI_CHG_APILIST);
-       GGIMESADPRINT_CORE("display-fbdev-mesa: do_setmode SUCCESS\n");
-Index: extras/Mesa/src/mesa/drivers/ggi/display/fbdev_visual.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/ggi/display/fbdev_visual.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/ggi/display/fbdev_visual.c    16 Jun 2004 09:18:46 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/ggi/display/fbdev_visual.c    15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -38,7 +38,6 @@
- #include <fcntl.h>
- #include <sys/stat.h>
--#define GGI_SYMNAME_PREFIX  "MesaGGIdl_"
- #ifdef HAVE_SYS_VT_H
- #include <sys/vt.h>
-@@ -68,69 +67,28 @@
- #define NUM_ACCELS    (sizeof(accel_strings)/sizeof(accel_info))
--/* FIXME: These should really be defined in the make system */
--#define CONF_FILE "/usr/local/etc/ggi/mesa/targets/fbdev.conf"
--void *_configHandle;
--char confstub[512] = CONF_FILE;
--char *conffile = confstub;
--static int changed(ggi_visual_t vis, int whatchanged)
--{
--      switch (whatchanged)
--      {
--              case GGI_CHG_APILIST:
--              {
--                      char api[256];
--                      char args[256];
--                      int i;
--                      const char *fname;
--                      ggi_dlhandle *lib;
--                      
--                      for (i = 0; ggiGetAPI(vis, i, api, args) == 0; i++)
--                      {
--                              strcat(api, "-mesa");
--                              fname = ggMatchConfig(_configHandle, api, NULL);
--                              if (fname == NULL)
--                              {
--                                      /* No special implementation for this sublib */
--                                      continue;
--                              }
--                              
--                              lib = ggiExtensionLoadDL(vis, fname, args, NULL, GGI_SYMNAME_PREFIX);
--                      }
--              }
--              break;
--      }
--      return 0;
--}
--int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
-+static int GGIopen(ggi_visual *vis, struct ggi_dlhandle *dlh,
-+                   const char *args, void *argptr, uint32 *dlret)
- {
--      struct fbdev_priv_mesa *priv;
-       int err;
-+      struct fbdev_priv_mesa *priv;
-       ggifunc_getapi *oldgetapi;
--      GGIMESA_PRIVATE(vis) = priv = malloc(sizeof(struct fbdev_priv_mesa));
--      if (priv == NULL) {
--              fprintf(stderr, "Failed to allocate fbdev private data\n");
--              return GGI_DL_ERROR;
--      }
--      
-+
-       priv->oldpriv = LIBGGI_PRIVATE(vis);  /* Hook back */
--      
--      err = ggLoadConfig(conffile, &_configHandle);
--      if (err != GGI_OK)
--      {
--              GGIMESADPRINT_CORE("display-fbdev: Couldn't open %s\n", conffile);
--              return err;
-+
-+      GGIMESA_PRIV(vis) = priv = malloc(sizeof(struct fbdev_priv_mesa));
-+      if (priv == NULL) {
-+              fprintf(stderr, "GGIMesa: Failed to allocate fbdev private data\n");
-+              return GGI_ENOMEM;
-       }
-       
--      LIBGGI_MESAEXT(vis)->update_state = NULL;
--      LIBGGI_MESAEXT(vis)->setup_driver = NULL;
--      
-       oldgetapi = vis->opdisplay->getapi;
-       vis->opdisplay->getapi = GGIMesa_fbdev_getapi;
-       changed(vis, GGI_CHG_APILIST);  
-+
-       /* If the accel sublibs didn't sucessfuly hook a driver,
-        * back up and keep looking */
-       if ((LIBGGI_MESAEXT(vis)->update_state == NULL) ||
-@@ -139,12 +97,42 @@
-               vis->opdisplay->getapi = oldgetapi;
-       }
-+      *dlret = GGI_DL_EXTENSION;
-       return 0;
- }
--int GGIdlcleanup(ggi_visual *vis)
-+
-+static int GGIclose(ggi_visual *vis, struct ggi_dlhandle *dlh)
- {
-+      struct fbdev_priv_mesa *priv = GGIMESA_PRIV(vis);
-+
-+      if (priv) {
-+              LIBGGI_PRIVATE(vis) = priv->oldpriv;
-+              free(priv);
-+      }
-+
-       return 0;
- }
-+
-+int MesaGGIdl_fbdev_mesa(int func, void **funcptr)
-+{
-+      switch (func) {
-+      case GGIFUNC_open:
-+              *funcptr = GGIopen;
-+              return 0;
-+      case GGIFUNC_exit:
-+              *funcptr = NULL;
-+              return 0;
-+      case GGIFUNC_close:
-+              *funcptr = GGIclose;
-+              return 0;
-+      default:
-+              *funcptr = NULL;
-+      }
-+        
-+      return GGI_ENOTFOUND;
-+}
-+
-+
- #include <ggi/internal/ggidlinit.h>
-Index: extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h        16 Jun 2004 09:18:46 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h        15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -75,7 +75,7 @@
-       ggi_pixel color;                /* Current color or index*/
-       ggi_pixel clearcolor;
-       
--      void *private;
-+      void *priv;
- };
- #define SHIFT (GGI_COLOR_PRECISION - 8)
-Index: extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h    16 Jun 2004 09:18:46 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h    15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -4,9 +4,8 @@
- #include <ggi/internal/internal.h>
- #include "ggimesa.h"
--#define GGI_SYMNAME_PREFIX  "MesaGGIdl_"
--extern ggi_extid ggiMesaID;
-+extern ggi_extid _ggiMesaID;
- ggifunc_setmode GGIMesa_setmode;
- ggifunc_getapi GGIMesa_getapi;
-@@ -39,7 +38,7 @@
-       void *private;
- } ggi_mesa_ext_t;
--#define LIBGGI_MESAEXT(vis) ((ggi_mesa_ext_t *)LIBGGI_EXT(vis,ggiMesaID))
--#define GGIMESA_PRIVATE(vis) ((LIBGGI_MESAEXT(vis)->private))
-+#define LIBGGI_MESAEXT(vis) ((ggi_mesa_ext_t *)LIBGGI_EXT(vis,_ggiMesaID))
-+#define GGIMESA_PRIV(vis) ((LIBGGI_MESAEXT(vis)->priv))
- #endif /* _GGI_MISC_INT_H */
-Index: extras/Mesa/src/mesa/drivers/glide/fx.rc
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fx.rc,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fx.rc   28 Aug 2004 04:27:42 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fx.rc   15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -5,10 +5,10 @@
- #define HWSTR                   "3dfx Voodoo Graphics, Voodoo^2, Voodoo Banshee, Velocity 100/200, Voodoo3, Voodoo4, Voodoo5"
- #define COPYRIGHTSTR            "Copyright \251 Brian E. Paul"
--#define VERSIONSTR              "6.1.0.9"
-+#define VERSIONSTR              "6.2.0.1"
- #define MANVERSION              6
--#define MANREVISION             1
--#define BUILD_NUMBER            9
-+#define MANREVISION             2
-+#define BUILD_NUMBER            1
- VS_VERSION_INFO VERSIONINFO
-  FILEVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER
-Index: extras/Mesa/src/mesa/drivers/glide/fxapi.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxapi.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxapi.c 28 Aug 2004 04:27:42 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fxapi.c 15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -356,11 +356,7 @@
-  }
-  grSstSelect(glbCurrentBoard);
-- /*grEnable(GR_OPENGL_MODE_EXT);*/ /* ZZZ: trick to make GL happy.
--                                  Glide3 will unmap memory for card when grSstWinClose is called.
--                                  This also forces the SLI band height to be 32 (above 1024x768) or 16
--                                  and disables the splash screen due to y-origin swapping.
--                                  Note: We only want the former. */
-+ /*grEnable(GR_OPENGL_MODE_EXT);*/ /* [koolsmoky] */
-  voodoo = &glbHWConfig.SSTs[glbCurrentBoard];
-  fxMesa = (fxMesaContext)CALLOC_STRUCT(tfxMesaContext);
-@@ -393,7 +389,7 @@
-         case GR_SSTTYPE_SST96:
-         case GR_SSTTYPE_Banshee:
-              fxMesa->bgrOrder = GL_TRUE;
--             fxMesa->snapVertices = GL_TRUE;
-+             fxMesa->snapVertices = (getenv("MESA_FX_NOSNAP") == NULL);
-              break;
-         case GR_SSTTYPE_Voodoo2:
-              fxMesa->bgrOrder = GL_TRUE;
-@@ -411,7 +407,7 @@
-              fxMesa->snapVertices = GL_FALSE;
-              break;
-  }
-- /* ZZZ TO DO: Add the old SLI/AA settings for Napalm. */
-+ /* XXX todo - Add the old SLI/AA settings for Napalm. */
-  switch(voodoo->numChips) {
-  case 4: /* 4 chips */
-    switch(sliaa) {
-@@ -526,8 +522,6 @@
-      goto errorhandler;
-  }
-- /* ZZZ TODO: check if there is enough fbRam */
--
-  /* Tips:
-   * 1. we don't bother setting/checking AUX for stencil, because we'll decide
-   *    later whether we have HW stencil, based on depth buffer (thus AUX is
-@@ -644,7 +638,7 @@
-                       fxMesa->snapVertices ? "" : "no ");
-    }
--  sprintf(fxMesa->rendererString, "Mesa %s v0.61 %s%s",
-+  sprintf(fxMesa->rendererString, "Mesa %s v0.62 %s%s",
-           grGetString(GR_RENDERER),
-           grGetString(GR_HARDWARE),
-           ((fxMesa->type < GR_SSTTYPE_Voodoo4) && (voodoo->numChips > 1)) ? " SLI" : "");
-Index: extras/Mesa/src/mesa/drivers/glide/fxdd.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxdd.c,v
-retrieving revision 1.1.1.4
-retrieving revision 1.1.1.4.2.1
-diff -u -u -r1.1.1.4 -r1.1.1.4.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxdd.c  28 Aug 2004 04:27:42 -0000      1.1.1.4
-+++ extras/Mesa/src/mesa/drivers/glide/fxdd.c  15 Dec 2004 01:51:01 -0000      1.1.1.4.2.1
-@@ -160,26 +160,14 @@
-                      (int) x, (int) y, (int) width, (int) height );
-    }
--   /* Need this check to respond to glScissor and clipping updates */
--   /* should also take care of FX_NEW_COLOR_MASK, FX_NEW_STENCIL, depth? */
--   if (fxMesa->new_state & FX_NEW_SCISSOR) {
--      fxSetupScissor(ctx);
--      fxMesa->new_state &= ~FX_NEW_SCISSOR;
--   }
-+   /* we can't clear accum buffers nor stereo */
-+   mask &= ~(DD_ACCUM_BIT | DD_FRONT_RIGHT_BIT | DD_BACK_RIGHT_BIT);
--   /* we can't clear accum buffers */
--   mask &= ~(DD_ACCUM_BIT);
--
--   /*
--    * As per GL spec, stencil masking should be obeyed when clearing
--    */
--   if (mask & DD_STENCIL_BIT) {
--      if (!fxMesa->haveHwStencil || fxMesa->unitsState.stencilWriteMask != 0xff) {
--         /* Napalm seems to have trouble with stencil write masks != 0xff */
--         /* do stencil clear in software */
--         softwareMask |= DD_STENCIL_BIT;
--         mask &= ~(DD_STENCIL_BIT);
--      }
-+   /* Need this check to respond to certain HW updates */
-+   if (fxMesa->new_state & (FX_NEW_SCISSOR | FX_NEW_COLOR_MASK)) {
-+      fxSetupScissor(ctx);
-+      fxSetupColorMask(ctx);
-+      fxMesa->new_state &= ~(FX_NEW_SCISSOR | FX_NEW_COLOR_MASK);
-    }
-    /*
-@@ -202,7 +190,7 @@
-        */
-       BEGIN_BOARD_LOCK();
-       if (mask & DD_STENCIL_BIT) {
--       fxMesa->Glide.grStencilMaskExt(0xff /*fxMesa->unitsState.stencilWriteMask*/);
-+       fxMesa->Glide.grStencilMaskExt(fxMesa->unitsState.stencilWriteMask);
-        /* set stencil ref value = desired clear value */
-        fxMesa->Glide.grStencilFuncExt(GR_CMP_ALWAYS, clearS, 0xff);
-        fxMesa->Glide.grStencilOpExt(GR_STENCILOP_REPLACE,
-@@ -213,6 +201,9 @@
-        grDisable(GR_STENCIL_MODE_EXT);
-       }
-       END_BOARD_LOCK();
-+   } else if (mask & DD_STENCIL_BIT) {
-+      softwareMask |= (mask & (DD_STENCIL_BIT));
-+      mask &= ~(DD_STENCIL_BIT);
-    }
-    /*
-@@ -228,8 +219,7 @@
-       switch (mask & ~DD_STENCIL_BIT) {
-       case DD_BACK_LEFT_BIT | DD_DEPTH_BIT:
-        /* back buffer & depth */
--       /* FX_grColorMaskv_NoLock(ctx, true4); */ /* work around Voodoo3 bug */
--       grDepthMask(FXTRUE);
-+         grDepthMask(FXTRUE);
-        grRenderBuffer(GR_BUFFER_BACKBUFFER);
-        if (stencil_size > 0) {
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-@@ -240,9 +230,6 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       if (!fxMesa->unitsState.depthTestEnabled) {
--            grDepthMask(FXFALSE);
--       }
-        break;
-       case DD_FRONT_LEFT_BIT | DD_DEPTH_BIT:
-        /* XXX it appears that the depth buffer isn't cleared when
-@@ -250,9 +237,9 @@
-         * This is a work-around/
-         */
-        /* clear depth */
--       grDepthMask(FXTRUE);
--       grRenderBuffer(GR_BUFFER_BACKBUFFER);
-+         grDepthMask(FXTRUE);
-          fxDisableColor(fxMesa);
-+       grRenderBuffer(GR_BUFFER_BACKBUFFER);
-        if (stencil_size > 0)
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-                                            fxMesa->clearA,
-@@ -261,8 +248,9 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       /* clear front */
-        fxSetupColorMask(ctx);
-+       grDepthMask(FXFALSE);
-+       /* clear front */
-        grRenderBuffer(GR_BUFFER_FRONTBUFFER);
-        if (stencil_size > 0)
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-@@ -272,9 +260,6 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       if (!fxMesa->unitsState.depthTestEnabled) {
--            grDepthMask(FXFALSE);
--       }
-        break;
-       case DD_BACK_LEFT_BIT:
-        /* back buffer only */
-@@ -288,9 +273,6 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       if (fxMesa->unitsState.depthTestEnabled) {
--            grDepthMask(FXTRUE);
--       }
-        break;
-       case DD_FRONT_LEFT_BIT:
-        /* front buffer only */
-@@ -304,9 +286,6 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       if (fxMesa->unitsState.depthTestEnabled) {
--            grDepthMask(FXTRUE);
--       }
-        break;
-       case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT:
-        /* front and back */
-@@ -329,15 +308,12 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       if (fxMesa->unitsState.depthTestEnabled) {
--            grDepthMask(FXTRUE);
--       }
-        break;
-       case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT:
--       /* clear front */
--       grDepthMask(FXFALSE);
--       grRenderBuffer(GR_BUFFER_FRONTBUFFER);
--       if (stencil_size > 0)
-+       /* clear back and depth */
-+         grDepthMask(FXTRUE);
-+       grRenderBuffer(GR_BUFFER_BACKBUFFER);
-+         if (stencil_size > 0)
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-                                            fxMesa->clearA,
-                                            clearD, clearS);
-@@ -345,10 +321,10 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       /* clear back and depth */
--       grDepthMask(FXTRUE);
--       grRenderBuffer(GR_BUFFER_BACKBUFFER);
--         if (stencil_size > 0)
-+       /* clear front */
-+       grDepthMask(FXFALSE);
-+       grRenderBuffer(GR_BUFFER_FRONTBUFFER);
-+       if (stencil_size > 0)
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-                                            fxMesa->clearA,
-                                            clearD, clearS);
-@@ -356,15 +332,12 @@
-             grBufferClear(fxMesa->clearC,
-                           fxMesa->clearA,
-                           clearD);
--       if (!fxMesa->unitsState.depthTestEnabled) {
--            grDepthMask(FXFALSE);
--       }
-        break;
-       case DD_DEPTH_BIT:
-        /* just the depth buffer */
--       grRenderBuffer(GR_BUFFER_BACKBUFFER);
-+         grDepthMask(FXTRUE);
-          fxDisableColor(fxMesa);
--       grDepthMask(FXTRUE);
-+       grRenderBuffer(GR_BUFFER_BACKBUFFER);
-        if (stencil_size > 0)
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-                                            fxMesa->clearA,
-@@ -374,41 +347,29 @@
-                           fxMesa->clearA,
-                           clearD);
-        fxSetupColorMask(ctx);
--       if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) {
--            grRenderBuffer(GR_BUFFER_FRONTBUFFER);
--         }
--       if (!fxMesa->unitsState.depthTestEnabled) {
--          grDepthMask(FXFALSE);
--         }
-        break;
-       default:
-          /* clear no color buffers or depth buffer but might clear stencil */
--       if (stencil_size > 0 && (mask & DD_STENCIL_BIT)) {
-+       if ((stencil_size > 0) && (mask & DD_STENCIL_BIT)) {
-             /* XXX need this RenderBuffer call to work around Glide bug */
--            grRenderBuffer(GR_BUFFER_BACKBUFFER);
-             grDepthMask(FXFALSE);
-+            grRenderBuffer(GR_BUFFER_BACKBUFFER);
-             fxDisableColor(fxMesa);
-             fxMesa->Glide.grBufferClearExt(fxMesa->clearC,
-                                            fxMesa->clearA,
-                                            clearD, clearS);
--            if (fxMesa->unitsState.depthTestEnabled) {
--               grDepthMask(FXTRUE);
--            }
-             fxSetupColorMask(ctx);
--            if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT) {
--               grRenderBuffer(GR_BUFFER_FRONTBUFFER);
--            }
-          }
-       }
-    }
-    END_CLIP_LOOP();
--   if (fxMesa->haveHwStencil && (mask & DD_STENCIL_BIT)) {
--      /* We changed the stencil state above.  Signal that we need to
--       * upload it again.
--       */
--      fxMesa->new_state |= FX_NEW_STENCIL;
-+   if (fxMesa->haveHwStencil) {
-+      /* We changed the stencil state above.  Restore it! */
-+      fxSetupStencil(ctx);
-    }
-+   fxSetupDepthTest(ctx);
-+   grRenderBuffer(fxMesa->currentFB);
-    if (softwareMask)
-       _swrast_Clear( ctx, softwareMask, all, x, y, width, height );
-@@ -417,6 +378,7 @@
- /* Set the buffer used for drawing */
- /* XXX support for separate read/draw buffers hasn't been tested */
-+/* XXX GL_NONE disables color, but fails to correctly maintain state */
- static void
- fxDDSetDrawBuffer(GLcontext * ctx, GLenum mode)
- {
-@@ -1693,7 +1655,7 @@
- }
- static const struct tnl_pipeline_stage *fx_pipeline[] = {
--   &_tnl_vertex_transform_stage,      /* TODO: Add the fastpath here */
-+   &_tnl_vertex_transform_stage,      /* XXX todo - Add the fastpath here */
-    &_tnl_normal_transform_stage,
-    &_tnl_lighting_stage,
-    &_tnl_fog_coordinate_stage,
-@@ -1893,35 +1855,12 @@
-    _mesa_enable_extension(ctx, "GL_EXT_shared_texture_palette");
-    _mesa_enable_extension(ctx, "GL_EXT_blend_func_separate");
-    _mesa_enable_extension(ctx, "GL_EXT_texture_env_add");
-+   _mesa_enable_extension(ctx, "GL_EXT_stencil_wrap");
-    if (fxMesa->haveTwoTMUs) {
-       _mesa_enable_extension(ctx, "GL_ARB_multitexture");
-    }
--   if (fxMesa->haveHwStencil) {
--      _mesa_enable_extension( ctx, "GL_EXT_stencil_wrap" );
--   }
--
--   /* [dBorca] Hack alert:
--    * True texture compression can be done only on Napalm.
--    * We will advertise, however, generic texture compression
--    * on all Voodoo cards; the Mesa logic allows us to eventually
--    * fallback to uncompressed. This will fix those dumb applications
--    * which refuse to run w/o texture compression! We actually _can_
--    * do texture compression for pre-Napalm cores, through NCC. But
--    * NCC poses many issues:
--    * 1) NCC w/o DITHER_ERR has poor quality and NCC w/ DITHER_ERR is
--    *    damn slow!
--    * 2) NCC compression cannot be used with multitexturing, because
--    *    the decompression tables are not per TMU anymore (bear in mind
--    *    that earlier Voodoos could handle 2 NCC tables for each TMU --
--    *    just look for POINTCAST_PALETTE). As a last resort, we could
--    *    fake NCC multitexturing through multipass rendering, but...
--    *    ohwell, it's not worth the effort...
--    *    This stand true for multitexturing palletized textures.
--    * 3) since NCC is not an OpenGL standard (as opposed to FXT1/DXTC), we
--    *    can't use precompressed textures!
--    */
-    if (fxMesa->type >= GR_SSTTYPE_Voodoo4) {
-       _mesa_enable_extension(ctx, "GL_ARB_texture_compression");
-       _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
-@@ -1929,17 +1868,31 @@
-       _mesa_enable_extension(ctx, "GL_S3_s3tc");
-       _mesa_enable_extension(ctx, "GL_NV_blend_square");
-    } else {
-+#if FX_TC_NCC
-+      /* [dBorca] Hack alert:
-+       * 1) NCC w/o DITHER_ERR has poor quality and NCC w/ DITHER_ERR is
-+       *    damn slow!
-+       * 2) NCC compression cannot be used with multitexturing, because
-+       *    the decompression tables are not per TMU anymore (bear in mind
-+       *    that earlier Voodoos could handle 2 NCC tables for each TMU --
-+       *    just look for POINTCAST_PALETTE). As a last resort, we could
-+       *    fake NCC multitexturing through multipass rendering, but...
-+       *    ohwell, it's not worth the effort...
-+       *    This stand true for multitexturing palletized textures.
-+       * 3) since NCC is not an OpenGL standard (as opposed to FXT1/DXTC), we
-+       *    can't use precompressed textures!
-+       */
-       if (fxMesa->HaveTexus2) {
-          _mesa_enable_extension(ctx, "GL_ARB_texture_compression");
-       }
--#if FX_TC_NCC
--      else
--#endif
-+#else
-       /* doesn't like texture compression */
-       _mesa_enable_extension(ctx, "GL_SGIS_generate_mipmap");
-+#endif
-    }
-    if (fxMesa->HaveCmbExt) {
-+      _mesa_enable_extension(ctx, "GL_ARB_texture_env_combine");
-       _mesa_enable_extension(ctx, "GL_EXT_texture_env_combine");
-    }
-@@ -2016,8 +1969,7 @@
- #if 0
-       /* [dBorca]
-        * We fail the spec here, unless certain blending modes:
--       * (c1 + c2) * 1 + d * 1 = c1 * 1 + d * 1 + c2 * 1
--       * (c1 + c2) * 1 + d * 0 = c1 * 1 + d * 0 + c2 * 1
-+       * RGB: (GL_ONE + GL_*) or (GL_ZERO + GL_*) or ...
-        */
-       if (NEED_SECONDARY_COLOR(ctx)) {
-          if ((ctx->Color.BlendEquationRGB != GL_FUNC_ADD) &&
-Index: extras/Mesa/src/mesa/drivers/glide/fxddspan.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxddspan.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxddspan.c      28 Aug 2004 04:27:42 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/glide/fxddspan.c      15 Dec 2004 01:51:01 -0000      1.1.1.2.2.1
-@@ -100,30 +100,23 @@
- #define HW_WRITE_CLIPLOOP()                                           \
-     do {                                                              \
--      const int _nc = 1; /* numcliprects */                           \
--      /* [dBorca] Hack alert: */                                      \
-       /* remember, we need to flip the scissor, too */                \
-       /* is it better to do it inside fxDDScissor? */                 \
--      while (_nc--) {                                                 \
--          const int minx = fxMesa->clipMinX;                          \
--          const int maxy = Y_FLIP(fxMesa->clipMinY);                  \
--          const int maxx = fxMesa->clipMaxX;                          \
--          const int miny = Y_FLIP(fxMesa->clipMaxY);
-+      const int minx = fxMesa->clipMinX;                              \
-+      const int maxy = Y_FLIP(fxMesa->clipMinY);                      \
-+      const int maxx = fxMesa->clipMaxX;                              \
-+      const int miny = Y_FLIP(fxMesa->clipMaxY);
- #define HW_READ_CLIPLOOP()                                            \
-     do {                                                              \
--      const int _nc = 1; /* numcliprects */                           \
--      /* [dBorca] Hack alert: */                                      \
-       /* remember, we need to flip the scissor, too */                \
-       /* is it better to do it inside fxDDScissor? */                 \
--      while (_nc--) {                                                 \
--          const int minx = fxMesa->clipMinX;                          \
--          const int maxy = Y_FLIP(fxMesa->clipMinY);                  \
--          const int maxx = fxMesa->clipMaxX;                          \
--          const int miny = Y_FLIP(fxMesa->clipMaxY);
-+      const int minx = fxMesa->clipMinX;                              \
-+      const int maxy = Y_FLIP(fxMesa->clipMinY);                      \
-+      const int maxx = fxMesa->clipMaxX;                              \
-+      const int miny = Y_FLIP(fxMesa->clipMaxY);
- #define HW_ENDCLIPLOOP()                                              \
--      }                                                               \
-     } while (0)
-Index: extras/Mesa/src/mesa/drivers/glide/fxddtex.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxddtex.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxddtex.c       28 Aug 2004 04:27:43 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fxddtex.c       15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -60,12 +60,12 @@
-    GLint dstWidth = srcWidth / 2;
-    GLint dstHeight = srcHeight / 2;
-    GLint srcRowStride = srcWidth * bytesPerPixel;
--   GLubyte *src = srcImage;
-+   GLubyte *src = (GLubyte *)srcImage;
-    GLubyte *dst = dstImage;
-    GLuint bpt = 0;
--   GLubyte *_s;
--   GLubyte *_d;
-+   GLubyte *_s = NULL;
-+   GLubyte *_d = NULL;
-    GLenum _t;
-    if (texImage->TexFormat->MesaFormat == MESA_FORMAT_RGB565) {
-@@ -615,21 +615,8 @@
-       fprintf(stderr, "fxDDTexUseGlbPalette(%d)\n", state);
-    }
--   if (state) {
--      fxMesa->haveGlobalPaletteTexture = 1;
--   }
--   else {
--      fxMesa->haveGlobalPaletteTexture = 0;
--
--      /* [dBorca] tis beyond my comprehension */
--      if ((ctx->Texture.Unit[0]._Current == ctx->Texture.Unit[0].Current2D) &&
--        (ctx->Texture.Unit[0]._Current != NULL)) {
--       struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current;
--         if (!tObj->DriverData)
--           tObj->DriverData = fxAllocTexObjData(fxMesa);
--       fxTexInvalidate(ctx, tObj);
--      }
--   }
-+   fxMesa->haveGlobalPaletteTexture = state;
-+   fxMesa->new_state |= FX_NEW_TEXTURING;
- }
-@@ -1539,17 +1526,7 @@
-    ti->info.format = mml->glideFormat;
-    texImage->FetchTexelc = fxFetchFunction(texImage->TexFormat->MesaFormat);
--   /* [dBorca]
--    * Hack alert: unsure...
--    */
--   if (0 && ti->validated && ti->isInTM) {
--      /*fprintf(stderr, "reloadmipmaplevels\n"); */
--      fxTMReloadMipMapLevel(fxMesa, texObj, level);
--   }
--   else {
--      /*fprintf(stderr, "invalidate2\n"); */
--      fxTexInvalidate(ctx, texObj);
--   }
-+   fxTexInvalidate(ctx, texObj);
- }
-@@ -1781,17 +1758,7 @@
-       assert(!texImage->IsCompressed);
-    }
--   /* [dBorca]
--    * Hack alert: unsure...
--    */
--   if (0 && ti->validated && ti->isInTM) {
--      /*fprintf(stderr, "reloadmipmaplevels\n"); */
--      fxTMReloadMipMapLevel(fxMesa, texObj, level);
--   }
--   else {
--      /*fprintf(stderr, "invalidate2\n"); */
--      fxTexInvalidate(ctx, texObj);
--   }
-+   fxTexInvalidate(ctx, texObj);
- }
-@@ -1829,7 +1796,7 @@
-                                          mml->width,
-                               (GLubyte*) texImage->Data);
--   rows = height / 4; /* [dBorca] hardcoded 4, but works for FXT1/DXTC */
-+   rows = height / 4; /* hardcoded 4, but works for FXT1/DXTC */
-    for (i = 0; i < rows; i++) {
-       MEMCPY(dest, data, srcRowStride);
-@@ -1905,9 +1872,7 @@
-                        GLint width, GLint height,
-                        GLint depth, GLint border)
- {
-- /* [dBorca]
--  * TODO - maybe through fxTexValidate()
--  */
-+ /* XXX todo - maybe through fxTexValidate() */
-  return _mesa_test_proxy_teximage(ctx, target,
-                                   level, internalFormat,
-                                   format, type,
-Index: extras/Mesa/src/mesa/drivers/glide/fxdrv.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxdrv.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/glide/fxdrv.h 22 Jul 2004 06:52:21 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/glide/fxdrv.h 15 Dec 2004 01:51:01 -0000      1.1.1.2.4.1
-@@ -714,6 +714,7 @@
- void fxSetupBlend (GLcontext *ctx);
- void fxSetupDepthTest (GLcontext *ctx);
- void fxSetupTexture (GLcontext *ctx);
-+void fxSetupStencil (GLcontext *ctx);
- /* Flags for software fallback cases */
- #define FX_FALLBACK_TEXTURE_MAP               0x0001
-@@ -730,6 +731,28 @@
- extern GLuint fx_check_IsInHardware(GLcontext *ctx);
-+/***
-+ *** CNORM: clamp float to [0,1] and map to float in [0,255]
-+ ***/
-+#if defined(USE_IEEE) && !defined(DEBUG)
-+#define IEEE_0996 0x3f7f0000  /* 0.996 or so */
-+#define CNORM(N, F)                           \
-+        do {                                  \
-+           fi_type __tmp;                     \
-+           __tmp.f = (F);                     \
-+           if (__tmp.i < 0)                   \
-+              N = 0;                          \
-+           else if (__tmp.i >= IEEE_0996)     \
-+              N = 255.0f;                     \
-+           else {                             \
-+              N = (F) * 255.0f;                       \
-+           }                                  \
-+        } while (0)
-+#else
-+#define CNORM(n, f) \
-+      n = (CLAMP((f), 0.0F, 1.0F) * 255.0F)
-+#endif
-+
- /* run-time debugging */
- #ifndef FX_DEBUG
- #define FX_DEBUG 0
-Index: extras/Mesa/src/mesa/drivers/glide/fxglidew.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxglidew.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/glide/fxglidew.c      16 Jun 2004 09:18:48 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/glide/fxglidew.c      15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -126,7 +126,12 @@
-    grCoordinateSpace(GR_WINDOW_COORDS);
-    grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE);
-+#if FX_PACKEDCOLOR
-    grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE);
-+#else  /* !FX_PACKEDCOLOR */
-+   grVertexLayout(GR_PARAM_RGB, GR_VERTEX_RGB_OFFSET << 2, GR_PARAM_ENABLE);
-+   grVertexLayout(GR_PARAM_A, GR_VERTEX_A_OFFSET << 2, GR_PARAM_ENABLE);
-+#endif /* !FX_PACKEDCOLOR */
-    grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE);
-    grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE);
-    grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2,
-@@ -210,7 +215,7 @@
-          config->SSTs[i].type = GR_SSTTYPE_VOODOO;
-       }
--      grGet(GR_MEMORY_FB, 4, &result); /* ZZZ: differs after grSstWinOpen */
-+      grGet(GR_MEMORY_FB, 4, &result);
-       config->SSTs[i].fbRam = result / (1024 * 1024);
-       grGet(GR_NUM_TMU, 4, &result);
-@@ -220,7 +225,7 @@
-       config->SSTs[i].fbiRev = result;
-       for (j = 0; j < config->SSTs[i].nTexelfx; j++) {
--       grGet(GR_MEMORY_TMU, 4, &result); /* ZZZ: differs after grSstWinOpen */
-+       grGet(GR_MEMORY_TMU, 4, &result);
-        config->SSTs[i].tmuConfig[j].tmuRam = result / (1024 * 1024);
-        grGet(GR_REVISION_TMU, 4, &result);
-        config->SSTs[i].tmuConfig[j].tmuRev = result;
-Index: extras/Mesa/src/mesa/drivers/glide/fxglidew.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxglidew.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/glide/fxglidew.h      16 Jun 2004 09:18:48 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/glide/fxglidew.h      15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -38,7 +38,9 @@
- #include "fxg.h"
--
-+#ifndef FX_PACKEDCOLOR
-+#define FX_PACKEDCOLOR 1
-+#endif
- #define MAX_NUM_SST             4
-@@ -112,6 +114,7 @@
-         float oow;            /* 1/w (used mipmapping - really 0xfff/w) */
- } GrTmuVertex;
-+#if FX_PACKEDCOLOR
- typedef struct {
-         float x, y;           /* X and Y in screen space */
-         float ooz;            /* 65535/Z (used for Z-buffering) */
-@@ -137,6 +140,34 @@
- #define GR_VERTEX_OOW_TMU1_OFFSET       10
- #define GR_VERTEX_FOG_OFFSET            11
- #define GR_VERTEX_PSPEC_OFFSET          12
-+#else  /* !FX_PACKEDCOLOR */
-+typedef struct {
-+        float x, y;           /* X and Y in screen space */
-+        float ooz;            /* 65535/Z (used for Z-buffering) */
-+        float oow;            /* 1/W (used for W-buffering, texturing) */
-+        float r, g, b, a;     /* R, G, B, A [0..255] */
-+        GrTmuVertex tmuvtx[GLIDE_NUM_TMU];
-+        float fog;            /* fog coordinate */
-+        float r1, g1, b1;     /* R, G, B [0..255] */
-+        float psize;          /* point size */
-+        long pad[20 - 19];    /* ensure multiple of 16 */
-+} GrVertex;
-+
-+#define GR_VERTEX_X_OFFSET              0
-+#define GR_VERTEX_Y_OFFSET              1
-+#define GR_VERTEX_OOZ_OFFSET            2
-+#define GR_VERTEX_OOW_OFFSET            3
-+#define GR_VERTEX_RGB_OFFSET            4
-+#define GR_VERTEX_A_OFFSET              7
-+#define GR_VERTEX_SOW_TMU0_OFFSET       8
-+#define GR_VERTEX_TOW_TMU0_OFFSET       9
-+#define GR_VERTEX_OOW_TMU0_OFFSET       10
-+#define GR_VERTEX_SOW_TMU1_OFFSET       11
-+#define GR_VERTEX_TOW_TMU1_OFFSET       12
-+#define GR_VERTEX_OOW_TMU1_OFFSET       13
-+#define GR_VERTEX_FOG_OFFSET            14
-+#define GR_VERTEX_SPEC_OFFSET           15
-+#endif /* !FX_PACKEDCOLOR */
-Index: extras/Mesa/src/mesa/drivers/glide/fxsetup.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxsetup.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxsetup.c       28 Aug 2004 04:27:44 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fxsetup.c       15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -76,9 +76,7 @@
-                                          const GLvoid *srcImage, GLvoid *dstImage );
-    fxMesaContext fxMesa = FX_CONTEXT(ctx);
-    /* [dBorca]
--    * Ooooooook! Here's a(nother) long story.
--    * We get here because we need to handle a texture larger
--    * than hardware can support. Two cases:
-+    * Fake textures larger than HW supports:
-     * 1) we have mipmaps. Then we just push up to the first supported
-     *    LOD. A possible drawback is that Mesa will ignore the skipped
-     *    LODs on further texture handling.
-@@ -88,13 +86,6 @@
-     *    once in TexImage2D to accomodate aspect ratio, and now we
-     *    are rescaling again. The thing is, in TexImage2D we don't
-     *    know whether we'll hit 1) or 2) by the time of validation.
--    * NB: we could handle mml->[wh]Scale nicely, using (biased) shifts.
--    *
--    * Which brings me to another issue. How can we handle NPOT textures?
--    * - rescaling NPOT to the next bigger POT (mml->[wh]Scale can't shift)
--    * - upping the max LOD to the next power-of-two, in fxTexGetInfo; then
--    *   choosing non-power-of-two values for ti->[st]Scale... Anyhow, we
--    *   still need to align mipmaps correctly in texture memory!
-     */
-    if ((tObj->MinFilter == GL_NEAREST) || (tObj->MinFilter == GL_LINEAR)) {
-       /* no mipmaps! */
-@@ -155,7 +146,7 @@
-    else
-       FX_smallLodLog2(ti->info) = FX_largeLodLog2(ti->info);
--   /* this is necessary because of fxDDCompressedTexImage2D */
-+   /* [dBorca] this is necessary because of fxDDCompressedTexImage2D */
-    if (ti->padded) {
-       struct gl_texture_image *texImage = tObj->Image[0][minl];
-       tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage);
-@@ -351,9 +342,7 @@
-       fprintf(stderr, "fxSetupSingleTMU_NoLock(%p (%d))\n", (void *)tObj, tObj->Name);
-    }
--#if 1 /* [dBorca] Good... bad... I'm the guy with the gun! */
-    ti->lastTimeUsed = fxMesa->texBindNumber;
--#endif
-    /* Make sure we're not loaded incorrectly */
-    if (ti->isInTM) {
-@@ -654,10 +643,9 @@
-             colorComb.Factor   = GR_COMBINE_FACTOR_TEXTURE_ALPHA;
-             colorComb.Other    = GR_COMBINE_OTHER_CONSTANT;
-          } else {
--            /* [dBorca] Hack alert:
--             * only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB)
--             * These settings assume that the TexEnv color is black
--             * and incoming fragment color is white.
-+            /* Only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB)
-+             * These settings assume that the TexEnv color is black and
-+             * incoming fragment color is white.
-              */
-             colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER;
-             colorComb.Factor   = GR_COMBINE_FACTOR_ONE;
-@@ -1781,7 +1769,7 @@
-    }
- }
--static void
-+void
- fxSetupStencil (GLcontext * ctx)
- {
-    fxMesaContext fxMesa = FX_CONTEXT(ctx);
-Index: extras/Mesa/src/mesa/drivers/glide/fxsetup.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxsetup.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/glide/fxsetup.h       16 Jun 2004 09:18:49 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/glide/fxsetup.h       15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -32,8 +32,7 @@
-  */
- /* fxsetup.c - 3Dfx VooDoo rendering mode setup functions */
--/* [dBorca] Hack alert:
-- * this code belongs to fxsetup.c, but I didn't want to clutter
-+/* This code belongs to fxsetup.c, but I didn't want to clutter
-  * the original code with Napalm specifics, in order to keep things
-  * clear -- especially for backward compatibility. I should have
-  * put it into another .c file, but I didn't want to export so many
-@@ -379,9 +378,7 @@
-       break;
-     /* COMBINE_EXT */
-     case GL_COMBINE_EXT:
--      /* [dBorca] Hack alert:
--       * INCOMPLETE!!!
--       */
-+      /* XXX todo - INCOMPLETE!!! */
-       if (TDFX_DEBUG & (VERBOSE_DRIVER | VERBOSE_TEXTURE)) {
- #if 1
-          fprintf(stderr, "COMBINE_EXT: %s + %s\n",
-@@ -1024,10 +1021,7 @@
-    }
-    if (LODblend) {
--      /* [dBorca] Hack alert:
--       * TODO: GR_CMBX_LOD_FRAC
--       */
--
-+      /* XXX todo - GR_CMBX_LOD_FRAC? */
-       fxMesa->tmuSrc = FX_TMU_SPLIT;
-    }
-    else {
-Index: extras/Mesa/src/mesa/drivers/glide/fxtexman.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxtexman.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/glide/fxtexman.c      16 Jun 2004 09:18:49 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/glide/fxtexman.c      15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -486,7 +486,7 @@
-       /*texmemsize = (int)grTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &(ti->info));*/
-       ti->tm[FX_TMU1] = fxTMAddObj(fxMesa, tObj, FX_TMU1, texmemsize);
--      fxMesa->stats.memTexUpload += texmemsize; /* ZZZ: required? */
-+      fxMesa->stats.memTexUpload += texmemsize;
-       for (i = FX_largeLodValue(ti->info), l = ti->minLevel;
-          i <= FX_smallLodValue(ti->info); i++, l++) {
-@@ -550,6 +550,7 @@
-    assert(mml->width > 0);
-    assert(mml->height > 0);
-    assert(mml->glideFormat > 0);
-+   assert(ti->isInTM);
-    if (!ti->validated) {
-       fprintf(stderr, "fxTMReloadMipMapLevel: INTERNAL ERROR: not validated\n");
-@@ -558,17 +559,8 @@
-    }
-    tmu = (int) ti->whichTMU;
--#if 0
--   /* [dBorca]
--    * We get here by (see Tex[Sub]Image2D), thus we are in TMU.
--    * Also, we just set the correct TMU above. fxTMMoveInTM will
--    * bail early, so don't bother...
--    */
--   fxTMMoveInTM(fxMesa, tObj, tmu);
--#else
-    fxMesa->stats.reqTexUpload++;
-    fxMesa->stats.texUpload++;
--#endif
-    lodlevel =  ti->info.largeLodLog2 - (level - ti->minLevel);
-Index: extras/Mesa/src/mesa/drivers/glide/fxtris.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxtris.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxtris.c        28 Aug 2004 04:27:44 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fxtris.c        15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -146,6 +146,7 @@
-    dst->win[2] = src->ooz;
-    dst->win[3] = src->oow;
-+#if FX_PACKEDCOLOR
-    dst->color[0] = src->pargb[2];
-    dst->color[1] = src->pargb[1];
-    dst->color[2] = src->pargb[0];
-@@ -154,6 +155,16 @@
-    dst->specular[0] = src->pspec[2];
-    dst->specular[1] = src->pspec[1];
-    dst->specular[2] = src->pspec[0];
-+#else  /* !FX_PACKEDCOLOR */
-+   dst->color[0] = src->r;
-+   dst->color[1] = src->g;
-+   dst->color[2] = src->b;
-+   dst->color[3] = src->a;
-+
-+   dst->specular[0] = src->r1;
-+   dst->specular[1] = src->g1;
-+   dst->specular[2] = src->g1;
-+#endif /* !FX_PACKEDCOLOR */
-    dst->texcoord[ts0][0] = fxMesa->inv_s0scale * src->tmuvtx[0].sow * w;
-    dst->texcoord[ts0][1] = fxMesa->inv_t0scale * src->tmuvtx[0].tow * w;
-@@ -227,7 +238,11 @@
-  fprintf(stderr, "\tvertex at %p\n", (void *) v);
-  fprintf(stderr, "\tx %f y %f z %f oow %f\n", v->x, v->y, v->ooz, v->oow);
-+#if FX_PACKEDCOLOR
-  fprintf(stderr, "\tr %d g %d b %d a %d\n", v->pargb[2], v->pargb[1], v->pargb[0], v->pargb[3]);
-+#else  /* !FX_PACKEDCOLOR */
-+ fprintf(stderr, "\tr %f g %f b %f a %f\n", v->r, v->g, v->b, v->a);
-+#endif /* !FX_PACKEDCOLOR */
-    
-  fprintf(stderr, "\n");
- }
-@@ -298,14 +313,25 @@
-  /* point coverage? */
-  /* we don't care about culling here (see fxSetupCull) */
-- _v_[0].x -= radius;
-- _v_[0].y += radius;
-- _v_[1].x += radius;
-- _v_[1].y += radius;
-- _v_[2].x += radius;
-- _v_[2].y -= radius;
-- _v_[3].x -= radius;
-- _v_[3].y -= radius;
-+ if (ctx->Point.SpriteOrigin == GL_UPPER_LEFT) {
-+    _v_[0].x -= radius;
-+    _v_[0].y += radius;
-+    _v_[1].x += radius;
-+    _v_[1].y += radius;
-+    _v_[2].x += radius;
-+    _v_[2].y -= radius;
-+    _v_[3].x -= radius;
-+    _v_[3].y -= radius;
-+ } else {
-+    _v_[0].x -= radius;
-+    _v_[0].y -= radius;
-+    _v_[1].x += radius;
-+    _v_[1].y -= radius;
-+    _v_[2].x += radius;
-+    _v_[2].y += radius;
-+    _v_[3].x -= radius;
-+    _v_[3].y += radius;
-+ }
-  if (ctx->Point.CoordReplace[ts0]) {
-     _v_[0].tmuvtx[0].sow = 0;
-@@ -340,7 +366,9 @@
-  GrVertex *_v_[3];
-  const GLcontext *ctx = fxMesa->glCtx;
-- const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN) ? v0->psize : ctx->Point.Size;
-+ const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN)
-+                       ? CLAMP(v0->psize, ctx->Point.MinSize, ctx->Point.MaxSize)
-+                       : ctx->Point._Size; /* clamped */
-  if (ctx->Point.PointSprite) {
-     fx_draw_point_sprite(fxMesa, v0, psize);
-@@ -415,7 +443,9 @@
-  GrVertex vtxB, vtxC;
-  const GLcontext *ctx = fxMesa->glCtx;
-- const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN) ? v0->psize : ctx->Point.Size;
-+ const GLfloat psize = (ctx->_TriangleCaps & DD_POINT_ATTEN)
-+                       ? CLAMP(v0->psize, ctx->Point.MinSize, ctx->Point.MaxSize)
-+                       : ctx->Point._Size; /* clamped */
-  if (ctx->Point.PointSprite) {
-     fx_draw_point_sprite(fxMesa, v0, psize);
-@@ -499,6 +529,7 @@
- #endif
-+#if FX_PACKEDCOLOR
- #define VERT_SET_RGBA( dst, f )                       \
- do {                                          \
-    UNCLAMPED_FLOAT_TO_UBYTE(dst->pargb[2], f[0]);\
-@@ -538,6 +569,74 @@
-    fxMesaContext fxMesa = FX_CONTEXT(ctx);    \
-    GLubyte color[n][4], spec[n][4];           \
-    (void) color; (void) spec;
-+#else  /* !FX_PACKEDCOLOR */
-+#define VERT_SET_RGBA( dst, f )       \
-+do {                          \
-+   CNORM(dst->r, f[0]);               \
-+   CNORM(dst->g, f[1]);               \
-+   CNORM(dst->b, f[2]);               \
-+   CNORM(dst->a, f[3]);               \
-+} while (0)
-+
-+#define VERT_COPY_RGBA( v0, v1 )              \
-+do {                                          \
-+   *(GLuint *)&v0->r = *(GLuint *)&v1->r;     \
-+   *(GLuint *)&v0->g = *(GLuint *)&v1->g;     \
-+   *(GLuint *)&v0->b = *(GLuint *)&v1->b;     \
-+   *(GLuint *)&v0->a = *(GLuint *)&v1->a;     \
-+} while (0)
-+
-+#define VERT_SAVE_RGBA( idx )                         \
-+do {                                          \
-+   *(GLuint *)&color[idx][0] = *(GLuint *)&v[idx]->r;\
-+   *(GLuint *)&color[idx][1] = *(GLuint *)&v[idx]->g;\
-+   *(GLuint *)&color[idx][2] = *(GLuint *)&v[idx]->b;\
-+   *(GLuint *)&color[idx][3] = *(GLuint *)&v[idx]->a;\
-+} while (0)
-+
-+#define VERT_RESTORE_RGBA( idx )              \
-+do {                                          \
-+   *(GLuint *)&v[idx]->r = *(GLuint *)&color[idx][0];\
-+   *(GLuint *)&v[idx]->g = *(GLuint *)&color[idx][1];\
-+   *(GLuint *)&v[idx]->b = *(GLuint *)&color[idx][2];\
-+   *(GLuint *)&v[idx]->a = *(GLuint *)&color[idx][3];\
-+} while (0)
-+
-+
-+#define VERT_SET_SPEC( dst, f )       \
-+do {                          \
-+   CNORM(dst->r1, f[0]);      \
-+   CNORM(dst->g1, f[1]);      \
-+   CNORM(dst->b1, f[2]);      \
-+} while (0)
-+
-+#define VERT_COPY_SPEC( v0, v1 )              \
-+do {                                          \
-+   *(GLuint *)&v0->r1 = *(GLuint *)&v1->r1;   \
-+   *(GLuint *)&v0->g1 = *(GLuint *)&v1->g1;   \
-+   *(GLuint *)&v0->b1 = *(GLuint *)&v1->b1;   \
-+} while (0)
-+
-+#define VERT_SAVE_SPEC( idx )                         \
-+do {                                          \
-+   *(GLuint *)&spec[idx][0] = *(GLuint *)&v[idx]->r1;\
-+   *(GLuint *)&spec[idx][1] = *(GLuint *)&v[idx]->g1;\
-+   *(GLuint *)&spec[idx][2] = *(GLuint *)&v[idx]->b1;\
-+} while (0)
-+
-+#define VERT_RESTORE_SPEC( idx )              \
-+do {                                          \
-+   *(GLuint *)&v[idx]->r1 = *(GLuint *)&spec[idx][0];\
-+   *(GLuint *)&v[idx]->g1 = *(GLuint *)&spec[idx][1];\
-+   *(GLuint *)&v[idx]->b1 = *(GLuint *)&spec[idx][2];\
-+} while (0)
-+
-+
-+#define LOCAL_VARS(n)                         \
-+   fxMesaContext fxMesa = FX_CONTEXT(ctx);    \
-+   GLuint color[n][4], spec[n][4];            \
-+   (void) color; (void) spec;
-+#endif /* !FX_PACKEDCOLOR */
-@@ -904,7 +1003,6 @@
- {
-    fxMesaContext fxMesa = FX_CONTEXT(ctx);
-    GrVertex *fxVB = fxMesa->verts;
--   int mode;
-    (void) flags;
-    if (TDFX_DEBUG & VERBOSE_VARRAY) {
-@@ -913,13 +1011,9 @@
-    INIT(GL_TRIANGLE_STRIP);
--   /* [dBorca] WTF?!?
--   if (flags & PRIM_PARITY) 
--      mode = GR_TRIANGLE_STRIP_CONTINUE;
--   else*/
--      mode = GR_TRIANGLE_STRIP;
-+   /* no GR_TRIANGLE_STRIP_CONTINUE?!? */
--   grDrawVertexArrayContiguous( mode, count-start,
-+   grDrawVertexArrayContiguous( GR_TRIANGLE_STRIP, count-start,
-                                 fxVB + start, sizeof(GrVertex));
- }
-@@ -1273,58 +1367,41 @@
-     */
-    if (new_gl_state & _NEW_PROJECTION)
-       fxMesa->new_state |= FX_NEW_FOG;
--   /* [dBorca] Hack alert:
--    * the above _NEW_PROJECTION is not included in the test below,
--    * so we may end up with fxMesa->new_state still dirty by the end
--    * of the routine. The fact is, we don't have NearFar callback
--    * anymore. We could use fxDDDepthRange instead, but it seems
--    * fog needs to be updated only by a fog-basis.
--    * Implementing fxDDDepthRange correctly is another story:
--    * that, together with a presumable fxDDViewport function would set
--    *   fxMesa->SetupNewInputs |= VERT_BIT_CLIP;
--    * which might be useful in fxBuildVertices...
--    */
- #endif
--   if (new_gl_state & (_FX_NEW_IS_IN_HARDWARE |
--                     _FX_NEW_RENDERSTATE |
--                     _FX_NEW_SETUP_FUNCTION |
--                     _NEW_TEXTURE)) {
--
--      if (new_gl_state & _FX_NEW_IS_IN_HARDWARE)
--       fxCheckIsInHardware(ctx);
--
--      if (fxMesa->new_state)
--       fxSetupFXUnits(ctx);
--
--      if (!fxMesa->fallback) {
--       if (new_gl_state & _FX_NEW_RENDERSTATE)
--          fxDDChooseRenderState(ctx);
-+   if (new_gl_state & _FX_NEW_IS_IN_HARDWARE)
-+      fxCheckIsInHardware(ctx);
-+
-+   if (fxMesa->new_state)
-+      fxSetupFXUnits(ctx);
-+
-+   if (!fxMesa->fallback) {
-+      if (new_gl_state & _FX_NEW_RENDERSTATE)
-+         fxDDChooseRenderState(ctx);
-+
-+      if (new_gl_state & _FX_NEW_SETUP_FUNCTION)
-+         fxChooseVertexState(ctx);
-+   }
-+
-+   if (new_gl_state & _NEW_TEXTURE) {
-+      struct gl_texture_unit *t0 = &ctx->Texture.Unit[fxMesa->tmu_source[0]];
-+      struct gl_texture_unit *t1 = &ctx->Texture.Unit[fxMesa->tmu_source[1]];
--       if (new_gl_state & _FX_NEW_SETUP_FUNCTION)
--          fxChooseVertexState(ctx);
-+      if (t0->_Current && FX_TEXTURE_DATA(t0)) {
-+         fxMesa->s0scale = FX_TEXTURE_DATA(t0)->sScale;
-+         fxMesa->t0scale = FX_TEXTURE_DATA(t0)->tScale;
-+         fxMesa->inv_s0scale = 1.0 / fxMesa->s0scale;
-+         fxMesa->inv_t0scale = 1.0 / fxMesa->t0scale;
-       }
--      if (new_gl_state & _NEW_TEXTURE) {
--         struct gl_texture_unit *t0 = &ctx->Texture.Unit[fxMesa->tmu_source[0]];
--         struct gl_texture_unit *t1 = &ctx->Texture.Unit[fxMesa->tmu_source[1]];
--      
--         if (t0->_Current && FX_TEXTURE_DATA(t0)) {
--            fxMesa->s0scale = FX_TEXTURE_DATA(t0)->sScale;
--            fxMesa->t0scale = FX_TEXTURE_DATA(t0)->tScale;
--            fxMesa->inv_s0scale = 1.0 / fxMesa->s0scale;
--            fxMesa->inv_t0scale = 1.0 / fxMesa->t0scale;
--         }
--      
--         if (t1->_Current && FX_TEXTURE_DATA(t1)) {
--            fxMesa->s1scale = FX_TEXTURE_DATA(t1)->sScale;
--            fxMesa->t1scale = FX_TEXTURE_DATA(t1)->tScale;
--            fxMesa->inv_s1scale = 1.0 / fxMesa->s1scale;
--            fxMesa->inv_t1scale = 1.0 / fxMesa->t1scale;
--         }
-+      if (t1->_Current && FX_TEXTURE_DATA(t1)) {
-+         fxMesa->s1scale = FX_TEXTURE_DATA(t1)->sScale;
-+         fxMesa->t1scale = FX_TEXTURE_DATA(t1)->tScale;
-+         fxMesa->inv_s1scale = 1.0 / fxMesa->s1scale;
-+         fxMesa->inv_t1scale = 1.0 / fxMesa->t1scale;
-       }
-    }
--      
-+
-    fxMesa->new_gl_state = 0;
-    _tnl_run_pipeline( ctx );
-@@ -1483,7 +1560,7 @@
- /* [dBorca] Hack alert:
-  * doesn't work with blending.
-- * need to take care of stencil.
-+ * XXX todo - need to take care of stencil.
-  */
- GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass)
- {
-@@ -1518,7 +1595,11 @@
-                 fxDDDepthMask( ctx, GL_FALSE );
-              }
-              /* switch to secondary colors */
-+#if FX_PACKEDCOLOR
-              grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PSPEC_OFFSET << 2, GR_PARAM_ENABLE);
-+#else  /* !FX_PACKEDCOLOR */
-+             grVertexLayout(GR_PARAM_RGB, GR_VERTEX_SPEC_OFFSET << 2, GR_PARAM_ENABLE);
-+#endif /* !FX_PACKEDCOLOR */
-              /* don't advertise new state */
-              fxMesa->new_state = 0;
-              break;
-@@ -1529,7 +1610,11 @@
-              ctx->Texture.Unit[0]._ReallyEnabled = t0;
-              ctx->Texture.Unit[1]._ReallyEnabled = t1;
-              /* revert to primary colors */
-+#if FX_PACKEDCOLOR
-              grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE);
-+#else  /* !FX_PACKEDCOLOR */
-+             grVertexLayout(GR_PARAM_RGB, GR_VERTEX_RGB_OFFSET << 2, GR_PARAM_ENABLE);
-+#endif /* !FX_PACKEDCOLOR */
-              break;
-         default:
-              assert(0); /* NOTREACHED */
-Index: extras/Mesa/src/mesa/drivers/glide/fxvb.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxvb.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/glide/fxvb.c  22 Jul 2004 06:52:24 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/glide/fxvb.c  15 Dec 2004 01:51:01 -0000      1.1.1.2.4.1
-@@ -55,7 +55,14 @@
-    GrVertex *dst = fxMesa->verts + edst;
-    GrVertex *src = fxMesa->verts + esrc;
-+#if FX_PACKEDCOLOR
-    *(GLuint *)&dst->pargb = *(GLuint *)&src->pargb;
-+#else  /* !FX_PACKEDCOLOR */
-+   *(GLuint *)&dst->r = *(GLuint *)&src->r;
-+   *(GLuint *)&dst->g = *(GLuint *)&src->g;
-+   *(GLuint *)&dst->b = *(GLuint *)&src->b;
-+   *(GLuint *)&dst->a = *(GLuint *)&src->a;
-+#endif /* !FX_PACKEDCOLOR */
- }
- static void copy_pv2( GLcontext *ctx, GLuint edst, GLuint esrc )
-@@ -64,8 +71,18 @@
-    GrVertex *dst = fxMesa->verts + edst;
-    GrVertex *src = fxMesa->verts + esrc;
-+#if FX_PACKEDCOLOR
-    *(GLuint *)&dst->pargb = *(GLuint *)&src->pargb;
-    *(GLuint *)&dst->pspec = *(GLuint *)&src->pspec;
-+#else  /* !FX_PACKEDCOLOR */
-+   *(GLuint *)&dst->r = *(GLuint *)&src->r;
-+   *(GLuint *)&dst->g = *(GLuint *)&src->g;
-+   *(GLuint *)&dst->b = *(GLuint *)&src->b;
-+   *(GLuint *)&dst->a = *(GLuint *)&src->a;
-+   *(GLuint *)&dst->r1 = *(GLuint *)&src->r1;
-+   *(GLuint *)&dst->g1 = *(GLuint *)&src->g1;
-+   *(GLuint *)&dst->b1 = *(GLuint *)&src->b1;
-+#endif /* !FX_PACKEDCOLOR */
- }
- static struct {
-@@ -695,10 +712,6 @@
-    } else {
-       GLuint ind = 0;
--      /* [dBorca] masked by VERT_BIT_POS ?!?
--      if (newinputs & VERT_BIT_POINT_SIZE)
--       ind |= SETUP_PSIZ;*/
--
-       if (newinputs & VERT_BIT_COLOR0)
-        ind |= SETUP_RGBA;
-       
-Index: extras/Mesa/src/mesa/drivers/glide/fxvbtmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxvbtmp.h,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxvbtmp.h       12 Aug 2004 23:06:37 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fxvbtmp.h       15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -145,6 +145,7 @@
-        proj =  (GLfloat (*)[4])((GLubyte *)proj +  proj_stride);
-       }
-       if (IND & SETUP_RGBA) {
-+#if FX_PACKEDCOLOR
-          UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[2], col[0][0]);
-          UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[1], col[0][1]);
-          UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[0], col[0][2]);
-@@ -153,12 +154,28 @@
-          } else {
-             v->pargb[3] = 255;
-          }
-+#else  /* !FX_PACKEDCOLOR */
-+         CNORM(v->r, col[0][0]);
-+         CNORM(v->g, col[0][1]);
-+         CNORM(v->b, col[0][2]);
-+         if (col_size == 4) {
-+            CNORM(v->a, col[0][3]);
-+         } else {
-+            v->a = 255.0f;
-+         }
-+#endif /* !FX_PACKEDCOLOR */
-        STRIDE_4F(col, col_stride);
-       }
-       if (IND & SETUP_SPEC) {
-+#if FX_PACKEDCOLOR
-        UNCLAMPED_FLOAT_TO_UBYTE(v->pspec[2], spec[0][0]);
-        UNCLAMPED_FLOAT_TO_UBYTE(v->pspec[1], spec[0][1]);
-        UNCLAMPED_FLOAT_TO_UBYTE(v->pspec[0], spec[0][2]);
-+#else  /* !FX_PACKEDCOLOR */
-+         CNORM(v->r1, spec[0][0]);
-+         CNORM(v->g1, spec[0][1]);
-+         CNORM(v->b1, spec[0][2]);
-+#endif /* !FX_PACKEDCOLOR */
-        STRIDE_4F(spec, spec_stride);
-       }
-       if (IND & SETUP_FOGC) {
-@@ -253,15 +270,28 @@
-    }
-    
-+#if FX_PACKEDCOLOR
-    INTERP_UB( t, dst->pargb[0], out->pargb[0], in->pargb[0] );
-    INTERP_UB( t, dst->pargb[1], out->pargb[1], in->pargb[1] );
-    INTERP_UB( t, dst->pargb[2], out->pargb[2], in->pargb[2] );
-    INTERP_UB( t, dst->pargb[3], out->pargb[3], in->pargb[3] );
-+#else  /* !FX_PACKEDCOLOR */
-+   INTERP_F( t, dst->r, out->r, in->r );
-+   INTERP_F( t, dst->g, out->g, in->g );
-+   INTERP_F( t, dst->b, out->b, in->b );
-+   INTERP_F( t, dst->a, out->a, in->a );
-+#endif /* !FX_PACKEDCOLOR */
-    if (IND & SETUP_SPEC) {
-+#if FX_PACKEDCOLOR
-       INTERP_UB( t, dst->pspec[0], out->pspec[0], in->pspec[0] );
-       INTERP_UB( t, dst->pspec[1], out->pspec[1], in->pspec[1] );
-       INTERP_UB( t, dst->pspec[2], out->pspec[2], in->pspec[2] );
-+#else  /* !FX_PACKEDCOLOR */
-+      INTERP_F( t, dst->r1, out->r1, in->r1 );
-+      INTERP_F( t, dst->g1, out->g1, in->g1 );
-+      INTERP_F( t, dst->b1, out->b1, in->b1 );
-+#endif /* !FX_PACKEDCOLOR */
-    }
-    if (IND & SETUP_FOGC) {
-Index: extras/Mesa/src/mesa/drivers/glide/fxwgl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/glide/fxwgl.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/drivers/glide/fxwgl.c 28 Aug 2004 04:27:44 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/drivers/glide/fxwgl.c 15 Dec 2004 01:51:01 -0000      1.1.1.3.2.1
-@@ -348,7 +348,7 @@
-      SetForegroundWindow(hWnd);
-      Sleep(100); /* a hack for win95 */
-      if (env_check("MESA_GLX_FX", 'w') && !(GetWindowLong (hWnd, GWL_STYLE) & WS_POPUP)) {
--      /* [dBorca] Hack alert: unfinished business! */
-+      /* XXX todo - windowed modes */
-         error = !(ctx = fxMesaCreateContext((GLuint) hWnd, GR_RESOLUTION_NONE, GR_REFRESH_NONE, pix[curPFD - 1].mesaAttr));
-      } else {
-         GetClientRect(hWnd, &cliRect);
-@@ -629,7 +629,7 @@
-    int i;
-    PROC p = (PROC) _glapi_get_proc_address((const char *) lpszProc);
--   /* [dBorca] we can't do BlendColor */
-+   /* we can't BlendColor. work around buggy applications */
-    if (p && strcmp(lpszProc, "glBlendColor") && strcmp(lpszProc, "glBlendColorEXT"))
-       return p;
-@@ -860,10 +860,7 @@
-       if (!(pfd.dwFlags & PFD_DOUBLEBUFFER_DONTCARE)
-         && ((pfd.dwFlags & PFD_DOUBLEBUFFER) !=
-             (pix[i].pfd.dwFlags & PFD_DOUBLEBUFFER))) continue;
--#if 0 /* [dBorca] Hack alert:\r
--       * Doom3 fails here!\r
--       * Can we get away by implementing WGL_ARB_pixel_format?\r
--       */\r
-+#if 1 /* Doom3 fails here! */
-       if (!(pfd.dwFlags & PFD_STEREO_DONTCARE)
-         && ((pfd.dwFlags & PFD_STEREO) !=
-             (pix[i].pfd.dwFlags & PFD_STEREO))) continue;
-@@ -875,7 +872,7 @@
-       if (pfd.cAlphaBits > 0 && pix[i].pfd.cAlphaBits == 0)
-        continue;              /* need alpha buffer */
--#if 0 /* [dBorca] regression bug? */
-+#if 0 /* regression bug? */
-       if (pfd.cStencilBits > 0 && pix[i].pfd.cStencilBits == 0)
-        continue;              /* need stencil buffer */
- #endif
-Index: extras/Mesa/src/mesa/drivers/osmesa/osmesa.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/osmesa/osmesa.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/osmesa/osmesa.c       16 Jun 2004 09:18:50 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/osmesa/osmesa.c       15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -1273,23 +1273,25 @@
- }
-+typedef void (*OSMESAproc)(void);
--struct name_address {
-+struct name_function
-+{
-    const char *Name;
--   GLvoid *Address;
-+   OSMESAproc Function;
- };
--static struct name_address functions[] = {
--   { "OSMesaCreateContext", (void *) OSMesaCreateContext },
--   { "OSMesaCreateContextExt", (void *) OSMesaCreateContextExt },
--   { "OSMesaDestroyContext", (void *) OSMesaDestroyContext },
--   { "OSMesaMakeCurrent", (void *) OSMesaMakeCurrent },
--   { "OSMesaGetCurrentContext", (void *) OSMesaGetCurrentContext },
--   { "OSMesaPixelsStore", (void *) OSMesaPixelStore },
--   { "OSMesaGetIntegerv", (void *) OSMesaGetIntegerv },
--   { "OSMesaGetDepthBuffer", (void *) OSMesaGetDepthBuffer },
--   { "OSMesaGetColorBuffer", (void *) OSMesaGetColorBuffer },
--   { "OSMesaGetProcAddress", (void *) OSMesaGetProcAddress },
-+static struct name_function functions[] = {
-+   { "OSMesaCreateContext", (OSMESAproc) OSMesaCreateContext },
-+   { "OSMesaCreateContextExt", (OSMESAproc) OSMesaCreateContextExt },
-+   { "OSMesaDestroyContext", (OSMESAproc) OSMesaDestroyContext },
-+   { "OSMesaMakeCurrent", (OSMESAproc) OSMesaMakeCurrent },
-+   { "OSMesaGetCurrentContext", (OSMESAproc) OSMesaGetCurrentContext },
-+   { "OSMesaPixelsStore", (OSMESAproc) OSMesaPixelStore },
-+   { "OSMesaGetIntegerv", (OSMESAproc) OSMesaGetIntegerv },
-+   { "OSMesaGetDepthBuffer", (OSMESAproc) OSMesaGetDepthBuffer },
-+   { "OSMesaGetColorBuffer", (OSMESAproc) OSMesaGetColorBuffer },
-+   { "OSMesaGetProcAddress", (OSMESAproc) OSMesaGetProcAddress },
-    { NULL, NULL }
- };
-@@ -1299,7 +1301,7 @@
-    int i;
-    for (i = 0; functions[i].Name; i++) {
-       if (_mesa_strcmp(functions[i].Name, funcName) == 0)
--         return (void *) functions[i].Address;
-+         return (void *) functions[i].Function;
-    }
-    return (void *) _glapi_get_proc_address(funcName);
- }
-Index: extras/Mesa/src/mesa/drivers/windows/gdi/colors.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/windows/gdi/colors.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/windows/gdi/colors.h  16 Jun 2004 09:18:50 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/windows/gdi/colors.h  15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -24,6 +24,9 @@
- /*
-  * $Log$
-+ * Revision 1.2  2004/08/25 15:59:48  brianp
-+ * Silence gcc 3.4 warnings on ReactOS.  Mostly unused var warnings.  (patch 1015696)
-+ *
-  * Revision 1.1  2003/07/24 03:47:46  kschultz
-  * Source code for GDI driver.
-  *
-@@ -49,6 +52,9 @@
- /*
-  * $Log$
-+ * Revision 1.2  2004/08/25 15:59:48  brianp
-+ * Silence gcc 3.4 warnings on ReactOS.  Mostly unused var warnings.  (patch 1015696)
-+ *
-  * Revision 1.1  2003/07/24 03:47:46  kschultz
-  * Source code for GDI driver.
-  *
-@@ -74,6 +80,9 @@
-  
- /*
-  * $Log$
-+ * Revision 1.2  2004/08/25 15:59:48  brianp
-+ * Silence gcc 3.4 warnings on ReactOS.  Mostly unused var warnings.  (patch 1015696)
-+ *
-  * Revision 1.1  2003/07/24 03:47:46  kschultz
-  * Source code for GDI driver.
-  *
-@@ -141,7 +150,7 @@
- 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
- 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
--#define BGR8(r,g,b)           (unsigned)(((BYTE)(b & 0xc0 | (g & 0xe0)>>2 | (r & 0xe0)>>5)))
-+#define BGR8(r,g,b)           (unsigned)(((BYTE)((b & 0xc0) | ((g & 0xe0)>>2) | ((r & 0xe0)>>5))))
- #ifdef DDRAW
- #define BGR16(r,g,b)  ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
- #else
-Index: extras/Mesa/src/mesa/drivers/windows/gdi/wgl.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/windows/gdi/wgl.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/windows/gdi/wgl.c     16 Jun 2004 09:18:51 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/windows/gdi/wgl.c     15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -1,4 +1,4 @@
--/* $Id$ */
-+/* $Id$ */
- /*
- * This library is free software; you can redistribute it and/or
-@@ -102,11 +102,12 @@
- static MesaWglCtx wgl_ctx[MESAWGL_CTX_MAX_COUNT];
- static unsigned ctx_count = 0;
--static unsigned ctx_current = -1;
-+static int ctx_current = -1;
- static unsigned curPFD = 0;
- WGLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc,HGLRC hglrcDst,UINT mask)
- {
-+    (void) hglrcSrc; (void) hglrcDst; (void) mask;
-     return(FALSE);
- }
-@@ -166,6 +167,7 @@
- WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,int iLayerPlane)
- {
-+    (void) hdc; (void) iLayerPlane;
-     SetLastError(0);
-     return(NULL);
- }
-@@ -212,6 +214,7 @@
- WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
- {
-+    (void) hglrc1; (void) hglrc2;
-     return(TRUE);
- }
-@@ -219,7 +222,7 @@
- static FIXED FixedFromDouble(double d)
- {
-    long l = (long) (d * 65536L);
--   return *(FIXED *)&l;
-+   return *(FIXED *) (void *) &l;
- }
-@@ -258,9 +261,9 @@
-   SetTextColor(bitDevice, tempColor);
-   // Place chars based on base line
--  VERIFY(SetTextAlign(bitDevice, TA_BASELINE) >= 0 ? 1 : 0);
-+  VERIFY(SetTextAlign(bitDevice, TA_BASELINE) != GDI_ERROR ? 1 : 0);
--  for(i = 0; i < numChars; i++) {
-+  for(i = 0; i < (int)numChars; i++) {
-     SIZE size;
-     char curChar;
-     int charWidth,charHeight,bmapWidth,bmapHeight,numBytes,res;
-@@ -285,7 +288,7 @@
-     // Assign the output bitmap to the device
-     origBmap = SelectObject(bitDevice, bitObject);
--    VERIFY(origBmap);
-+    (void) VERIFY(origBmap);
-     VERIFY( PatBlt( bitDevice, 0, 0, bmapWidth, bmapHeight,BLACKNESS ) );
-@@ -344,11 +347,7 @@
-    MAT2 mat;
-    int  success = TRUE;
--   if (first<0)
--      return FALSE;
--   if (count<0)
--      return FALSE;
--   if (listBase<0)
-+   if (count == 0)
-       return FALSE;
-    font_list = listBase;
-@@ -373,7 +372,7 @@
-    /*
-    ** Otherwise process all desired characters.
-    */
--   for (i = 0; i < count; i++)
-+   for (i = 0; i < (int)count; i++)
-    {
-        DWORD err;
-        
-@@ -432,6 +431,7 @@
- WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc,DWORD first,DWORD count,DWORD listBase)
- {
-+    (void) hdc; (void) first; (void) count; (void) listBase;
-     return FALSE;
- }
-@@ -440,6 +440,9 @@
-                                   FLOAT extrusion,int format,
-                                   LPGLYPHMETRICSFLOAT lpgmf)
- {
-+    (void) hdc; (void) first; (void) count;
-+    (void) listBase; (void) deviation; (void) extrusion; (void) format;
-+    (void) lpgmf;
-     SetLastError(0);
-     return(FALSE);
- }
-@@ -449,6 +452,9 @@
-                                   FLOAT extrusion,int format,
-                                   LPGLYPHMETRICSFLOAT lpgmf)
- {
-+    (void) hdc; (void) first; (void) count;
-+    (void) listBase; (void) deviation; (void) extrusion; (void) format;
-+    (void) lpgmf;
-     SetLastError(0);
-     return(FALSE);
- }
-@@ -457,6 +463,7 @@
-                                     int iLayerPlane,UINT nBytes,
-                                     LPLAYERPLANEDESCRIPTOR plpd)
- {
-+    (void) hdc; (void) iPixelFormat; (void) iLayerPlane; (void) nBytes; (void) plpd;
-     SetLastError(0);
-     return(FALSE);
- }
-@@ -465,6 +472,7 @@
-                                        int iStart,int cEntries,
-                                        CONST COLORREF *pcr)
- {
-+    (void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
-     SetLastError(0);
-     return(0);
- }
-@@ -473,18 +481,21 @@
-                                        int iStart,int cEntries,
-                                        COLORREF *pcr)
- {
-+    (void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
-     SetLastError(0);
-     return(0);
- }
- WGLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc,int iLayerPlane,BOOL bRealize)
- {
-+    (void) hdc; (void) iLayerPlane; (void) bRealize;
-     SetLastError(0);
-     return(FALSE);
- }
- WGLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc,UINT fuPlanes)
- {
-+    (void) fuPlanes;
-     if( !hdc )
-     {
-         WMesaSwapBuffers();
-@@ -498,6 +509,7 @@
-                                   CONST PIXELFORMATDESCRIPTOR *ppfd)
- {
-     int               i,best = -1,bestdelta = 0x7FFFFFFF,delta,qt_valid_pix;
-+    (void) hdc;
-     qt_valid_pix = qt_pix;
-     if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
-@@ -556,6 +568,7 @@
-                                     LPPIXELFORMATDESCRIPTOR ppfd)
- {
-     int               qt_valid_pix;
-+    (void) hdc;
-     qt_valid_pix = qt_pix;
-     if(ppfd == NULL)
-@@ -584,6 +597,7 @@
- WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc)
- {
-+    (void) hdc;
-     if(curPFD == 0)
-     {
-         SetLastError(0);
-@@ -596,6 +610,7 @@
-                                 PIXELFORMATDESCRIPTOR *ppfd)
- {
-     int               qt_valid_pix;
-+    (void) hdc;
-     qt_valid_pix = qt_pix;
-     if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))
-@@ -609,6 +624,7 @@
- WGLAPI BOOL GLAPIENTRY wglSwapBuffers(HDC hdc)
- {
-+   (void) hdc;
-    if (ctx_current < 0)
-       return FALSE;
-Index: extras/Mesa/src/mesa/drivers/windows/gdi/wmesa.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/windows/gdi/wmesa.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/drivers/windows/gdi/wmesa.c   22 Jul 2004 06:52:26 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/windows/gdi/wmesa.c   15 Dec 2004 01:51:01 -0000      1.1.1.2.4.1
-@@ -45,6 +45,7 @@
- #include "array_cache/acache.h"
- #include "swrast/swrast.h"
- #include "swrast_setup/swrast_setup.h"
-+#include "swrast/s_alphabuf.h"
- #include "swrast/s_context.h"
- #include "swrast/s_depth.h"
- #include "swrast/s_lines.h"
-@@ -165,7 +166,6 @@
- #define USE_GDI_TO_CLEAR 1
- #endif
--static void FlushToFile(PWMC pwc, PSTR  szFile);
- BOOL wmCreateBackingStore(PWMC pwc, long lxSize, long lySize);
- BOOL wmDeleteBackingStore(PWMC pwc);
- void wmCreatePalette( PWMC pwdc );
-@@ -347,15 +347,20 @@
- BYTE DITHER_RGB_2_8BIT( int r, int g, int b, int x, int y);
-+#if 0 /* unused */
-+
- /* Finish all pending operations and synchronize. */
- static void finish(GLcontext* ctx)
- {
-   /* No op */
-+  (void) ctx;
- }
-+#endif /* unused */
- static void flush(GLcontext* ctx)
- {
-+  (void) ctx;
-   if((Current->rgb_flag &&!(Current->db_flag))
-      ||(!Current->rgb_flag))
-     {
-@@ -371,6 +376,7 @@
-  */
- static void clear_index(GLcontext* ctx, GLuint index)
- {
-+  (void) ctx;
-   Current->clearpixel = index;
- }
-@@ -382,6 +388,7 @@
- static void clear_color( GLcontext* ctx, const GLfloat color[4] )
- {
-   GLubyte col[4];
-+  (void) ctx;
-   CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]);
-   CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]);
-   CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]);
-@@ -400,7 +407,7 @@
-  * Otherwise, we let swrast do it. 
-  */ 
--static clear(GLcontext* ctx, GLbitfield mask, 
-+static void clear(GLcontext* ctx, GLbitfield mask, 
-       GLboolean all, GLint x, GLint y, GLint width, GLint height) 
- { 
-   const   GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask; 
-@@ -467,7 +474,7 @@
-    WORD    wColor; 
-    BYTE    bColor; 
-    LPDWORD lpdw = (LPDWORD)Current->pbPixels; 
--   LPWORD  lpw = (LPWORD)Current->pbPixels; 
-+   /*LPWORD  lpw = (LPWORD)Current->pbPixels; */
-    LPBYTE  lpb = Current->pbPixels; 
-    int     lines; 
-    /* Double-buffering - clear back buffer */ 
-@@ -513,7 +520,9 @@
-        dwColor = BGR32(GetRValue(Current->clearpixel), 
-          GetGValue(Current->clearpixel), 
-          GetBValue(Current->clearpixel)); 
--   } 
-+   }
-+   else
-+       dwColor = 0;
-    if (nBypp != 3) 
-    { 
-@@ -567,6 +576,7 @@
- static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
- {
-+  (void) ctx;
-   if (!Current)
-     return;
-   
-@@ -592,6 +602,7 @@
- static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
-                        GLuint bufferBit )
- {
-+  (void) ctx; (void) colorBuffer; (void) bufferBit;
-   /* XXX todo - examine bufferBit and set read/write pointers */
-   return;
- }
-@@ -601,9 +612,10 @@
- /* Return characteristics of the output buffer. */
- static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
- {
--  GET_CURRENT_CONTEXT(ctx);
-+  /*GET_CURRENT_CONTEXT(ctx);*/
-   int New_Size;
-   RECT CR;
-+  (void) buffer;
-   
-   GetClientRect(Current->Window,&CR);
-   
-@@ -649,25 +661,36 @@
- /* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
-+#if 0 /* unused */
-+
- static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
- {
-+  (void) ctx; (void) first; (void) last;
- }
-+#endif /* unused */
-+
- /* Return pointer to accelerated points function */
- extern tnl_points_func choose_points_function( GLcontext* ctx )
- {
-+  (void) ctx;
-   return NULL;
- }
-+#if 0 /* unused */
-+
- static void fast_flat_rgb_line( GLcontext* ctx, GLuint v0, 
-                               GLuint v1, GLuint pv )
- {
-+  (void) ctx; (void) v0; (void) v1; (void) pv;
- }
- static tnl_line_func choose_line_function( GLcontext* ctx )
- {
-+  (void) ctx;
- }
-+#endif /* unused */
- /**********************************************************************/
- /*****                 Span-based pixel drawing                   *****/
-@@ -682,6 +705,7 @@
- {
-   GLuint i;
-   PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++)
-     if (mask[i])
-@@ -697,6 +721,7 @@
- {
-   GLuint i;
-   PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++)
-     if (mask[i])
-@@ -715,6 +740,7 @@
- {
-   GLuint i;
-   BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++)
-     if (mask[i])
-@@ -731,11 +757,12 @@
-                              const GLubyte rgba[][4], const GLubyte mask[] )
- {
-   PWMC    pwc = Current;
-+  (void) ctx;
-   
-   if (pwc->rgb_flag==GL_TRUE)
-     {
-       GLuint i;
--      HDC DC=DD_GETDC;
-+      /*HDC DC=DD_GETDC;*/
-       y=FLIP(y);
-       if (mask) {
-       for (i=0; i<n; i++)
-@@ -779,11 +806,12 @@
-                             const GLubyte rgb[][3], const GLubyte mask[] )
- {
-   PWMC    pwc = Current;
--  
-+  (void) ctx;
-+
-   if (pwc->rgb_flag==GL_TRUE)
-     {
-       GLuint i;
--      HDC DC=DD_GETDC;
-+      /*HDC DC=DD_GETDC;*/
-       y=FLIP(y);
-       if (mask) {
-       for (i=0; i<n; i++)
-@@ -831,6 +859,7 @@
- {
-   GLuint i;
-   PWMC pwc = Current;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_TRUE);
-   y=FLIP(y);
-   if(Current->rgb_flag==GL_TRUE)
-@@ -863,6 +892,7 @@
-                                const GLuint index[], const GLubyte mask[] )
- {
-   GLuint i;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++) {
-     if (mask[i]) {
-@@ -884,6 +914,7 @@
-                                   GLuint colorIndex, const GLubyte mask[] )
- {
-   GLuint i;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++) {
-     if (mask[i]) {
-@@ -902,7 +933,8 @@
- {
-   GLuint i;
-   PWMC    pwc = Current;
--  HDC DC=DD_GETDC;
-+  /*HDC DC=DD_GETDC;*/
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_TRUE);
-   for (i=0; i<n; i++)
-     if (mask[i])
-@@ -925,7 +957,8 @@
- {
-   GLuint i;
-   PWMC    pwc = Current;
--  HDC DC=DD_GETDC;
-+  /*HDC DC=DD_GETDC;*/
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_TRUE);
-   for (i=0; i<n; i++)
-     if (mask[i])
-@@ -947,6 +980,7 @@
- {
-   GLuint i;
-   BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++)
-     index[i]=Mem[i];
-@@ -961,6 +995,7 @@
-                               GLuint indx[], const GLubyte mask[] )
- {
-   GLuint i;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_FALSE);
-   for (i=0; i<n; i++) {
-     if (mask[i]) {
-@@ -979,6 +1014,7 @@
-   UINT i;
-   COLORREF Color;
-   HDC DC=DD_GETDC;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_TRUE);
-   y = Current->height - y - 1;
-   for (i=0; i<n; i++) {
-@@ -1000,6 +1036,7 @@
-   GLuint i;
-   COLORREF Color;
-   HDC DC=DD_GETDC;
-+  (void) ctx;
-   assert(Current->rgb_flag==GL_TRUE);
-   for (i=0; i<n; i++) {
-     if (mask[i]) {
-@@ -1022,6 +1059,7 @@
- static const GLubyte *get_string(GLcontext *ctx, GLenum name)
- {
-+  (void) ctx;
-   if (name == GL_RENDERER) {
-     return (GLubyte *) "Mesa Windows";
-   }
-@@ -1074,7 +1112,7 @@
- static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
- {
--  struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
-+  /*struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );*/
-   TNLcontext *tnl = TNL_CONTEXT(ctx);
-   
-   /*
-@@ -1166,7 +1204,7 @@
- /*****                  WMesa API Functions                       *****/
- /**********************************************************************/
--
-+#if 0 /* unused */
- #define PAL_SIZE 256
- static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
-@@ -1178,11 +1216,9 @@
-     WORD Version;
-     WORD NumberOfEntries;
-     PALETTEENTRY aEntries[PAL_SIZE];
--  } Palette =
--    {
--      0x300,
--      PAL_SIZE
--    };
-+  } Palette;
-+  Palette.Version = 0x300;
-+  Palette.NumberOfEntries = PAL_SIZE;
-   hdc=GetDC(NULL);
-   if (Pal!=NULL)
-     GetPaletteEntries(Pal,0,PAL_SIZE,Palette.aEntries);
-@@ -1226,6 +1262,7 @@
-     }
- }
-+#endif /* unused */
- WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
-                                GLboolean rgb_flag,
-@@ -1236,6 +1273,7 @@
-   WMesaContext c;
-   GLboolean true_color_flag;
-   struct dd_function_table functions;
-+  (void) Pal;
-   c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
-   if (!c)
-@@ -1436,7 +1474,7 @@
- void WMesaSwapBuffers( void )
- {
--  HDC DC = Current->hDC;
-+/*  HDC DC = Current->hDC;*/
-   GET_CURRENT_CONTEXT(ctx);
-   
-   /* If we're swapping the buffer associated with the current context
-@@ -1699,6 +1737,8 @@
-   DWORD   dwScanWidth;
-   UINT    nBypp = pwc->cColorBits / 8;
-   HDC     hic;
-+  (void) hDC;
-+  (void) pbmi;
-   
-   dwScanWidth = (((pwc->ScanWidth * nBypp)+ 3) & ~3);
-   
-@@ -1742,14 +1782,14 @@
-   pwc->hbmDIB = CreateDIBSection(hic,
-                                &(pwc->bmi),
-                                (iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
--                               &(pwc->pbPixels),
-+                               (void **)&(pwc->pbPixels),
-                                pwc->dib.hFileMap,
-                                0);
- #else
-   pwc->hbmDIB = CreateDIBSection(hic,
-                                &(pwc->bmi),
-                                (iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
--                               &(pwc->pbPixels),
-+                               (void **)&(pwc->pbPixels),
-                                0,
-                                0);
- #endif // USE_MAPPED_FILE
-@@ -1768,7 +1808,7 @@
- BOOL wmFlush(PWMC pwc)
- {
-   BOOL    bRet = 0;
--  DWORD   dwErr = 0;
-+/*  DWORD   dwErr = 0;*/
- #ifdef DDRAW
-   HRESULT             ddrval;
- #endif
-@@ -3182,8 +3222,11 @@
- #endif
- /************** END DEAD TRIANGLE CODE ***********************/
-+#if 0 /* unused */
-+
- static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
- {
-+    (void) ctx;
- #if 0
-     WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
-     int depth = wmesa->cColorBits;
-@@ -3277,6 +3320,8 @@
- #endif
- }
-+#endif /* unused */
-+
- /*
-  * Define a new viewport and reallocate auxillary buffers if the size of
-  * the window (color buffer) has changed.
-@@ -3284,6 +3329,7 @@
- void WMesaViewport( GLcontext *ctx,
-                   GLint x, GLint y, GLsizei width, GLsizei height )
- {
-+  (void) ctx; (void) x; (void) y; (void) width; (void) height;
-   assert(0);  /* I don't think that this is being used. */
- #if 0
-   /* Save viewport */
-Index: extras/Mesa/src/mesa/drivers/windows/gdi/wmesadef.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/windows/gdi/wmesadef.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/windows/gdi/wmesadef.h        16 Jun 2004 09:18:51 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/windows/gdi/wmesadef.h        15 Dec 2004 01:51:01 -0000      1.1.1.1.4.1
-@@ -93,6 +93,7 @@
- }WMDIBSECTION, *PWMDIBSECTION;
- #ifdef COMPILE_SETPIXEL
-+struct wmesa_context;
- typedef void (*SETPIXELTYPE)(struct wmesa_context *pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b);
- #endif
-Index: extras/Mesa/src/mesa/drivers/x11/fakeglx.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/x11/fakeglx.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/drivers/x11/fakeglx.c 12 Aug 2004 23:06:51 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/drivers/x11/fakeglx.c 15 Dec 2004 01:51:02 -0000      1.1.1.2.2.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -80,10 +80,6 @@
-    "GLX_SGI_video_sync " \
-    "GLX_SGIX_fbconfig " \
-    "GLX_SGIX_pbuffer "
--/*
--   "GLX_ARB_render_texture"
--*/
--
- /*
-  * Our fake GLX context will contain a "real" GLX context and an XMesa context.
-@@ -144,7 +140,8 @@
- /*
-  * Test if the given XVisualInfo is usable for Mesa rendering.
-  */
--static GLboolean is_usable_visual( XVisualInfo *vinfo )
-+static GLboolean
-+is_usable_visual( XVisualInfo *vinfo )
- {
-    switch (vinfo->CLASS) {
-       case StaticGray:
-@@ -181,7 +178,8 @@
-  *            >0 = overlay planes
-  *            <0 = underlay planes
-  */
--static int level_of_visual( Display *dpy, XVisualInfo *vinfo )
-+static int
-+level_of_visual( Display *dpy, XVisualInfo *vinfo )
- {
-    Atom overlayVisualsAtom;
-    OverlayInfo *overlay_info = NULL;
-@@ -332,7 +330,9 @@
-       /* add xmvis to the list */
-       VisualTable[NumVisuals] = xmvis;
-       NumVisuals++;
--      /* XXX minor hack */
-+      /* XXX minor hack, because XMesaCreateVisual doesn't support an
-+       * aux buffers parameter.
-+       */
-       xmvis->mesa_visual.numAuxBuffers = numAuxBuffers;
-    }
-    return xmvis;
-@@ -467,7 +467,8 @@
-  * Input:  glxvis - the glx_visual
-  * Return:  a pixel value or -1 if no transparent pixel
-  */
--static int transparent_pixel( XMesaVisual glxvis )
-+static int
-+transparent_pixel( XMesaVisual glxvis )
- {
-    Display *dpy = glxvis->display;
-    XVisualInfo *vinfo = glxvis->visinfo;
-@@ -532,8 +533,8 @@
- /*
-  * Try to get an X visual which matches the given arguments.
-  */
--static XVisualInfo *get_visual( Display *dpy, int scr,
--                              unsigned int depth, int xclass )
-+static XVisualInfo *
-+get_visual( Display *dpy, int scr, unsigned int depth, int xclass )
- {
-    XVisualInfo temp, *vis;
-    long mask;
-@@ -586,7 +587,8 @@
-  *         varname - the name of the environment variable
-  * Return:  an XVisualInfo pointer to NULL if error.
-  */
--static XVisualInfo *get_env_visual(Display *dpy, int scr, const char *varname)
-+static XVisualInfo *
-+get_env_visual(Display *dpy, int scr, const char *varname)
- {
-    char value[100], type[100];
-    int depth, xclass = -1;
-@@ -631,9 +633,9 @@
-  *         preferred_class - preferred GLX visual class or DONT_CARE
-  * Return:  pointer to an XVisualInfo or NULL.
-  */
--static XVisualInfo *choose_x_visual( Display *dpy, int screen,
--                                   GLboolean rgba, int min_depth,
--                                     int preferred_class )
-+static XVisualInfo *
-+choose_x_visual( Display *dpy, int screen, GLboolean rgba, int min_depth,
-+                 int preferred_class )
- {
-    XVisualInfo *vis;
-    int xclass, visclass = 0;
-@@ -801,12 +803,10 @@
-  *         preferred_class - preferred GLX visual class or DONT_CARE
-  * Return:  pointer to an XVisualInfo or NULL.
-  */
--static XVisualInfo *choose_x_overlay_visual( Display *dpy, int scr,
--                                             GLboolean rgbFlag,
--                                             int level, int trans_type,
--                                             int trans_value,
--                                             int min_depth,
--                                             int preferred_class )
-+static XVisualInfo *
-+choose_x_overlay_visual( Display *dpy, int scr, GLboolean rgbFlag,
-+                         int level, int trans_type, int trans_value,
-+                         int min_depth, int preferred_class )
- {
-    Atom overlayVisualsAtom;
-    OverlayInfo *overlay_info;
-@@ -931,8 +931,9 @@
- /**********************************************************************/
--static XMesaVisual choose_visual( Display *dpy, int screen, const int *list,
--                                  GLboolean rgbModeDefault )
-+static XMesaVisual
-+choose_visual( Display *dpy, int screen, const int *list,
-+               GLboolean rgbModeDefault )
- {
-    const int *parselist;
-    XVisualInfo *vis;
-@@ -1392,7 +1393,6 @@
- }
--
- static Bool
- Fake_glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx )
- {
-@@ -1400,7 +1400,6 @@
- }
--
- static GLXPixmap
- Fake_glXCreateGLXPixmap( Display *dpy, XVisualInfo *visinfo, Pixmap pixmap )
- {
-@@ -1463,7 +1462,6 @@
- }
--
- static void
- Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
-                      unsigned long mask )
-@@ -1477,7 +1475,6 @@
- }
--
- static Bool
- Fake_glXQueryExtension( Display *dpy, int *errorb, int *event )
- {
-@@ -1512,7 +1509,6 @@
- }
--
- static Bool
- Fake_glXIsDirect( Display *dpy, GLXContext ctx )
- {
-@@ -1554,7 +1550,6 @@
- }
--
- static Bool
- Fake_glXQueryVersion( Display *dpy, int *maj, int *min )
- {
-@@ -1567,7 +1562,6 @@
- }
--
- /*
-  * Query the GLX attributes of the given XVisualInfo.
-  */
-@@ -2738,9 +2732,19 @@
- }
--
-+/* silence warning */
- extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
--struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
-+
-+
-+/**
-+ * Create a new GLX API dispatch table with its function pointers
-+ * initialized to point to Mesa's "fake" GLX API functions.
-+ * Note: there's a similar function (_real_GetGLXDispatchTable) that
-+ * returns a new dispatch table with all pointers initalized to point
-+ * to "real" GLX functions (which understand GLX wire protocol, etc).
-+ */
-+struct _glxapi_table *
-+_mesa_GetGLXDispatchTable(void)
- {
-    static struct _glxapi_table glx;
-Index: extras/Mesa/src/mesa/drivers/x11/glxapi.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/x11/glxapi.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/x11/glxapi.c  16 Jun 2004 09:19:00 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/x11/glxapi.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,9 +1,8 @@
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  5.1
-+ * Version:  6.2.1
-  * 
-- * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  * 
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -1141,160 +1140,161 @@
- void
- _glxapi_set_no_op_table(struct _glxapi_table *t)
- {
-+   typedef int (*nop_func)(void);
-+   nop_func *dispatch = (nop_func *) t;
-    GLuint n = _glxapi_get_dispatch_table_size();
-    GLuint i;
--   void **dispatch = (void **) t;
-    for (i = 0; i < n; i++) {
--      dispatch[i] = (void *) generic_no_op_func;
-+      dispatch[i] = generic_no_op_func;
-    }
- }
- struct name_address_pair {
-    const char *Name;
--   GLvoid *Address;
-+   __GLXextFuncPtr Address;
- };
- static struct name_address_pair GLX_functions[] = {
-    /*** GLX_VERSION_1_0 ***/
--   { "glXChooseVisual", (GLvoid *) glXChooseVisual },
--   { "glXCopyContext", (GLvoid *) glXCopyContext },
--   { "glXCreateContext", (GLvoid *) glXCreateContext },
--   { "glXCreateGLXPixmap", (GLvoid *) glXCreateGLXPixmap },
--   { "glXDestroyContext", (GLvoid *) glXDestroyContext },
--   { "glXDestroyGLXPixmap", (GLvoid *) glXDestroyGLXPixmap },
--   { "glXGetConfig", (GLvoid *) glXGetConfig },
--   { "glXGetCurrentContext", (GLvoid *) glXGetCurrentContext },
--   { "glXGetCurrentDrawable", (GLvoid *) glXGetCurrentDrawable },
--   { "glXIsDirect", (GLvoid *) glXIsDirect },
--   { "glXMakeCurrent", (GLvoid *) glXMakeCurrent },
--   { "glXQueryExtension", (GLvoid *) glXQueryExtension },
--   { "glXQueryVersion", (GLvoid *) glXQueryVersion },
--   { "glXSwapBuffers", (GLvoid *) glXSwapBuffers },
--   { "glXUseXFont", (GLvoid *) glXUseXFont },
--   { "glXWaitGL", (GLvoid *) glXWaitGL },
--   { "glXWaitX", (GLvoid *) glXWaitX },
-+   { "glXChooseVisual", (__GLXextFuncPtr) glXChooseVisual },
-+   { "glXCopyContext", (__GLXextFuncPtr) glXCopyContext },
-+   { "glXCreateContext", (__GLXextFuncPtr) glXCreateContext },
-+   { "glXCreateGLXPixmap", (__GLXextFuncPtr) glXCreateGLXPixmap },
-+   { "glXDestroyContext", (__GLXextFuncPtr) glXDestroyContext },
-+   { "glXDestroyGLXPixmap", (__GLXextFuncPtr) glXDestroyGLXPixmap },
-+   { "glXGetConfig", (__GLXextFuncPtr) glXGetConfig },
-+   { "glXGetCurrentContext", (__GLXextFuncPtr) glXGetCurrentContext },
-+   { "glXGetCurrentDrawable", (__GLXextFuncPtr) glXGetCurrentDrawable },
-+   { "glXIsDirect", (__GLXextFuncPtr) glXIsDirect },
-+   { "glXMakeCurrent", (__GLXextFuncPtr) glXMakeCurrent },
-+   { "glXQueryExtension", (__GLXextFuncPtr) glXQueryExtension },
-+   { "glXQueryVersion", (__GLXextFuncPtr) glXQueryVersion },
-+   { "glXSwapBuffers", (__GLXextFuncPtr) glXSwapBuffers },
-+   { "glXUseXFont", (__GLXextFuncPtr) glXUseXFont },
-+   { "glXWaitGL", (__GLXextFuncPtr) glXWaitGL },
-+   { "glXWaitX", (__GLXextFuncPtr) glXWaitX },
-    /*** GLX_VERSION_1_1 ***/
--   { "glXGetClientString", (GLvoid *) glXGetClientString },
--   { "glXQueryExtensionsString", (GLvoid *) glXQueryExtensionsString },
--   { "glXQueryServerString", (GLvoid *) glXQueryServerString },
-+   { "glXGetClientString", (__GLXextFuncPtr) glXGetClientString },
-+   { "glXQueryExtensionsString", (__GLXextFuncPtr) glXQueryExtensionsString },
-+   { "glXQueryServerString", (__GLXextFuncPtr) glXQueryServerString },
-    /*** GLX_VERSION_1_2 ***/
--   { "glXGetCurrentDisplay", (GLvoid *) glXGetCurrentDisplay },
-+   { "glXGetCurrentDisplay", (__GLXextFuncPtr) glXGetCurrentDisplay },
-    /*** GLX_VERSION_1_3 ***/
--   { "glXChooseFBConfig", (GLvoid *) glXChooseFBConfig },
--   { "glXCreateNewContext", (GLvoid *) glXCreateNewContext },
--   { "glXCreatePbuffer", (GLvoid *) glXCreatePbuffer },
--   { "glXCreatePixmap", (GLvoid *) glXCreatePixmap },
--   { "glXCreateWindow", (GLvoid *) glXCreateWindow },
--   { "glXDestroyPbuffer", (GLvoid *) glXDestroyPbuffer },
--   { "glXDestroyPixmap", (GLvoid *) glXDestroyPixmap },
--   { "glXDestroyWindow", (GLvoid *) glXDestroyWindow },
--   { "glXGetCurrentReadDrawable", (GLvoid *) glXGetCurrentReadDrawable },
--   { "glXGetFBConfigAttrib", (GLvoid *) glXGetFBConfigAttrib },
--   { "glXGetFBConfigs", (GLvoid *) glXGetFBConfigs },
--   { "glXGetSelectedEvent", (GLvoid *) glXGetSelectedEvent },
--   { "glXGetVisualFromFBConfig", (GLvoid *) glXGetVisualFromFBConfig },
--   { "glXMakeContextCurrent", (GLvoid *) glXMakeContextCurrent },
--   { "glXQueryContext", (GLvoid *) glXQueryContext },
--   { "glXQueryDrawable", (GLvoid *) glXQueryDrawable },
--   { "glXSelectEvent", (GLvoid *) glXSelectEvent },
-+   { "glXChooseFBConfig", (__GLXextFuncPtr) glXChooseFBConfig },
-+   { "glXCreateNewContext", (__GLXextFuncPtr) glXCreateNewContext },
-+   { "glXCreatePbuffer", (__GLXextFuncPtr) glXCreatePbuffer },
-+   { "glXCreatePixmap", (__GLXextFuncPtr) glXCreatePixmap },
-+   { "glXCreateWindow", (__GLXextFuncPtr) glXCreateWindow },
-+   { "glXDestroyPbuffer", (__GLXextFuncPtr) glXDestroyPbuffer },
-+   { "glXDestroyPixmap", (__GLXextFuncPtr) glXDestroyPixmap },
-+   { "glXDestroyWindow", (__GLXextFuncPtr) glXDestroyWindow },
-+   { "glXGetCurrentReadDrawable", (__GLXextFuncPtr) glXGetCurrentReadDrawable },
-+   { "glXGetFBConfigAttrib", (__GLXextFuncPtr) glXGetFBConfigAttrib },
-+   { "glXGetFBConfigs", (__GLXextFuncPtr) glXGetFBConfigs },
-+   { "glXGetSelectedEvent", (__GLXextFuncPtr) glXGetSelectedEvent },
-+   { "glXGetVisualFromFBConfig", (__GLXextFuncPtr) glXGetVisualFromFBConfig },
-+   { "glXMakeContextCurrent", (__GLXextFuncPtr) glXMakeContextCurrent },
-+   { "glXQueryContext", (__GLXextFuncPtr) glXQueryContext },
-+   { "glXQueryDrawable", (__GLXextFuncPtr) glXQueryDrawable },
-+   { "glXSelectEvent", (__GLXextFuncPtr) glXSelectEvent },
-    /*** GLX_VERSION_1_4 ***/
--   { "glXGetProcAddress", (GLvoid *) glXGetProcAddress },
-+   { "glXGetProcAddress", (__GLXextFuncPtr) glXGetProcAddress },
-    /*** GLX_SGI_swap_control ***/
--   { "glXSwapIntervalSGI", (GLvoid *) glXSwapIntervalSGI },
-+   { "glXSwapIntervalSGI", (__GLXextFuncPtr) glXSwapIntervalSGI },
-    /*** GLX_SGI_video_sync ***/
--   { "glXGetVideoSyncSGI", (GLvoid *) glXGetVideoSyncSGI },
--   { "glXWaitVideoSyncSGI", (GLvoid *) glXWaitVideoSyncSGI },
-+   { "glXGetVideoSyncSGI", (__GLXextFuncPtr) glXGetVideoSyncSGI },
-+   { "glXWaitVideoSyncSGI", (__GLXextFuncPtr) glXWaitVideoSyncSGI },
-    /*** GLX_SGI_make_current_read ***/
--   { "glXMakeCurrentReadSGI", (GLvoid *) glXMakeCurrentReadSGI },
--   { "glXGetCurrentReadDrawableSGI", (GLvoid *) glXGetCurrentReadDrawableSGI },
-+   { "glXMakeCurrentReadSGI", (__GLXextFuncPtr) glXMakeCurrentReadSGI },
-+   { "glXGetCurrentReadDrawableSGI", (__GLXextFuncPtr) glXGetCurrentReadDrawableSGI },
-    /*** GLX_SGIX_video_source ***/
- #if defined(_VL_H)
--   { "glXCreateGLXVideoSourceSGIX", (GLvoid *) glXCreateGLXVideoSourceSGIX },
--   { "glXDestroyGLXVideoSourceSGIX", (GLvoid *) glXDestroyGLXVideoSourceSGIX },
-+   { "glXCreateGLXVideoSourceSGIX", (__GLXextFuncPtr) glXCreateGLXVideoSourceSGIX },
-+   { "glXDestroyGLXVideoSourceSGIX", (__GLXextFuncPtr) glXDestroyGLXVideoSourceSGIX },
- #endif
-    /*** GLX_EXT_import_context ***/
--   { "glXFreeContextEXT", (GLvoid *) glXFreeContextEXT },
--   { "glXGetContextIDEXT", (GLvoid *) glXGetContextIDEXT },
--   { "glXGetCurrentDisplayEXT", (GLvoid *) glXGetCurrentDisplayEXT },
--   { "glXImportContextEXT", (GLvoid *) glXImportContextEXT },
--   { "glXQueryContextInfoEXT", (GLvoid *) glXQueryContextInfoEXT },
-+   { "glXFreeContextEXT", (__GLXextFuncPtr) glXFreeContextEXT },
-+   { "glXGetContextIDEXT", (__GLXextFuncPtr) glXGetContextIDEXT },
-+   { "glXGetCurrentDisplayEXT", (__GLXextFuncPtr) glXGetCurrentDisplayEXT },
-+   { "glXImportContextEXT", (__GLXextFuncPtr) glXImportContextEXT },
-+   { "glXQueryContextInfoEXT", (__GLXextFuncPtr) glXQueryContextInfoEXT },
-    /*** GLX_SGIX_fbconfig ***/
--   { "glXGetFBConfigAttribSGIX", (GLvoid *) glXGetFBConfigAttribSGIX },
--   { "glXChooseFBConfigSGIX", (GLvoid *) glXChooseFBConfigSGIX },
--   { "glXCreateGLXPixmapWithConfigSGIX", (GLvoid *) glXCreateGLXPixmapWithConfigSGIX },
--   { "glXCreateContextWithConfigSGIX", (GLvoid *) glXCreateContextWithConfigSGIX },
--   { "glXGetVisualFromFBConfigSGIX", (GLvoid *) glXGetVisualFromFBConfigSGIX },
--   { "glXGetFBConfigFromVisualSGIX", (GLvoid *) glXGetFBConfigFromVisualSGIX },
-+   { "glXGetFBConfigAttribSGIX", (__GLXextFuncPtr) glXGetFBConfigAttribSGIX },
-+   { "glXChooseFBConfigSGIX", (__GLXextFuncPtr) glXChooseFBConfigSGIX },
-+   { "glXCreateGLXPixmapWithConfigSGIX", (__GLXextFuncPtr) glXCreateGLXPixmapWithConfigSGIX },
-+   { "glXCreateContextWithConfigSGIX", (__GLXextFuncPtr) glXCreateContextWithConfigSGIX },
-+   { "glXGetVisualFromFBConfigSGIX", (__GLXextFuncPtr) glXGetVisualFromFBConfigSGIX },
-+   { "glXGetFBConfigFromVisualSGIX", (__GLXextFuncPtr) glXGetFBConfigFromVisualSGIX },
-    /*** GLX_SGIX_pbuffer ***/
--   { "glXCreateGLXPbufferSGIX", (GLvoid *) glXCreateGLXPbufferSGIX },
--   { "glXDestroyGLXPbufferSGIX", (GLvoid *) glXDestroyGLXPbufferSGIX },
--   { "glXQueryGLXPbufferSGIX", (GLvoid *) glXQueryGLXPbufferSGIX },
--   { "glXSelectEventSGIX", (GLvoid *) glXSelectEventSGIX },
--   { "glXGetSelectedEventSGIX", (GLvoid *) glXGetSelectedEventSGIX },
-+   { "glXCreateGLXPbufferSGIX", (__GLXextFuncPtr) glXCreateGLXPbufferSGIX },
-+   { "glXDestroyGLXPbufferSGIX", (__GLXextFuncPtr) glXDestroyGLXPbufferSGIX },
-+   { "glXQueryGLXPbufferSGIX", (__GLXextFuncPtr) glXQueryGLXPbufferSGIX },
-+   { "glXSelectEventSGIX", (__GLXextFuncPtr) glXSelectEventSGIX },
-+   { "glXGetSelectedEventSGIX", (__GLXextFuncPtr) glXGetSelectedEventSGIX },
-    /*** GLX_SGI_cushion ***/
--   { "glXCushionSGI", (GLvoid *) glXCushionSGI },
-+   { "glXCushionSGI", (__GLXextFuncPtr) glXCushionSGI },
-    /*** GLX_SGIX_video_resize ***/
--   { "glXBindChannelToWindowSGIX", (GLvoid *) glXBindChannelToWindowSGIX },
--   { "glXChannelRectSGIX", (GLvoid *) glXChannelRectSGIX },
--   { "glXQueryChannelRectSGIX", (GLvoid *) glXQueryChannelRectSGIX },
--   { "glXQueryChannelDeltasSGIX", (GLvoid *) glXQueryChannelDeltasSGIX },
--   { "glXChannelRectSyncSGIX", (GLvoid *) glXChannelRectSyncSGIX },
-+   { "glXBindChannelToWindowSGIX", (__GLXextFuncPtr) glXBindChannelToWindowSGIX },
-+   { "glXChannelRectSGIX", (__GLXextFuncPtr) glXChannelRectSGIX },
-+   { "glXQueryChannelRectSGIX", (__GLXextFuncPtr) glXQueryChannelRectSGIX },
-+   { "glXQueryChannelDeltasSGIX", (__GLXextFuncPtr) glXQueryChannelDeltasSGIX },
-+   { "glXChannelRectSyncSGIX", (__GLXextFuncPtr) glXChannelRectSyncSGIX },
-    /*** GLX_SGIX_dmbuffer **/
- #if defined(_DM_BUFFER_H_)
--   { "glXAssociateDMPbufferSGIX", (GLvoid *) glXAssociateDMPbufferSGIX },
-+   { "glXAssociateDMPbufferSGIX", (__GLXextFuncPtr) glXAssociateDMPbufferSGIX },
- #endif
-    /*** GLX_SGIX_swap_group ***/
--   { "glXJoinSwapGroupSGIX", (GLvoid *) glXJoinSwapGroupSGIX },
-+   { "glXJoinSwapGroupSGIX", (__GLXextFuncPtr) glXJoinSwapGroupSGIX },
-    /*** GLX_SGIX_swap_barrier ***/
--   { "glXBindSwapBarrierSGIX", (GLvoid *) glXBindSwapBarrierSGIX },
--   { "glXQueryMaxSwapBarriersSGIX", (GLvoid *) glXQueryMaxSwapBarriersSGIX },
-+   { "glXBindSwapBarrierSGIX", (__GLXextFuncPtr) glXBindSwapBarrierSGIX },
-+   { "glXQueryMaxSwapBarriersSGIX", (__GLXextFuncPtr) glXQueryMaxSwapBarriersSGIX },
-    /*** GLX_SUN_get_transparent_index ***/
--   { "glXGetTransparentIndexSUN", (GLvoid *) glXGetTransparentIndexSUN },
-+   { "glXGetTransparentIndexSUN", (__GLXextFuncPtr) glXGetTransparentIndexSUN },
-    /*** GLX_MESA_copy_sub_buffer ***/
--   { "glXCopySubBufferMESA", (GLvoid *) glXCopySubBufferMESA },
-+   { "glXCopySubBufferMESA", (__GLXextFuncPtr) glXCopySubBufferMESA },
-    /*** GLX_MESA_pixmap_colormap ***/
--   { "glXCreateGLXPixmapMESA", (GLvoid *) glXCreateGLXPixmapMESA },
-+   { "glXCreateGLXPixmapMESA", (__GLXextFuncPtr) glXCreateGLXPixmapMESA },
-    /*** GLX_MESA_release_buffers ***/
--   { "glXReleaseBuffersMESA", (GLvoid *) glXReleaseBuffersMESA },
-+   { "glXReleaseBuffersMESA", (__GLXextFuncPtr) glXReleaseBuffersMESA },
-    /*** GLX_MESA_set_3dfx_mode ***/
--   { "glXSet3DfxModeMESA", (GLvoid *) glXSet3DfxModeMESA },
-+   { "glXSet3DfxModeMESA", (__GLXextFuncPtr) glXSet3DfxModeMESA },
-    /*** GLX_ARB_get_proc_address ***/
--   { "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB },
-+   { "glXGetProcAddressARB", (__GLXextFuncPtr) glXGetProcAddressARB },
-    /*** GLX_NV_vertex_array_range ***/
--   { "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV },
--   { "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV },
-+   { "glXAllocateMemoryNV", (__GLXextFuncPtr) glXAllocateMemoryNV },
-+   { "glXFreeMemoryNV", (__GLXextFuncPtr) glXFreeMemoryNV },
-    /*** GLX_MESA_agp_offset ***/
--   { "glXGetAGPOffsetMESA", (GLvoid *) glXGetAGPOffsetMESA },
-+   { "glXGetAGPOffsetMESA", (__GLXextFuncPtr) glXGetAGPOffsetMESA },
-    /*** GLX_ARB_render_texture ***/
--   { "glXBindTexImageARB", (GLvoid *) glXBindTexImageARB },
--   { "glXReleaseTexImageARB", (GLvoid *) glXReleaseTexImageARB },
--   { "glXDrawableAttribARB", (GLvoid *) glXDrawableAttribARB },
-+   { "glXBindTexImageARB", (__GLXextFuncPtr) glXBindTexImageARB },
-+   { "glXReleaseTexImageARB", (__GLXextFuncPtr) glXReleaseTexImageARB },
-+   { "glXDrawableAttribARB", (__GLXextFuncPtr) glXDrawableAttribARB },
-    { NULL, NULL }   /* end of list */
- };
-@@ -1304,7 +1304,7 @@
- /*
-  * Return address of named glX function, or NULL if not found.
-  */
--const GLvoid *
-+__GLXextFuncPtr
- _glxapi_get_proc_address(const char *funcName)
- {
-    GLuint i;
-@@ -1321,17 +1321,17 @@
-  * This function does not get dispatched through the dispatch table
-  * since it's really a "meta" function.
-  */
--void (*glXGetProcAddressARB(const GLubyte *procName))()
-+__GLXextFuncPtr
-+glXGetProcAddressARB(const GLubyte *procName)
- {
--   typedef void (*gl_function)();
--   gl_function f;
-+   __GLXextFuncPtr f;
--   f = (gl_function) _glxapi_get_proc_address((const char *) procName);
-+   f = _glxapi_get_proc_address((const char *) procName);
-    if (f) {
-       return f;
-    }
--   f = (gl_function) _glapi_get_proc_address((const char *) procName);
-+   f = (__GLXextFuncPtr) _glapi_get_proc_address((const char *) procName);
-    return f;
- }
-Index: extras/Mesa/src/mesa/drivers/x11/glxapi.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/x11/glxapi.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/x11/glxapi.h  16 Jun 2004 09:19:00 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/x11/glxapi.h  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -229,7 +229,7 @@
- _glxapi_set_no_op_table(struct _glxapi_table *t);
--extern const GLvoid *
-+extern __GLXextFuncPtr
- _glxapi_get_proc_address(const char *funcName);
-Index: extras/Mesa/src/mesa/drivers/x11/xm_span.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/x11/xm_span.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/x11/xm_span.c 16 Jun 2004 09:19:02 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/x11/xm_span.c 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,8 +1,8 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  5.1
-+ * Version:  6.2.1
-  *
-- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -3456,6 +3456,49 @@
- /*****                      Pixel reading                         *****/
- /**********************************************************************/
-+#ifndef XFree86Server
-+/**
-+ * Do clip testing prior to calling XGetImage.  If any of the region lies
-+ * outside the screen's bounds, XGetImage will return NULL.
-+ * We use XTranslateCoordinates() to check if that's the case and
-+ * adjust the x, y and length parameters accordingly.
-+ * \return  -1 if span is totally clipped away,
-+ *          else return number of pixels to skip in the destination array.
-+ */
-+static int
-+clip_for_xgetimage(XMesaContext xmesa, GLuint *n, GLint *x, GLint *y)
-+{
-+   XMesaBuffer source = xmesa->xm_buffer;
-+   Window rootWin = RootWindow(xmesa->display, 0);
-+   Window child;
-+   int screenWidth = WidthOfScreen(DefaultScreenOfDisplay(xmesa->display));
-+   int dx, dy;
-+   if (source->type == PBUFFER)
-+      return 0;
-+   XTranslateCoordinates(xmesa->display, source->buffer, rootWin,
-+                         *x, *y, &dx, &dy, &child);
-+   if (dx >= screenWidth) {
-+      /* totally clipped on right */
-+      return -1;
-+   }
-+   if (dx < 0) {
-+      /* clipped on left */
-+      int clip = -dx;
-+      if (clip >= *n)
-+         return -1;  /* totally clipped on left */
-+      *x += clip;
-+      *n -= clip;
-+      dx = 0;
-+      return clip;
-+   }
-+   if (dx + *n > screenWidth) {
-+      /* clipped on right */
-+      int clip = dx + *n - screenWidth;
-+      *n -= clip;
-+   }
-+   return 0;
-+}
-+#endif
- /*
-@@ -3474,6 +3517,11 @@
- #ifndef XFree86Server
-       XMesaImage *span = NULL;
-       int error;
-+      int k = clip_for_xgetimage(xmesa, &n, &x, &y);
-+      if (k < 0)
-+         return;
-+      index += k;
-+
-       catch_xgetimage_errors( xmesa->display );
-       span = XGetImage( xmesa->display, source->buffer,
-                       x, y, n, 1, AllPlanes, ZPixmap );
-@@ -3530,9 +3578,15 @@
-                                 x, FLIP(source, y), n, 1, ZPixmap,
-                                 ~0L, (pointer)span->data);
- #else
-+      int k;
-+      y = FLIP(source, y);
-+      k = clip_for_xgetimage(xmesa, &n, &x, &y);
-+      if (k < 0)
-+         return;
-+      rgba += k;
-       catch_xgetimage_errors( xmesa->display );
-       span = XGetImage( xmesa->display, source->buffer,
--                      x, FLIP(source, y), n, 1, AllPlanes, ZPixmap );
-+                      x, y, n, 1, AllPlanes, ZPixmap );
-       error = check_xgetimage_errors();
- #endif
-       if (span && !error) {
-Index: extras/Mesa/src/mesa/drivers/x11/xm_tri.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/x11/xm_tri.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/drivers/x11/xm_tri.c  16 Jun 2004 09:19:02 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/drivers/x11/xm_tri.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1352,7 +1352,6 @@
-                   USE(smooth_DITHER8_z_triangle);
-                else
-                   USE(smooth_DITHER_z_triangle);
--               break;
-             case PF_Lookup:
-                if (depth == 8)
-                   USE(smooth_LOOKUP8_z_triangle);
-@@ -1390,7 +1389,6 @@
-                   USE(flat_DITHER8_z_triangle);
-                else
-                   USE(flat_DITHER_z_triangle);
--               break;
-             case PF_Lookup:
-                if (depth == 8)
-                   USE(flat_LOOKUP8_z_triangle);
-@@ -1425,7 +1423,6 @@
-                   USE(smooth_DITHER8_triangle);
-                else
-                   USE(smooth_DITHER_triangle);
--               break;
-             case PF_Lookup:
-                if (depth == 8)
-                   USE(smooth_LOOKUP8_triangle);
-@@ -1461,7 +1458,6 @@
-                   USE(flat_DITHER8_triangle);
-                else
-                   USE(flat_DITHER_triangle);
--               break;
-             case PF_Lookup:
-                if (depth == 8)
-                   USE(flat_LOOKUP8_triangle);
-Index: extras/Mesa/src/mesa/glapi/Makefile
-===================================================================
-RCS file: extras/Mesa/src/mesa/glapi/Makefile
-diff -N extras/Mesa/src/mesa/glapi/Makefile
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/glapi/Makefile        15 Dec 2004 01:51:02 -0000      1.1.1.1.2.1
-@@ -0,0 +1,38 @@
-+# This file isn't used during a normal compilation since we don't want to
-+# require Python in order to compile Mesa.
-+# Instead, when the Mesa developers update/change the API interface it's
-+# up to him/her to re-run this makefile and check in the newly generated files.
-+
-+
-+OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h glapi_x86.S 
-+
-+COMMON = gl_XML.pyc license.pyc gl_API.xml
-+
-+all: $(OUTPUTS)
-+
-+gl_XML.pyc: gl_XML.py
-+      rm -f gl_XML.pyc > /dev/null
-+      python2 -t -O gl_XML.py
-+
-+license.pyc: license.py
-+      rm -f license.pyc > /dev/null
-+      python2 -t -O license.py
-+
-+glprocs.h: $(COMMON) gl_procs.py
-+      python2 -t gl_procs.py > glprocs.h
-+
-+glapitemp.h: $(COMMON) gl_apitemp.py
-+      python2 -t gl_apitemp.py > glapitemp.h
-+
-+glapioffsets.h: $(COMMON) gl_offsets.py
-+      python2 -t gl_offsets.py > glapioffsets.h
-+
-+glapitable.h: $(COMMON) gl_table.py
-+      python2 -t gl_table.py > glapitable.h
-+
-+glapi_x86.S: $(COMMON) gl_x86_asm.py
-+      python2 -t gl_x86_asm.py > glapi_x86.S
-+
-+clean:
-+      rm -f *~ *.pyc
-+      rm -f $(OUTPUTS)
-Index: extras/Mesa/src/mesa/glapi/gl_API.xml
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/gl_API.xml,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/gl_API.xml      16 Jun 2004 09:19:07 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/gl_API.xml      15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -3806,6 +3806,7 @@
-     <function name="MapBuffer" alias="MapBufferARB">
-         <param name="target" type="GLenum"/>
-         <param name="access" type="GLenum"/>
-+        <return type="GLvoid *"/>
-     </function>
-     <function name="UnmapBuffer" alias="UnmapBufferARB">
-Index: extras/Mesa/src/mesa/glapi/gl_SPARC_asm.py
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/gl_SPARC_asm.py,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/gl_SPARC_asm.py 16 Jun 2004 09:19:07 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/gl_SPARC_asm.py 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -48,7 +48,7 @@
-               print ''
-               print '#define GLOBL_FN(x) .globl x ; .type x,#function'
-               print ''
--              print '#if defined(__sparc_v9__) && !defined(__linux__)'
-+              print '#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))'
-               print '#  define GL_STUB(fn,off)\t\t\t\t\\'
-               print 'GLOBL_FN(fn) ; fn:\t\t\t\t\t\\'
-               print '\tsethi\t%hi(0x00000000), %g4 ;\t\t\t\\'
-Index: extras/Mesa/src/mesa/glapi/gl_apitemp.py
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/gl_apitemp.py,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/glapi/gl_apitemp.py   22 Jul 2004 06:52:47 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/glapi/gl_apitemp.py   15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -149,7 +149,7 @@
- #error TABLE_ENTRY must be defined
- #endif
--static void * DISPATCH_TABLE_NAME[] = {"""
-+static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
-               keys = self.functions.keys()
-               keys.sort()
-               for k in keys:
-@@ -176,7 +176,7 @@
-  * We list the functions which are not otherwise used.
-  */
- #ifdef UNUSED_TABLE_NAME
--static const void * const UNUSED_TABLE_NAME[] = {"""
-+static _glapi_proc UNUSED_TABLE_NAME[] = {"""
-               keys = self.functions.keys()
-               keys.sort()
-Index: extras/Mesa/src/mesa/glapi/gl_procs.py
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/gl_procs.py,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/gl_procs.py     16 Jun 2004 09:19:07 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/gl_procs.py     15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -50,15 +50,15 @@
-               print ' */'
-               print ''
-               print 'typedef struct {'
--              print '    int Name_offset;'
-+              print '    GLint Name_offset;'
-               print '#ifdef NEED_FUNCTION_POINTER'
--              print '    void * Address;'
-+              print '    _glapi_proc Address;'
-               print '#endif'
--              print '    unsigned int Offset;'
-+              print '    GLuint Offset;'
-               print '} glprocs_table_t;'
-               print ''
-               print '#ifdef NEED_FUNCTION_POINTER'
--              print '#  define NAME_FUNC_OFFSET(n,f,o) { n , (void *) f , o }'
-+              print '#  define NAME_FUNC_OFFSET(n,f,o) { n , (_glapi_proc) f , o }'
-               print '#else'
-               print '#  define NAME_FUNC_OFFSET(n,f,o) { n , o }'
-               print '#endif'
-@@ -132,7 +132,7 @@
-                       base_offset += len(self.functions[k].name) + 3
--              print '    NAME_FUNC_OFFSET( -1, NULL, -1 )'
-+              print '    NAME_FUNC_OFFSET( -1, NULL, 0 )'
-               print '};'
-               return
-Index: extras/Mesa/src/mesa/glapi/gl_x86_asm.py
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/gl_x86_asm.py,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/glapi/gl_x86_asm.py   28 Aug 2004 04:27:54 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/glapi/gl_x86_asm.py   15 Dec 2004 01:51:02 -0000      1.1.1.3.2.1
-@@ -62,11 +62,17 @@
-               print '#ifndef __WIN32__'
-               print ''        
-               print '#if defined(STDCALL_API)'
--              print '#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))'
--              print '#elif defined(USE_MGL_NAMESPACE)'
--              print '#define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))'
-+              print '# if defined(USE_MGL_NAMESPACE)'
-+              print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))'
-+              print '# else'
-+              print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))'
-+              print '# endif'
-               print '#else'
--              print '#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))'
-+              print '# if defined(USE_MGL_NAMESPACE)'
-+              print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))'
-+              print '# else'
-+              print '#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))'
-+              print '# endif'
-               print '#endif'
-               print ''
-               print '#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))'
-Index: extras/Mesa/src/mesa/glapi/glapi.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glapi.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/glapi/glapi.c 22 Jul 2004 06:52:42 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/glapi/glapi.c 15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -1,9 +1,8 @@
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  4.1
-+ * Version:  6.3
-  *
-- * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -100,25 +99,23 @@
- #define F NULL
--#define DISPATCH(func, args, msg)                                     \
--   if (warn()) {                                                      \
--      warning_func(NULL, "GL User Error: called without context:");   \
--      warning_func msg;                                                       \
-+#define DISPATCH(func, args, msg)                                           \
-+   if (warn()) {                                                            \
-+      warning_func(NULL, "GL User Error: called without context: %s", #func); \
-    }
--#define RETURN_DISPATCH(func, args, msg)                              \
--   if (warn()) {                                                      \
--      warning_func(NULL, "GL User Error: called without context:");   \
--      warning_func msg;                                                       \
--   }                                                                  \
-+#define RETURN_DISPATCH(func, args, msg)                                    \
-+   if (warn()) {                                                            \
-+      warning_func(NULL, "GL User Error: called without context: %s", #func); \
-+   }                                                                        \
-    return 0
- #define DISPATCH_TABLE_NAME __glapi_noop_table
--#define UNUSED_TABLE_NAME __usused_noop_functions
-+#define UNUSED_TABLE_NAME __unused_noop_functions
--#define TABLE_ENTRY(name) (void *) NoOp##name
-+#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
--static int NoOpUnused(void)
-+static GLint NoOpUnused(void)
- {
-    if (warn()) {
-       warning_func(NULL, "GL User Error: calling extension function without a current context\n");
-@@ -171,11 +168,11 @@
- #define DISPATCH_TABLE_NAME __glapi_threadsafe_table
--#define UNUSED_TABLE_NAME __usused_threadsafe_functions
-+#define UNUSED_TABLE_NAME __unused_threadsafe_functions
--#define TABLE_ENTRY(name) (void *) gl##name
-+#define TABLE_ENTRY(name) (_glapi_proc) gl##name
--static int glUnused(void)
-+static GLint glUnused(void)
- {
-    return 0;
- }
-@@ -203,7 +200,8 @@
--/* strdup() is actually not a standard ANSI C or POSIX routine.
-+/**
-+ * strdup() is actually not a standard ANSI C or POSIX routine.
-  * Irix will not define it if ANSI mode is in effect.
-  */
- static char *
-@@ -219,7 +217,7 @@
--/*
-+/**
-  * We should call this periodically from a function such as glXMakeCurrent
-  * in order to test if multiple threads are being used.
-  */
-@@ -248,7 +246,7 @@
--/*
-+/**
-  * Set the current context pointer for this thread.
-  * The context pointer is an opaque type which should be cast to
-  * void from the real context pointer type.
-@@ -256,7 +254,9 @@
- void
- _glapi_set_context(void *context)
- {
-+   (void) __unused_noop_functions; /* silence a warning */
- #if defined(THREADS)
-+   (void) __unused_threadsafe_functions; /* silence a warning */
-    _glthread_SetTSD(&ContextTSD, context);
-    _glapi_Context = (ThreadSafe) ? NULL : context;
- #else
-@@ -266,7 +266,7 @@
--/*
-+/**
-  * Get the current context pointer for this thread.
-  * The context pointer is an opaque type which should be cast from
-  * void to the real context pointer type.
-@@ -288,7 +288,7 @@
--/*
-+/**
-  * Set the global or per-thread dispatch table pointer.
-  */
- void
-@@ -336,7 +336,7 @@
--/*
-+/**
-  * Return pointer to current dispatch table for calling thread.
-  */
- struct _glapi_table *
-@@ -452,13 +452,6 @@
- }
--struct name_address_offset {
--   const char *Name;
--   GLvoid *Address;
--   GLuint Offset;
--};
--
--
- #if !defined( USE_X86_ASM )
- #define NEED_FUNCTION_POINTER
- #endif
-@@ -467,12 +460,16 @@
- #include "glprocs.h"
-+/**
-+ * Search the table of static entrypoint functions for the named function
-+ * and return the corresponding glprocs_table_t entry.
-+ */
- static const glprocs_table_t *
- find_entry( const char * n )
- {
--   unsigned   i;
-+   GLuint i;
--   for ( i = 0 ; static_functions[i].Name_offset >= 0 ; i++ ) {
-+   for (i = 0; static_functions[i].Name_offset >= 0; i++) {
-       const char * test_name;
-       test_name = gl_string_table + static_functions[i].Name_offset;
-@@ -483,7 +480,8 @@
-    return NULL;
- }
--/*
-+
-+/**
-  * Return dispatch table offset of the named static (built-in) function.
-  * Return -1 if function not found.
-  */
-@@ -509,18 +507,18 @@
- # endif
--/*
-+/**
-  * Return dispatch function address the named static (built-in) function.
-  * Return NULL if function not found.
-  */
--static const GLvoid *
-+static const _glapi_proc
- get_static_proc_address(const char *funcName)
- {
-    const glprocs_table_t * const f = find_entry( funcName );
-    if ( f != NULL ) {
--      return gl_dispatch_functions_start 
--         + (X86_DISPATCH_FUNCTION_SIZE * f->Offset);
-+      return (_glapi_proc) (gl_dispatch_functions_start 
-+                            + (X86_DISPATCH_FUNCTION_SIZE * f->Offset));
-    }
-    else {
-       return NULL;
-@@ -530,11 +528,11 @@
- #else
--/*
-- * Return dispatch function address the named static (built-in) function.
-- * Return NULL if function not found.
-+/**
-+ * Return pointer to the named static (built-in) function.
-+ * \return  NULL if function not found.
-  */
--static const GLvoid *
-+static const _glapi_proc
- get_static_proc_address(const char *funcName)
- {
-    const glprocs_table_t * const f = find_entry( funcName );
-@@ -544,12 +542,16 @@
- #endif /* USE_X86_ASM */
-+/**
-+ * Return the name of the function at the given offset in the dispatch
-+ * table.  For debugging only.
-+ */
- static const char *
- get_static_proc_name( GLuint offset )
- {
--   unsigned   i;
-+   GLuint i;
--   for ( i = 0 ; static_functions[i].Name_offset >= 0 ; i++ ) {
-+   for (i = 0; static_functions[i].Name_offset >= 0; i++) {
-       if (static_functions[i].Offset == offset) {
-        return gl_string_table + static_functions[i].Name_offset;
-       }
-@@ -570,7 +572,7 @@
- /*
-- * The disptach table size (number of entries) is the sizeof the
-+ * The dispatch table size (number of entries) is the size of the
-  * _glapi_table struct plus the number of dynamic entries we can add.
-  * The extra slots can be filled in by DRI drivers that register new extension
-  * functions.
-@@ -578,6 +580,13 @@
- #define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)
-+struct name_address_offset {
-+   const char *Name;
-+   _glapi_proc Address;
-+   GLuint Offset;
-+};
-+
-+
- static struct name_address_offset ExtEntryTable[MAX_EXTENSION_FUNCS];
- static GLuint NumExtEntryPoints = 0;
-@@ -585,12 +594,12 @@
- extern void __glapi_sparc_icache_flush(unsigned int *);
- #endif
--/*
-+/**
-  * Generate a dispatch function (entrypoint) which jumps through
-  * the given slot number (offset) in the current dispatch table.
-  * We need assembly language in order to accomplish this.
-  */
--static void *
-+static _glapi_proc
- generate_entrypoint(GLuint functionOffset)
- {
- #if defined(USE_X86_ASM)
-@@ -633,10 +642,10 @@
-       *(unsigned int *)(code + 0x10) = (unsigned int)_glapi_get_dispatch - next_insn;
-       *(unsigned int *)(code + 0x16) = (unsigned int)functionOffset * 4;
-    }
--   return code;
-+   return (_glapi_proc) code;
- #elif defined(USE_SPARC_ASM)
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-    static const unsigned int insn_template[] = {
-          0x05000000,  /* sethi        %uhi(_glapi_Dispatch), %g2      */
-          0x03000000,  /* sethi        %hi(_glapi_Dispatch), %g1       */
-@@ -664,7 +673,7 @@
-    if (code) {
-       memcpy(code, insn_template, sizeof(insn_template));
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       code[0] |= (glapi_addr >> (32 + 10));
-       code[1] |= ((glapi_addr & 0xffffffff) >> 10);
-       __glapi_sparc_icache_flush(&code[0]);
-@@ -682,19 +691,20 @@
-       __glapi_sparc_icache_flush(&code[2]);
- #endif
-    }
--   return code;
-+   return (_glapi_proc) code;
- #else
-+   (void) functionOffset;
-    return NULL;
- #endif /* USE_*_ASM */
- }
--/*
-+/**
-  * This function inserts a new dispatch offset into the assembly language
-  * stub that was generated with the preceeding function.
-  */
- static void
--fill_in_entrypoint_offset(void *entrypoint, GLuint offset)
-+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
- {
- #if defined(USE_X86_ASM)
-@@ -706,7 +716,7 @@
-    /* XXX this hasn't been tested! */
-    unsigned int *code = (unsigned int *) entrypoint;
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-    code[6] = 0x05000000;  /* sethi    %hi(8 * glapioffset), %g2       */
-    code[7] = 0x8410a000;  /* or               %g2, %lo(8 * glapioffset), %g2  */
-    code[6] |= ((offset * 8) >> 10);
-@@ -718,11 +728,17 @@
-    __glapi_sparc_icache_flush(&code[2]);
- #endif /* __sparc_v9__ && !linux */
-+#else
-+
-+   /* an unimplemented architecture */
-+   (void) entrypoint;
-+   (void) offset;
-+
- #endif /* USE_*_ASM */
- }
--/*
-+/**
-  * Add a new extension function entrypoint.
-  * Return: GL_TRUE = success or GL_FALSE = failure
-  */
-@@ -732,7 +748,7 @@
-    /* trivial rejection test */
- #ifdef MANGLE
-    if (!funcName || funcName[0] != 'm' || funcName[1] != 'g' || funcName[2] != 'l')
--      return NULL;
-+      return GL_FALSE;
- #else
-    if (!funcName || funcName[0] != 'g' || funcName[1] != 'l')
-       return GL_FALSE;
-@@ -778,7 +794,7 @@
-       return GL_FALSE;
-    }
-    else {
--      void *entrypoint = generate_entrypoint(offset);
-+      _glapi_proc entrypoint = generate_entrypoint(offset);
-       if (!entrypoint)
-          return GL_FALSE; /* couldn't generate assembly */
-@@ -796,7 +812,7 @@
- }
--/*
-+/**
-  * Return offset of entrypoint for named function within dispatch table.
-  */
- GLint
-@@ -816,10 +832,12 @@
--/*
-- * Return entrypoint for named function.
-+/**
-+ * Return pointer to the named function.  If the function name isn't found
-+ * in the name of static functions, try generating a new API entrypoint on
-+ * the fly with assembly language.
-  */
--const GLvoid *
-+const _glapi_proc
- _glapi_get_proc_address(const char *funcName)
- {
-    GLuint i;
-@@ -841,7 +859,7 @@
-    /* search static functions */
-    {
--      const GLvoid *func = get_static_proc_address(funcName);
-+      const _glapi_proc func = get_static_proc_address(funcName);
-       if (func)
-          return func;
-    }
-@@ -853,7 +871,7 @@
-     * when you try calling a GL function that doesn't really exist.
-     */
-    if (NumExtEntryPoints < MAX_EXTENSION_FUNCS) {
--      GLvoid *entrypoint = generate_entrypoint(~0);
-+      _glapi_proc entrypoint = generate_entrypoint(~0);
-       if (!entrypoint)
-          return GL_FALSE;
-@@ -872,7 +890,7 @@
--/*
-+/**
-  * Return the name of the function at the given dispatch offset.
-  * This is only intended for debugging.
-  */
-@@ -899,7 +917,7 @@
--/*
-+/**
-  * Return size of dispatch table struct as number of functions (or
-  * slots).
-  */
-@@ -911,7 +929,7 @@
--/*
-+/**
-  * Get API dispatcher version string.
-  */
- const char *
-@@ -922,7 +940,7 @@
--/*
-+/**
-  * Make sure there are no NULL pointers in the given dispatch table.
-  * Intended for debugging purposes.
-  */
-@@ -988,7 +1006,7 @@
-       GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
-       assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
-       assert(secondaryColor3fOffset == offset);
--      assert(_glapi_get_proc_address("glSecondaryColor3fEXT") == (void *) &glSecondaryColor3fEXT);
-+      assert(_glapi_get_proc_address("glSecondaryColor3fEXT") == (_glapi_proc) &glSecondaryColor3fEXT);
-    }
-    {
-       GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV");
-@@ -996,7 +1014,7 @@
-       GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
-       assert(pointParameterivOffset == _gloffset_PointParameterivNV);
-       assert(pointParameterivOffset == offset);
--      assert(_glapi_get_proc_address("glPointParameterivNV") == (void *) &glPointParameterivNV);
-+      assert(_glapi_get_proc_address("glPointParameterivNV") == (_glapi_proc) &glPointParameterivNV);
-    }
-    {
-       GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
-@@ -1004,7 +1022,9 @@
-       GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
-       assert(setFenceOffset == _gloffset_SetFenceNV);
-       assert(setFenceOffset == offset);
--      assert(_glapi_get_proc_address("glSetFenceNV") == (void *) &glSetFenceNV);
-+      assert(_glapi_get_proc_address("glSetFenceNV") == (_glapi_proc) &glSetFenceNV);
-    }
-+#else
-+   (void) table;
- #endif
- }
-Index: extras/Mesa/src/mesa/glapi/glapi.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glapi.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/glapi.h 16 Jun 2004 09:19:03 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/glapi.h 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,9 +1,8 @@
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  3.5
-+ * Version:  6.3
-  *
-- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -24,6 +23,24 @@
-  */
-+/**
-+ * \mainpage Mesa GL API Module
-+ *
-+ * \section GLAPIIntroduction Introduction
-+ *
-+ * The Mesa GL API module is responsible for dispatching all the
-+ * gl*() functions.  All GL functions are dispatched by jumping through
-+ * the current dispatch table (basically a struct full of function
-+ * pointers.)
-+ *
-+ * A per-thread current dispatch table and per-thread current context
-+ * pointer are managed by this module too.
-+ *
-+ * This module is intended to be non-Mesa-specific so it can be used
-+ * with the X/DRI libGL also.
-+ */
-+
-+
- #ifndef _GLAPI_H
- #define _GLAPI_H
-@@ -34,6 +51,8 @@
- typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
-+typedef void (*_glapi_proc)(void); /* generic function pointer */
-+
- extern void *_glapi_Context;
-@@ -98,7 +117,7 @@
- _glapi_get_proc_offset(const char *funcName);
--extern const GLvoid *
-+extern const _glapi_proc
- _glapi_get_proc_address(const char *funcName);
-Index: extras/Mesa/src/mesa/glapi/glapioffsets.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glapioffsets.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/glapioffsets.h  16 Jun 2004 09:19:04 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/glapioffsets.h  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,4 +1,31 @@
--/* DO NOT EDIT - This file generated automatically by gloffsets.py script */
-+/* DO NOT EDIT - This file generated automatically by gl_offsets.py (from Mesa) script */
-+
-+/*
-+ * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
-+ * (C) Copyright IBM Corporation 2004
-+ * All Rights Reserved.
-+ * 
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-+ * BRIAN PAUL, IBM,
-+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
- #ifndef _GLAPI_OFFSETS_H_
- #define _GLAPI_OFFSETS_H_
-Index: extras/Mesa/src/mesa/glapi/glapitable.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glapitable.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/glapitable.h    16 Jun 2004 09:19:04 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/glapitable.h    15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,4 +1,31 @@
--/* DO NOT EDIT - This file generated automatically with gltable.py script */
-+/* DO NOT EDIT - This file generated automatically by a script */
-+
-+/*
-+ * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-+ * (C) Copyright IBM Corporation 2004
-+ * All Rights Reserved.
-+ * 
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-+ * BRIAN PAUL, IBM,
-+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
- #ifndef _GLAPI_TABLE_H_
- #define _GLAPI_TABLE_H_
-@@ -703,9 +730,9 @@
-    void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 692 */
-    void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 693 */
-    void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 694 */
--   void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data); /* 695 */
-+   void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 695 */
-    GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 696 */
--   void * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 697 */
-+   GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 697 */
-    GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 698 */
-    void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 699 */
-    void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 700 */
-Index: extras/Mesa/src/mesa/glapi/glapitemp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glapitemp.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/glapi/glapitemp.h     22 Jul 2004 06:52:43 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/glapi/glapitemp.h     15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -1,5 +1,31 @@
-+/* DO NOT EDIT - This file generated automatically by gl_apitemp.py (from Mesa) script */
-+
-+/*
-+ * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
-+ * (C) Copyright IBM Corporation 2004
-+ * All Rights Reserved.
-+ * 
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-+ * BRIAN PAUL, IBM,
-+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
--/* DO NOT EDIT!  This file is generated by the glapitemp.py script. */
- /*
-  * This file is a template which generates the OpenGL API entry point
-@@ -12,7 +38,7 @@
-  *                               msg is a printf-style debug message.
-  *   RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value
-  *
-- * Here's an example which generates the usual OpenGL functions:
-+ * Here is an example which generates the usual OpenGL functions:
-  *   #define KEYWORD1
-  *   #define KEYWORD2
-  *   #define NAME(func)  gl##func
-@@ -107,7 +133,7 @@
- KEYWORD1 void KEYWORD2 NAME(Color3dv)(const GLdouble * v)
- {
--   DISPATCH(Color3dv, (v), (F, "glColor3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(Color3dv, (v), (F, "glColor3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Color3f)(GLfloat red, GLfloat green, GLfloat blue)
-@@ -117,7 +143,7 @@
- KEYWORD1 void KEYWORD2 NAME(Color3fv)(const GLfloat * v)
- {
--   DISPATCH(Color3fv, (v), (F, "glColor3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(Color3fv, (v), (F, "glColor3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Color3i)(GLint red, GLint green, GLint blue)
-@@ -187,7 +213,7 @@
- KEYWORD1 void KEYWORD2 NAME(Color4dv)(const GLdouble * v)
- {
--   DISPATCH(Color4dv, (v), (F, "glColor4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(Color4dv, (v), (F, "glColor4dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-@@ -197,7 +223,7 @@
- KEYWORD1 void KEYWORD2 NAME(Color4fv)(const GLfloat * v)
- {
--   DISPATCH(Color4fv, (v), (F, "glColor4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(Color4fv, (v), (F, "glColor4fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Color4i)(GLint red, GLint green, GLint blue, GLint alpha)
-@@ -322,7 +348,7 @@
- KEYWORD1 void KEYWORD2 NAME(Normal3dv)(const GLdouble * v)
- {
--   DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz)
-@@ -332,7 +358,7 @@
- KEYWORD1 void KEYWORD2 NAME(Normal3fv)(const GLfloat * v)
- {
--   DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Normal3i)(GLint nx, GLint ny, GLint nz)
-@@ -362,7 +388,7 @@
- KEYWORD1 void KEYWORD2 NAME(RasterPos2dv)(const GLdouble * v)
- {
--   DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(RasterPos2f)(GLfloat x, GLfloat y)
-@@ -372,7 +398,7 @@
- KEYWORD1 void KEYWORD2 NAME(RasterPos2fv)(const GLfloat * v)
- {
--   DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(RasterPos2i)(GLint x, GLint y)
-@@ -402,7 +428,7 @@
- KEYWORD1 void KEYWORD2 NAME(RasterPos3dv)(const GLdouble * v)
- {
--   DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z)
-@@ -412,7 +438,7 @@
- KEYWORD1 void KEYWORD2 NAME(RasterPos3fv)(const GLfloat * v)
- {
--   DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(RasterPos3i)(GLint x, GLint y, GLint z)
-@@ -442,7 +468,7 @@
- KEYWORD1 void KEYWORD2 NAME(RasterPos4dv)(const GLdouble * v)
- {
--   DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-@@ -452,7 +478,7 @@
- KEYWORD1 void KEYWORD2 NAME(RasterPos4fv)(const GLfloat * v)
- {
--   DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(RasterPos4i)(GLint x, GLint y, GLint z, GLint w)
-@@ -562,7 +588,7 @@
- KEYWORD1 void KEYWORD2 NAME(TexCoord2dv)(const GLdouble * v)
- {
--   DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(TexCoord2f)(GLfloat s, GLfloat t)
-@@ -572,7 +598,7 @@
- KEYWORD1 void KEYWORD2 NAME(TexCoord2fv)(const GLfloat * v)
- {
--   DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(TexCoord2i)(GLint s, GLint t)
-@@ -602,7 +628,7 @@
- KEYWORD1 void KEYWORD2 NAME(TexCoord3dv)(const GLdouble * v)
- {
--   DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r)
-@@ -612,7 +638,7 @@
- KEYWORD1 void KEYWORD2 NAME(TexCoord3fv)(const GLfloat * v)
- {
--   DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(TexCoord3i)(GLint s, GLint t, GLint r)
-@@ -642,7 +668,7 @@
- KEYWORD1 void KEYWORD2 NAME(TexCoord4dv)(const GLdouble * v)
- {
--   DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-@@ -652,7 +678,7 @@
- KEYWORD1 void KEYWORD2 NAME(TexCoord4fv)(const GLfloat * v)
- {
--   DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(TexCoord4i)(GLint s, GLint t, GLint r, GLint q)
-@@ -682,7 +708,7 @@
- KEYWORD1 void KEYWORD2 NAME(Vertex2dv)(const GLdouble * v)
- {
--   DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Vertex2f)(GLfloat x, GLfloat y)
-@@ -692,7 +718,7 @@
- KEYWORD1 void KEYWORD2 NAME(Vertex2fv)(const GLfloat * v)
- {
--   DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Vertex2i)(GLint x, GLint y)
-@@ -722,7 +748,7 @@
- KEYWORD1 void KEYWORD2 NAME(Vertex3dv)(const GLdouble * v)
- {
--   DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Vertex3f)(GLfloat x, GLfloat y, GLfloat z)
-@@ -732,7 +758,7 @@
- KEYWORD1 void KEYWORD2 NAME(Vertex3fv)(const GLfloat * v)
- {
--   DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Vertex3i)(GLint x, GLint y, GLint z)
-@@ -762,7 +788,7 @@
- KEYWORD1 void KEYWORD2 NAME(Vertex4dv)(const GLdouble * v)
- {
--   DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-@@ -772,7 +798,7 @@
- KEYWORD1 void KEYWORD2 NAME(Vertex4fv)(const GLfloat * v)
- {
--   DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(Vertex4i)(GLint x, GLint y, GLint z, GLint w)
-@@ -1062,7 +1088,7 @@
- KEYWORD1 void KEYWORD2 NAME(Clear)(GLbitfield mask)
- {
--   DISPATCH(Clear, (mask), (F, "glClear(%p);\n", (const void *) mask));
-+   DISPATCH(Clear, (mask), (F, "glClear(%d);\n", mask));
- }
- KEYWORD1 void KEYWORD2 NAME(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-@@ -1142,7 +1168,7 @@
- KEYWORD1 void KEYWORD2 NAME(PushAttrib)(GLbitfield mask)
- {
--   DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%p);\n", (const void *) mask));
-+   DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%d);\n", mask));
- }
- KEYWORD1 void KEYWORD2 NAME(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points)
-@@ -1212,7 +1238,7 @@
- KEYWORD1 void KEYWORD2 NAME(EvalCoord2dv)(const GLdouble * u)
- {
--   DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p /* %g, %g */);\n", (const void *) u, u[0], u[1]));
-+   DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p);\n", (const void *) u));
- }
- KEYWORD1 void KEYWORD2 NAME(EvalCoord2f)(GLfloat u, GLfloat v)
-@@ -1222,7 +1248,7 @@
- KEYWORD1 void KEYWORD2 NAME(EvalCoord2fv)(const GLfloat * u)
- {
--   DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p /* %g, %g */);\n", (const void *) u, u[0], u[1]));
-+   DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p);\n", (const void *) u));
- }
- KEYWORD1 void KEYWORD2 NAME(EvalMesh1)(GLenum mode, GLint i1, GLint i2)
-@@ -1580,6 +1606,11 @@
-    DISPATCH(ArrayElement, (i), (F, "glArrayElement(%d);\n", i));
- }
-+KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture)
-+{
-+   DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture));
-+}
-+
- KEYWORD1 void KEYWORD2 NAME(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
- {
-    DISPATCH(ColorPointer, (size, type, stride, pointer), (F, "glColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-@@ -1610,14 +1641,19 @@
-    DISPATCH(EnableClientState, (array), (F, "glEnableClientState(0x%x);\n", array));
- }
--KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params)
-+KEYWORD1 void KEYWORD2 NAME(IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer)
- {
--   DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(Indexub)(GLubyte c)
- {
--   DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-+   DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(Indexubv)(const GLubyte * c)
-+{
-+   DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c));
- }
- KEYWORD1 void KEYWORD2 NAME(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer)
-@@ -1630,6 +1666,11 @@
-    DISPATCH(NormalPointer, (type, stride, pointer), (F, "glNormalPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
- }
-+KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units)
-+{
-+   DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units));
-+}
-+
- KEYWORD1 void KEYWORD2 NAME(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
- {
-    DISPATCH(TexCoordPointer, (size, type, stride, pointer), (F, "glTexCoordPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-@@ -1640,9 +1681,9 @@
-    DISPATCH(VertexPointer, (size, type, stride, pointer), (F, "glVertexPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units)
-+KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences)
- {
--   DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units));
-+   RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
- }
- KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
-@@ -1665,26 +1706,6 @@
-    DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2D(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height));
- }
--KEYWORD1 void KEYWORD2 NAME(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
--{
--   DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels));
--}
--
--KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
--{
--   DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels));
--}
--
--KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences)
--{
--   RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
--}
--
--KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture)
--{
--   DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture));
--}
--
- KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures)
- {
-    DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures));
-@@ -1695,6 +1716,11 @@
-    DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures));
- }
-+KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params)
-+{
-+   DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params));
-+}
-+
- KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture)
- {
-    RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture));
-@@ -1705,14 +1731,14 @@
-    DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities));
- }
--KEYWORD1 void KEYWORD2 NAME(Indexub)(GLubyte c)
-+KEYWORD1 void KEYWORD2 NAME(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c));
-+   DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(Indexubv)(const GLubyte * c)
-+KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c));
-+   DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels));
- }
- KEYWORD1 void KEYWORD2 NAME(PopClientAttrib)(void)
-@@ -1722,7 +1748,7 @@
- KEYWORD1 void KEYWORD2 NAME(PushClientAttrib)(GLbitfield mask)
- {
--   DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%p);\n", (const void *) mask));
-+   DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%d);\n", mask));
- }
- KEYWORD1 void KEYWORD2 NAME(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-@@ -1972,7 +1998,7 @@
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dvARB)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1]));
-+   DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p);\n", target, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t)
-@@ -1982,7 +2008,7 @@
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fvARB)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1]));
-+   DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p);\n", target, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t)
-@@ -2012,7 +2038,7 @@
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dvARB)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p);\n", target, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
-@@ -2022,7 +2048,7 @@
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fvARB)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p);\n", target, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r)
-@@ -2052,7 +2078,7 @@
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dvARB)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p);\n", target, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-@@ -2062,7 +2088,7 @@
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fvARB)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p);\n", target, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q)
-@@ -2115,1853 +2141,1719 @@
-    DISPATCH(__unused413, (), (F, "gl__unused413();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias)
- {
--   DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data));
-+   DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(GetTexFilterFuncSGIS)(GLenum target, GLenum filter, GLfloat * weights)
- {
--   DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data));
-+   DISPATCH(GetTexFilterFuncSGIS, (target, filter, weights), (F, "glGetTexFilterFuncSGIS(0x%x, 0x%x, %p);\n", target, filter, (const void *) weights));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(TexFilterFuncSGIS)(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights)
- {
--   DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1DARB(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data));
-+   DISPATCH(TexFilterFuncSGIS, (target, filter, n, weights), (F, "glTexFilterFuncSGIS(0x%x, 0x%x, %d, %p);\n", target, filter, n, (const void *) weights));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(GetHistogramEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
- {
--   DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DARB(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data));
-+   DISPATCH(GetHistogramEXT, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
- {
--   DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2DARB(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data));
-+   DISPATCH(GetHistogramParameterfvEXT, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterivEXT)(GLenum target, GLenum pname, GLint * params)
- {
--   DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1DARB(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data));
-+   DISPATCH(GetHistogramParameterivEXT, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img)
-+KEYWORD1 void KEYWORD2 NAME(GetMinmaxEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
- {
--   DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImageARB(0x%x, %d, %p);\n", target, level, (const void *) img));
-+   DISPATCH(GetMinmaxEXT, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
- }
--KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture)
-+KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
- {
--   DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTexture(0x%x);\n", texture));
-+   DISPATCH(GetMinmaxParameterfvEXT, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ClientActiveTexture)(GLenum texture)
-+KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterivEXT)(GLenum target, GLenum pname, GLint * params)
- {
--   DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTexture(0x%x);\n", texture));
-+   DISPATCH(GetMinmaxParameterivEXT, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1d)(GLenum target, GLdouble s)
-+KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * image)
- {
--   DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1d(0x%x, %f);\n", target, s));
-+   DISPATCH(GetConvolutionFilterEXT, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dv)(GLenum target, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
- {
--   DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(GetConvolutionParameterfvEXT, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1f)(GLenum target, GLfloat s)
-+KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterivEXT)(GLenum target, GLenum pname, GLint * params)
- {
--   DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1f(0x%x, %f);\n", target, s));
-+   DISPATCH(GetConvolutionParameterivEXT, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fv)(GLenum target, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(GetSeparableFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
- {
--   DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(GetSeparableFilterEXT, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1i)(GLenum target, GLint s)
-+KEYWORD1 void KEYWORD2 NAME(GetColorTableSGI)(GLenum target, GLenum format, GLenum type, GLvoid * table)
- {
--   DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1i(0x%x, %d);\n", target, s));
-+   DISPATCH(GetColorTableSGI, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iv)(GLenum target, const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvSGI)(GLenum target, GLenum pname, GLfloat * params)
- {
--   DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1iv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(GetColorTableParameterfvSGI, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1s)(GLenum target, GLshort s)
-+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivSGI)(GLenum target, GLenum pname, GLint * params)
- {
--   DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1s(0x%x, %d);\n", target, s));
-+   DISPATCH(GetColorTableParameterivSGI, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sv)(GLenum target, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(PixelTexGenSGIX)(GLenum mode)
- {
--   DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1sv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t)
-+KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameteriSGIS)(GLenum pname, GLint param)
- {
--   DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2d(0x%x, %f, %f);\n", target, s, t));
-+   DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dv)(GLenum target, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params)
- {
--   DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dv(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1]));
-+   DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t)
-+KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param)
- {
--   DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2f(0x%x, %f, %f);\n", target, s, t));
-+   DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fv)(GLenum target, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params)
- {
--   DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fv(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1]));
-+   DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2i)(GLenum target, GLint s, GLint t)
-+KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params)
- {
--   DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2i(0x%x, %d, %d);\n", target, s, t));
-+   DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iv)(GLenum target, const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params)
- {
--   DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2iv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t)
-+KEYWORD1 void KEYWORD2 NAME(TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2s(0x%x, %d, %d);\n", target, s, t));
-+   DISPATCH(TexImage4DSGIS, (target, level, internalformat, width, height, depth, size4d, border, format, type, pixels), (F, "glTexImage4DSGIS(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, size4d, border, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sv)(GLenum target, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2sv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(TexSubImage4DSGIS, (target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels), (F, "glTexSubImage4DSGIS(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
-+KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences)
- {
--   DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3d(0x%x, %f, %f, %f);\n", target, s, t, r));
-+   RETURN_DISPATCH(AreTexturesResidentEXT, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dv)(GLenum target, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures)
- {
--   DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dv(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(GenTexturesEXT, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture)
- {
--   DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3f(0x%x, %f, %f, %f);\n", target, s, t, r));
-+   RETURN_DISPATCH(IsTextureEXT, (texture), (F, "glIsTextureEXT(%d);\n", texture));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fv)(GLenum target, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(DetailTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points)
- {
--   DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fv(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(DetailTexFuncSGIS, (target, n, points), (F, "glDetailTexFuncSGIS(0x%x, %d, %p);\n", target, n, (const void *) points));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r)
-+KEYWORD1 void KEYWORD2 NAME(GetDetailTexFuncSGIS)(GLenum target, GLfloat * points)
- {
--   DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3i(0x%x, %d, %d, %d);\n", target, s, t, r));
-+   DISPATCH(GetDetailTexFuncSGIS, (target, points), (F, "glGetDetailTexFuncSGIS(0x%x, %p);\n", target, (const void *) points));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iv)(GLenum target, const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(SharpenTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points)
- {
--   DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3iv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(SharpenTexFuncSGIS, (target, n, points), (F, "glSharpenTexFuncSGIS(0x%x, %d, %p);\n", target, n, (const void *) points));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r)
-+KEYWORD1 void KEYWORD2 NAME(GetSharpenTexFuncSGIS)(GLenum target, GLfloat * points)
- {
--   DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3s(0x%x, %d, %d, %d);\n", target, s, t, r));
-+   DISPATCH(GetSharpenTexFuncSGIS, (target, points), (F, "glGetSharpenTexFuncSGIS(0x%x, %p);\n", target, (const void *) points));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sv)(GLenum target, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(SampleMaskSGIS)(GLclampf value, GLboolean invert)
- {
--   DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3sv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-+KEYWORD1 void KEYWORD2 NAME(SamplePatternSGIS)(GLenum pattern)
- {
--   DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4d(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-+   DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dv)(GLenum target, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
- {
--   DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dv(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(ColorPointerEXT, (size, type, stride, count, pointer), (F, "glColorPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-+KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer)
- {
--   DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4f(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-+   DISPATCH(EdgeFlagPointerEXT, (stride, count, pointer), (F, "glEdgeFlagPointerEXT(%d, %d, %p);\n", stride, count, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fv)(GLenum target, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
- {
--   DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fv(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(IndexPointerEXT, (type, stride, count, pointer), (F, "glIndexPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q)
-+KEYWORD1 void KEYWORD2 NAME(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
- {
--   DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4i(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-+   DISPATCH(NormalPointerEXT, (type, stride, count, pointer), (F, "glNormalPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iv)(GLenum target, const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
- {
--   DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4iv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(TexCoordPointerEXT, (size, type, stride, count, pointer), (F, "glTexCoordPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
-+KEYWORD1 void KEYWORD2 NAME(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
- {
--   DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4s(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-+   DISPATCH(VertexPointerEXT, (size, type, stride, count, pointer), (F, "glVertexPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sv)(GLenum target, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(SpriteParameterfSGIX)(GLenum pname, GLfloat param)
- {
--   DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4sv(0x%x, %p);\n", target, (const void *) v));
-+   DISPATCH(SpriteParameterfSGIX, (pname, param), (F, "glSpriteParameterfSGIX(0x%x, %f);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixf)(const GLfloat * m)
-+KEYWORD1 void KEYWORD2 NAME(SpriteParameterfvSGIX)(GLenum pname, const GLfloat * params)
- {
--   DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixf(%p);\n", (const void *) m));
-+   DISPATCH(SpriteParameterfvSGIX, (pname, params), (F, "glSpriteParameterfvSGIX(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m)
-+KEYWORD1 void KEYWORD2 NAME(SpriteParameteriSGIX)(GLenum pname, GLint param)
- {
--   DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m));
-+   DISPATCH(SpriteParameteriSGIX, (pname, param), (F, "glSpriteParameteriSGIX(0x%x, %d);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixf)(const GLfloat * m)
-+KEYWORD1 void KEYWORD2 NAME(SpriteParameterivSGIX)(GLenum pname, const GLint * params)
- {
--   DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixf(%p);\n", (const void *) m));
-+   DISPATCH(SpriteParameterivSGIX, (pname, params), (F, "glSpriteParameterivSGIX(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixd)(const GLdouble * m)
-+KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param)
- {
--   DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixd(%p);\n", (const void *) m));
-+   DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert)
-+KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * params)
- {
--   DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert));
-+   DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 GLint KEYWORD2 NAME(GetInstrumentsSGIX)(void)
- {
--   DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data));
-+   RETURN_DISPATCH(GetInstrumentsSGIX, (), (F, "glGetInstrumentsSGIX();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(InstrumentsBufferSGIX)(GLsizei size, GLint * buffer)
- {
--   DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data));
-+   DISPATCH(InstrumentsBufferSGIX, (size, buffer), (F, "glInstrumentsBufferSGIX(%d, %p);\n", size, (const void *) buffer));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 GLint KEYWORD2 NAME(PollInstrumentsSGIX)(GLint * marker_p)
- {
--   DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data));
-+   RETURN_DISPATCH(PollInstrumentsSGIX, (marker_p), (F, "glPollInstrumentsSGIX(%p);\n", (const void *) marker_p));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(ReadInstrumentsSGIX)(GLint marker)
- {
--   DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data));
-+   DISPATCH(ReadInstrumentsSGIX, (marker), (F, "glReadInstrumentsSGIX(%d);\n", marker));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(StartInstrumentsSGIX)(void)
- {
--   DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data));
-+   DISPATCH(StartInstrumentsSGIX, (), (F, "glStartInstrumentsSGIX();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(StopInstrumentsSGIX)(GLint marker)
- {
--   DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1D(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data));
-+   DISPATCH(StopInstrumentsSGIX, (marker), (F, "glStopInstrumentsSGIX(%d);\n", marker));
- }
--KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImage)(GLenum target, GLint level, GLvoid * img)
-+KEYWORD1 void KEYWORD2 NAME(FrameZoomSGIX)(GLint factor)
- {
--   DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImage(0x%x, %d, %p);\n", target, level, (const void *) img));
-+   DISPATCH(FrameZoomSGIX, (factor), (F, "glFrameZoomSGIX(%d);\n", factor));
- }
--/* No dispatch for WeightbvARB() */
--/* No dispatch for WeightsvARB() */
--/* No dispatch for WeightivARB() */
--/* No dispatch for WeightfvARB() */
--/* No dispatch for WeightdvARB() */
--/* No dispatch for WeightubvARB() */
--/* No dispatch for WeightusvARB() */
--/* No dispatch for WeightuivARB() */
--/* No dispatch for WeightPointerARB() */
--/* No dispatch for VertexBlendARB() */
--/* No dispatch for CurrentPaletteMatrixARB() */
--/* No dispatch for MatrixIndexubvARB() */
--/* No dispatch for MatrixIndexusvARB() */
--/* No dispatch for MatrixIndexuivARB() */
--/* No dispatch for MatrixIndexPointerARB() */
--KEYWORD1 void KEYWORD2 NAME(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-+KEYWORD1 void KEYWORD2 NAME(TagSampleBufferSGIX)(void)
- {
--   DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColorEXT(%f, %f, %f, %f);\n", red, green, blue, alpha));
-+   DISPATCH(TagSampleBufferSGIX, (), (F, "glTagSampleBufferSGIX();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias)
-+KEYWORD1 void KEYWORD2 NAME(ReferencePlaneSGIX)(const GLdouble * equation)
- {
--   DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias));
-+   DISPATCH(ReferencePlaneSGIX, (equation), (F, "glReferencePlaneSGIX(%p);\n", (const void *) equation));
- }
--KEYWORD1 void KEYWORD2 NAME(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-+KEYWORD1 void KEYWORD2 NAME(FlushRasterSGIX)(void)
- {
--   DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels));
-+   DISPATCH(FlushRasterSGIX, (), (F, "glFlushRasterSGIX();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
-+KEYWORD1 void KEYWORD2 NAME(GetListParameterfvSGIX)(GLuint list, GLenum pname, GLfloat * params)
- {
--   DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels));
-+   DISPATCH(GetListParameterfvSGIX, (list, pname, params), (F, "glGetListParameterfvSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetTexFilterFuncSGIS)(GLenum target, GLenum filter, GLfloat * weights)
-+KEYWORD1 void KEYWORD2 NAME(GetListParameterivSGIX)(GLuint list, GLenum pname, GLint * params)
- {
--   DISPATCH(GetTexFilterFuncSGIS, (target, filter, weights), (F, "glGetTexFilterFuncSGIS(0x%x, 0x%x, %p);\n", target, filter, (const void *) weights));
-+   DISPATCH(GetListParameterivSGIX, (list, pname, params), (F, "glGetListParameterivSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(TexFilterFuncSGIS)(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights)
-+KEYWORD1 void KEYWORD2 NAME(ListParameterfSGIX)(GLuint list, GLenum pname, GLfloat param)
- {
--   DISPATCH(TexFilterFuncSGIS, (target, filter, n, weights), (F, "glTexFilterFuncSGIS(0x%x, 0x%x, %d, %p);\n", target, filter, n, (const void *) weights));
-+   DISPATCH(ListParameterfSGIX, (list, pname, param), (F, "glListParameterfSGIX(%d, 0x%x, %f);\n", list, pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
-+KEYWORD1 void KEYWORD2 NAME(ListParameterfvSGIX)(GLuint list, GLenum pname, const GLfloat * params)
- {
--   DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1DEXT(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels));
-+   DISPATCH(ListParameterfvSGIX, (list, pname, params), (F, "glListParameterfvSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
-+KEYWORD1 void KEYWORD2 NAME(ListParameteriSGIX)(GLuint list, GLenum pname, GLint param)
- {
--   DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels));
-+   DISPATCH(ListParameteriSGIX, (list, pname, param), (F, "glListParameteriSGIX(%d, 0x%x, %d);\n", list, pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
-+KEYWORD1 void KEYWORD2 NAME(ListParameterivSGIX)(GLuint list, GLenum pname, const GLint * params)
- {
--   DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border));
-+   DISPATCH(ListParameterivSGIX, (list, pname, params), (F, "glListParameterivSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
-+KEYWORD1 void KEYWORD2 NAME(FragmentColorMaterialSGIX)(GLenum face, GLenum mode)
- {
--   DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border));
-+   DISPATCH(FragmentColorMaterialSGIX, (face, mode), (F, "glFragmentColorMaterialSGIX(0x%x, 0x%x);\n", face, mode));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightfSGIX)(GLenum light, GLenum pname, GLfloat param)
- {
--   DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1DEXT(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width));
-+   DISPATCH(FragmentLightfSGIX, (light, pname, param), (F, "glFragmentLightfSGIX(0x%x, 0x%x, %f);\n", light, pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightfvSGIX)(GLenum light, GLenum pname, const GLfloat * params)
- {
--   DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height));
-+   DISPATCH(FragmentLightfvSGIX, (light, pname, params), (F, "glFragmentLightfvSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightiSGIX)(GLenum light, GLenum pname, GLint param)
- {
--   DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height));
-+   DISPATCH(FragmentLightiSGIX, (light, pname, param), (F, "glFragmentLightiSGIX(0x%x, 0x%x, %d);\n", light, pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(GetHistogramEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightivSGIX)(GLenum light, GLenum pname, const GLint * params)
- {
--   DISPATCH(GetHistogramEXT, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
-+   DISPATCH(FragmentLightivSGIX, (light, pname, params), (F, "glFragmentLightivSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightModelfSGIX)(GLenum pname, GLfloat param)
- {
--   DISPATCH(GetHistogramParameterfvEXT, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(FragmentLightModelfSGIX, (pname, param), (F, "glFragmentLightModelfSGIX(0x%x, %f);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterivEXT)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightModelfvSGIX)(GLenum pname, const GLfloat * params)
- {
--   DISPATCH(GetHistogramParameterivEXT, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(FragmentLightModelfvSGIX, (pname, params), (F, "glFragmentLightModelfvSGIX(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetMinmaxEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightModeliSGIX)(GLenum pname, GLint param)
- {
--   DISPATCH(GetMinmaxEXT, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
-+   DISPATCH(FragmentLightModeliSGIX, (pname, param), (F, "glFragmentLightModeliSGIX(0x%x, %d);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(FragmentLightModelivSGIX)(GLenum pname, const GLint * params)
- {
--   DISPATCH(GetMinmaxParameterfvEXT, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(FragmentLightModelivSGIX, (pname, params), (F, "glFragmentLightModelivSGIX(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterivEXT)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(FragmentMaterialfSGIX)(GLenum face, GLenum pname, GLfloat param)
- {
--   DISPATCH(GetMinmaxParameterivEXT, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(FragmentMaterialfSGIX, (face, pname, param), (F, "glFragmentMaterialfSGIX(0x%x, 0x%x, %f);\n", face, pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(HistogramEXT)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
-+KEYWORD1 void KEYWORD2 NAME(FragmentMaterialfvSGIX)(GLenum face, GLenum pname, const GLfloat * params)
- {
--   DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogramEXT(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink));
-+   DISPATCH(FragmentMaterialfvSGIX, (face, pname, params), (F, "glFragmentMaterialfvSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MinmaxEXT)(GLenum target, GLenum internalformat, GLboolean sink)
-+KEYWORD1 void KEYWORD2 NAME(FragmentMaterialiSGIX)(GLenum face, GLenum pname, GLint param)
- {
--   DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmaxEXT(0x%x, 0x%x, %d);\n", target, internalformat, sink));
-+   DISPATCH(FragmentMaterialiSGIX, (face, pname, param), (F, "glFragmentMaterialiSGIX(0x%x, 0x%x, %d);\n", face, pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(ResetHistogramEXT)(GLenum target)
-+KEYWORD1 void KEYWORD2 NAME(FragmentMaterialivSGIX)(GLenum face, GLenum pname, const GLint * params)
- {
--   DISPATCH(ResetHistogram, (target), (F, "glResetHistogramEXT(0x%x);\n", target));
-+   DISPATCH(FragmentMaterialivSGIX, (face, pname, params), (F, "glFragmentMaterialivSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ResetMinmaxEXT)(GLenum target)
-+KEYWORD1 void KEYWORD2 NAME(GetFragmentLightfvSGIX)(GLenum light, GLenum pname, GLfloat * params)
- {
--   DISPATCH(ResetMinmax, (target), (F, "glResetMinmaxEXT(0x%x);\n", target));
-+   DISPATCH(GetFragmentLightfvSGIX, (light, pname, params), (F, "glGetFragmentLightfvSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter1DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
-+KEYWORD1 void KEYWORD2 NAME(GetFragmentLightivSGIX)(GLenum light, GLenum pname, GLint * params)
- {
--   DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1DEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image));
-+   DISPATCH(GetFragmentLightivSGIX, (light, pname, params), (F, "glGetFragmentLightivSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter2DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
-+KEYWORD1 void KEYWORD2 NAME(GetFragmentMaterialfvSGIX)(GLenum face, GLenum pname, GLfloat * params)
- {
--   DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image));
-+   DISPATCH(GetFragmentMaterialfvSGIX, (face, pname, params), (F, "glGetFragmentMaterialfvSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfEXT)(GLenum target, GLenum pname, GLfloat params)
-+KEYWORD1 void KEYWORD2 NAME(GetFragmentMaterialivSGIX)(GLenum face, GLenum pname, GLint * params)
- {
--   DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterfEXT(0x%x, 0x%x, %f);\n", target, pname, params));
-+   DISPATCH(GetFragmentMaterialivSGIX, (face, pname, params), (F, "glGetFragmentMaterialivSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfvEXT)(GLenum target, GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(LightEnviSGIX)(GLenum pname, GLint param)
- {
--   DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(LightEnviSGIX, (pname, param), (F, "glLightEnviSGIX(0x%x, %d);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteriEXT)(GLenum target, GLenum pname, GLint params)
-+KEYWORD1 void KEYWORD2 NAME(VertexWeightfEXT)(GLfloat weight)
- {
--   DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteriEXT(0x%x, 0x%x, %d);\n", target, pname, params));
-+   DISPATCH(VertexWeightfEXT, (weight), (F, "glVertexWeightfEXT(%f);\n", weight));
- }
--KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterivEXT)(GLenum target, GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(VertexWeightfvEXT)(const GLfloat * weight)
- {
--   DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(VertexWeightfvEXT, (weight), (F, "glVertexWeightfvEXT(%p);\n", (const void *) weight));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter1DEXT)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-+KEYWORD1 void KEYWORD2 NAME(VertexWeightPointerEXT)(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer)
- {
--   DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1DEXT(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
-+   DISPATCH(VertexWeightPointerEXT, (size, type, stride, pointer), (F, "glVertexWeightPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter2DEXT)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
-+KEYWORD1 void KEYWORD2 NAME(FlushVertexArrayRangeNV)(void)
- {
--   DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height));
-+   DISPATCH(FlushVertexArrayRangeNV, (), (F, "glFlushVertexArrayRangeNV();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * image)
-+KEYWORD1 void KEYWORD2 NAME(VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer)
- {
--   DISPATCH(GetConvolutionFilterEXT, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
-+   DISPATCH(VertexArrayRangeNV, (length, pointer), (F, "glVertexArrayRangeNV(%d, %p);\n", length, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(CombinerParameterfvNV)(GLenum pname, const GLfloat * params)
- {
--   DISPATCH(GetConvolutionParameterfvEXT, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(CombinerParameterfvNV, (pname, params), (F, "glCombinerParameterfvNV(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterivEXT)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(CombinerParameterfNV)(GLenum pname, GLfloat param)
- {
--   DISPATCH(GetConvolutionParameterivEXT, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(CombinerParameterfNV, (pname, param), (F, "glCombinerParameterfNV(0x%x, %f);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(GetSeparableFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
-+KEYWORD1 void KEYWORD2 NAME(CombinerParameterivNV)(GLenum pname, const GLint * params)
- {
--   DISPATCH(GetSeparableFilterEXT, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
-+   DISPATCH(CombinerParameterivNV, (pname, params), (F, "glCombinerParameterivNV(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(SeparableFilter2DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column)
-+KEYWORD1 void KEYWORD2 NAME(CombinerParameteriNV)(GLenum pname, GLint param)
- {
--   DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column));
-+   DISPATCH(CombinerParameteriNV, (pname, param), (F, "glCombinerParameteriNV(0x%x, %d);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(ColorTableSGI)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
-+KEYWORD1 void KEYWORD2 NAME(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
- {
--   DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
-+   DISPATCH(CombinerInputNV, (stage, portion, variable, input, mapping, componentUsage), (F, "glCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x);\n", stage, portion, variable, input, mapping, componentUsage));
- }
--KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfvSGI)(GLenum target, GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)
- {
--   DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(CombinerOutputNV, (stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum), (F, "glCombinerOutputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, %d, %d, %d);\n", stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum));
- }
--KEYWORD1 void KEYWORD2 NAME(ColorTableParameterivSGI)(GLenum target, GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
- {
--   DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(FinalCombinerInputNV, (variable, input, mapping, componentUsage), (F, "glFinalCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x);\n", variable, input, mapping, componentUsage));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyColorTableSGI)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-+KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params)
- {
--   DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTableSGI(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
-+   DISPATCH(GetCombinerInputParameterfvNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterfvNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetColorTableSGI)(GLenum target, GLenum format, GLenum type, GLvoid * table)
-+KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params)
- {
--   DISPATCH(GetColorTableSGI, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-+   DISPATCH(GetCombinerInputParameterivNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterivNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvSGI)(GLenum target, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params)
- {
--   DISPATCH(GetColorTableParameterfvSGI, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(GetCombinerOutputParameterfvNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterfvNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivSGI)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params)
- {
--   DISPATCH(GetColorTableParameterivSGI, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(GetCombinerOutputParameterivNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterivNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(PixelTexGenSGIX)(GLenum mode)
-+KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params)
- {
--   DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode));
-+   DISPATCH(GetFinalCombinerInputParameterfvNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterfvNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameteriSGIS)(GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params)
- {
--   DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param));
-+   DISPATCH(GetFinalCombinerInputParameterivNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterivNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(ResizeBuffersMESA)(void)
- {
--   DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(ResizeBuffersMESA, (), (F, "glResizeBuffersMESA();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2dMESA)(GLdouble x, GLdouble y)
- {
--   DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param));
-+   DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dMESA(%f, %f);\n", x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2dvMESA)(const GLdouble * v)
- {
--   DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2fMESA)(GLfloat x, GLfloat y)
- {
--   DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fMESA(%f, %f);\n", x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2fvMESA)(const GLfloat * v)
- {
--   DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y)
- {
--   DISPATCH(TexImage4DSGIS, (target, level, internalformat, width, height, depth, size4d, border, format, type, pixels), (F, "glTexImage4DSGIS(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, size4d, border, format, type, (const void *) pixels));
-+   DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iMESA(%d, %d);\n", x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2ivMESA)(const GLint * v)
- {
--   DISPATCH(TexSubImage4DSGIS, (target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels), (F, "glTexSubImage4DSGIS(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, (const void *) pixels));
-+   DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2sMESA)(GLshort x, GLshort y)
- {
--   RETURN_DISPATCH(AreTexturesResidentEXT, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
-+   DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sMESA(%d, %d);\n", x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(BindTextureEXT)(GLenum target, GLuint texture)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2svMESA)(const GLshort * v)
- {
--   DISPATCH(BindTexture, (target, texture), (F, "glBindTextureEXT(0x%x, %d);\n", target, texture));
-+   DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z)
- {
--   DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures));
-+   DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dMESA(%f, %f, %f);\n", x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3dvMESA)(const GLdouble * v)
- {
--   DISPATCH(GenTexturesEXT, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures));
-+   DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z)
- {
--   RETURN_DISPATCH(IsTextureEXT, (texture), (F, "glIsTextureEXT(%d);\n", texture));
-+   DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fMESA(%f, %f, %f);\n", x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(PrioritizeTexturesEXT)(GLsizei n, const GLuint * textures, const GLclampf * priorities)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3fvMESA)(const GLfloat * v)
- {
--   DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTexturesEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities));
-+   DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(DetailTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3iMESA)(GLint x, GLint y, GLint z)
- {
--   DISPATCH(DetailTexFuncSGIS, (target, n, points), (F, "glDetailTexFuncSGIS(0x%x, %d, %p);\n", target, n, (const void *) points));
-+   DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iMESA(%d, %d, %d);\n", x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(GetDetailTexFuncSGIS)(GLenum target, GLfloat * points)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3ivMESA)(const GLint * v)
- {
--   DISPATCH(GetDetailTexFuncSGIS, (target, points), (F, "glGetDetailTexFuncSGIS(0x%x, %p);\n", target, (const void *) points));
-+   DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SharpenTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z)
- {
--   DISPATCH(SharpenTexFuncSGIS, (target, n, points), (F, "glSharpenTexFuncSGIS(0x%x, %d, %p);\n", target, n, (const void *) points));
-+   DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sMESA(%d, %d, %d);\n", x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(GetSharpenTexFuncSGIS)(GLenum target, GLfloat * points)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3svMESA)(const GLshort * v)
- {
--   DISPATCH(GetSharpenTexFuncSGIS, (target, points), (F, "glGetSharpenTexFuncSGIS(0x%x, %p);\n", target, (const void *) points));
-+   DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SampleMaskSGIS)(GLclampf value, GLboolean invert)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
- {
--   DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert));
-+   DISPATCH(WindowPos4dMESA, (x, y, z, w), (F, "glWindowPos4dMESA(%f, %f, %f, %f);\n", x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(SamplePatternSGIS)(GLenum pattern)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble * v)
- {
--   DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern));
-+   DISPATCH(WindowPos4dvMESA, (v), (F, "glWindowPos4dvMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(ArrayElementEXT)(GLint i)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
- {
--   DISPATCH(ArrayElement, (i), (F, "glArrayElementEXT(%d);\n", i));
-+   DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, "glWindowPos4fMESA(%f, %f, %f, %f);\n", x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4fvMESA)(const GLfloat * v)
- {
--   DISPATCH(ColorPointerEXT, (size, type, stride, count, pointer), (F, "glColorPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer));
-+   DISPATCH(WindowPos4fvMESA, (v), (F, "glWindowPos4fvMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w)
- {
--   DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArraysEXT(0x%x, %d, %d);\n", mode, first, count));
-+   DISPATCH(WindowPos4iMESA, (x, y, z, w), (F, "glWindowPos4iMESA(%d, %d, %d, %d);\n", x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4ivMESA)(const GLint * v)
- {
--   DISPATCH(EdgeFlagPointerEXT, (stride, count, pointer), (F, "glEdgeFlagPointerEXT(%d, %d, %p);\n", stride, count, (const void *) pointer));
-+   DISPATCH(WindowPos4ivMESA, (v), (F, "glWindowPos4ivMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetPointervEXT)(GLenum pname, GLvoid ** params)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w)
- {
--   DISPATCH(GetPointerv, (pname, params), (F, "glGetPointervEXT(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(WindowPos4sMESA, (x, y, z, w), (F, "glWindowPos4sMESA(%d, %d, %d, %d);\n", x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v)
- {
--   DISPATCH(IndexPointerEXT, (type, stride, count, pointer), (F, "glIndexPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer));
-+   DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
- {
--   DISPATCH(NormalPointerEXT, (type, stride, count, pointer), (F, "glNormalPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer));
-+   DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
- }
--KEYWORD1 void KEYWORD2 NAME(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(IndexMaterialEXT)(GLenum face, GLenum mode)
- {
--   DISPATCH(TexCoordPointerEXT, (size, type, stride, count, pointer), (F, "glTexCoordPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer));
-+   DISPATCH(IndexMaterialEXT, (face, mode), (F, "glIndexMaterialEXT(0x%x, 0x%x);\n", face, mode));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(IndexFuncEXT)(GLenum func, GLclampf ref)
- {
--   DISPATCH(VertexPointerEXT, (size, type, stride, count, pointer), (F, "glVertexPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer));
-+   DISPATCH(IndexFuncEXT, (func, ref), (F, "glIndexFuncEXT(0x%x, %f);\n", func, ref));
- }
--KEYWORD1 void KEYWORD2 NAME(BlendEquationEXT)(GLenum mode)
-+KEYWORD1 void KEYWORD2 NAME(LockArraysEXT)(GLint first, GLsizei count)
- {
--   DISPATCH(BlendEquation, (mode), (F, "glBlendEquationEXT(0x%x);\n", mode));
-+   DISPATCH(LockArraysEXT, (first, count), (F, "glLockArraysEXT(%d, %d);\n", first, count));
- }
--KEYWORD1 void KEYWORD2 NAME(SpriteParameterfSGIX)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void)
- {
--   DISPATCH(SpriteParameterfSGIX, (pname, param), (F, "glSpriteParameterfSGIX(0x%x, %f);\n", pname, param));
-+   DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n"));
- }
--KEYWORD1 void KEYWORD2 NAME(SpriteParameterfvSGIX)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(CullParameterdvEXT)(GLenum pname, GLdouble * params)
- {
--   DISPATCH(SpriteParameterfvSGIX, (pname, params), (F, "glSpriteParameterfvSGIX(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(SpriteParameteriSGIX)(GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(CullParameterfvEXT)(GLenum pname, GLfloat * params)
- {
--   DISPATCH(SpriteParameteriSGIX, (pname, param), (F, "glSpriteParameteriSGIX(0x%x, %d);\n", pname, param));
-+   DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(SpriteParameterivSGIX)(GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(HintPGI)(GLenum target, GLint mode)
- {
--   DISPATCH(SpriteParameterivSGIX, (pname, params), (F, "glSpriteParameterivSGIX(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(HintPGI, (target, mode), (F, "glHintPGI(0x%x, %d);\n", target, mode));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(FogCoordfEXT)(GLfloat coord)
- {
--   DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param));
-+   DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordfEXT(%f);\n", coord));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord)
- {
--   DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterfARB)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(FogCoorddEXT)(GLdouble coord)
- {
--   DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfARB(0x%x, %f);\n", pname, param));
-+   DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoorddEXT(%f);\n", coord));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterfvARB)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(FogCoorddvEXT)(const GLdouble * coord)
- {
--   DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvARB(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddvEXT(%p);\n", (const void *) coord));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterfSGIS)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer)
- {
--   DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param));
-+   DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointerEXT(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterfvSGIS)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data)
- {
--   DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(GetColorTableEXT, (target, format, type, data), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) data));
- }
--KEYWORD1 GLint KEYWORD2 NAME(GetInstrumentsSGIX)(void)
-+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params)
- {
--   RETURN_DISPATCH(GetInstrumentsSGIX, (), (F, "glGetInstrumentsSGIX();\n"));
-+   DISPATCH(GetColorTableParameterivEXT, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(InstrumentsBufferSGIX)(GLsizei size, GLint * buffer)
-+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
- {
--   DISPATCH(InstrumentsBufferSGIX, (size, buffer), (F, "glInstrumentsBufferSGIX(%d, %p);\n", size, (const void *) buffer));
-+   DISPATCH(GetColorTableParameterfvEXT, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 GLint KEYWORD2 NAME(PollInstrumentsSGIX)(GLint * marker_p)
-+KEYWORD1 void KEYWORD2 NAME(TbufferMask3DFX)(GLuint mask)
- {
--   RETURN_DISPATCH(PollInstrumentsSGIX, (marker_p), (F, "glPollInstrumentsSGIX(%p);\n", (const void *) marker_p));
-+   DISPATCH(TbufferMask3DFX, (mask), (F, "glTbufferMask3DFX(%d);\n", mask));
- }
--KEYWORD1 void KEYWORD2 NAME(ReadInstrumentsSGIX)(GLint marker)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(ReadInstrumentsSGIX, (marker), (F, "glReadInstrumentsSGIX(%d);\n", marker));
-+   DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(StartInstrumentsSGIX)(void)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(StartInstrumentsSGIX, (), (F, "glStartInstrumentsSGIX();\n"));
-+   DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(StopInstrumentsSGIX)(GLint marker)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(StopInstrumentsSGIX, (marker), (F, "glStopInstrumentsSGIX(%d);\n", marker));
-+   DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1DARB(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(FrameZoomSGIX)(GLint factor)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(FrameZoomSGIX, (factor), (F, "glFrameZoomSGIX(%d);\n", factor));
-+   DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DARB(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(TagSampleBufferSGIX)(void)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(TagSampleBufferSGIX, (), (F, "glTagSampleBufferSGIX();\n"));
-+   DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2DARB(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data));
- }
--/* No dispatch for DeformationMap3dSGIX() */
--/* No dispatch for DeformationMap3fSGIX() */
--/* No dispatch for DeformSGIX() */
--/* No dispatch for LoadIdentityDeformationMapSGIX() */
--KEYWORD1 void KEYWORD2 NAME(ReferencePlaneSGIX)(const GLdouble * equation)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(ReferencePlaneSGIX, (equation), (F, "glReferencePlaneSGIX(%p);\n", (const void *) equation));
-+   DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1DARB(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(FlushRasterSGIX)(void)
-+KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img)
- {
--   DISPATCH(FlushRasterSGIX, (), (F, "glFlushRasterSGIX();\n"));
-+   DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImageARB(0x%x, %d, %p);\n", target, level, (const void *) img));
- }
--/* No dispatch for FogFuncSGIS() */
--/* No dispatch for GetFogFuncSGIS() */
--/* No dispatch for ImageTransformParameteriHP() */
--/* No dispatch for ImageTransformParameterfHP() */
--/* No dispatch for ImageTransformParameterivHP() */
--/* No dispatch for ImageTransformParameterfvHP() */
--/* No dispatch for GetImageTransformParameterivHP() */
--/* No dispatch for GetImageTransformParameterfvHP() */
--KEYWORD1 void KEYWORD2 NAME(ColorSubTableEXT)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue)
- {
--   DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTableEXT(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data));
-+   DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3bEXT(%d, %d, %d);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(CopyColorSubTableEXT)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bvEXT)(const GLbyte * v)
- {
--   DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTableEXT(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width));
-+   DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bvEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(HintPGI)(GLenum target, GLint mode)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue)
- {
--   DISPATCH(HintPGI, (target, mode), (F, "glHintPGI(0x%x, %d);\n", target, mode));
-+   DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3dEXT(%f, %f, %f);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dvEXT)(const GLdouble * v)
- {
--   DISPATCH(ColorTable, (target, internalFormat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalFormat, width, format, type, (const void *) table));
-+   DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dvEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue)
- {
--   DISPATCH(GetColorTableEXT, (target, format, type, data), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) data));
-+   DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3fEXT(%f, %f, %f);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fvEXT)(const GLfloat * v)
- {
--   DISPATCH(GetColorTableParameterivEXT, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fvEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue)
- {
--   DISPATCH(GetColorTableParameterfvEXT, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3iEXT(%d, %d, %d);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(GetListParameterfvSGIX)(GLuint list, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ivEXT)(const GLint * v)
- {
--   DISPATCH(GetListParameterfvSGIX, (list, pname, params), (F, "glGetListParameterfvSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
-+   DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3ivEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetListParameterivSGIX)(GLuint list, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue)
- {
--   DISPATCH(GetListParameterivSGIX, (list, pname, params), (F, "glGetListParameterivSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
-+   DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3sEXT(%d, %d, %d);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(ListParameterfSGIX)(GLuint list, GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3svEXT)(const GLshort * v)
- {
--   DISPATCH(ListParameterfSGIX, (list, pname, param), (F, "glListParameterfSGIX(%d, 0x%x, %f);\n", list, pname, param));
-+   DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3svEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(ListParameterfvSGIX)(GLuint list, GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue)
- {
--   DISPATCH(ListParameterfvSGIX, (list, pname, params), (F, "glListParameterfvSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
-+   DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ubEXT(%d, %d, %d);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(ListParameteriSGIX)(GLuint list, GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubvEXT)(const GLubyte * v)
- {
--   DISPATCH(ListParameteriSGIX, (list, pname, param), (F, "glListParameteriSGIX(%d, 0x%x, %d);\n", list, pname, param));
-+   DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubvEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(ListParameterivSGIX)(GLuint list, GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue)
- {
--   DISPATCH(ListParameterivSGIX, (list, pname, params), (F, "glListParameterivSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params));
-+   DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3uiEXT(%d, %d, %d);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(IndexMaterialEXT)(GLenum face, GLenum mode)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uivEXT)(const GLuint * v)
- {
--   DISPATCH(IndexMaterialEXT, (face, mode), (F, "glIndexMaterialEXT(0x%x, 0x%x);\n", face, mode));
-+   DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uivEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(IndexFuncEXT)(GLenum func, GLclampf ref)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue)
- {
--   DISPATCH(IndexFuncEXT, (func, ref), (F, "glIndexFuncEXT(0x%x, %f);\n", func, ref));
-+   DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3usEXT(%d, %d, %d);\n", red, green, blue));
- }
--KEYWORD1 void KEYWORD2 NAME(LockArraysEXT)(GLint first, GLsizei count)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usvEXT)(const GLushort * v)
- {
--   DISPATCH(LockArraysEXT, (first, count), (F, "glLockArraysEXT(%d, %d);\n", first, count));
-+   DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usvEXT(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
- {
--   DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n"));
-+   DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(CullParameterdvEXT)(GLenum pname, GLdouble * params)
-+KEYWORD1 GLboolean KEYWORD2 NAME(AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences)
- {
--   DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params));
-+   RETURN_DISPATCH(AreProgramsResidentNV, (n, ids, residences), (F, "glAreProgramsResidentNV(%d, %p, %p);\n", n, (const void *) ids, (const void *) residences));
- }
--KEYWORD1 void KEYWORD2 NAME(CullParameterfvEXT)(GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(BindProgramNV)(GLenum target, GLuint id)
- {
--   DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(BindProgramNV, (target, id), (F, "glBindProgramNV(0x%x, %d);\n", target, id));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentColorMaterialSGIX)(GLenum face, GLenum mode)
-+KEYWORD1 void KEYWORD2 NAME(DeleteProgramsNV)(GLsizei n, const GLuint * ids)
- {
--   DISPATCH(FragmentColorMaterialSGIX, (face, mode), (F, "glFragmentColorMaterialSGIX(0x%x, 0x%x);\n", face, mode));
-+   DISPATCH(DeleteProgramsNV, (n, ids), (F, "glDeleteProgramsNV(%d, %p);\n", n, (const void *) ids));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightfSGIX)(GLenum light, GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params)
- {
--   DISPATCH(FragmentLightfSGIX, (light, pname, param), (F, "glFragmentLightfSGIX(0x%x, 0x%x, %f);\n", light, pname, param));
-+   DISPATCH(ExecuteProgramNV, (target, id, params), (F, "glExecuteProgramNV(0x%x, %d, %p);\n", target, id, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GenProgramsNV)(GLsizei n, GLuint * ids)
-+{
-+   DISPATCH(GenProgramsNV, (n, ids), (F, "glGenProgramsNV(%d, %p);\n", n, (const void *) ids));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params)
-+{
-+   DISPATCH(GetProgramParameterdvNV, (target, index, pname, params), (F, "glGetProgramParameterdvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightfvSGIX)(GLenum light, GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params)
- {
--   DISPATCH(FragmentLightfvSGIX, (light, pname, params), (F, "glFragmentLightfvSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-+   DISPATCH(GetProgramParameterfvNV, (target, index, pname, params), (F, "glGetProgramParameterfvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightiSGIX)(GLenum light, GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramivNV)(GLuint id, GLenum pname, GLint * params)
- {
--   DISPATCH(FragmentLightiSGIX, (light, pname, param), (F, "glFragmentLightiSGIX(0x%x, 0x%x, %d);\n", light, pname, param));
-+   DISPATCH(GetProgramivNV, (id, pname, params), (F, "glGetProgramivNV(%d, 0x%x, %p);\n", id, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightivSGIX)(GLenum light, GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program)
- {
--   DISPATCH(FragmentLightivSGIX, (light, pname, params), (F, "glFragmentLightivSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-+   DISPATCH(GetProgramStringNV, (id, pname, program), (F, "glGetProgramStringNV(%d, 0x%x, %p);\n", id, pname, (const void *) program));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightModelfSGIX)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params)
- {
--   DISPATCH(FragmentLightModelfSGIX, (pname, param), (F, "glFragmentLightModelfSGIX(0x%x, %f);\n", pname, param));
-+   DISPATCH(GetTrackMatrixivNV, (target, address, pname, params), (F, "glGetTrackMatrixivNV(0x%x, %d, 0x%x, %p);\n", target, address, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightModelfvSGIX)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params)
- {
--   DISPATCH(FragmentLightModelfvSGIX, (pname, params), (F, "glFragmentLightModelfvSGIX(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(GetVertexAttribdvNV, (index, pname, params), (F, "glGetVertexAttribdvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightModeliSGIX)(GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params)
- {
--   DISPATCH(FragmentLightModeliSGIX, (pname, param), (F, "glFragmentLightModeliSGIX(0x%x, %d);\n", pname, param));
-+   DISPATCH(GetVertexAttribfvNV, (index, pname, params), (F, "glGetVertexAttribfvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentLightModelivSGIX)(GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params)
- {
--   DISPATCH(FragmentLightModelivSGIX, (pname, params), (F, "glFragmentLightModelivSGIX(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(GetVertexAttribivNV, (index, pname, params), (F, "glGetVertexAttribivNV(%d, 0x%x, %p);\n", index, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentMaterialfSGIX)(GLenum face, GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer)
- {
--   DISPATCH(FragmentMaterialfSGIX, (face, pname, param), (F, "glFragmentMaterialfSGIX(0x%x, 0x%x, %f);\n", face, pname, param));
-+   DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentMaterialfvSGIX)(GLenum face, GLenum pname, const GLfloat * params)
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramNV)(GLuint id)
- {
--   DISPATCH(FragmentMaterialfvSGIX, (face, pname, params), (F, "glFragmentMaterialfvSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-+   RETURN_DISPATCH(IsProgramNV, (id), (F, "glIsProgramNV(%d);\n", id));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentMaterialiSGIX)(GLenum face, GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
- {
--   DISPATCH(FragmentMaterialiSGIX, (face, pname, param), (F, "glFragmentMaterialiSGIX(0x%x, 0x%x, %d);\n", face, pname, param));
-+   DISPATCH(LoadProgramNV, (target, id, len, program), (F, "glLoadProgramNV(0x%x, %d, %d, %p);\n", target, id, len, (const void *) program));
- }
--KEYWORD1 void KEYWORD2 NAME(FragmentMaterialivSGIX)(GLenum face, GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
- {
--   DISPATCH(FragmentMaterialivSGIX, (face, pname, params), (F, "glFragmentMaterialivSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-+   DISPATCH(ProgramParameter4dNV, (target, index, x, y, z, w), (F, "glProgramParameter4dNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFragmentLightfvSGIX)(GLenum light, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params)
- {
--   DISPATCH(GetFragmentLightfvSGIX, (light, pname, params), (F, "glGetFragmentLightfvSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-+   DISPATCH(ProgramParameter4dvNV, (target, index, params), (F, "glProgramParameter4dvNV(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFragmentLightivSGIX)(GLenum light, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
- {
--   DISPATCH(GetFragmentLightivSGIX, (light, pname, params), (F, "glGetFragmentLightivSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-+   DISPATCH(ProgramParameter4fNV, (target, index, x, y, z, w), (F, "glProgramParameter4fNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFragmentMaterialfvSGIX)(GLenum face, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params)
- {
--   DISPATCH(GetFragmentMaterialfvSGIX, (face, pname, params), (F, "glGetFragmentMaterialfvSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-+   DISPATCH(ProgramParameter4fvNV, (target, index, params), (F, "glProgramParameter4fvNV(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFragmentMaterialivSGIX)(GLenum face, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params)
- {
--   DISPATCH(GetFragmentMaterialivSGIX, (face, pname, params), (F, "glGetFragmentMaterialivSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-+   DISPATCH(ProgramParameters4dvNV, (target, index, num, params), (F, "glProgramParameters4dvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(LightEnviSGIX)(GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params)
- {
--   DISPATCH(LightEnviSGIX, (pname, param), (F, "glLightEnviSGIX(0x%x, %d);\n", pname, param));
-+   DISPATCH(ProgramParameters4fvNV, (target, index, num, params), (F, "glProgramParameters4fvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices)
-+KEYWORD1 void KEYWORD2 NAME(RequestResidentProgramsNV)(GLsizei n, const GLuint * ids)
- {
--   DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices));
-+   DISPATCH(RequestResidentProgramsNV, (n, ids), (F, "glRequestResidentProgramsNV(%d, %p);\n", n, (const void *) ids));
- }
--/* No dispatch for ApplyTextureEXT() */
--/* No dispatch for TextureLightEXT() */
--/* No dispatch for TextureMaterialEXT() */
--/* No dispatch for AsyncMarkerSGIX() */
--/* No dispatch for FinishAsyncSGIX() */
--/* No dispatch for PollAsyncSGIX() */
--/* No dispatch for GenAsyncMarkersSGIX() */
--/* No dispatch for DeleteAsyncMarkersSGIX() */
--/* No dispatch for IsAsyncMarkerSGIX() */
--/* No dispatch for VertexPointervINTEL() */
--/* No dispatch for NormalPointervINTEL() */
--/* No dispatch for ColorPointervINTEL() */
--/* No dispatch for TexCoordPointervINTEL() */
--/* No dispatch for PixelTransformParameteriEXT() */
--/* No dispatch for PixelTransformParameterfEXT() */
--/* No dispatch for PixelTransformParameterivEXT() */
--/* No dispatch for PixelTransformParameterfvEXT() */
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue)
-+KEYWORD1 void KEYWORD2 NAME(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform)
- {
--   DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3bEXT(%d, %d, %d);\n", red, green, blue));
-+   DISPATCH(TrackMatrixNV, (target, address, matrix, transform), (F, "glTrackMatrixNV(0x%x, %d, 0x%x, 0x%x);\n", target, address, matrix, transform));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bvEXT)(const GLbyte * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
- {
--   DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bvEXT(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttribPointerNV, (index, size, type, stride, pointer), (F, "glVertexAttribPointerNV(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dNV)(GLuint index, GLdouble x)
- {
--   DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3dEXT(%f, %f, %f);\n", red, green, blue));
-+   DISPATCH(VertexAttrib1dNV, (index, x), (F, "glVertexAttrib1dNV(%d, %f);\n", index, x));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dvEXT)(const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvNV)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dvEXT(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(VertexAttrib1dvNV, (index, v), (F, "glVertexAttrib1dvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fNV)(GLuint index, GLfloat x)
- {
--   DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3fEXT(%f, %f, %f);\n", red, green, blue));
-+   DISPATCH(VertexAttrib1fNV, (index, x), (F, "glVertexAttrib1fNV(%d, %f);\n", index, x));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fvEXT)(const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvNV)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fvEXT(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(VertexAttrib1fvNV, (index, v), (F, "glVertexAttrib1fvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sNV)(GLuint index, GLshort x)
- {
--   DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3iEXT(%d, %d, %d);\n", red, green, blue));
-+   DISPATCH(VertexAttrib1sNV, (index, x), (F, "glVertexAttrib1sNV(%d, %d);\n", index, x));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ivEXT)(const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svNV)(GLuint index, const GLshort * v)
- {
--   DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3ivEXT(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib1svNV, (index, v), (F, "glVertexAttrib1svNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y)
- {
--   DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3sEXT(%d, %d, %d);\n", red, green, blue));
-+   DISPATCH(VertexAttrib2dNV, (index, x, y), (F, "glVertexAttrib2dNV(%d, %f, %f);\n", index, x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3svEXT)(const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvNV)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3svEXT(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y)
- {
--   DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ubEXT(%d, %d, %d);\n", red, green, blue));
-+   DISPATCH(VertexAttrib2fNV, (index, x, y), (F, "glVertexAttrib2fNV(%d, %f, %f);\n", index, x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubvEXT)(const GLubyte * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvNV)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubvEXT(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y)
- {
--   DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3uiEXT(%d, %d, %d);\n", red, green, blue));
-+   DISPATCH(VertexAttrib2sNV, (index, x, y), (F, "glVertexAttrib2sNV(%d, %d, %d);\n", index, x, y));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uivEXT)(const GLuint * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svNV)(GLuint index, const GLshort * v)
- {
--   DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uivEXT(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib2svNV, (index, v), (F, "glVertexAttrib2svNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
- {
--   DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3usEXT(%d, %d, %d);\n", red, green, blue));
-+   DISPATCH(VertexAttrib3dNV, (index, x, y, z), (F, "glVertexAttrib3dNV(%d, %f, %f, %f);\n", index, x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usvEXT)(const GLushort * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvNV)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usvEXT(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
- {
--   DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-+   DISPATCH(VertexAttrib3fNV, (index, x, y, z), (F, "glVertexAttrib3fNV(%d, %f, %f, %f);\n", index, x, y, z));
- }
--/* No dispatch for TextureNormalEXT() */
--KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvNV)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount));
-+   DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z)
- {
--   DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount));
-+   DISPATCH(VertexAttrib3sNV, (index, x, y, z), (F, "glVertexAttrib3sNV(%d, %d, %d, %d);\n", index, x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(FogCoordfEXT)(GLfloat coord)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svNV)(GLuint index, const GLshort * v)
- {
--   DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordfEXT(%f);\n", coord));
-+   DISPATCH(VertexAttrib3svNV, (index, v), (F, "glVertexAttrib3svNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
- {
--   DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord));
-+   DISPATCH(VertexAttrib4dNV, (index, x, y, z, w), (F, "glVertexAttrib4dNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(FogCoorddEXT)(GLdouble coord)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvNV)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoorddEXT(%f);\n", coord));
-+   DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(FogCoorddvEXT)(const GLdouble * coord)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
- {
--   DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddvEXT(%p);\n", (const void *) coord));
-+   DISPATCH(VertexAttrib4fNV, (index, x, y, z, w), (F, "glVertexAttrib4fNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvNV)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointerEXT(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-+   DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvNV(%d, %p);\n", index, (const void *) v));
- }
--/* No dispatch for Tangent3bEXT() */
--/* No dispatch for Tangent3bvEXT() */
--/* No dispatch for Tangent3dEXT() */
--/* No dispatch for Tangent3dvEXT() */
--/* No dispatch for Tangent3fEXT() */
--/* No dispatch for Tangent3fvEXT() */
--/* No dispatch for Tangent3iEXT() */
--/* No dispatch for Tangent3ivEXT() */
--/* No dispatch for Tangent3sEXT() */
--/* No dispatch for Tangent3svEXT() */
--/* No dispatch for Binormal3bEXT() */
--/* No dispatch for Binormal3bvEXT() */
--/* No dispatch for Binormal3dEXT() */
--/* No dispatch for Binormal3dvEXT() */
--/* No dispatch for Binormal3fEXT() */
--/* No dispatch for Binormal3fvEXT() */
--/* No dispatch for Binormal3iEXT() */
--/* No dispatch for Binormal3ivEXT() */
--/* No dispatch for Binormal3sEXT() */
--/* No dispatch for Binormal3svEXT() */
--/* No dispatch for TangentPointerEXT() */
--/* No dispatch for BinormalPointerEXT() */
--/* No dispatch for FinishTextureSUNX() */
--/* No dispatch for GlobalAlphaFactorbSUN() */
--/* No dispatch for GlobalAlphaFactorsSUN() */
--/* No dispatch for GlobalAlphaFactoriSUN() */
--/* No dispatch for GlobalAlphaFactorfSUN() */
--/* No dispatch for GlobalAlphaFactordSUN() */
--/* No dispatch for GlobalAlphaFactorubSUN() */
--/* No dispatch for GlobalAlphaFactorusSUN() */
--/* No dispatch for GlobalAlphaFactoruiSUN() */
--/* No dispatch for ReplacementCodeuiSUN() */
--/* No dispatch for ReplacementCodeusSUN() */
--/* No dispatch for ReplacementCodeubSUN() */
--/* No dispatch for ReplacementCodeuivSUN() */
--/* No dispatch for ReplacementCodeusvSUN() */
--/* No dispatch for ReplacementCodeubvSUN() */
--/* No dispatch for ReplacementCodePointerSUN() */
--/* No dispatch for Color4ubVertex2fSUN() */
--/* No dispatch for Color4ubVertex2fvSUN() */
--/* No dispatch for Color4ubVertex3fSUN() */
--/* No dispatch for Color4ubVertex3fvSUN() */
--/* No dispatch for Color3fVertex3fSUN() */
--/* No dispatch for Color3fVertex3fvSUN() */
--/* No dispatch for Normal3fVertex3fSUN() */
--/* No dispatch for Normal3fVertex3fvSUN() */
--/* No dispatch for Color4fNormal3fVertex3fSUN() */
--/* No dispatch for Color4fNormal3fVertex3fvSUN() */
--/* No dispatch for TexCoord2fVertex3fSUN() */
--/* No dispatch for TexCoord2fVertex3fvSUN() */
--/* No dispatch for TexCoord4fVertex4fSUN() */
--/* No dispatch for TexCoord4fVertex4fvSUN() */
--/* No dispatch for TexCoord2fColor4ubVertex3fSUN() */
--/* No dispatch for TexCoord2fColor4ubVertex3fvSUN() */
--/* No dispatch for TexCoord2fColor3fVertex3fSUN() */
--/* No dispatch for TexCoord2fColor3fVertex3fvSUN() */
--/* No dispatch for TexCoord2fNormal3fVertex3fSUN() */
--/* No dispatch for TexCoord2fNormal3fVertex3fvSUN() */
--/* No dispatch for TexCoord2fColor4fNormal3fVertex3fSUN() */
--/* No dispatch for TexCoord2fColor4fNormal3fVertex3fvSUN() */
--/* No dispatch for TexCoord4fColor4fNormal3fVertex4fSUN() */
--/* No dispatch for TexCoord4fColor4fNormal3fVertex4fvSUN() */
--/* No dispatch for ReplacementCodeuiVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiColor4ubVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiColor4ubVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiColor3fVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiColor3fVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiNormal3fVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiNormal3fVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiColor4fNormal3fVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiColor4fNormal3fVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiTexCoord2fVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiTexCoord2fVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN() */
--/* No dispatch for ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN() */
--/* No dispatch for ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN() */
--KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
- {
--   DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
-+   DISPATCH(VertexAttrib4sNV, (index, x, y, z, w), (F, "glVertexAttrib4sNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateINGR)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svNV)(GLuint index, const GLshort * v)
- {
--   DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
-+   DISPATCH(VertexAttrib4svNV, (index, v), (F, "glVertexAttrib4svNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexWeightfEXT)(GLfloat weight)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
- {
--   DISPATCH(VertexWeightfEXT, (weight), (F, "glVertexWeightfEXT(%f);\n", weight));
-+   DISPATCH(VertexAttrib4ubNV, (index, x, y, z, w), (F, "glVertexAttrib4ubNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexWeightfvEXT)(const GLfloat * weight)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvNV)(GLuint index, const GLubyte * v)
- {
--   DISPATCH(VertexWeightfvEXT, (weight), (F, "glVertexWeightfvEXT(%p);\n", (const void *) weight));
-+   DISPATCH(VertexAttrib4ubvNV, (index, v), (F, "glVertexAttrib4ubvNV(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexWeightPointerEXT)(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v)
- {
--   DISPATCH(VertexWeightPointerEXT, (size, type, stride, pointer), (F, "glVertexWeightPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-+   DISPATCH(VertexAttribs1dvNV, (index, n, v), (F, "glVertexAttribs1dvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(FlushVertexArrayRangeNV)(void)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v)
- {
--   DISPATCH(FlushVertexArrayRangeNV, (), (F, "glFlushVertexArrayRangeNV();\n"));
-+   DISPATCH(VertexAttribs1fvNV, (index, n, v), (F, "glVertexAttribs1fvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v)
- {
--   DISPATCH(VertexArrayRangeNV, (length, pointer), (F, "glVertexArrayRangeNV(%d, %p);\n", length, (const void *) pointer));
-+   DISPATCH(VertexAttribs1svNV, (index, n, v), (F, "glVertexAttribs1svNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(CombinerParameterfvNV)(GLenum pname, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v)
- {
--   DISPATCH(CombinerParameterfvNV, (pname, params), (F, "glCombinerParameterfvNV(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(VertexAttribs2dvNV, (index, n, v), (F, "glVertexAttribs2dvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(CombinerParameterfNV)(GLenum pname, GLfloat param)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v)
- {
--   DISPATCH(CombinerParameterfNV, (pname, param), (F, "glCombinerParameterfNV(0x%x, %f);\n", pname, param));
-+   DISPATCH(VertexAttribs2fvNV, (index, n, v), (F, "glVertexAttribs2fvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(CombinerParameterivNV)(GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v)
- {
--   DISPATCH(CombinerParameterivNV, (pname, params), (F, "glCombinerParameterivNV(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(VertexAttribs2svNV, (index, n, v), (F, "glVertexAttribs2svNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(CombinerParameteriNV)(GLenum pname, GLint param)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v)
- {
--   DISPATCH(CombinerParameteriNV, (pname, param), (F, "glCombinerParameteriNV(0x%x, %d);\n", pname, param));
-+   DISPATCH(VertexAttribs3dvNV, (index, n, v), (F, "glVertexAttribs3dvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v)
- {
--   DISPATCH(CombinerInputNV, (stage, portion, variable, input, mapping, componentUsage), (F, "glCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x);\n", stage, portion, variable, input, mapping, componentUsage));
-+   DISPATCH(VertexAttribs3fvNV, (index, n, v), (F, "glVertexAttribs3fvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v)
- {
--   DISPATCH(CombinerOutputNV, (stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum), (F, "glCombinerOutputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, %d, %d, %d);\n", stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum));
-+   DISPATCH(VertexAttribs3svNV, (index, n, v), (F, "glVertexAttribs3svNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v)
- {
--   DISPATCH(FinalCombinerInputNV, (variable, input, mapping, componentUsage), (F, "glFinalCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x);\n", variable, input, mapping, componentUsage));
-+   DISPATCH(VertexAttribs4dvNV, (index, n, v), (F, "glVertexAttribs4dvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v)
- {
--   DISPATCH(GetCombinerInputParameterfvNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterfvNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params));
-+   DISPATCH(VertexAttribs4fvNV, (index, n, v), (F, "glVertexAttribs4fvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v)
- {
--   DISPATCH(GetCombinerInputParameterivNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterivNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params));
-+   DISPATCH(VertexAttribs4svNV, (index, n, v), (F, "glVertexAttribs4svNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v)
- {
--   DISPATCH(GetCombinerOutputParameterfvNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterfvNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params));
-+   DISPATCH(VertexAttribs4ubvNV, (index, n, v), (F, "glVertexAttribs4ubvNV(%d, %d, %p);\n", index, n, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(PointParameteriNV)(GLenum pname, GLint params)
- {
--   DISPATCH(GetCombinerOutputParameterivNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterivNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params));
-+   DISPATCH(PointParameteriNV, (pname, params), (F, "glPointParameteriNV(0x%x, %d);\n", pname, params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * params)
- {
--   DISPATCH(GetFinalCombinerInputParameterfvNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterfvNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params));
-+   DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount)
- {
--   DISPATCH(GetFinalCombinerInputParameterivNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterivNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params));
-+   DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount));
- }
--KEYWORD1 void KEYWORD2 NAME(ResizeBuffersMESA)(void)
-+KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount)
- {
--   DISPATCH(ResizeBuffersMESA, (), (F, "glResizeBuffersMESA();\n"));
-+   DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2dMESA)(GLdouble x, GLdouble y)
-+KEYWORD1 void KEYWORD2 NAME(ActiveStencilFaceEXT)(GLenum face)
- {
--   DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dMESA(%f, %f);\n", x, y));
-+   DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2dvMESA)(const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(DeleteFencesNV)(GLsizei n, const GLuint * fences)
- {
--   DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvMESA(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2fMESA)(GLfloat x, GLfloat y)
-+KEYWORD1 void KEYWORD2 NAME(GenFencesNV)(GLsizei n, GLuint * fences)
- {
--   DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fMESA(%f, %f);\n", x, y));
-+   DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2fvMESA)(const GLfloat * v)
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsFenceNV)(GLuint fence)
- {
--   DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvMESA(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y)
-+KEYWORD1 GLboolean KEYWORD2 NAME(TestFenceNV)(GLuint fence)
- {
--   DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iMESA(%d, %d);\n", x, y));
-+   RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2ivMESA)(const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(GetFenceivNV)(GLuint fence, GLenum pname, GLint * params)
- {
--   DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivMESA(%p);\n", (const void *) v));
-+   DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2sMESA)(GLshort x, GLshort y)
-+KEYWORD1 void KEYWORD2 NAME(FinishFenceNV)(GLuint fence)
- {
--   DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sMESA(%d, %d);\n", x, y));
-+   DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2svMESA)(const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(SetFenceNV)(GLuint fence, GLenum condition)
- {
--   DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svMESA(%p);\n", (const void *) v));
-+   DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bvARB)(GLuint index, const GLbyte * v)
- {
--   DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dMESA(%f, %f, %f);\n", x, y, z));
-+   DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3dvMESA)(const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ivARB)(GLuint index, const GLint * v)
- {
--   DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvMESA(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4ivARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvARB)(GLuint index, const GLubyte * v)
- {
--   DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fMESA(%f, %f, %f);\n", x, y, z));
-+   DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3fvMESA)(const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usvARB)(GLuint index, const GLushort * v)
- {
--   DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvMESA(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3iMESA)(GLint x, GLint y, GLint z)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uivARB)(GLuint index, const GLuint * v)
- {
--   DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iMESA(%d, %d, %d);\n", x, y, z));
-+   DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uivARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3ivMESA)(const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NbvARB)(GLuint index, const GLbyte * v)
- {
--   DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivMESA(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4NbvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NsvARB)(GLuint index, const GLshort * v)
- {
--   DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sMESA(%d, %d, %d);\n", x, y, z));
-+   DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4NsvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3svMESA)(const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NivARB)(GLuint index, const GLint * v)
- {
--   DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svMESA(%p);\n", (const void *) v));
-+   DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4NivARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NusvARB)(GLuint index, const GLushort * v)
- {
--   DISPATCH(WindowPos4dMESA, (x, y, z, w), (F, "glWindowPos4dMESA(%f, %f, %f, %f);\n", x, y, z, w));
-+   DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4NusvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NuivARB)(GLuint index, const GLuint * v)
- {
--   DISPATCH(WindowPos4dvMESA, (v), (F, "glWindowPos4dvMESA(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4NuivARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-+KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer)
- {
--   DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, "glWindowPos4fMESA(%f, %f, %f, %f);\n", x, y, z, w));
-+   DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointerARB(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4fvMESA)(const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArrayARB)(GLuint index)
- {
--   DISPATCH(WindowPos4fvMESA, (v), (F, "glWindowPos4fvMESA(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArrayARB(%d);\n", index));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w)
-+KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArrayARB)(GLuint index)
- {
--   DISPATCH(WindowPos4iMESA, (x, y, z, w), (F, "glWindowPos4iMESA(%d, %d, %d, %d);\n", x, y, z, w));
-+   DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArrayARB(%d);\n", index));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4ivMESA)(const GLint * v)
-+KEYWORD1 void KEYWORD2 NAME(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
- {
--   DISPATCH(WindowPos4ivMESA, (v), (F, "glWindowPos4ivMESA(%p);\n", (const void *) v));
-+   DISPATCH(ProgramStringARB, (target, format, len, string), (F, "glProgramStringARB(0x%x, 0x%x, %d, %p);\n", target, format, len, (const void *) string));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w)
-+KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
- {
--   DISPATCH(WindowPos4sMESA, (x, y, z, w), (F, "glWindowPos4sMESA(%d, %d, %d, %d);\n", x, y, z, w));
-+   DISPATCH(ProgramEnvParameter4dARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params)
- {
--   DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v));
-+   DISPATCH(ProgramEnvParameter4dvARB, (target, index, params), (F, "glProgramEnvParameter4dvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
-+KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
- {
--   DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride));
-+   DISPATCH(ProgramEnvParameter4fARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
-+KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params)
- {
--   DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride));
-+   DISPATCH(ProgramEnvParameter4fvARB, (target, index, params), (F, "glProgramEnvParameter4fvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--/* No dispatch for ColorPointerListIBM() */
--/* No dispatch for SecondaryColorPointerListIBM() */
--/* No dispatch for EdgeFlagPointerListIBM() */
--/* No dispatch for FogCoordPointerListIBM() */
--/* No dispatch for IndexPointerListIBM() */
--/* No dispatch for NormalPointerListIBM() */
--/* No dispatch for TexCoordPointerListIBM() */
--/* No dispatch for VertexPointerListIBM() */
--KEYWORD1 void KEYWORD2 NAME(TbufferMask3DFX)(GLuint mask)
-+KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
- {
--   DISPATCH(TbufferMask3DFX, (mask), (F, "glTbufferMask3DFX(%d);\n", mask));
-+   DISPATCH(ProgramLocalParameter4dARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(SampleMaskEXT)(GLclampf value, GLboolean invert)
-+KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params)
- {
--   DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskEXT(%f, %d);\n", value, invert));
-+   DISPATCH(ProgramLocalParameter4dvARB, (target, index, params), (F, "glProgramLocalParameter4dvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(SamplePatternEXT)(GLenum pattern)
-+KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
- {
--   DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternEXT(0x%x);\n", pattern));
-+   DISPATCH(ProgramLocalParameter4fARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
- }
--/* No dispatch for TextureColorMaskSGIS() */
--/* No dispatch for IglooInterfaceSGIX() */
--/* No dispatch for MapControlPointsNV() */
--/* No dispatch for MapParameterivNV() */
--/* No dispatch for MapParameterfvNV() */
--/* No dispatch for GetMapControlPointsNV() */
--/* No dispatch for GetMapParameterivNV() */
--/* No dispatch for GetMapParameterfvNV() */
--/* No dispatch for GetMapAttribParameterivNV() */
--/* No dispatch for GetMapAttribParameterfvNV() */
--/* No dispatch for EvalMapsNV() */
--/* No dispatch for CombinerStageParameterfvNV() */
--/* No dispatch for GetCombinerStageParameterfvNV() */
--KEYWORD1 void KEYWORD2 NAME(WindowPos2dARB)(GLdouble x, GLdouble y)
-+KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params)
- {
--   DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dARB(%f, %f);\n", x, y));
-+   DISPATCH(ProgramLocalParameter4fvARB, (target, index, params), (F, "glProgramLocalParameter4fvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2fARB)(GLfloat x, GLfloat y)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params)
- {
--   DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fARB(%f, %f);\n", x, y));
-+   DISPATCH(GetProgramEnvParameterdvARB, (target, index, params), (F, "glGetProgramEnvParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2iARB)(GLint x, GLint y)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params)
- {
--   DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iARB(%d, %d);\n", x, y));
-+   DISPATCH(GetProgramEnvParameterfvARB, (target, index, params), (F, "glGetProgramEnvParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2sARB)(GLshort x, GLshort y)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params)
- {
--   DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sARB(%d, %d);\n", x, y));
-+   DISPATCH(GetProgramLocalParameterdvARB, (target, index, params), (F, "glGetProgramLocalParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2dvARB)(const GLdouble * p)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params)
- {
--   DISPATCH(WindowPos2dvMESA, (p), (F, "glWindowPos2dvARB(%p /* %g, %g */);\n", (const void *) p, p[0], p[1]));
-+   DISPATCH(GetProgramLocalParameterfvARB, (target, index, params), (F, "glGetProgramLocalParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2fvARB)(const GLfloat * p)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramivARB)(GLenum target, GLenum pname, GLint * params)
- {
--   DISPATCH(WindowPos2fvMESA, (p), (F, "glWindowPos2fvARB(%p /* %g, %g */);\n", (const void *) p, p[0], p[1]));
-+   DISPATCH(GetProgramivARB, (target, pname, params), (F, "glGetProgramivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2ivARB)(const GLint * p)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string)
- {
--   DISPATCH(WindowPos2ivMESA, (p), (F, "glWindowPos2ivARB(%p);\n", (const void *) p));
-+   DISPATCH(GetProgramStringARB, (target, pname, string), (F, "glGetProgramStringARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) string));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos2svARB)(const GLshort * p)
-+KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
- {
--   DISPATCH(WindowPos2svMESA, (p), (F, "glWindowPos2svARB(%p);\n", (const void *) p));
-+   DISPATCH(ProgramNamedParameter4fNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4fNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z)
-+KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
- {
--   DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dARB(%f, %f, %f);\n", x, y, z));
-+   DISPATCH(ProgramNamedParameter4dNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4dNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z)
-+KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
- {
--   DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fARB(%f, %f, %f);\n", x, y, z));
-+   DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3iARB)(GLint x, GLint y, GLint z)
-+KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
- {
--   DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iARB(%d, %d, %d);\n", x, y, z));
-+   DISPATCH(ProgramNamedParameter4dvNV, (id, len, name, v), (F, "glProgramNamedParameter4dvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3sARB)(GLshort x, GLshort y, GLshort z)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
- {
--   DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sARB(%d, %d, %d);\n", x, y, z));
-+   DISPATCH(GetProgramNamedParameterfvNV, (id, len, name, params), (F, "glGetProgramNamedParameterfvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3dvARB)(const GLdouble * p)
-+KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
- {
--   DISPATCH(WindowPos3dvMESA, (p), (F, "glWindowPos3dvARB(%p /* %g, %g, %g */);\n", (const void *) p, p[0], p[1], p[2]));
-+   DISPATCH(GetProgramNamedParameterdvNV, (id, len, name, params), (F, "glGetProgramNamedParameterdvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3fvARB)(const GLfloat * p)
-+KEYWORD1 void KEYWORD2 NAME(BindBufferARB)(GLenum target, GLuint buffer)
- {
--   DISPATCH(WindowPos3fvMESA, (p), (F, "glWindowPos3fvARB(%p /* %g, %g, %g */);\n", (const void *) p, p[0], p[1], p[2]));
-+   DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBufferARB(0x%x, %d);\n", target, buffer));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3ivARB)(const GLint * p)
-+KEYWORD1 void KEYWORD2 NAME(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage)
- {
--   DISPATCH(WindowPos3ivMESA, (p), (F, "glWindowPos3ivARB(%p);\n", (const void *) p));
-+   DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferDataARB(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3svARB)(const GLshort * p)
-+KEYWORD1 void KEYWORD2 NAME(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data)
- {
--   DISPATCH(WindowPos3svMESA, (p), (F, "glWindowPos3svARB(%p);\n", (const void *) p));
-+   DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubDataARB(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences)
-+KEYWORD1 void KEYWORD2 NAME(DeleteBuffersARB)(GLsizei n, const GLuint * buffer)
- {
--   RETURN_DISPATCH(AreProgramsResidentNV, (n, ids, residences), (F, "glAreProgramsResidentNV(%d, %p, %p);\n", n, (const void *) ids, (const void *) residences));
-+   DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffersARB(%d, %p);\n", n, (const void *) buffer));
- }
--KEYWORD1 void KEYWORD2 NAME(BindProgramNV)(GLenum target, GLuint id)
-+KEYWORD1 void KEYWORD2 NAME(GenBuffersARB)(GLsizei n, GLuint * buffer)
- {
--   DISPATCH(BindProgramNV, (target, id), (F, "glBindProgramNV(0x%x, %d);\n", target, id));
-+   DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffersARB(%d, %p);\n", n, (const void *) buffer));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteProgramsNV)(GLsizei n, const GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params)
- {
--   DISPATCH(DeleteProgramsNV, (n, ids), (F, "glDeleteProgramsNV(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameterivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params)
- {
--   DISPATCH(ExecuteProgramNV, (target, id, params), (F, "glExecuteProgramNV(0x%x, %d, %p);\n", target, id, (const void *) params));
-+   DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointervARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GenProgramsNV)(GLsizei n, GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data)
- {
--   DISPATCH(GenProgramsNV, (n, ids), (F, "glGenProgramsNV(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubDataARB(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params)
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsBufferARB)(GLuint buffer)
- {
--   DISPATCH(GetProgramParameterdvNV, (target, index, pname, params), (F, "glGetProgramParameterdvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params));
-+   RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBufferARB(%d);\n", buffer));
- }
--KEYWORD1 void KEYWORD2 NAME(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params)
-+KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferARB)(GLenum target, GLenum access)
- {
--   DISPATCH(GetProgramParameterfvNV, (target, index, pname, params), (F, "glGetProgramParameterfvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params));
-+   RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBufferARB(0x%x, 0x%x);\n", target, access));
- }
--KEYWORD1 void KEYWORD2 NAME(GetProgramivNV)(GLuint id, GLenum pname, GLint * params)
-+KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferARB)(GLenum target)
- {
--   DISPATCH(GetProgramivNV, (id, pname, params), (F, "glGetProgramivNV(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+   RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBufferARB(0x%x);\n", target));
- }
--KEYWORD1 void KEYWORD2 NAME(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program)
-+KEYWORD1 void KEYWORD2 NAME(DepthBoundsEXT)(GLclampd zmin, GLclampd zmax)
- {
--   DISPATCH(GetProgramStringNV, (id, pname, program), (F, "glGetProgramStringNV(%d, 0x%x, %p);\n", id, pname, (const void *) program));
-+   DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax));
- }
--KEYWORD1 void KEYWORD2 NAME(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(GenQueriesARB)(GLsizei n, GLuint * ids)
- {
--   DISPATCH(GetTrackMatrixivNV, (target, address, pname, params), (F, "glGetTrackMatrixivNV(0x%x, %d, 0x%x, %p);\n", target, address, pname, (const void *) params));
-+   DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueriesARB(%d, %p);\n", n, (const void *) ids));
- }
--KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params)
-+KEYWORD1 void KEYWORD2 NAME(DeleteQueriesARB)(GLsizei n, const GLuint * ids)
- {
--   DISPATCH(GetVertexAttribdvNV, (index, pname, params), (F, "glGetVertexAttribdvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params));
-+   DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueriesARB(%d, %p);\n", n, (const void *) ids));
- }
--KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params)
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsQueryARB)(GLuint id)
- {
--   DISPATCH(GetVertexAttribfvNV, (index, pname, params), (F, "glGetVertexAttribfvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params));
-+   RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQueryARB(%d);\n", id));
- }
--KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(BeginQueryARB)(GLenum target, GLuint id)
- {
--   DISPATCH(GetVertexAttribivNV, (index, pname, params), (F, "glGetVertexAttribivNV(%d, 0x%x, %p);\n", index, pname, (const void *) params));
-+   DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQueryARB(0x%x, %d);\n", target, id));
- }
--KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer)
-+KEYWORD1 void KEYWORD2 NAME(EndQueryARB)(GLenum target)
- {
--   DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) pointer));
-+   DISPATCH(EndQueryARB, (target), (F, "glEndQueryARB(0x%x);\n", target));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramNV)(GLuint id)
-+KEYWORD1 void KEYWORD2 NAME(GetQueryivARB)(GLenum target, GLenum pname, GLint * params)
- {
--   RETURN_DISPATCH(IsProgramNV, (id), (F, "glIsProgramNV(%d);\n", id));
-+   DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program)
-+KEYWORD1 void KEYWORD2 NAME(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params)
- {
--   DISPATCH(LoadProgramNV, (target, id, len, program), (F, "glLoadProgramNV(0x%x, %d, %d, %p);\n", target, id, len, (const void *) program));
-+   DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-+KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params)
- {
--   DISPATCH(ProgramParameter4dNV, (target, index, x, y, z, w), (F, "glProgramParameter4dNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
-+   DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params)
-+KEYWORD1 void KEYWORD2 NAME(MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
- {
--   DISPATCH(ProgramParameter4dvNV, (target, index, params), (F, "glProgramParameter4dvNV(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3]));
-+   DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-+KEYWORD1 void KEYWORD2 NAME(MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
- {
--   DISPATCH(ProgramParameter4fNV, (target, index, x, y, z, w), (F, "glProgramParameter4fNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
-+   DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA)
- {
--   DISPATCH(ProgramParameter4fvNV, (target, index, params), (F, "glProgramParameter4fvNV(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3]));
-+   DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params)
-+KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture)
- {
--   DISPATCH(ProgramParameters4dvNV, (target, index, num, params), (F, "glProgramParameters4dvNV(0x%x, %d, %d, %p /* %g, %g, %g, %g */);\n", target, index, num, (const void *) params, params[0], params[1], params[2], params[3]));
-+   DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTexture(0x%x);\n", texture));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(ClientActiveTexture)(GLenum texture)
- {
--   DISPATCH(ProgramParameters4fvNV, (target, index, num, params), (F, "glProgramParameters4fvNV(0x%x, %d, %d, %p /* %g, %g, %g, %g */);\n", target, index, num, (const void *) params, params[0], params[1], params[2], params[3]));
-+   DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTexture(0x%x);\n", texture));
- }
--KEYWORD1 void KEYWORD2 NAME(RequestResidentProgramsNV)(GLsizei n, const GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1d)(GLenum target, GLdouble s)
- {
--   DISPATCH(RequestResidentProgramsNV, (n, ids), (F, "glRequestResidentProgramsNV(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1d(0x%x, %f);\n", target, s));
- }
--KEYWORD1 void KEYWORD2 NAME(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dv)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(TrackMatrixNV, (target, address, matrix, transform), (F, "glTrackMatrixNV(0x%x, %d, 0x%x, 0x%x);\n", target, address, matrix, transform));
-+   DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1f)(GLenum target, GLfloat s)
- {
--   DISPATCH(VertexAttribPointerNV, (index, size, type, stride, pointer), (F, "glVertexAttribPointerNV(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer));
-+   DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1f(0x%x, %f);\n", target, s));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dNV)(GLuint index, GLdouble x)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fv)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib1dNV, (index, x), (F, "glVertexAttrib1dNV(%d, %f);\n", index, x));
-+   DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvNV)(GLuint index, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1i)(GLenum target, GLint s)
- {
--   DISPATCH(VertexAttrib1dvNV, (index, v), (F, "glVertexAttrib1dvNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1i(0x%x, %d);\n", target, s));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fNV)(GLuint index, GLfloat x)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iv)(GLenum target, const GLint * v)
- {
--   DISPATCH(VertexAttrib1fNV, (index, x), (F, "glVertexAttrib1fNV(%d, %f);\n", index, x));
-+   DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1iv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvNV)(GLuint index, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1s)(GLenum target, GLshort s)
- {
--   DISPATCH(VertexAttrib1fvNV, (index, v), (F, "glVertexAttrib1fvNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1s(0x%x, %d);\n", target, s));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sNV)(GLuint index, GLshort x)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sv)(GLenum target, const GLshort * v)
- {
--   DISPATCH(VertexAttrib1sNV, (index, x), (F, "glVertexAttrib1sNV(%d, %d);\n", index, x));
-+   DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1sv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svNV)(GLuint index, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t)
- {
--   DISPATCH(VertexAttrib1svNV, (index, v), (F, "glVertexAttrib1svNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2d(0x%x, %f, %f);\n", target, s, t));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dv)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(VertexAttrib2dNV, (index, x, y), (F, "glVertexAttrib2dNV(%d, %f, %f);\n", index, x, y));
-+   DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvNV)(GLuint index, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t)
- {
--   DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvNV(%d, %p /* %g, %g */);\n", index, (const void *) v, v[0], v[1]));
-+   DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2f(0x%x, %f, %f);\n", target, s, t));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fv)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib2fNV, (index, x, y), (F, "glVertexAttrib2fNV(%d, %f, %f);\n", index, x, y));
-+   DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvNV)(GLuint index, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2i)(GLenum target, GLint s, GLint t)
- {
--   DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvNV(%d, %p /* %g, %g */);\n", index, (const void *) v, v[0], v[1]));
-+   DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2i(0x%x, %d, %d);\n", target, s, t));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iv)(GLenum target, const GLint * v)
- {
--   DISPATCH(VertexAttrib2sNV, (index, x, y), (F, "glVertexAttrib2sNV(%d, %d, %d);\n", index, x, y));
-+   DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2iv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svNV)(GLuint index, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t)
- {
--   DISPATCH(VertexAttrib2svNV, (index, v), (F, "glVertexAttrib2svNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2s(0x%x, %d, %d);\n", target, s, t));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sv)(GLenum target, const GLshort * v)
- {
--   DISPATCH(VertexAttrib3dNV, (index, x, y, z), (F, "glVertexAttrib3dNV(%d, %f, %f, %f);\n", index, x, y, z));
-+   DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2sv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvNV)(GLuint index, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
- {
--   DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvNV(%d, %p /* %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3d(0x%x, %f, %f, %f);\n", target, s, t, r));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dv)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(VertexAttrib3fNV, (index, x, y, z), (F, "glVertexAttrib3fNV(%d, %f, %f, %f);\n", index, x, y, z));
-+   DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvNV)(GLuint index, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
- {
--   DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvNV(%d, %p /* %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3f(0x%x, %f, %f, %f);\n", target, s, t, r));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fv)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib3sNV, (index, x, y, z), (F, "glVertexAttrib3sNV(%d, %d, %d, %d);\n", index, x, y, z));
-+   DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svNV)(GLuint index, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r)
- {
--   DISPATCH(VertexAttrib3svNV, (index, v), (F, "glVertexAttrib3svNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3i(0x%x, %d, %d, %d);\n", target, s, t, r));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iv)(GLenum target, const GLint * v)
- {
--   DISPATCH(VertexAttrib4dNV, (index, x, y, z, w), (F, "glVertexAttrib4dNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w));
-+   DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3iv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvNV)(GLuint index, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r)
- {
--   DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvNV(%d, %p /* %g, %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3s(0x%x, %d, %d, %d);\n", target, s, t, r));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sv)(GLenum target, const GLshort * v)
- {
--   DISPATCH(VertexAttrib4fNV, (index, x, y, z, w), (F, "glVertexAttrib4fNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w));
-+   DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3sv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvNV)(GLuint index, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
- {
--   DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvNV(%d, %p /* %g, %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4d(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dv)(GLenum target, const GLdouble * v)
- {
--   DISPATCH(VertexAttrib4sNV, (index, x, y, z, w), (F, "glVertexAttrib4sNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
-+   DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svNV)(GLuint index, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
- {
--   DISPATCH(VertexAttrib4svNV, (index, v), (F, "glVertexAttrib4svNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4f(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fv)(GLenum target, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib4ubNV, (index, x, y, z, w), (F, "glVertexAttrib4ubNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w));
-+   DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvNV)(GLuint index, const GLubyte * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q)
- {
--   DISPATCH(VertexAttrib4ubvNV, (index, v), (F, "glVertexAttrib4ubvNV(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4i(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iv)(GLenum target, const GLint * v)
- {
--   DISPATCH(VertexAttribs1dvNV, (index, n, v), (F, "glVertexAttribs1dvNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4iv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
- {
--   DISPATCH(VertexAttribs1fvNV, (index, n, v), (F, "glVertexAttribs1fvNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4s(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sv)(GLenum target, const GLshort * v)
- {
--   DISPATCH(VertexAttribs1svNV, (index, n, v), (F, "glVertexAttribs1svNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4sv(0x%x, %p);\n", target, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixf)(const GLfloat * m)
- {
--   DISPATCH(VertexAttribs2dvNV, (index, n, v), (F, "glVertexAttribs2dvNV(%d, %d, %p /* %g, %g */);\n", index, n, (const void *) v, v[0], v[1]));
-+   DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixf(%p);\n", (const void *) m));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m)
- {
--   DISPATCH(VertexAttribs2fvNV, (index, n, v), (F, "glVertexAttribs2fvNV(%d, %d, %p /* %g, %g */);\n", index, n, (const void *) v, v[0], v[1]));
-+   DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixf)(const GLfloat * m)
- {
--   DISPATCH(VertexAttribs2svNV, (index, n, v), (F, "glVertexAttribs2svNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixf(%p);\n", (const void *) m));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixd)(const GLdouble * m)
- {
--   DISPATCH(VertexAttribs3dvNV, (index, n, v), (F, "glVertexAttribs3dvNV(%d, %d, %p /* %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixd(%p);\n", (const void *) m));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert)
- {
--   DISPATCH(VertexAttribs3fvNV, (index, n, v), (F, "glVertexAttribs3fvNV(%d, %d, %p /* %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(VertexAttribs3svNV, (index, n, v), (F, "glVertexAttribs3svNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(VertexAttribs4dvNV, (index, n, v), (F, "glVertexAttribs4dvNV(%d, %d, %p /* %g, %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(VertexAttribs4fvNV, (index, n, v), (F, "glVertexAttribs4fvNV(%d, %d, %p /* %g, %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(VertexAttribs4svNV, (index, n, v), (F, "glVertexAttribs4svNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(VertexAttribs4ubvNV, (index, n, v), (F, "glVertexAttribs4ubvNV(%d, %d, %p);\n", index, n, (const void *) v));
-+   DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameteriNV)(GLenum pname, GLint params)
-+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data)
- {
--   DISPATCH(PointParameteriNV, (pname, params), (F, "glPointParameteriNV(0x%x, %d);\n", pname, params));
-+   DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1D(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImage)(GLenum target, GLint level, GLvoid * img)
- {
--   DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params));
-+   DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImage(0x%x, %d, %p);\n", target, level, (const void *) img));
- }
- KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
-@@ -4041,7 +3933,7 @@
- KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dv)(const GLdouble * v)
- {
--   DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue)
-@@ -4051,7 +3943,7 @@
- KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fv)(const GLfloat * v)
- {
--   DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(SecondaryColor3i)(GLint red, GLint green, GLint blue)
-@@ -4104,7 +3996,7 @@
-    DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usv(%p);\n", (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const void * pointer)
-+KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
- {
-    DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
- }
-@@ -4116,7 +4008,7 @@
- KEYWORD1 void KEYWORD2 NAME(WindowPos2dv)(const GLdouble * v)
- {
--   DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(WindowPos2f)(GLfloat x, GLfloat y)
-@@ -4126,7 +4018,7 @@
- KEYWORD1 void KEYWORD2 NAME(WindowPos2fv)(const GLfloat * v)
- {
--   DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1]));
-+   DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(WindowPos2i)(GLint x, GLint y)
-@@ -4156,7 +4048,7 @@
- KEYWORD1 void KEYWORD2 NAME(WindowPos3dv)(const GLdouble * v)
- {
--   DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z)
-@@ -4166,7 +4058,7 @@
- KEYWORD1 void KEYWORD2 NAME(WindowPos3fv)(const GLfloat * v)
- {
--   DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fv(%p);\n", (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(WindowPos3i)(GLint x, GLint y, GLint z)
-@@ -4181,52 +4073,197 @@
- KEYWORD1 void KEYWORD2 NAME(WindowPos3s)(GLshort x, GLshort y, GLshort z)
- {
--   DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3s(%d, %d, %d);\n", x, y, z));
-+   DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3s(%d, %d, %d);\n", x, y, z));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3sv)(const GLshort * v)
-+{
-+   DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3sv(%p);\n", (const void *) v));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(BindBuffer)(GLenum target, GLuint buffer)
-+{
-+   DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBuffer(0x%x, %d);\n", target, buffer));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(BufferData)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage)
-+{
-+   DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferData(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(BufferSubData)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data)
-+{
-+   DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(DeleteBuffers)(GLsizei n, const GLuint * buffer)
-+{
-+   DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffers(%d, %p);\n", n, (const void *) buffer));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GenBuffers)(GLsizei n, GLuint * buffer)
-+{
-+   DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffers(%d, %p);\n", n, (const void *) buffer));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params)
-+{
-+   DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid ** params)
-+{
-+   DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointerv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetBufferSubData)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data)
-+{
-+   DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data));
-+}
-+
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsBuffer)(GLuint buffer)
-+{
-+   RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBuffer(%d);\n", buffer));
-+}
-+
-+KEYWORD1 GLvoid * KEYWORD2 NAME(MapBuffer)(GLenum target, GLenum access)
-+{
-+   RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBuffer(0x%x, 0x%x);\n", target, access));
-+}
-+
-+KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBuffer)(GLenum target)
-+{
-+   RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBuffer(0x%x);\n", target));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GenQueries)(GLsizei n, GLuint * ids)
-+{
-+   DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueries(%d, %p);\n", n, (const void *) ids));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(DeleteQueries)(GLsizei n, const GLuint * ids)
-+{
-+   DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueries(%d, %p);\n", n, (const void *) ids));
-+}
-+
-+KEYWORD1 GLboolean KEYWORD2 NAME(IsQuery)(GLuint id)
-+{
-+   RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQuery(%d);\n", id));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(BeginQuery)(GLenum target, GLuint id)
-+{
-+   DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQuery(0x%x, %d);\n", target, id));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(EndQuery)(GLenum target)
-+{
-+   DISPATCH(EndQueryARB, (target), (F, "glEndQuery(0x%x);\n", target));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetQueryiv)(GLenum target, GLenum pname, GLint * params)
-+{
-+   DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetQueryObjectiv)(GLuint id, GLenum pname, GLint * params)
-+{
-+   DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectiv(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint * params)
-+{
-+   DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuiv(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(PointParameterfARB)(GLenum pname, GLfloat param)
-+{
-+   DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfARB(0x%x, %f);\n", pname, param));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(PointParameterfvARB)(GLenum pname, const GLfloat * params)
-+{
-+   DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvARB(0x%x, %p);\n", pname, (const void *) params));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2dARB)(GLdouble x, GLdouble y)
-+{
-+   DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dARB(%f, %f);\n", x, y));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2fARB)(GLfloat x, GLfloat y)
-+{
-+   DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fARB(%f, %f);\n", x, y));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2iARB)(GLint x, GLint y)
-+{
-+   DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iARB(%d, %d);\n", x, y));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2sARB)(GLshort x, GLshort y)
-+{
-+   DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sARB(%d, %d);\n", x, y));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2dvARB)(const GLdouble * p)
-+{
-+   DISPATCH(WindowPos2dvMESA, (p), (F, "glWindowPos2dvARB(%p);\n", (const void *) p));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2fvARB)(const GLfloat * p)
-+{
-+   DISPATCH(WindowPos2fvMESA, (p), (F, "glWindowPos2fvARB(%p);\n", (const void *) p));
-+}
-+
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2ivARB)(const GLint * p)
-+{
-+   DISPATCH(WindowPos2ivMESA, (p), (F, "glWindowPos2ivARB(%p);\n", (const void *) p));
- }
--KEYWORD1 void KEYWORD2 NAME(WindowPos3sv)(const GLshort * v)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos2svARB)(const GLshort * p)
- {
--   DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3sv(%p);\n", (const void *) v));
-+   DISPATCH(WindowPos2svMESA, (p), (F, "glWindowPos2svARB(%p);\n", (const void *) p));
- }
--KEYWORD1 void KEYWORD2 NAME(ActiveStencilFaceEXT)(GLenum face)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z)
- {
--   DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face));
-+   DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dARB(%f, %f, %f);\n", x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteFencesNV)(GLsizei n, const GLuint * fences)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z)
- {
--   DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences));
-+   DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fARB(%f, %f, %f);\n", x, y, z));
- }
--KEYWORD1 void KEYWORD2 NAME(GenFencesNV)(GLsizei n, GLuint * fences)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3iARB)(GLint x, GLint y, GLint z)
- {
--   DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences));
-+   DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iARB(%d, %d, %d);\n", x, y, z));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsFenceNV)(GLuint fence)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3sARB)(GLshort x, GLshort y, GLshort z)
- {
--   RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence));
-+   DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sARB(%d, %d, %d);\n", x, y, z));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(TestFenceNV)(GLuint fence)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3dvARB)(const GLdouble * p)
- {
--   RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence));
-+   DISPATCH(WindowPos3dvMESA, (p), (F, "glWindowPos3dvARB(%p);\n", (const void *) p));
- }
--KEYWORD1 void KEYWORD2 NAME(GetFenceivNV)(GLuint fence, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3fvARB)(const GLfloat * p)
- {
--   DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params));
-+   DISPATCH(WindowPos3fvMESA, (p), (F, "glWindowPos3fvARB(%p);\n", (const void *) p));
- }
--KEYWORD1 void KEYWORD2 NAME(FinishFenceNV)(GLuint fence)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3ivARB)(const GLint * p)
- {
--   DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence));
-+   DISPATCH(WindowPos3ivMESA, (p), (F, "glWindowPos3ivARB(%p);\n", (const void *) p));
- }
--KEYWORD1 void KEYWORD2 NAME(SetFenceNV)(GLuint fence, GLenum condition)
-+KEYWORD1 void KEYWORD2 NAME(WindowPos3svARB)(const GLshort * p)
- {
--   DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition));
-+   DISPATCH(WindowPos3svMESA, (p), (F, "glWindowPos3svARB(%p);\n", (const void *) p));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sARB)(GLuint index, GLshort x)
-@@ -4316,12 +4353,12 @@
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvARB)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvARB(%d, %p /* %g, %g */);\n", index, (const void *) v, v[0], v[1]));
-+   DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvARB(%d, %p);\n", index, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvARB)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvARB(%d, %p /* %g, %g */);\n", index, (const void *) v, v[0], v[1]));
-+   DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvARB(%d, %p);\n", index, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svARB)(GLuint index, const GLshort * v)
-@@ -4331,17 +4368,12 @@
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvARB)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvARB(%d, %p /* %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2]));
-+   DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvARB(%d, %p);\n", index, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvARB)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvARB(%d, %p /* %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bvARB)(GLuint index, const GLbyte * v)
--{
--   DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bvARB(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvARB(%d, %p);\n", index, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svARB)(GLuint index, const GLshort * v)
-@@ -4349,49 +4381,14 @@
-    DISPATCH(VertexAttrib4svNV, (index, v), (F, "glVertexAttrib4svARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ivARB)(GLuint index, const GLint * v)
--{
--   DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4ivARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvARB)(GLuint index, const GLubyte * v)
--{
--   DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubvARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usvARB)(GLuint index, const GLushort * v)
--{
--   DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usvARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uivARB)(GLuint index, const GLuint * v)
--{
--   DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uivARB(%d, %p);\n", index, (const void *) v));
--}
--
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvARB)(GLuint index, const GLfloat * v)
- {
--   DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvARB(%d, %p /* %g, %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvARB(%d, %p);\n", index, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvARB)(GLuint index, const GLdouble * v)
- {
--   DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvARB(%d, %p /* %g, %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2], v[3]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NbvARB)(GLuint index, const GLbyte * v)
--{
--   DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4NbvARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NsvARB)(GLuint index, const GLshort * v)
--{
--   DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4NsvARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NivARB)(GLuint index, const GLint * v)
--{
--   DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4NivARB(%d, %p);\n", index, (const void *) v));
-+   DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvARB(%d, %p);\n", index, (const void *) v));
- }
- KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubvARB)(GLuint index, const GLubyte * v)
-@@ -4399,36 +4396,6 @@
-    DISPATCH(VertexAttrib4ubvNV, (index, v), (F, "glVertexAttrib4NubvARB(%d, %p);\n", index, (const void *) v));
- }
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NusvARB)(GLuint index, const GLushort * v)
--{
--   DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4NusvARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NuivARB)(GLuint index, const GLuint * v)
--{
--   DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4NuivARB(%d, %p);\n", index, (const void *) v));
--}
--
--KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer)
--{
--   DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointerARB(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer));
--}
--
--KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArrayARB)(GLuint index)
--{
--   DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArrayARB(%d);\n", index));
--}
--
--KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArrayARB)(GLuint index)
--{
--   DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArrayARB(%d);\n", index));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string)
--{
--   DISPATCH(ProgramStringARB, (target, format, len, string), (F, "glProgramStringARB(0x%x, 0x%x, %d, %p);\n", target, format, len, (const void *) string));
--}
--
- KEYWORD1 void KEYWORD2 NAME(BindProgramARB)(GLenum target, GLuint program)
- {
-    DISPATCH(BindProgramNV, (target, program), (F, "glBindProgramARB(0x%x, %d);\n", target, program));
-@@ -4449,76 +4416,6 @@
-    RETURN_DISPATCH(IsProgramNV, (program), (F, "glIsProgramARB(%d);\n", program));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
--{
--   DISPATCH(ProgramEnvParameter4dARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params)
--{
--   DISPATCH(ProgramEnvParameter4dvARB, (target, index, params), (F, "glProgramEnvParameter4dvARB(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
--{
--   DISPATCH(ProgramEnvParameter4fARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params)
--{
--   DISPATCH(ProgramEnvParameter4fvARB, (target, index, params), (F, "glProgramEnvParameter4fvARB(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
--{
--   DISPATCH(ProgramLocalParameter4dARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params)
--{
--   DISPATCH(ProgramLocalParameter4dvARB, (target, index, params), (F, "glProgramLocalParameter4dvARB(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
--{
--   DISPATCH(ProgramLocalParameter4fARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params)
--{
--   DISPATCH(ProgramLocalParameter4fvARB, (target, index, params), (F, "glProgramLocalParameter4fvARB(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params)
--{
--   DISPATCH(GetProgramEnvParameterdvARB, (target, index, params), (F, "glGetProgramEnvParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
--}
--
--KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params)
--{
--   DISPATCH(GetProgramEnvParameterfvARB, (target, index, params), (F, "glGetProgramEnvParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
--}
--
--KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params)
--{
--   DISPATCH(GetProgramLocalParameterdvARB, (target, index, params), (F, "glGetProgramLocalParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
--}
--
--KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params)
--{
--   DISPATCH(GetProgramLocalParameterfvARB, (target, index, params), (F, "glGetProgramLocalParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params));
--}
--
--KEYWORD1 void KEYWORD2 NAME(GetProgramivARB)(GLenum target, GLenum pname, GLint * params)
--{
--   DISPATCH(GetProgramivARB, (target, pname, params), (F, "glGetProgramivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
--}
--
--KEYWORD1 void KEYWORD2 NAME(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string)
--{
--   DISPATCH(GetProgramStringARB, (target, pname, string), (F, "glGetProgramStringARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) string));
--}
--
- KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params)
- {
-    DISPATCH(GetVertexAttribdvNV, (index, pname, params), (F, "glGetVertexAttribdvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params));
-@@ -4539,239 +4436,224 @@
-    DISPATCH(GetVertexAttribPointervNV, (index, pname, params), (F, "glGetVertexAttribPointervARB(%d, 0x%x, %p);\n", index, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
--{
--   DISPATCH(ProgramNamedParameter4fNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4fNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
--{
--   DISPATCH(ProgramNamedParameter4dNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4dNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v)
--{
--   DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p /* %g, %g, %g, %g */);\n", id, len, (const void *) name, (const void *) v, v[0], v[1], v[2], v[3]));
--}
--
--KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v)
-+KEYWORD1 void KEYWORD2 NAME(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
- {
--   DISPATCH(ProgramNamedParameter4dvNV, (id, len, name, v), (F, "glProgramNamedParameter4dvNV(%d, %d, %p, %p /* %g, %g, %g, %g */);\n", id, len, (const void *) name, (const void *) v, v[0], v[1], v[2], v[3]));
-+   DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColorEXT(%f, %f, %f, %f);\n", red, green, blue, alpha));
- }
--KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params)
-+KEYWORD1 void KEYWORD2 NAME(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(GetProgramNamedParameterfvNV, (id, len, name, params), (F, "glGetProgramNamedParameterfvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params));
-+   DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params)
-+KEYWORD1 void KEYWORD2 NAME(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(GetProgramNamedParameterdvNV, (id, len, name, params), (F, "glGetProgramNamedParameterdvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params));
-+   DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(BindBufferARB)(GLenum target, GLuint buffer)
-+KEYWORD1 void KEYWORD2 NAME(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBufferARB(0x%x, %d);\n", target, buffer));
-+   DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1DEXT(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage)
-+KEYWORD1 void KEYWORD2 NAME(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
- {
--   DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferDataARB(0x%x, %p, %p, 0x%x);\n", target, (const void *) size, (const void *) data, usage));
-+   DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels));
- }
--KEYWORD1 void KEYWORD2 NAME(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
- {
--   DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubDataARB(0x%x, %p, %p, %p);\n", target, (const void *) offset, (const void *) size, (const void *) data));
-+   DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteBuffersARB)(GLsizei n, const GLuint * buffer)
-+KEYWORD1 void KEYWORD2 NAME(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
- {
--   DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffersARB(%d, %p);\n", n, (const void *) buffer));
-+   DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border));
- }
--KEYWORD1 void KEYWORD2 NAME(GenBuffersARB)(GLsizei n, GLuint * buffer)
-+KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
- {
--   DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffersARB(%d, %p);\n", n, (const void *) buffer));
-+   DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1DEXT(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width));
- }
--KEYWORD1 void KEYWORD2 NAME(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
- {
--   DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameterivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height));
- }
--KEYWORD1 void KEYWORD2 NAME(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params)
-+KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
- {
--   DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointervARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height));
- }
--KEYWORD1 void KEYWORD2 NAME(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data)
-+KEYWORD1 void KEYWORD2 NAME(HistogramEXT)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
- {
--   DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubDataARB(0x%x, %p, %p, %p);\n", target, (const void *) offset, (const void *) size, (const void *) data));
-+   DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogramEXT(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsBufferARB)(GLuint buffer)
-+KEYWORD1 void KEYWORD2 NAME(MinmaxEXT)(GLenum target, GLenum internalformat, GLboolean sink)
- {
--   RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBufferARB(%d);\n", buffer));
-+   DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmaxEXT(0x%x, 0x%x, %d);\n", target, internalformat, sink));
- }
--KEYWORD1 void * KEYWORD2 NAME(MapBufferARB)(GLenum target, GLenum access)
-+KEYWORD1 void KEYWORD2 NAME(ResetHistogramEXT)(GLenum target)
- {
--   RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBufferARB(0x%x, 0x%x);\n", target, access));
-+   DISPATCH(ResetHistogram, (target), (F, "glResetHistogramEXT(0x%x);\n", target));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferARB)(GLenum target)
-+KEYWORD1 void KEYWORD2 NAME(ResetMinmaxEXT)(GLenum target)
- {
--   RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBufferARB(0x%x);\n", target));
-+   DISPATCH(ResetMinmax, (target), (F, "glResetMinmaxEXT(0x%x);\n", target));
- }
--KEYWORD1 void KEYWORD2 NAME(DepthBoundsEXT)(GLclampd zmin, GLclampd zmax)
-+KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter1DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
- {
--   DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax));
-+   DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1DEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image));
- }
--KEYWORD1 void KEYWORD2 NAME(GenQueriesARB)(GLsizei n, GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter2DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
- {
--   DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueriesARB(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteQueriesARB)(GLsizei n, const GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfEXT)(GLenum target, GLenum pname, GLfloat params)
- {
--   DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueriesARB(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterfEXT(0x%x, 0x%x, %f);\n", target, pname, params));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsQueryARB)(GLuint id)
-+KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfvEXT)(GLenum target, GLenum pname, const GLfloat * params)
- {
--   RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQueryARB(%d);\n", id));
-+   DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(BeginQueryARB)(GLenum target, GLuint id)
-+KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteriEXT)(GLenum target, GLenum pname, GLint params)
- {
--   DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQueryARB(0x%x, %d);\n", target, id));
-+   DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteriEXT(0x%x, 0x%x, %d);\n", target, pname, params));
- }
--KEYWORD1 void KEYWORD2 NAME(EndQueryARB)(GLenum target)
-+KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterivEXT)(GLenum target, GLenum pname, const GLint * params)
- {
--   DISPATCH(EndQueryARB, (target), (F, "glEndQueryARB(0x%x);\n", target));
-+   DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(GetQueryivARB)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter1DEXT)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
- {
--   DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1DEXT(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
- }
--KEYWORD1 void KEYWORD2 NAME(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter2DEXT)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
- {
--   DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+   DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height));
- }
--KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params)
-+KEYWORD1 void KEYWORD2 NAME(SeparableFilter2DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column)
- {
--   DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+   DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column));
- }
--KEYWORD1 void KEYWORD2 NAME(BindBuffer)(GLenum target, GLuint buffer)
-+KEYWORD1 void KEYWORD2 NAME(ColorTableSGI)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
- {
--   DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBuffer(0x%x, %d);\n", target, buffer));
-+   DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
- }
--KEYWORD1 void KEYWORD2 NAME(BufferData)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage)
-+KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfvSGI)(GLenum target, GLenum pname, const GLfloat * params)
- {
--   DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferData(0x%x, %p, %p, 0x%x);\n", target, (const void *) size, (const void *) data, usage));
-+   DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(BufferSubData)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data)
-+KEYWORD1 void KEYWORD2 NAME(ColorTableParameterivSGI)(GLenum target, GLenum pname, const GLint * params)
- {
--   DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubData(0x%x, %p, %p, %p);\n", target, (const void *) offset, (const void *) size, (const void *) data));
-+   DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteBuffers)(GLsizei n, const GLuint * buffer)
-+KEYWORD1 void KEYWORD2 NAME(CopyColorTableSGI)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
- {
--   DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffers(%d, %p);\n", n, (const void *) buffer));
-+   DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTableSGI(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
- }
--KEYWORD1 void KEYWORD2 NAME(GenBuffers)(GLsizei n, GLuint * buffer)
-+KEYWORD1 void KEYWORD2 NAME(BindTextureEXT)(GLenum target, GLuint texture)
- {
--   DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffers(%d, %p);\n", n, (const void *) buffer));
-+   DISPATCH(BindTexture, (target, texture), (F, "glBindTextureEXT(0x%x, %d);\n", target, texture));
- }
--KEYWORD1 void KEYWORD2 NAME(GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures)
- {
--   DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures));
- }
--KEYWORD1 void KEYWORD2 NAME(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid ** params)
-+KEYWORD1 void KEYWORD2 NAME(PrioritizeTexturesEXT)(GLsizei n, const GLuint * textures, const GLclampf * priorities)
- {
--   DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointerv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTexturesEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities));
- }
--KEYWORD1 void KEYWORD2 NAME(GetBufferSubData)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data)
-+KEYWORD1 void KEYWORD2 NAME(ArrayElementEXT)(GLint i)
- {
--   DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubData(0x%x, %p, %p, %p);\n", target, (const void *) offset, (const void *) size, (const void *) data));
-+   DISPATCH(ArrayElement, (i), (F, "glArrayElementEXT(%d);\n", i));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsBuffer)(GLuint buffer)
-+KEYWORD1 void KEYWORD2 NAME(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count)
- {
--   RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBuffer(%d);\n", buffer));
-+   DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArraysEXT(0x%x, %d, %d);\n", mode, first, count));
- }
--KEYWORD1 void * KEYWORD2 NAME(MapBuffer)(GLenum target, GLenum access)
-+KEYWORD1 void KEYWORD2 NAME(GetPointervEXT)(GLenum pname, GLvoid ** params)
- {
--   RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBuffer(0x%x, 0x%x);\n", target, access));
-+   DISPATCH(GetPointerv, (pname, params), (F, "glGetPointervEXT(0x%x, %p);\n", pname, (const void *) params));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBuffer)(GLenum target)
-+KEYWORD1 void KEYWORD2 NAME(BlendEquationEXT)(GLenum mode)
- {
--   RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBuffer(0x%x);\n", target));
-+   DISPATCH(BlendEquation, (mode), (F, "glBlendEquationEXT(0x%x);\n", mode));
- }
--KEYWORD1 void KEYWORD2 NAME(GenQueries)(GLsizei n, GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(ColorSubTableEXT)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
- {
--   DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueries(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTableEXT(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data));
- }
--KEYWORD1 void KEYWORD2 NAME(DeleteQueries)(GLsizei n, const GLuint * ids)
-+KEYWORD1 void KEYWORD2 NAME(CopyColorSubTableEXT)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
- {
--   DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueries(%d, %p);\n", n, (const void *) ids));
-+   DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTableEXT(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width));
- }
--KEYWORD1 GLboolean KEYWORD2 NAME(IsQuery)(GLuint id)
-+KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
- {
--   RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQuery(%d);\n", id));
-+   DISPATCH(ColorTable, (target, internalFormat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalFormat, width, format, type, (const void *) table));
- }
--KEYWORD1 void KEYWORD2 NAME(BeginQuery)(GLenum target, GLuint id)
-+KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices)
- {
--   DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQuery(0x%x, %d);\n", target, id));
-+   DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices));
- }
--KEYWORD1 void KEYWORD2 NAME(EndQuery)(GLenum target)
-+KEYWORD1 void KEYWORD2 NAME(SampleMaskEXT)(GLclampf value, GLboolean invert)
- {
--   DISPATCH(EndQueryARB, (target), (F, "glEndQuery(0x%x);\n", target));
-+   DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskEXT(%f, %d);\n", value, invert));
- }
--KEYWORD1 void KEYWORD2 NAME(GetQueryiv)(GLenum target, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(SamplePatternEXT)(GLenum pattern)
- {
--   DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-+   DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternEXT(0x%x);\n", pattern));
- }
--KEYWORD1 void KEYWORD2 NAME(GetQueryObjectiv)(GLuint id, GLenum pname, GLint * params)
-+KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateATI)(GLenum modeRGB, GLenum modeA)
- {
--   DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectiv(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+   DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateATI(0x%x, 0x%x);\n", modeRGB, modeA));
- }
--KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint * params)
-+KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateINGR)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
- {
--   DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuiv(%d, 0x%x, %p);\n", id, pname, (const void *) params));
-+   DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
- }
--KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA)
-+KEYWORD1 void KEYWORD2 NAME(PointParameterfSGIS)(GLenum pname, GLfloat param)
- {
--   DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA));
-+   DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param));
- }
--KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateATI)(GLenum modeRGB, GLenum modeA)
-+KEYWORD1 void KEYWORD2 NAME(PointParameterfvSGIS)(GLenum pname, const GLfloat * params)
- {
--   DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateATI(0x%x, 0x%x);\n", modeRGB, modeA));
-+   DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
- }
-@@ -4787,7 +4669,7 @@
- #error TABLE_ENTRY must be defined
- #endif
--void *DISPATCH_TABLE_NAME[] = {
-+static _glapi_proc DISPATCH_TABLE_NAME[] = {
-    TABLE_ENTRY(NewList),
-    TABLE_ENTRY(EndList),
-    TABLE_ENTRY(CallList),
-@@ -5608,10 +5490,10 @@
- /*
-  * This is just used to silence compiler warnings.
-- * We list the functions which aren't otherwise used.
-+ * We list the functions which are not otherwise used.
-  */
- #ifdef UNUSED_TABLE_NAME
--void *UNUSED_TABLE_NAME[] = {
-+static _glapi_proc UNUSED_TABLE_NAME[] = {
-    TABLE_ENTRY(ActiveTexture),
-    TABLE_ENTRY(ClientActiveTexture),
-    TABLE_ENTRY(MultiTexCoord1d),
-@@ -5658,67 +5540,6 @@
-    TABLE_ENTRY(CompressedTexSubImage2D),
-    TABLE_ENTRY(CompressedTexSubImage1D),
-    TABLE_ENTRY(GetCompressedTexImage),
--   TABLE_ENTRY(BlendColorEXT),
--   TABLE_ENTRY(TexImage3DEXT),
--   TABLE_ENTRY(TexSubImage3DEXT),
--   TABLE_ENTRY(TexSubImage1DEXT),
--   TABLE_ENTRY(TexSubImage2DEXT),
--   TABLE_ENTRY(CopyTexImage1DEXT),
--   TABLE_ENTRY(CopyTexImage2DEXT),
--   TABLE_ENTRY(CopyTexSubImage1DEXT),
--   TABLE_ENTRY(CopyTexSubImage2DEXT),
--   TABLE_ENTRY(CopyTexSubImage3DEXT),
--   TABLE_ENTRY(HistogramEXT),
--   TABLE_ENTRY(MinmaxEXT),
--   TABLE_ENTRY(ResetHistogramEXT),
--   TABLE_ENTRY(ResetMinmaxEXT),
--   TABLE_ENTRY(ConvolutionFilter1DEXT),
--   TABLE_ENTRY(ConvolutionFilter2DEXT),
--   TABLE_ENTRY(ConvolutionParameterfEXT),
--   TABLE_ENTRY(ConvolutionParameterfvEXT),
--   TABLE_ENTRY(ConvolutionParameteriEXT),
--   TABLE_ENTRY(ConvolutionParameterivEXT),
--   TABLE_ENTRY(CopyConvolutionFilter1DEXT),
--   TABLE_ENTRY(CopyConvolutionFilter2DEXT),
--   TABLE_ENTRY(SeparableFilter2DEXT),
--   TABLE_ENTRY(ColorTableSGI),
--   TABLE_ENTRY(ColorTableParameterfvSGI),
--   TABLE_ENTRY(ColorTableParameterivSGI),
--   TABLE_ENTRY(CopyColorTableSGI),
--   TABLE_ENTRY(BindTextureEXT),
--   TABLE_ENTRY(DeleteTexturesEXT),
--   TABLE_ENTRY(PrioritizeTexturesEXT),
--   TABLE_ENTRY(ArrayElementEXT),
--   TABLE_ENTRY(DrawArraysEXT),
--   TABLE_ENTRY(GetPointervEXT),
--   TABLE_ENTRY(BlendEquationEXT),
--   TABLE_ENTRY(PointParameterfARB),
--   TABLE_ENTRY(PointParameterfvARB),
--   TABLE_ENTRY(PointParameterfSGIS),
--   TABLE_ENTRY(PointParameterfvSGIS),
--   TABLE_ENTRY(ColorSubTableEXT),
--   TABLE_ENTRY(CopyColorSubTableEXT),
--   TABLE_ENTRY(ColorTableEXT),
--   TABLE_ENTRY(DrawRangeElementsEXT),
--   TABLE_ENTRY(BlendFuncSeparateINGR),
--   TABLE_ENTRY(SampleMaskEXT),
--   TABLE_ENTRY(SamplePatternEXT),
--   TABLE_ENTRY(WindowPos2dARB),
--   TABLE_ENTRY(WindowPos2fARB),
--   TABLE_ENTRY(WindowPos2iARB),
--   TABLE_ENTRY(WindowPos2sARB),
--   TABLE_ENTRY(WindowPos2dvARB),
--   TABLE_ENTRY(WindowPos2fvARB),
--   TABLE_ENTRY(WindowPos2ivARB),
--   TABLE_ENTRY(WindowPos2svARB),
--   TABLE_ENTRY(WindowPos3dARB),
--   TABLE_ENTRY(WindowPos3fARB),
--   TABLE_ENTRY(WindowPos3iARB),
--   TABLE_ENTRY(WindowPos3sARB),
--   TABLE_ENTRY(WindowPos3dvARB),
--   TABLE_ENTRY(WindowPos3fvARB),
--   TABLE_ENTRY(WindowPos3ivARB),
--   TABLE_ENTRY(WindowPos3svARB),
-    TABLE_ENTRY(BlendFuncSeparate),
-    TABLE_ENTRY(FogCoordf),
-    TABLE_ENTRY(FogCoordfv),
-@@ -5764,6 +5585,43 @@
-    TABLE_ENTRY(WindowPos3iv),
-    TABLE_ENTRY(WindowPos3s),
-    TABLE_ENTRY(WindowPos3sv),
-+   TABLE_ENTRY(BindBuffer),
-+   TABLE_ENTRY(BufferData),
-+   TABLE_ENTRY(BufferSubData),
-+   TABLE_ENTRY(DeleteBuffers),
-+   TABLE_ENTRY(GenBuffers),
-+   TABLE_ENTRY(GetBufferParameteriv),
-+   TABLE_ENTRY(GetBufferPointerv),
-+   TABLE_ENTRY(GetBufferSubData),
-+   TABLE_ENTRY(IsBuffer),
-+   TABLE_ENTRY(MapBuffer),
-+   TABLE_ENTRY(UnmapBuffer),
-+   TABLE_ENTRY(GenQueries),
-+   TABLE_ENTRY(DeleteQueries),
-+   TABLE_ENTRY(IsQuery),
-+   TABLE_ENTRY(BeginQuery),
-+   TABLE_ENTRY(EndQuery),
-+   TABLE_ENTRY(GetQueryiv),
-+   TABLE_ENTRY(GetQueryObjectiv),
-+   TABLE_ENTRY(GetQueryObjectuiv),
-+   TABLE_ENTRY(PointParameterfARB),
-+   TABLE_ENTRY(PointParameterfvARB),
-+   TABLE_ENTRY(WindowPos2dARB),
-+   TABLE_ENTRY(WindowPos2fARB),
-+   TABLE_ENTRY(WindowPos2iARB),
-+   TABLE_ENTRY(WindowPos2sARB),
-+   TABLE_ENTRY(WindowPos2dvARB),
-+   TABLE_ENTRY(WindowPos2fvARB),
-+   TABLE_ENTRY(WindowPos2ivARB),
-+   TABLE_ENTRY(WindowPos2svARB),
-+   TABLE_ENTRY(WindowPos3dARB),
-+   TABLE_ENTRY(WindowPos3fARB),
-+   TABLE_ENTRY(WindowPos3iARB),
-+   TABLE_ENTRY(WindowPos3sARB),
-+   TABLE_ENTRY(WindowPos3dvARB),
-+   TABLE_ENTRY(WindowPos3fvARB),
-+   TABLE_ENTRY(WindowPos3ivARB),
-+   TABLE_ENTRY(WindowPos3svARB),
-    TABLE_ENTRY(VertexAttrib1sARB),
-    TABLE_ENTRY(VertexAttrib1fARB),
-    TABLE_ENTRY(VertexAttrib1dARB),
-@@ -5798,26 +5656,50 @@
-    TABLE_ENTRY(GetVertexAttribfvARB),
-    TABLE_ENTRY(GetVertexAttribivARB),
-    TABLE_ENTRY(GetVertexAttribPointervARB),
--   TABLE_ENTRY(BindBuffer),
--   TABLE_ENTRY(BufferData),
--   TABLE_ENTRY(BufferSubData),
--   TABLE_ENTRY(DeleteBuffers),
--   TABLE_ENTRY(GenBuffers),
--   TABLE_ENTRY(GetBufferParameteriv),
--   TABLE_ENTRY(GetBufferPointerv),
--   TABLE_ENTRY(GetBufferSubData),
--   TABLE_ENTRY(IsBuffer),
--   TABLE_ENTRY(MapBuffer),
--   TABLE_ENTRY(UnmapBuffer),
--   TABLE_ENTRY(GenQueries),
--   TABLE_ENTRY(DeleteQueries),
--   TABLE_ENTRY(IsQuery),
--   TABLE_ENTRY(BeginQuery),
--   TABLE_ENTRY(EndQuery),
--   TABLE_ENTRY(GetQueryiv),
--   TABLE_ENTRY(GetQueryObjectiv),
--   TABLE_ENTRY(GetQueryObjectuiv),
-+   TABLE_ENTRY(BlendColorEXT),
-+   TABLE_ENTRY(TexImage3DEXT),
-+   TABLE_ENTRY(TexSubImage3DEXT),
-+   TABLE_ENTRY(TexSubImage1DEXT),
-+   TABLE_ENTRY(TexSubImage2DEXT),
-+   TABLE_ENTRY(CopyTexImage1DEXT),
-+   TABLE_ENTRY(CopyTexImage2DEXT),
-+   TABLE_ENTRY(CopyTexSubImage1DEXT),
-+   TABLE_ENTRY(CopyTexSubImage2DEXT),
-+   TABLE_ENTRY(CopyTexSubImage3DEXT),
-+   TABLE_ENTRY(HistogramEXT),
-+   TABLE_ENTRY(MinmaxEXT),
-+   TABLE_ENTRY(ResetHistogramEXT),
-+   TABLE_ENTRY(ResetMinmaxEXT),
-+   TABLE_ENTRY(ConvolutionFilter1DEXT),
-+   TABLE_ENTRY(ConvolutionFilter2DEXT),
-+   TABLE_ENTRY(ConvolutionParameterfEXT),
-+   TABLE_ENTRY(ConvolutionParameterfvEXT),
-+   TABLE_ENTRY(ConvolutionParameteriEXT),
-+   TABLE_ENTRY(ConvolutionParameterivEXT),
-+   TABLE_ENTRY(CopyConvolutionFilter1DEXT),
-+   TABLE_ENTRY(CopyConvolutionFilter2DEXT),
-+   TABLE_ENTRY(SeparableFilter2DEXT),
-+   TABLE_ENTRY(ColorTableSGI),
-+   TABLE_ENTRY(ColorTableParameterfvSGI),
-+   TABLE_ENTRY(ColorTableParameterivSGI),
-+   TABLE_ENTRY(CopyColorTableSGI),
-+   TABLE_ENTRY(BindTextureEXT),
-+   TABLE_ENTRY(DeleteTexturesEXT),
-+   TABLE_ENTRY(PrioritizeTexturesEXT),
-+   TABLE_ENTRY(ArrayElementEXT),
-+   TABLE_ENTRY(DrawArraysEXT),
-+   TABLE_ENTRY(GetPointervEXT),
-+   TABLE_ENTRY(BlendEquationEXT),
-+   TABLE_ENTRY(ColorSubTableEXT),
-+   TABLE_ENTRY(CopyColorSubTableEXT),
-+   TABLE_ENTRY(ColorTableEXT),
-+   TABLE_ENTRY(DrawRangeElementsEXT),
-+   TABLE_ENTRY(SampleMaskEXT),
-+   TABLE_ENTRY(SamplePatternEXT),
-    TABLE_ENTRY(BlendEquationSeparateATI),
-+   TABLE_ENTRY(BlendFuncSeparateINGR),
-+   TABLE_ENTRY(PointParameterfSGIS),
-+   TABLE_ENTRY(PointParameterfvSGIS),
- };
- #endif /*UNUSED_TABLE_NAME*/
-Index: extras/Mesa/src/mesa/glapi/glprocs.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glprocs.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/glprocs.h       16 Jun 2004 09:19:06 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/glprocs.h       15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -31,939 +31,939 @@
-  */
- typedef struct {
--    int Name_offset;
-+    GLint Name_offset;
- #ifdef NEED_FUNCTION_POINTER
--    void * Address;
-+    _glapi_proc Address;
- #endif
--    unsigned int Offset;
-+    GLuint Offset;
- } glprocs_table_t;
- #ifdef NEED_FUNCTION_POINTER
--#  define NAME_FUNC_OFFSET(n,f,o) { n , (void *) f , o }
-+#  define NAME_FUNC_OFFSET(n,f,o) { n , (_glapi_proc) f , o }
- #else
- #  define NAME_FUNC_OFFSET(n,f,o) { n , o }
- #endif
--static const char gl_string_table[] = {
--    'g','l', 'N', 'e', 'w', 'L', 'i', 's', 't', '\0',
--    'g','l', 'E', 'n', 'd', 'L', 'i', 's', 't', '\0',
--    'g','l', 'C', 'a', 'l', 'l', 'L', 'i', 's', 't', '\0',
--    'g','l', 'C', 'a', 'l', 'l', 'L', 'i', 's', 't', 's', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'L', 'i', 's', 't', 's', '\0',
--    'g','l', 'G', 'e', 'n', 'L', 'i', 's', 't', 's', '\0',
--    'g','l', 'L', 'i', 's', 't', 'B', 'a', 's', 'e', '\0',
--    'g','l', 'B', 'e', 'g', 'i', 'n', '\0',
--    'g','l', 'B', 'i', 't', 'm', 'a', 'p', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'b', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'b', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'd', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'd', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'f', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'f', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'i', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 's', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 's', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'b', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'b', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'i', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'u', 's', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '3', 'u', 's', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'b', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'b', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'd', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'd', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'f', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'f', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'i', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 's', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 's', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'u', 'b', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'u', 'b', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'u', 'i', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'u', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'u', 's', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', '4', 'u', 's', 'v', '\0',
--    'g','l', 'E', 'd', 'g', 'e', 'F', 'l', 'a', 'g', '\0',
--    'g','l', 'E', 'd', 'g', 'e', 'F', 'l', 'a', 'g', 'v', '\0',
--    'g','l', 'E', 'n', 'd', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'd', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'd', 'v', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'f', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'f', 'v', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'i', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'i', 'v', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 's', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 's', 'v', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'b', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'b', 'v', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'd', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'd', 'v', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'f', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'f', 'v', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'i', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 'i', 'v', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 's', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', '3', 's', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 'd', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 'd', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 'f', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 'f', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 'i', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 'i', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 's', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '2', 's', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 'd', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 'd', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 'f', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 'f', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 'i', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 'i', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 's', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '3', 's', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 'd', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 'd', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 'f', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 'f', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 'i', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 'i', 'v', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 's', '\0',
--    'g','l', 'R', 'a', 's', 't', 'e', 'r', 'P', 'o', 's', '4', 's', 'v', '\0',
--    'g','l', 'R', 'e', 'c', 't', 'd', '\0',
--    'g','l', 'R', 'e', 'c', 't', 'd', 'v', '\0',
--    'g','l', 'R', 'e', 'c', 't', 'f', '\0',
--    'g','l', 'R', 'e', 'c', 't', 'f', 'v', '\0',
--    'g','l', 'R', 'e', 'c', 't', 'i', '\0',
--    'g','l', 'R', 'e', 'c', 't', 'i', 'v', '\0',
--    'g','l', 'R', 'e', 'c', 't', 's', '\0',
--    'g','l', 'R', 'e', 'c', 't', 's', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'd', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'd', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'i', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 's', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 's', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'd', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'd', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'i', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 's', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 's', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'd', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'd', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'i', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 's', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 's', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'd', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'd', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'i', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 's', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 's', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 'd', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 'd', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 'f', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 'f', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 'i', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 'i', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 's', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '2', 's', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 'd', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 'd', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 'f', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 'f', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 'i', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 'i', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 's', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '3', 's', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 'd', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 'd', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 'f', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 'f', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 'i', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 'i', 'v', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 's', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', '4', 's', 'v', '\0',
--    'g','l', 'C', 'l', 'i', 'p', 'P', 'l', 'a', 'n', 'e', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', '\0',
--    'g','l', 'C', 'u', 'l', 'l', 'F', 'a', 'c', 'e', '\0',
--    'g','l', 'F', 'o', 'g', 'f', '\0',
--    'g','l', 'F', 'o', 'g', 'f', 'v', '\0',
--    'g','l', 'F', 'o', 'g', 'i', '\0',
--    'g','l', 'F', 'o', 'g', 'i', 'v', '\0',
--    'g','l', 'F', 'r', 'o', 'n', 't', 'F', 'a', 'c', 'e', '\0',
--    'g','l', 'H', 'i', 'n', 't', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'f', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'f', 'v', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'i', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'i', 'v', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'f', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'f', 'v', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'i', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'i', 'v', '\0',
--    'g','l', 'L', 'i', 'n', 'e', 'S', 't', 'i', 'p', 'p', 'l', 'e', '\0',
--    'g','l', 'L', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
--    'g','l', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'f', '\0',
--    'g','l', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'f', 'v', '\0',
--    'g','l', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'i', '\0',
--    'g','l', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'i', 'v', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'S', 'i', 'z', 'e', '\0',
--    'g','l', 'P', 'o', 'l', 'y', 'g', 'o', 'n', 'M', 'o', 'd', 'e', '\0',
--    'g','l', 'P', 'o', 'l', 'y', 'g', 'o', 'n', 'S', 't', 'i', 'p', 'p', 'l', 'e', '\0',
--    'g','l', 'S', 'c', 'i', 's', 's', 'o', 'r', '\0',
--    'g','l', 'S', 'h', 'a', 'd', 'e', 'M', 'o', 'd', 'e', 'l', '\0',
--    'g','l', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '1', 'D', '\0',
--    'g','l', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
--    'g','l', 'T', 'e', 'x', 'E', 'n', 'v', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'E', 'n', 'v', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'E', 'n', 'v', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'E', 'n', 'v', 'i', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'G', 'e', 'n', 'd', '\0',
--    'g','l', 'T', 'e', 'x', 'G', 'e', 'n', 'd', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'G', 'e', 'n', 'f', '\0',
--    'g','l', 'T', 'e', 'x', 'G', 'e', 'n', 'f', 'v', '\0',
--    'g','l', 'T', 'e', 'x', 'G', 'e', 'n', 'i', '\0',
--    'g','l', 'T', 'e', 'x', 'G', 'e', 'n', 'i', 'v', '\0',
--    'g','l', 'F', 'e', 'e', 'd', 'b', 'a', 'c', 'k', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'S', 'e', 'l', 'e', 'c', 't', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'R', 'e', 'n', 'd', 'e', 'r', 'M', 'o', 'd', 'e', '\0',
--    'g','l', 'I', 'n', 'i', 't', 'N', 'a', 'm', 'e', 's', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'N', 'a', 'm', 'e', '\0',
--    'g','l', 'P', 'a', 's', 's', 'T', 'h', 'r', 'o', 'u', 'g', 'h', '\0',
--    'g','l', 'P', 'o', 'p', 'N', 'a', 'm', 'e', '\0',
--    'g','l', 'P', 'u', 's', 'h', 'N', 'a', 'm', 'e', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'C', 'l', 'e', 'a', 'r', '\0',
--    'g','l', 'C', 'l', 'e', 'a', 'r', 'A', 'c', 'c', 'u', 'm', '\0',
--    'g','l', 'C', 'l', 'e', 'a', 'r', 'I', 'n', 'd', 'e', 'x', '\0',
--    'g','l', 'C', 'l', 'e', 'a', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
--    'g','l', 'C', 'l', 'e', 'a', 'r', 'S', 't', 'e', 'n', 'c', 'i', 'l', '\0',
--    'g','l', 'C', 'l', 'e', 'a', 'r', 'D', 'e', 'p', 't', 'h', '\0',
--    'g','l', 'S', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'M', 'a', 's', 'k', '\0',
--    'g','l', 'D', 'e', 'p', 't', 'h', 'M', 'a', 's', 'k', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'M', 'a', 's', 'k', '\0',
--    'g','l', 'A', 'c', 'c', 'u', 'm', '\0',
--    'g','l', 'D', 'i', 's', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'E', 'n', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'F', 'i', 'n', 'i', 's', 'h', '\0',
--    'g','l', 'F', 'l', 'u', 's', 'h', '\0',
--    'g','l', 'P', 'o', 'p', 'A', 't', 't', 'r', 'i', 'b', '\0',
--    'g','l', 'P', 'u', 's', 'h', 'A', 't', 't', 'r', 'i', 'b', '\0',
--    'g','l', 'M', 'a', 'p', '1', 'd', '\0',
--    'g','l', 'M', 'a', 'p', '1', 'f', '\0',
--    'g','l', 'M', 'a', 'p', '2', 'd', '\0',
--    'g','l', 'M', 'a', 'p', '2', 'f', '\0',
--    'g','l', 'M', 'a', 'p', 'G', 'r', 'i', 'd', '1', 'd', '\0',
--    'g','l', 'M', 'a', 'p', 'G', 'r', 'i', 'd', '1', 'f', '\0',
--    'g','l', 'M', 'a', 'p', 'G', 'r', 'i', 'd', '2', 'd', '\0',
--    'g','l', 'M', 'a', 'p', 'G', 'r', 'i', 'd', '2', 'f', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '1', 'd', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '1', 'd', 'v', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '1', 'f', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '1', 'f', 'v', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '2', 'd', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '2', 'd', 'v', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '2', 'f', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'C', 'o', 'o', 'r', 'd', '2', 'f', 'v', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'M', 'e', 's', 'h', '1', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'P', 'o', 'i', 'n', 't', '1', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'M', 'e', 's', 'h', '2', '\0',
--    'g','l', 'E', 'v', 'a', 'l', 'P', 'o', 'i', 'n', 't', '2', '\0',
--    'g','l', 'A', 'l', 'p', 'h', 'a', 'F', 'u', 'n', 'c', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', '\0',
--    'g','l', 'L', 'o', 'g', 'i', 'c', 'O', 'p', '\0',
--    'g','l', 'S', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', '\0',
--    'g','l', 'S', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', '\0',
--    'g','l', 'D', 'e', 'p', 't', 'h', 'F', 'u', 'n', 'c', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'Z', 'o', 'o', 'm', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'r', 'a', 'n', 's', 'f', 'e', 'r', 'f', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'r', 'a', 'n', 's', 'f', 'e', 'r', 'i', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'S', 't', 'o', 'r', 'e', 'f', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'S', 't', 'o', 'r', 'e', 'i', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'M', 'a', 'p', 'f', 'v', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'M', 'a', 'p', 'u', 'i', 'v', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'M', 'a', 'p', 'u', 's', 'v', '\0',
--    'g','l', 'R', 'e', 'a', 'd', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'P', 'i', 'x', 'e', 'l', 's', '\0',
--    'g','l', 'R', 'e', 'a', 'd', 'P', 'i', 'x', 'e', 'l', 's', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'P', 'i', 'x', 'e', 'l', 's', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'o', 'o', 'l', 'e', 'a', 'n', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'l', 'i', 'p', 'P', 'l', 'a', 'n', 'e', '\0',
--    'g','l', 'G', 'e', 't', 'D', 'o', 'u', 'b', 'l', 'e', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'E', 'r', 'r', 'o', 'r', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'l', 'o', 'a', 't', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'I', 'n', 't', 'e', 'g', 'e', 'r', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'L', 'i', 'g', 'h', 't', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'L', 'i', 'g', 'h', 't', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'a', 'p', 'd', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'a', 'p', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'a', 'p', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'i', 'x', 'e', 'l', 'M', 'a', 'p', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'i', 'x', 'e', 'l', 'M', 'a', 'p', 'u', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'i', 'x', 'e', 'l', 'M', 'a', 'p', 'u', 's', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'o', 'l', 'y', 'g', 'o', 'n', 'S', 't', 'i', 'p', 'p', 'l', 'e', '\0',
--    'g','l', 'G', 'e', 't', 'S', 't', 'r', 'i', 'n', 'g', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'E', 'n', 'v', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'E', 'n', 'v', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'G', 'e', 'n', 'd', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'G', 'e', 'n', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'G', 'e', 'n', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'L', 'e', 'v', 'e', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'L', 'e', 'v', 'e', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'I', 's', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\0',
--    'g','l', 'I', 's', 'L', 'i', 's', 't', '\0',
--    'g','l', 'D', 'e', 'p', 't', 'h', 'R', 'a', 'n', 'g', 'e', '\0',
--    'g','l', 'F', 'r', 'u', 's', 't', 'u', 'm', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'M', 'a', 't', 'r', 'i', 'x', 'f', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'M', 'a', 't', 'r', 'i', 'x', 'd', '\0',
--    'g','l', 'M', 'a', 't', 'r', 'i', 'x', 'M', 'o', 'd', 'e', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'M', 'a', 't', 'r', 'i', 'x', 'f', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'M', 'a', 't', 'r', 'i', 'x', 'd', '\0',
--    'g','l', 'O', 'r', 't', 'h', 'o', '\0',
--    'g','l', 'P', 'o', 'p', 'M', 'a', 't', 'r', 'i', 'x', '\0',
--    'g','l', 'P', 'u', 's', 'h', 'M', 'a', 't', 'r', 'i', 'x', '\0',
--    'g','l', 'R', 'o', 't', 'a', 't', 'e', 'd', '\0',
--    'g','l', 'R', 'o', 't', 'a', 't', 'e', 'f', '\0',
--    'g','l', 'S', 'c', 'a', 'l', 'e', 'd', '\0',
--    'g','l', 'S', 'c', 'a', 'l', 'e', 'f', '\0',
--    'g','l', 'T', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e', 'd', '\0',
--    'g','l', 'T', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e', 'f', '\0',
--    'g','l', 'V', 'i', 'e', 'w', 'p', 'o', 'r', 't', '\0',
--    'g','l', 'A', 'r', 'r', 'a', 'y', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
--    'g','l', 'B', 'i', 'n', 'd', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'D', 'i', 's', 'a', 'b', 'l', 'e', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'e', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
--    'g','l', 'E', 'd', 'g', 'e', 'F', 'l', 'a', 'g', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'E', 'n', 'a', 'b', 'l', 'e', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'e', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'u', 'b', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'u', 'b', 'v', '\0',
--    'g','l', 'I', 'n', 't', 'e', 'r', 'l', 'e', 'a', 'v', 'e', 'd', 'A', 'r', 'r', 'a', 'y', 's', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'P', 'o', 'l', 'y', 'g', 'o', 'n', 'O', 'f', 'f', 's', 'e', 't', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'A', 'r', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', 'R', 'e', 's', 'i', 'd', 'e', 'n', 't', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '1', 'D', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '1', 'D', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', '\0',
--    'g','l', 'G', 'e', 'n', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'v', '\0',
--    'g','l', 'I', 's', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
--    'g','l', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'i', 'z', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '1', 'D', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
--    'g','l', 'P', 'o', 'p', 'C', 'l', 'i', 'e', 'n', 't', 'A', 't', 't', 'r', 'i', 'b', '\0',
--    'g','l', 'P', 'u', 's', 'h', 'C', 'l', 'i', 'e', 'n', 't', 'A', 't', 't', 'r', 'i', 'b', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'R', 'a', 'n', 'g', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'S', 'u', 'b', 'T', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'l', 'o', 'r', 'S', 'u', 'b', 'T', 'a', 'b', 'l', 'e', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '1', 'D', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '2', 'D', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '1', 'D', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '2', 'D', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'S', 'e', 'p', 'a', 'r', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\0',
--    'g','l', 'S', 'e', 'p', 'a', 'r', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', '2', 'D', '\0',
--    'g','l', 'G', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', '\0',
--    'g','l', 'G', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', '\0',
--    'g','l', 'M', 'i', 'n', 'm', 'a', 'x', '\0',
--    'g','l', 'R', 'e', 's', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', '\0',
--    'g','l', 'R', 'e', 's', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', '\0',
--    'g','l', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '3', 'D', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '3', 'D', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '3', 'D', '\0',
--    'g','l', 'A', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 'A', 'R', 'B', '\0',
--    'g','l', 'C', 'l', 'i', 'e', 'n', 't', 'A', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'i', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'i', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'i', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'i', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'S', 'a', 'm', 'p', 'l', 'e', 'C', 'o', 'v', 'e', 'r', 'a', 'g', 'e', 'A', 'R', 'B', '\0',
--    'g','l', '_', '_', 'u', 'n', 'u', 's', 'e', 'd', '4', '1', '3', '\0',
--    'g','l', 'P', 'o', 'l', 'y', 'g', 'o', 'n', 'O', 'f', 'f', 's', 'e', 't', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'e', 'x', 'F', 'i', 'l', 't', 'e', 'r', 'F', 'u', 'n', 'c', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'T', 'e', 'x', 'F', 'i', 'l', 't', 'e', 'r', 'F', 'u', 'n', 'c', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'G', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'S', 'e', 'p', 'a', 'r', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'S', 'G', 'I', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'i', 'x', 'e', 'l', 'T', 'e', 'x', 'G', 'e', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '4', 'D', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '4', 'D', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'A', 'r', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', 'R', 'e', 's', 'i', 'd', 'e', 'n', 't', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 'n', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'I', 's', 'T', 'e', 'x', 't', 'u', 'r', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'D', 'e', 't', 'a', 'i', 'l', 'T', 'e', 'x', 'F', 'u', 'n', 'c', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'G', 'e', 't', 'D', 'e', 't', 'a', 'i', 'l', 'T', 'e', 'x', 'F', 'u', 'n', 'c', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'S', 'h', 'a', 'r', 'p', 'e', 'n', 'T', 'e', 'x', 'F', 'u', 'n', 'c', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'G', 'e', 't', 'S', 'h', 'a', 'r', 'p', 'e', 'n', 'T', 'e', 'x', 'F', 'u', 'n', 'c', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'S', 'a', 'm', 'p', 'l', 'e', 'M', 'a', 's', 'k', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'S', 'a', 'm', 'p', 'l', 'e', 'P', 'a', 't', 't', 'e', 'r', 'n', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'E', 'd', 'g', 'e', 'F', 'l', 'a', 'g', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'N', 'o', 'r', 'm', 'a', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'p', 'r', 'i', 't', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'S', 'p', 'r', 'i', 't', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'S', 'p', 'r', 'i', 't', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'S', 'p', 'r', 'i', 't', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'E', 'X', 'T', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's', 'B', 'u', 'f', 'f', 'e', 'r', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'P', 'o', 'l', 'l', 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'R', 'e', 'a', 'd', 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'S', 't', 'a', 'r', 't', 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'S', 't', 'o', 'p', 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'm', 'e', 'Z', 'o', 'o', 'm', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'T', 'a', 'g', 'S', 'a', 'm', 'p', 'l', 'e', 'B', 'u', 'f', 'f', 'e', 'r', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'R', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e', 'P', 'l', 'a', 'n', 'e', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'l', 'u', 's', 'h', 'R', 'a', 's', 't', 'e', 'r', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'G', 'e', 't', 'L', 'i', 's', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'G', 'e', 't', 'L', 'i', 's', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'L', 'i', 's', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'L', 'i', 's', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'L', 'i', 's', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'L', 'i', 's', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'C', 'o', 'l', 'o', 'r', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'f', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'i', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'f', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'i', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'M', 'o', 'd', 'e', 'l', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'f', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'i', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'L', 'i', 'g', 'h', 't', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'f', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'i', 'v', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'L', 'i', 'g', 'h', 't', 'E', 'n', 'v', 'i', 'S', 'G', 'I', 'X', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'W', 'e', 'i', 'g', 'h', 't', 'f', 'E', 'X', 'T', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'W', 'e', 'i', 'g', 'h', 't', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'W', 'e', 'i', 'g', 'h', 't', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'F', 'l', 'u', 's', 'h', 'V', 'e', 'r', 't', 'e', 'x', 'A', 'r', 'r', 'a', 'y', 'R', 'a', 'n', 'g', 'e', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 'r', 'r', 'a', 'y', 'R', 'a', 'n', 'g', 'e', 'N', 'V', '\0',
--    'g','l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'N', 'V', '\0',
--    'g','l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'N', 'V', '\0',
--    'g','l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'I', 'n', 'p', 'u', 't', 'N', 'V', '\0',
--    'g','l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'O', 'u', 't', 'p', 'u', 't', 'N', 'V', '\0',
--    'g','l', 'F', 'i', 'n', 'a', 'l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'I', 'n', 'p', 'u', 't', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'I', 'n', 'p', 'u', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'I', 'n', 'p', 'u', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'O', 'u', 't', 'p', 'u', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'O', 'u', 't', 'p', 'u', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'i', 'n', 'a', 'l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'I', 'n', 'p', 'u', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'i', 'n', 'a', 'l', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'I', 'n', 'p', 'u', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'R', 'e', 's', 'i', 'z', 'e', 'B', 'u', 'f', 'f', 'e', 'r', 's', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'd', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'd', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'f', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'f', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'i', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'i', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 's', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 's', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'd', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'd', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'f', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'f', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'i', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'i', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 's', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 's', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 'd', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 'd', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 'f', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 'f', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 'i', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 'i', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 's', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '4', 's', 'v', 'M', 'E', 'S', 'A', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'M', 'a', 't', 'e', 'r', 'i', 'a', 'l', 'E', 'X', 'T', '\0',
--    'g','l', 'I', 'n', 'd', 'e', 'x', 'F', 'u', 'n', 'c', 'E', 'X', 'T', '\0',
--    'g','l', 'L', 'o', 'c', 'k', 'A', 'r', 'r', 'a', 'y', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'U', 'n', 'l', 'o', 'c', 'k', 'A', 'r', 'r', 'a', 'y', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'u', 'l', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'd', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'u', 'l', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'H', 'i', 'n', 't', 'P', 'G', 'I', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'f', 'E', 'X', 'T', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'd', 'E', 'X', 'T', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'd', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'T', 'b', 'u', 'f', 'f', 'e', 'r', 'M', 'a', 's', 'k', '3', 'D', 'F', 'X', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '3', 'D', 'A', 'R', 'B', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', 'A', 'R', 'B', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '1', 'D', 'A', 'R', 'B', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '3', 'D', 'A', 'R', 'B', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', 'A', 'R', 'B', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '1', 'D', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', 'A', 'R', 'B', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'b', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'b', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'd', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'd', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'f', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'i', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 's', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'b', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'b', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'i', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 's', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'A', 'r', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 's', 'R', 'e', 's', 'i', 'd', 'e', 'n', 't', 'N', 'V', '\0',
--    'g','l', 'B', 'i', 'n', 'd', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'V', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 's', 'N', 'V', '\0',
--    'g','l', 'E', 'x', 'e', 'c', 'u', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 'n', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 's', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'S', 't', 'r', 'i', 'n', 'g', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'T', 'r', 'a', 'c', 'k', 'M', 'a', 't', 'r', 'i', 'x', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'v', 'N', 'V', '\0',
--    'g','l', 'I', 's', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'V', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '4', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '4', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'R', 'e', 'q', 'u', 'e', 's', 't', 'R', 'e', 's', 'i', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 's', 'N', 'V', '\0',
--    'g','l', 'T', 'r', 'a', 'c', 'k', 'M', 'a', 't', 'r', 'i', 'x', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'd', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 's', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'd', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 's', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'd', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 's', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'd', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 's', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'u', 'b', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'u', 'b', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '1', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '1', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '1', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '2', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '2', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '2', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '3', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '3', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '3', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '4', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '4', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '4', 's', 'v', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 's', '4', 'u', 'b', 'v', 'N', 'V', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'N', 'V', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'D', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'D', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'A', 'c', 't', 'i', 'v', 'e', 'S', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'a', 'c', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'F', 'e', 'n', 'c', 'e', 's', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 'n', 'F', 'e', 'n', 'c', 'e', 's', 'N', 'V', '\0',
--    'g','l', 'I', 's', 'F', 'e', 'n', 'c', 'e', 'N', 'V', '\0',
--    'g','l', 'T', 'e', 's', 't', 'F', 'e', 'n', 'c', 'e', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'F', 'e', 'n', 'c', 'e', 'i', 'v', 'N', 'V', '\0',
--    'g','l', 'F', 'i', 'n', 'i', 's', 'h', 'F', 'e', 'n', 'c', 'e', 'N', 'V', '\0',
--    'g','l', 'S', 'e', 't', 'F', 'e', 'n', 'c', 'e', 'N', 'V', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'b', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'u', 'b', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'u', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'u', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 'b', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 'u', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 'u', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'A', 'R', 'B', '\0',
--    'g','l', 'E', 'n', 'a', 'b', 'l', 'e', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'A', 'r', 'r', 'a', 'y', 'A', 'R', 'B', '\0',
--    'g','l', 'D', 'i', 's', 'a', 'b', 'l', 'e', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'A', 'r', 'r', 'a', 'y', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'S', 't', 'r', 'i', 'n', 'g', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'E', 'n', 'v', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'E', 'n', 'v', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'E', 'n', 'v', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'E', 'n', 'v', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'E', 'n', 'v', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'E', 'n', 'v', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'S', 't', 'r', 'i', 'n', 'g', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'a', 'm', 'e', 'd', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'a', 'm', 'e', 'd', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'a', 'm', 'e', 'd', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'a', 'm', 'e', 'd', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '4', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'a', 'm', 'e', 'd', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'N', 'V', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'N', 'a', 'm', 'e', 'd', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'd', 'v', 'N', 'V', '\0',
--    'g','l', 'B', 'i', 'n', 'd', 'B', 'u', 'f', 'f', 'e', 'r', 'A', 'R', 'B', '\0',
--    'g','l', 'B', 'u', 'f', 'f', 'e', 'r', 'D', 'a', 't', 'a', 'A', 'R', 'B', '\0',
--    'g','l', 'B', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', 'A', 'R', 'B', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 'n', 'B', 'u', 'f', 'f', 'e', 'r', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', 'A', 'R', 'B', '\0',
--    'g','l', 'I', 's', 'B', 'u', 'f', 'f', 'e', 'r', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'a', 'p', 'B', 'u', 'f', 'f', 'e', 'r', 'A', 'R', 'B', '\0',
--    'g','l', 'U', 'n', 'm', 'a', 'p', 'B', 'u', 'f', 'f', 'e', 'r', 'A', 'R', 'B', '\0',
--    'g','l', 'D', 'e', 'p', 't', 'h', 'B', 'o', 'u', 'n', 'd', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 'n', 'Q', 'u', 'e', 'r', 'i', 'e', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'Q', 'u', 'e', 'r', 'i', 'e', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'I', 's', 'Q', 'u', 'e', 'r', 'y', 'A', 'R', 'B', '\0',
--    'g','l', 'B', 'e', 'g', 'i', 'n', 'Q', 'u', 'e', 'r', 'y', 'A', 'R', 'B', '\0',
--    'g','l', 'E', 'n', 'd', 'Q', 'u', 'e', 'r', 'y', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'Q', 'u', 'e', 'r', 'y', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'Q', 'u', 'e', 'r', 'y', 'O', 'b', 'j', 'e', 'c', 't', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'Q', 'u', 'e', 'r', 'y', 'O', 'b', 'j', 'e', 'c', 't', 'u', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'M', 'o', 'd', 'e', 'D', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', 'I', 'B', 'M', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'M', 'o', 'd', 'e', 'D', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'I', 'B', 'M', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'A', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
--    'g','l', 'C', 'l', 'i', 'e', 'n', 't', 'A', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'd', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'd', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'f', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'f', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'i', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 'i', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 's', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '1', 's', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'd', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'd', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'f', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'f', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'i', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 'i', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 's', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '2', 's', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'd', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'd', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'f', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'f', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'i', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 'i', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 's', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '3', 's', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'd', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'd', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'f', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'f', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'i', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 'i', 'v', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 's', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'T', 'e', 'x', 'C', 'o', 'o', 'r', 'd', '4', 's', 'v', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'f', '\0',
--    'g','l', 'L', 'o', 'a', 'd', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'd', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'f', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'T', 'r', 'a', 'n', 's', 'p', 'o', 's', 'e', 'M', 'a', 't', 'r', 'i', 'x', 'd', '\0',
--    'g','l', 'S', 'a', 'm', 'p', 'l', 'e', 'C', 'o', 'v', 'e', 'r', 'a', 'g', 'e', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '3', 'D', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '1', 'D', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '3', 'D', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
--    'g','l', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '1', 'D', '\0',
--    'g','l', 'G', 'e', 't', 'C', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'f', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'f', 'v', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'd', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'd', 'v', '\0',
--    'g','l', 'F', 'o', 'g', 'C', 'o', 'o', 'r', 'd', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'D', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', '\0',
--    'g','l', 'M', 'u', 'l', 't', 'i', 'D', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'b', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'b', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'd', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'd', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'f', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'f', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'i', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'i', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 's', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 's', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'b', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'b', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'i', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 'i', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 's', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', '3', 'u', 's', 'v', '\0',
--    'g','l', 'S', 'e', 'c', 'o', 'n', 'd', 'a', 'r', 'y', 'C', 'o', 'l', 'o', 'r', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'd', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'd', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'f', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'f', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'i', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'i', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 's', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 's', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'd', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'd', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'f', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'f', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'i', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'i', 'v', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 's', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 's', 'v', '\0',
--    'g','l', 'B', 'i', 'n', 'd', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'B', 'u', 'f', 'f', 'e', 'r', 'D', 'a', 't', 'a', '\0',
--    'g','l', 'B', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', 's', '\0',
--    'g','l', 'G', 'e', 'n', 'B', 'u', 'f', 'f', 'e', 'r', 's', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', '\0',
--    'g','l', 'I', 's', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'M', 'a', 'p', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'U', 'n', 'm', 'a', 'p', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
--    'g','l', 'G', 'e', 'n', 'Q', 'u', 'e', 'r', 'i', 'e', 's', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'Q', 'u', 'e', 'r', 'i', 'e', 's', '\0',
--    'g','l', 'I', 's', 'Q', 'u', 'e', 'r', 'y', '\0',
--    'g','l', 'B', 'e', 'g', 'i', 'n', 'Q', 'u', 'e', 'r', 'y', '\0',
--    'g','l', 'E', 'n', 'd', 'Q', 'u', 'e', 'r', 'y', '\0',
--    'g','l', 'G', 'e', 't', 'Q', 'u', 'e', 'r', 'y', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'Q', 'u', 'e', 'r', 'y', 'O', 'b', 'j', 'e', 'c', 't', 'i', 'v', '\0',
--    'g','l', 'G', 'e', 't', 'Q', 'u', 'e', 'r', 'y', 'O', 'b', 'j', 'e', 'c', 't', 'u', 'i', 'v', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'i', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '2', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'i', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'W', 'i', 'n', 'd', 'o', 'w', 'P', 'o', 's', '3', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'd', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 'u', 'b', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 's', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'N', 'u', 'b', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'B', 'i', 'n', 'd', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'A', 'R', 'B', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 'n', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 's', 'A', 'R', 'B', '\0',
--    'g','l', 'I', 's', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'd', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'f', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'i', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'G', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'v', 'A', 'R', 'B', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'C', 'o', 'l', 'o', 'r', 'E', 'X', 'T', '\0',
--    'g','l', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '3', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '3', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '1', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '1', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '1', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '3', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'E', 'X', 'T', '\0',
--    'g','l', 'M', 'i', 'n', 'm', 'a', 'x', 'E', 'X', 'T', '\0',
--    'g','l', 'R', 'e', 's', 'e', 't', 'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'E', 'X', 'T', '\0',
--    'g','l', 'R', 'e', 's', 'e', 't', 'M', 'i', 'n', 'm', 'a', 'x', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '1', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '2', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '1', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'n', 'v', 'o', 'l', 'u', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '2', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'e', 'p', 'a', 'r', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', '2', 'D', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'S', 'G', 'I', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', 'v', 'S', 'G', 'I', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'S', 'G', 'I', '\0',
--    'g','l', 'B', 'i', 'n', 'd', 'T', 'e', 'x', 't', 'u', 'r', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'D', 'e', 'l', 'e', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'i', 'z', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'A', 'r', 'r', 'a', 'y', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'E', 'X', 'T', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'G', 'e', 't', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'v', 'E', 'X', 'T', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'S', 'u', 'b', 'T', 'a', 'b', 'l', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'p', 'y', 'C', 'o', 'l', 'o', 'r', 'S', 'u', 'b', 'T', 'a', 'b', 'l', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'C', 'o', 'l', 'o', 'r', 'T', 'a', 'b', 'l', 'e', 'E', 'X', 'T', '\0',
--    'g','l', 'D', 'r', 'a', 'w', 'R', 'a', 'n', 'g', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'a', 'm', 'p', 'l', 'e', 'M', 'a', 's', 'k', 'E', 'X', 'T', '\0',
--    'g','l', 'S', 'a', 'm', 'p', 'l', 'e', 'P', 'a', 't', 't', 'e', 'r', 'n', 'E', 'X', 'T', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', 'A', 'T', 'I', '\0',
--    'g','l', 'B', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', 'I', 'N', 'G', 'R', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'S', 'G', 'I', 'S', '\0',
--    'g','l', 'P', 'o', 'i', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', 'v', 'S', 'G', 'I', 'S', '\0',
--};
-+static const char gl_string_table[] =
-+    "glNewList\0"
-+    "glEndList\0"
-+    "glCallList\0"
-+    "glCallLists\0"
-+    "glDeleteLists\0"
-+    "glGenLists\0"
-+    "glListBase\0"
-+    "glBegin\0"
-+    "glBitmap\0"
-+    "glColor3b\0"
-+    "glColor3bv\0"
-+    "glColor3d\0"
-+    "glColor3dv\0"
-+    "glColor3f\0"
-+    "glColor3fv\0"
-+    "glColor3i\0"
-+    "glColor3iv\0"
-+    "glColor3s\0"
-+    "glColor3sv\0"
-+    "glColor3ub\0"
-+    "glColor3ubv\0"
-+    "glColor3ui\0"
-+    "glColor3uiv\0"
-+    "glColor3us\0"
-+    "glColor3usv\0"
-+    "glColor4b\0"
-+    "glColor4bv\0"
-+    "glColor4d\0"
-+    "glColor4dv\0"
-+    "glColor4f\0"
-+    "glColor4fv\0"
-+    "glColor4i\0"
-+    "glColor4iv\0"
-+    "glColor4s\0"
-+    "glColor4sv\0"
-+    "glColor4ub\0"
-+    "glColor4ubv\0"
-+    "glColor4ui\0"
-+    "glColor4uiv\0"
-+    "glColor4us\0"
-+    "glColor4usv\0"
-+    "glEdgeFlag\0"
-+    "glEdgeFlagv\0"
-+    "glEnd\0"
-+    "glIndexd\0"
-+    "glIndexdv\0"
-+    "glIndexf\0"
-+    "glIndexfv\0"
-+    "glIndexi\0"
-+    "glIndexiv\0"
-+    "glIndexs\0"
-+    "glIndexsv\0"
-+    "glNormal3b\0"
-+    "glNormal3bv\0"
-+    "glNormal3d\0"
-+    "glNormal3dv\0"
-+    "glNormal3f\0"
-+    "glNormal3fv\0"
-+    "glNormal3i\0"
-+    "glNormal3iv\0"
-+    "glNormal3s\0"
-+    "glNormal3sv\0"
-+    "glRasterPos2d\0"
-+    "glRasterPos2dv\0"
-+    "glRasterPos2f\0"
-+    "glRasterPos2fv\0"
-+    "glRasterPos2i\0"
-+    "glRasterPos2iv\0"
-+    "glRasterPos2s\0"
-+    "glRasterPos2sv\0"
-+    "glRasterPos3d\0"
-+    "glRasterPos3dv\0"
-+    "glRasterPos3f\0"
-+    "glRasterPos3fv\0"
-+    "glRasterPos3i\0"
-+    "glRasterPos3iv\0"
-+    "glRasterPos3s\0"
-+    "glRasterPos3sv\0"
-+    "glRasterPos4d\0"
-+    "glRasterPos4dv\0"
-+    "glRasterPos4f\0"
-+    "glRasterPos4fv\0"
-+    "glRasterPos4i\0"
-+    "glRasterPos4iv\0"
-+    "glRasterPos4s\0"
-+    "glRasterPos4sv\0"
-+    "glRectd\0"
-+    "glRectdv\0"
-+    "glRectf\0"
-+    "glRectfv\0"
-+    "glRecti\0"
-+    "glRectiv\0"
-+    "glRects\0"
-+    "glRectsv\0"
-+    "glTexCoord1d\0"
-+    "glTexCoord1dv\0"
-+    "glTexCoord1f\0"
-+    "glTexCoord1fv\0"
-+    "glTexCoord1i\0"
-+    "glTexCoord1iv\0"
-+    "glTexCoord1s\0"
-+    "glTexCoord1sv\0"
-+    "glTexCoord2d\0"
-+    "glTexCoord2dv\0"
-+    "glTexCoord2f\0"
-+    "glTexCoord2fv\0"
-+    "glTexCoord2i\0"
-+    "glTexCoord2iv\0"
-+    "glTexCoord2s\0"
-+    "glTexCoord2sv\0"
-+    "glTexCoord3d\0"
-+    "glTexCoord3dv\0"
-+    "glTexCoord3f\0"
-+    "glTexCoord3fv\0"
-+    "glTexCoord3i\0"
-+    "glTexCoord3iv\0"
-+    "glTexCoord3s\0"
-+    "glTexCoord3sv\0"
-+    "glTexCoord4d\0"
-+    "glTexCoord4dv\0"
-+    "glTexCoord4f\0"
-+    "glTexCoord4fv\0"
-+    "glTexCoord4i\0"
-+    "glTexCoord4iv\0"
-+    "glTexCoord4s\0"
-+    "glTexCoord4sv\0"
-+    "glVertex2d\0"
-+    "glVertex2dv\0"
-+    "glVertex2f\0"
-+    "glVertex2fv\0"
-+    "glVertex2i\0"
-+    "glVertex2iv\0"
-+    "glVertex2s\0"
-+    "glVertex2sv\0"
-+    "glVertex3d\0"
-+    "glVertex3dv\0"
-+    "glVertex3f\0"
-+    "glVertex3fv\0"
-+    "glVertex3i\0"
-+    "glVertex3iv\0"
-+    "glVertex3s\0"
-+    "glVertex3sv\0"
-+    "glVertex4d\0"
-+    "glVertex4dv\0"
-+    "glVertex4f\0"
-+    "glVertex4fv\0"
-+    "glVertex4i\0"
-+    "glVertex4iv\0"
-+    "glVertex4s\0"
-+    "glVertex4sv\0"
-+    "glClipPlane\0"
-+    "glColorMaterial\0"
-+    "glCullFace\0"
-+    "glFogf\0"
-+    "glFogfv\0"
-+    "glFogi\0"
-+    "glFogiv\0"
-+    "glFrontFace\0"
-+    "glHint\0"
-+    "glLightf\0"
-+    "glLightfv\0"
-+    "glLighti\0"
-+    "glLightiv\0"
-+    "glLightModelf\0"
-+    "glLightModelfv\0"
-+    "glLightModeli\0"
-+    "glLightModeliv\0"
-+    "glLineStipple\0"
-+    "glLineWidth\0"
-+    "glMaterialf\0"
-+    "glMaterialfv\0"
-+    "glMateriali\0"
-+    "glMaterialiv\0"
-+    "glPointSize\0"
-+    "glPolygonMode\0"
-+    "glPolygonStipple\0"
-+    "glScissor\0"
-+    "glShadeModel\0"
-+    "glTexParameterf\0"
-+    "glTexParameterfv\0"
-+    "glTexParameteri\0"
-+    "glTexParameteriv\0"
-+    "glTexImage1D\0"
-+    "glTexImage2D\0"
-+    "glTexEnvf\0"
-+    "glTexEnvfv\0"
-+    "glTexEnvi\0"
-+    "glTexEnviv\0"
-+    "glTexGend\0"
-+    "glTexGendv\0"
-+    "glTexGenf\0"
-+    "glTexGenfv\0"
-+    "glTexGeni\0"
-+    "glTexGeniv\0"
-+    "glFeedbackBuffer\0"
-+    "glSelectBuffer\0"
-+    "glRenderMode\0"
-+    "glInitNames\0"
-+    "glLoadName\0"
-+    "glPassThrough\0"
-+    "glPopName\0"
-+    "glPushName\0"
-+    "glDrawBuffer\0"
-+    "glClear\0"
-+    "glClearAccum\0"
-+    "glClearIndex\0"
-+    "glClearColor\0"
-+    "glClearStencil\0"
-+    "glClearDepth\0"
-+    "glStencilMask\0"
-+    "glColorMask\0"
-+    "glDepthMask\0"
-+    "glIndexMask\0"
-+    "glAccum\0"
-+    "glDisable\0"
-+    "glEnable\0"
-+    "glFinish\0"
-+    "glFlush\0"
-+    "glPopAttrib\0"
-+    "glPushAttrib\0"
-+    "glMap1d\0"
-+    "glMap1f\0"
-+    "glMap2d\0"
-+    "glMap2f\0"
-+    "glMapGrid1d\0"
-+    "glMapGrid1f\0"
-+    "glMapGrid2d\0"
-+    "glMapGrid2f\0"
-+    "glEvalCoord1d\0"
-+    "glEvalCoord1dv\0"
-+    "glEvalCoord1f\0"
-+    "glEvalCoord1fv\0"
-+    "glEvalCoord2d\0"
-+    "glEvalCoord2dv\0"
-+    "glEvalCoord2f\0"
-+    "glEvalCoord2fv\0"
-+    "glEvalMesh1\0"
-+    "glEvalPoint1\0"
-+    "glEvalMesh2\0"
-+    "glEvalPoint2\0"
-+    "glAlphaFunc\0"
-+    "glBlendFunc\0"
-+    "glLogicOp\0"
-+    "glStencilFunc\0"
-+    "glStencilOp\0"
-+    "glDepthFunc\0"
-+    "glPixelZoom\0"
-+    "glPixelTransferf\0"
-+    "glPixelTransferi\0"
-+    "glPixelStoref\0"
-+    "glPixelStorei\0"
-+    "glPixelMapfv\0"
-+    "glPixelMapuiv\0"
-+    "glPixelMapusv\0"
-+    "glReadBuffer\0"
-+    "glCopyPixels\0"
-+    "glReadPixels\0"
-+    "glDrawPixels\0"
-+    "glGetBooleanv\0"
-+    "glGetClipPlane\0"
-+    "glGetDoublev\0"
-+    "glGetError\0"
-+    "glGetFloatv\0"
-+    "glGetIntegerv\0"
-+    "glGetLightfv\0"
-+    "glGetLightiv\0"
-+    "glGetMapdv\0"
-+    "glGetMapfv\0"
-+    "glGetMapiv\0"
-+    "glGetMaterialfv\0"
-+    "glGetMaterialiv\0"
-+    "glGetPixelMapfv\0"
-+    "glGetPixelMapuiv\0"
-+    "glGetPixelMapusv\0"
-+    "glGetPolygonStipple\0"
-+    "glGetString\0"
-+    "glGetTexEnvfv\0"
-+    "glGetTexEnviv\0"
-+    "glGetTexGendv\0"
-+    "glGetTexGenfv\0"
-+    "glGetTexGeniv\0"
-+    "glGetTexImage\0"
-+    "glGetTexParameterfv\0"
-+    "glGetTexParameteriv\0"
-+    "glGetTexLevelParameterfv\0"
-+    "glGetTexLevelParameteriv\0"
-+    "glIsEnabled\0"
-+    "glIsList\0"
-+    "glDepthRange\0"
-+    "glFrustum\0"
-+    "glLoadIdentity\0"
-+    "glLoadMatrixf\0"
-+    "glLoadMatrixd\0"
-+    "glMatrixMode\0"
-+    "glMultMatrixf\0"
-+    "glMultMatrixd\0"
-+    "glOrtho\0"
-+    "glPopMatrix\0"
-+    "glPushMatrix\0"
-+    "glRotated\0"
-+    "glRotatef\0"
-+    "glScaled\0"
-+    "glScalef\0"
-+    "glTranslated\0"
-+    "glTranslatef\0"
-+    "glViewport\0"
-+    "glArrayElement\0"
-+    "glBindTexture\0"
-+    "glColorPointer\0"
-+    "glDisableClientState\0"
-+    "glDrawArrays\0"
-+    "glDrawElements\0"
-+    "glEdgeFlagPointer\0"
-+    "glEnableClientState\0"
-+    "glIndexPointer\0"
-+    "glIndexub\0"
-+    "glIndexubv\0"
-+    "glInterleavedArrays\0"
-+    "glNormalPointer\0"
-+    "glPolygonOffset\0"
-+    "glTexCoordPointer\0"
-+    "glVertexPointer\0"
-+    "glAreTexturesResident\0"
-+    "glCopyTexImage1D\0"
-+    "glCopyTexImage2D\0"
-+    "glCopyTexSubImage1D\0"
-+    "glCopyTexSubImage2D\0"
-+    "glDeleteTextures\0"
-+    "glGenTextures\0"
-+    "glGetPointerv\0"
-+    "glIsTexture\0"
-+    "glPrioritizeTextures\0"
-+    "glTexSubImage1D\0"
-+    "glTexSubImage2D\0"
-+    "glPopClientAttrib\0"
-+    "glPushClientAttrib\0"
-+    "glBlendColor\0"
-+    "glBlendEquation\0"
-+    "glDrawRangeElements\0"
-+    "glColorTable\0"
-+    "glColorTableParameterfv\0"
-+    "glColorTableParameteriv\0"
-+    "glCopyColorTable\0"
-+    "glGetColorTable\0"
-+    "glGetColorTableParameterfv\0"
-+    "glGetColorTableParameteriv\0"
-+    "glColorSubTable\0"
-+    "glCopyColorSubTable\0"
-+    "glConvolutionFilter1D\0"
-+    "glConvolutionFilter2D\0"
-+    "glConvolutionParameterf\0"
-+    "glConvolutionParameterfv\0"
-+    "glConvolutionParameteri\0"
-+    "glConvolutionParameteriv\0"
-+    "glCopyConvolutionFilter1D\0"
-+    "glCopyConvolutionFilter2D\0"
-+    "glGetConvolutionFilter\0"
-+    "glGetConvolutionParameterfv\0"
-+    "glGetConvolutionParameteriv\0"
-+    "glGetSeparableFilter\0"
-+    "glSeparableFilter2D\0"
-+    "glGetHistogram\0"
-+    "glGetHistogramParameterfv\0"
-+    "glGetHistogramParameteriv\0"
-+    "glGetMinmax\0"
-+    "glGetMinmaxParameterfv\0"
-+    "glGetMinmaxParameteriv\0"
-+    "glHistogram\0"
-+    "glMinmax\0"
-+    "glResetHistogram\0"
-+    "glResetMinmax\0"
-+    "glTexImage3D\0"
-+    "glTexSubImage3D\0"
-+    "glCopyTexSubImage3D\0"
-+    "glActiveTextureARB\0"
-+    "glClientActiveTextureARB\0"
-+    "glMultiTexCoord1dARB\0"
-+    "glMultiTexCoord1dvARB\0"
-+    "glMultiTexCoord1fARB\0"
-+    "glMultiTexCoord1fvARB\0"
-+    "glMultiTexCoord1iARB\0"
-+    "glMultiTexCoord1ivARB\0"
-+    "glMultiTexCoord1sARB\0"
-+    "glMultiTexCoord1svARB\0"
-+    "glMultiTexCoord2dARB\0"
-+    "glMultiTexCoord2dvARB\0"
-+    "glMultiTexCoord2fARB\0"
-+    "glMultiTexCoord2fvARB\0"
-+    "glMultiTexCoord2iARB\0"
-+    "glMultiTexCoord2ivARB\0"
-+    "glMultiTexCoord2sARB\0"
-+    "glMultiTexCoord2svARB\0"
-+    "glMultiTexCoord3dARB\0"
-+    "glMultiTexCoord3dvARB\0"
-+    "glMultiTexCoord3fARB\0"
-+    "glMultiTexCoord3fvARB\0"
-+    "glMultiTexCoord3iARB\0"
-+    "glMultiTexCoord3ivARB\0"
-+    "glMultiTexCoord3sARB\0"
-+    "glMultiTexCoord3svARB\0"
-+    "glMultiTexCoord4dARB\0"
-+    "glMultiTexCoord4dvARB\0"
-+    "glMultiTexCoord4fARB\0"
-+    "glMultiTexCoord4fvARB\0"
-+    "glMultiTexCoord4iARB\0"
-+    "glMultiTexCoord4ivARB\0"
-+    "glMultiTexCoord4sARB\0"
-+    "glMultiTexCoord4svARB\0"
-+    "glLoadTransposeMatrixfARB\0"
-+    "glLoadTransposeMatrixdARB\0"
-+    "glMultTransposeMatrixfARB\0"
-+    "glMultTransposeMatrixdARB\0"
-+    "glSampleCoverageARB\0"
-+    "gl__unused413\0"
-+    "glPolygonOffsetEXT\0"
-+    "glGetTexFilterFuncSGIS\0"
-+    "glTexFilterFuncSGIS\0"
-+    "glGetHistogramEXT\0"
-+    "glGetHistogramParameterfvEXT\0"
-+    "glGetHistogramParameterivEXT\0"
-+    "glGetMinmaxEXT\0"
-+    "glGetMinmaxParameterfvEXT\0"
-+    "glGetMinmaxParameterivEXT\0"
-+    "glGetConvolutionFilterEXT\0"
-+    "glGetConvolutionParameterfvEXT\0"
-+    "glGetConvolutionParameterivEXT\0"
-+    "glGetSeparableFilterEXT\0"
-+    "glGetColorTableSGI\0"
-+    "glGetColorTableParameterfvSGI\0"
-+    "glGetColorTableParameterivSGI\0"
-+    "glPixelTexGenSGIX\0"
-+    "glPixelTexGenParameteriSGIS\0"
-+    "glPixelTexGenParameterivSGIS\0"
-+    "glPixelTexGenParameterfSGIS\0"
-+    "glPixelTexGenParameterfvSGIS\0"
-+    "glGetPixelTexGenParameterivSGIS\0"
-+    "glGetPixelTexGenParameterfvSGIS\0"
-+    "glTexImage4DSGIS\0"
-+    "glTexSubImage4DSGIS\0"
-+    "glAreTexturesResidentEXT\0"
-+    "glGenTexturesEXT\0"
-+    "glIsTextureEXT\0"
-+    "glDetailTexFuncSGIS\0"
-+    "glGetDetailTexFuncSGIS\0"
-+    "glSharpenTexFuncSGIS\0"
-+    "glGetSharpenTexFuncSGIS\0"
-+    "glSampleMaskSGIS\0"
-+    "glSamplePatternSGIS\0"
-+    "glColorPointerEXT\0"
-+    "glEdgeFlagPointerEXT\0"
-+    "glIndexPointerEXT\0"
-+    "glNormalPointerEXT\0"
-+    "glTexCoordPointerEXT\0"
-+    "glVertexPointerEXT\0"
-+    "glSpriteParameterfSGIX\0"
-+    "glSpriteParameterfvSGIX\0"
-+    "glSpriteParameteriSGIX\0"
-+    "glSpriteParameterivSGIX\0"
-+    "glPointParameterfEXT\0"
-+    "glPointParameterfvEXT\0"
-+    "glGetInstrumentsSGIX\0"
-+    "glInstrumentsBufferSGIX\0"
-+    "glPollInstrumentsSGIX\0"
-+    "glReadInstrumentsSGIX\0"
-+    "glStartInstrumentsSGIX\0"
-+    "glStopInstrumentsSGIX\0"
-+    "glFrameZoomSGIX\0"
-+    "glTagSampleBufferSGIX\0"
-+    "glReferencePlaneSGIX\0"
-+    "glFlushRasterSGIX\0"
-+    "glGetListParameterfvSGIX\0"
-+    "glGetListParameterivSGIX\0"
-+    "glListParameterfSGIX\0"
-+    "glListParameterfvSGIX\0"
-+    "glListParameteriSGIX\0"
-+    "glListParameterivSGIX\0"
-+    "glFragmentColorMaterialSGIX\0"
-+    "glFragmentLightfSGIX\0"
-+    "glFragmentLightfvSGIX\0"
-+    "glFragmentLightiSGIX\0"
-+    "glFragmentLightivSGIX\0"
-+    "glFragmentLightModelfSGIX\0"
-+    "glFragmentLightModelfvSGIX\0"
-+    "glFragmentLightModeliSGIX\0"
-+    "glFragmentLightModelivSGIX\0"
-+    "glFragmentMaterialfSGIX\0"
-+    "glFragmentMaterialfvSGIX\0"
-+    "glFragmentMaterialiSGIX\0"
-+    "glFragmentMaterialivSGIX\0"
-+    "glGetFragmentLightfvSGIX\0"
-+    "glGetFragmentLightivSGIX\0"
-+    "glGetFragmentMaterialfvSGIX\0"
-+    "glGetFragmentMaterialivSGIX\0"
-+    "glLightEnviSGIX\0"
-+    "glVertexWeightfEXT\0"
-+    "glVertexWeightfvEXT\0"
-+    "glVertexWeightPointerEXT\0"
-+    "glFlushVertexArrayRangeNV\0"
-+    "glVertexArrayRangeNV\0"
-+    "glCombinerParameterfvNV\0"
-+    "glCombinerParameterfNV\0"
-+    "glCombinerParameterivNV\0"
-+    "glCombinerParameteriNV\0"
-+    "glCombinerInputNV\0"
-+    "glCombinerOutputNV\0"
-+    "glFinalCombinerInputNV\0"
-+    "glGetCombinerInputParameterfvNV\0"
-+    "glGetCombinerInputParameterivNV\0"
-+    "glGetCombinerOutputParameterfvNV\0"
-+    "glGetCombinerOutputParameterivNV\0"
-+    "glGetFinalCombinerInputParameterfvNV\0"
-+    "glGetFinalCombinerInputParameterivNV\0"
-+    "glResizeBuffersMESA\0"
-+    "glWindowPos2dMESA\0"
-+    "glWindowPos2dvMESA\0"
-+    "glWindowPos2fMESA\0"
-+    "glWindowPos2fvMESA\0"
-+    "glWindowPos2iMESA\0"
-+    "glWindowPos2ivMESA\0"
-+    "glWindowPos2sMESA\0"
-+    "glWindowPos2svMESA\0"
-+    "glWindowPos3dMESA\0"
-+    "glWindowPos3dvMESA\0"
-+    "glWindowPos3fMESA\0"
-+    "glWindowPos3fvMESA\0"
-+    "glWindowPos3iMESA\0"
-+    "glWindowPos3ivMESA\0"
-+    "glWindowPos3sMESA\0"
-+    "glWindowPos3svMESA\0"
-+    "glWindowPos4dMESA\0"
-+    "glWindowPos4dvMESA\0"
-+    "glWindowPos4fMESA\0"
-+    "glWindowPos4fvMESA\0"
-+    "glWindowPos4iMESA\0"
-+    "glWindowPos4ivMESA\0"
-+    "glWindowPos4sMESA\0"
-+    "glWindowPos4svMESA\0"
-+    "glBlendFuncSeparateEXT\0"
-+    "glIndexMaterialEXT\0"
-+    "glIndexFuncEXT\0"
-+    "glLockArraysEXT\0"
-+    "glUnlockArraysEXT\0"
-+    "glCullParameterdvEXT\0"
-+    "glCullParameterfvEXT\0"
-+    "glHintPGI\0"
-+    "glFogCoordfEXT\0"
-+    "glFogCoordfvEXT\0"
-+    "glFogCoorddEXT\0"
-+    "glFogCoorddvEXT\0"
-+    "glFogCoordPointerEXT\0"
-+    "glGetColorTableEXT\0"
-+    "glGetColorTableParameterivEXT\0"
-+    "glGetColorTableParameterfvEXT\0"
-+    "glTbufferMask3DFX\0"
-+    "glCompressedTexImage3DARB\0"
-+    "glCompressedTexImage2DARB\0"
-+    "glCompressedTexImage1DARB\0"
-+    "glCompressedTexSubImage3DARB\0"
-+    "glCompressedTexSubImage2DARB\0"
-+    "glCompressedTexSubImage1DARB\0"
-+    "glGetCompressedTexImageARB\0"
-+    "glSecondaryColor3bEXT\0"
-+    "glSecondaryColor3bvEXT\0"
-+    "glSecondaryColor3dEXT\0"
-+    "glSecondaryColor3dvEXT\0"
-+    "glSecondaryColor3fEXT\0"
-+    "glSecondaryColor3fvEXT\0"
-+    "glSecondaryColor3iEXT\0"
-+    "glSecondaryColor3ivEXT\0"
-+    "glSecondaryColor3sEXT\0"
-+    "glSecondaryColor3svEXT\0"
-+    "glSecondaryColor3ubEXT\0"
-+    "glSecondaryColor3ubvEXT\0"
-+    "glSecondaryColor3uiEXT\0"
-+    "glSecondaryColor3uivEXT\0"
-+    "glSecondaryColor3usEXT\0"
-+    "glSecondaryColor3usvEXT\0"
-+    "glSecondaryColorPointerEXT\0"
-+    "glAreProgramsResidentNV\0"
-+    "glBindProgramNV\0"
-+    "glDeleteProgramsNV\0"
-+    "glExecuteProgramNV\0"
-+    "glGenProgramsNV\0"
-+    "glGetProgramParameterdvNV\0"
-+    "glGetProgramParameterfvNV\0"
-+    "glGetProgramivNV\0"
-+    "glGetProgramStringNV\0"
-+    "glGetTrackMatrixivNV\0"
-+    "glGetVertexAttribdvNV\0"
-+    "glGetVertexAttribfvNV\0"
-+    "glGetVertexAttribivNV\0"
-+    "glGetVertexAttribPointervNV\0"
-+    "glIsProgramNV\0"
-+    "glLoadProgramNV\0"
-+    "glProgramParameter4dNV\0"
-+    "glProgramParameter4dvNV\0"
-+    "glProgramParameter4fNV\0"
-+    "glProgramParameter4fvNV\0"
-+    "glProgramParameters4dvNV\0"
-+    "glProgramParameters4fvNV\0"
-+    "glRequestResidentProgramsNV\0"
-+    "glTrackMatrixNV\0"
-+    "glVertexAttribPointerNV\0"
-+    "glVertexAttrib1dNV\0"
-+    "glVertexAttrib1dvNV\0"
-+    "glVertexAttrib1fNV\0"
-+    "glVertexAttrib1fvNV\0"
-+    "glVertexAttrib1sNV\0"
-+    "glVertexAttrib1svNV\0"
-+    "glVertexAttrib2dNV\0"
-+    "glVertexAttrib2dvNV\0"
-+    "glVertexAttrib2fNV\0"
-+    "glVertexAttrib2fvNV\0"
-+    "glVertexAttrib2sNV\0"
-+    "glVertexAttrib2svNV\0"
-+    "glVertexAttrib3dNV\0"
-+    "glVertexAttrib3dvNV\0"
-+    "glVertexAttrib3fNV\0"
-+    "glVertexAttrib3fvNV\0"
-+    "glVertexAttrib3sNV\0"
-+    "glVertexAttrib3svNV\0"
-+    "glVertexAttrib4dNV\0"
-+    "glVertexAttrib4dvNV\0"
-+    "glVertexAttrib4fNV\0"
-+    "glVertexAttrib4fvNV\0"
-+    "glVertexAttrib4sNV\0"
-+    "glVertexAttrib4svNV\0"
-+    "glVertexAttrib4ubNV\0"
-+    "glVertexAttrib4ubvNV\0"
-+    "glVertexAttribs1dvNV\0"
-+    "glVertexAttribs1fvNV\0"
-+    "glVertexAttribs1svNV\0"
-+    "glVertexAttribs2dvNV\0"
-+    "glVertexAttribs2fvNV\0"
-+    "glVertexAttribs2svNV\0"
-+    "glVertexAttribs3dvNV\0"
-+    "glVertexAttribs3fvNV\0"
-+    "glVertexAttribs3svNV\0"
-+    "glVertexAttribs4dvNV\0"
-+    "glVertexAttribs4fvNV\0"
-+    "glVertexAttribs4svNV\0"
-+    "glVertexAttribs4ubvNV\0"
-+    "glPointParameteriNV\0"
-+    "glPointParameterivNV\0"
-+    "glMultiDrawArraysEXT\0"
-+    "glMultiDrawElementsEXT\0"
-+    "glActiveStencilFaceEXT\0"
-+    "glDeleteFencesNV\0"
-+    "glGenFencesNV\0"
-+    "glIsFenceNV\0"
-+    "glTestFenceNV\0"
-+    "glGetFenceivNV\0"
-+    "glFinishFenceNV\0"
-+    "glSetFenceNV\0"
-+    "glVertexAttrib4bvARB\0"
-+    "glVertexAttrib4ivARB\0"
-+    "glVertexAttrib4ubvARB\0"
-+    "glVertexAttrib4usvARB\0"
-+    "glVertexAttrib4uivARB\0"
-+    "glVertexAttrib4NbvARB\0"
-+    "glVertexAttrib4NsvARB\0"
-+    "glVertexAttrib4NivARB\0"
-+    "glVertexAttrib4NusvARB\0"
-+    "glVertexAttrib4NuivARB\0"
-+    "glVertexAttribPointerARB\0"
-+    "glEnableVertexAttribArrayARB\0"
-+    "glDisableVertexAttribArrayARB\0"
-+    "glProgramStringARB\0"
-+    "glProgramEnvParameter4dARB\0"
-+    "glProgramEnvParameter4dvARB\0"
-+    "glProgramEnvParameter4fARB\0"
-+    "glProgramEnvParameter4fvARB\0"
-+    "glProgramLocalParameter4dARB\0"
-+    "glProgramLocalParameter4dvARB\0"
-+    "glProgramLocalParameter4fARB\0"
-+    "glProgramLocalParameter4fvARB\0"
-+    "glGetProgramEnvParameterdvARB\0"
-+    "glGetProgramEnvParameterfvARB\0"
-+    "glGetProgramLocalParameterdvARB\0"
-+    "glGetProgramLocalParameterfvARB\0"
-+    "glGetProgramivARB\0"
-+    "glGetProgramStringARB\0"
-+    "glProgramNamedParameter4fNV\0"
-+    "glProgramNamedParameter4dNV\0"
-+    "glProgramNamedParameter4fvNV\0"
-+    "glProgramNamedParameter4dvNV\0"
-+    "glGetProgramNamedParameterfvNV\0"
-+    "glGetProgramNamedParameterdvNV\0"
-+    "glBindBufferARB\0"
-+    "glBufferDataARB\0"
-+    "glBufferSubDataARB\0"
-+    "glDeleteBuffersARB\0"
-+    "glGenBuffersARB\0"
-+    "glGetBufferParameterivARB\0"
-+    "glGetBufferPointervARB\0"
-+    "glGetBufferSubDataARB\0"
-+    "glIsBufferARB\0"
-+    "glMapBufferARB\0"
-+    "glUnmapBufferARB\0"
-+    "glDepthBoundsEXT\0"
-+    "glGenQueriesARB\0"
-+    "glDeleteQueriesARB\0"
-+    "glIsQueryARB\0"
-+    "glBeginQueryARB\0"
-+    "glEndQueryARB\0"
-+    "glGetQueryivARB\0"
-+    "glGetQueryObjectivARB\0"
-+    "glGetQueryObjectuivARB\0"
-+    "glMultiModeDrawArraysIBM\0"
-+    "glMultiModeDrawElementsIBM\0"
-+    "glBlendEquationSeparateEXT\0"
-+    "glActiveTexture\0"
-+    "glClientActiveTexture\0"
-+    "glMultiTexCoord1d\0"
-+    "glMultiTexCoord1dv\0"
-+    "glMultiTexCoord1f\0"
-+    "glMultiTexCoord1fv\0"
-+    "glMultiTexCoord1i\0"
-+    "glMultiTexCoord1iv\0"
-+    "glMultiTexCoord1s\0"
-+    "glMultiTexCoord1sv\0"
-+    "glMultiTexCoord2d\0"
-+    "glMultiTexCoord2dv\0"
-+    "glMultiTexCoord2f\0"
-+    "glMultiTexCoord2fv\0"
-+    "glMultiTexCoord2i\0"
-+    "glMultiTexCoord2iv\0"
-+    "glMultiTexCoord2s\0"
-+    "glMultiTexCoord2sv\0"
-+    "glMultiTexCoord3d\0"
-+    "glMultiTexCoord3dv\0"
-+    "glMultiTexCoord3f\0"
-+    "glMultiTexCoord3fv\0"
-+    "glMultiTexCoord3i\0"
-+    "glMultiTexCoord3iv\0"
-+    "glMultiTexCoord3s\0"
-+    "glMultiTexCoord3sv\0"
-+    "glMultiTexCoord4d\0"
-+    "glMultiTexCoord4dv\0"
-+    "glMultiTexCoord4f\0"
-+    "glMultiTexCoord4fv\0"
-+    "glMultiTexCoord4i\0"
-+    "glMultiTexCoord4iv\0"
-+    "glMultiTexCoord4s\0"
-+    "glMultiTexCoord4sv\0"
-+    "glLoadTransposeMatrixf\0"
-+    "glLoadTransposeMatrixd\0"
-+    "glMultTransposeMatrixf\0"
-+    "glMultTransposeMatrixd\0"
-+    "glSampleCoverage\0"
-+    "glCompressedTexImage3D\0"
-+    "glCompressedTexImage2D\0"
-+    "glCompressedTexImage1D\0"
-+    "glCompressedTexSubImage3D\0"
-+    "glCompressedTexSubImage2D\0"
-+    "glCompressedTexSubImage1D\0"
-+    "glGetCompressedTexImage\0"
-+    "glBlendFuncSeparate\0"
-+    "glFogCoordf\0"
-+    "glFogCoordfv\0"
-+    "glFogCoordd\0"
-+    "glFogCoorddv\0"
-+    "glFogCoordPointer\0"
-+    "glMultiDrawArrays\0"
-+    "glMultiDrawElements\0"
-+    "glPointParameterf\0"
-+    "glPointParameterfv\0"
-+    "glPointParameteri\0"
-+    "glPointParameteriv\0"
-+    "glSecondaryColor3b\0"
-+    "glSecondaryColor3bv\0"
-+    "glSecondaryColor3d\0"
-+    "glSecondaryColor3dv\0"
-+    "glSecondaryColor3f\0"
-+    "glSecondaryColor3fv\0"
-+    "glSecondaryColor3i\0"
-+    "glSecondaryColor3iv\0"
-+    "glSecondaryColor3s\0"
-+    "glSecondaryColor3sv\0"
-+    "glSecondaryColor3ub\0"
-+    "glSecondaryColor3ubv\0"
-+    "glSecondaryColor3ui\0"
-+    "glSecondaryColor3uiv\0"
-+    "glSecondaryColor3us\0"
-+    "glSecondaryColor3usv\0"
-+    "glSecondaryColorPointer\0"
-+    "glWindowPos2d\0"
-+    "glWindowPos2dv\0"
-+    "glWindowPos2f\0"
-+    "glWindowPos2fv\0"
-+    "glWindowPos2i\0"
-+    "glWindowPos2iv\0"
-+    "glWindowPos2s\0"
-+    "glWindowPos2sv\0"
-+    "glWindowPos3d\0"
-+    "glWindowPos3dv\0"
-+    "glWindowPos3f\0"
-+    "glWindowPos3fv\0"
-+    "glWindowPos3i\0"
-+    "glWindowPos3iv\0"
-+    "glWindowPos3s\0"
-+    "glWindowPos3sv\0"
-+    "glBindBuffer\0"
-+    "glBufferData\0"
-+    "glBufferSubData\0"
-+    "glDeleteBuffers\0"
-+    "glGenBuffers\0"
-+    "glGetBufferParameteriv\0"
-+    "glGetBufferPointerv\0"
-+    "glGetBufferSubData\0"
-+    "glIsBuffer\0"
-+    "glMapBuffer\0"
-+    "glUnmapBuffer\0"
-+    "glGenQueries\0"
-+    "glDeleteQueries\0"
-+    "glIsQuery\0"
-+    "glBeginQuery\0"
-+    "glEndQuery\0"
-+    "glGetQueryiv\0"
-+    "glGetQueryObjectiv\0"
-+    "glGetQueryObjectuiv\0"
-+    "glPointParameterfARB\0"
-+    "glPointParameterfvARB\0"
-+    "glWindowPos2dARB\0"
-+    "glWindowPos2fARB\0"
-+    "glWindowPos2iARB\0"
-+    "glWindowPos2sARB\0"
-+    "glWindowPos2dvARB\0"
-+    "glWindowPos2fvARB\0"
-+    "glWindowPos2ivARB\0"
-+    "glWindowPos2svARB\0"
-+    "glWindowPos3dARB\0"
-+    "glWindowPos3fARB\0"
-+    "glWindowPos3iARB\0"
-+    "glWindowPos3sARB\0"
-+    "glWindowPos3dvARB\0"
-+    "glWindowPos3fvARB\0"
-+    "glWindowPos3ivARB\0"
-+    "glWindowPos3svARB\0"
-+    "glVertexAttrib1sARB\0"
-+    "glVertexAttrib1fARB\0"
-+    "glVertexAttrib1dARB\0"
-+    "glVertexAttrib2sARB\0"
-+    "glVertexAttrib2fARB\0"
-+    "glVertexAttrib2dARB\0"
-+    "glVertexAttrib3sARB\0"
-+    "glVertexAttrib3fARB\0"
-+    "glVertexAttrib3dARB\0"
-+    "glVertexAttrib4sARB\0"
-+    "glVertexAttrib4fARB\0"
-+    "glVertexAttrib4dARB\0"
-+    "glVertexAttrib4NubARB\0"
-+    "glVertexAttrib1svARB\0"
-+    "glVertexAttrib1fvARB\0"
-+    "glVertexAttrib1dvARB\0"
-+    "glVertexAttrib2svARB\0"
-+    "glVertexAttrib2fvARB\0"
-+    "glVertexAttrib2dvARB\0"
-+    "glVertexAttrib3svARB\0"
-+    "glVertexAttrib3fvARB\0"
-+    "glVertexAttrib3dvARB\0"
-+    "glVertexAttrib4svARB\0"
-+    "glVertexAttrib4fvARB\0"
-+    "glVertexAttrib4dvARB\0"
-+    "glVertexAttrib4NubvARB\0"
-+    "glBindProgramARB\0"
-+    "glDeleteProgramsARB\0"
-+    "glGenProgramsARB\0"
-+    "glIsProgramARB\0"
-+    "glGetVertexAttribdvARB\0"
-+    "glGetVertexAttribfvARB\0"
-+    "glGetVertexAttribivARB\0"
-+    "glGetVertexAttribPointervARB\0"
-+    "glBlendColorEXT\0"
-+    "glTexImage3DEXT\0"
-+    "glTexSubImage3DEXT\0"
-+    "glTexSubImage1DEXT\0"
-+    "glTexSubImage2DEXT\0"
-+    "glCopyTexImage1DEXT\0"
-+    "glCopyTexImage2DEXT\0"
-+    "glCopyTexSubImage1DEXT\0"
-+    "glCopyTexSubImage2DEXT\0"
-+    "glCopyTexSubImage3DEXT\0"
-+    "glHistogramEXT\0"
-+    "glMinmaxEXT\0"
-+    "glResetHistogramEXT\0"
-+    "glResetMinmaxEXT\0"
-+    "glConvolutionFilter1DEXT\0"
-+    "glConvolutionFilter2DEXT\0"
-+    "glConvolutionParameterfEXT\0"
-+    "glConvolutionParameterfvEXT\0"
-+    "glConvolutionParameteriEXT\0"
-+    "glConvolutionParameterivEXT\0"
-+    "glCopyConvolutionFilter1DEXT\0"
-+    "glCopyConvolutionFilter2DEXT\0"
-+    "glSeparableFilter2DEXT\0"
-+    "glColorTableSGI\0"
-+    "glColorTableParameterfvSGI\0"
-+    "glColorTableParameterivSGI\0"
-+    "glCopyColorTableSGI\0"
-+    "glBindTextureEXT\0"
-+    "glDeleteTexturesEXT\0"
-+    "glPrioritizeTexturesEXT\0"
-+    "glArrayElementEXT\0"
-+    "glDrawArraysEXT\0"
-+    "glGetPointervEXT\0"
-+    "glBlendEquationEXT\0"
-+    "glColorSubTableEXT\0"
-+    "glCopyColorSubTableEXT\0"
-+    "glColorTableEXT\0"
-+    "glDrawRangeElementsEXT\0"
-+    "glSampleMaskEXT\0"
-+    "glSamplePatternEXT\0"
-+    "glBlendEquationSeparateATI\0"
-+    "glBlendFuncSeparateINGR\0"
-+    "glPointParameterfSGIS\0"
-+    "glPointParameterfvSGIS\0"
-+    ;
- static const glprocs_table_t static_functions[] = {
-     NAME_FUNC_OFFSET(     0, glNewList, _gloffset_NewList ),
-@@ -1883,7 +1883,7 @@
-     NAME_FUNC_OFFSET( 16324, glBlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT ),
-     NAME_FUNC_OFFSET( 16348, glPointParameterfSGIS, _gloffset_PointParameterfEXT ),
-     NAME_FUNC_OFFSET( 16370, glPointParameterfvSGIS, _gloffset_PointParameterfvEXT ),
--    NAME_FUNC_OFFSET( -1, NULL, -1 )
-+    NAME_FUNC_OFFSET( -1, NULL, 0 )
- };
- #undef NAME_FUNC_OFFSET
-Index: extras/Mesa/src/mesa/glapi/glsparcasm.py
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glsparcasm.py,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/glapi/glsparcasm.py   16 Jun 2004 09:19:06 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/glapi/glsparcasm.py   15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -109,7 +109,7 @@
-       print '.globl gl%s' % (name)
-       print '.type gl%s,#function' % (name)
-       print 'gl%s:' % (name)
--      print '#if defined(__sparc_v9__) && !defined(__linux__)'
-+      print '#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))'
-       print '\tsethi\t%hi(0x00000000), %g2'
-       print '\tsethi\t%hi(0x00000000), %g1'
-       print '\tor\t%g2, %lo(0x00000000), %g2'
-Index: extras/Mesa/src/mesa/glapi/glthread.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/glapi/glthread.h,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/glapi/glthread.h      28 Aug 2004 04:27:56 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/glapi/glthread.h      15 Dec 2004 01:51:02 -0000      1.1.1.3.2.1
-@@ -1,9 +1,8 @@
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  3.5
-+ * Version:  6.2.1
-  *
-- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -194,7 +193,7 @@
-  * We wrap it again for GL.
-  */
- #ifdef XTHREADS
--#include "Xthreads.h"
-+#include <X11/Xthreads.h>
- typedef struct {
-    xthread_key_t key;
-Index: extras/Mesa/src/mesa/main/Makefile.BeOS-R5
-===================================================================
-RCS file: extras/Mesa/src/mesa/main/Makefile.BeOS-R5
-diff -N extras/Mesa/src/mesa/main/Makefile.BeOS-R5
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ extras/Mesa/src/mesa/main/Makefile.BeOS-R5 15 Dec 2004 01:51:02 -0000      1.2.2.1
-@@ -0,0 +1,453 @@
-+# Mesa 3-D graphics library
-+# Version:  5.1
-+# 
-+# Copyright (C) 1995-2003  Brian Paul   All Rights Reserved.
-+# 
-+# Permission is hereby granted, free of charge, to any person obtaining a
-+# copy of this software and associated documentation files (the "Software"),
-+# to deal in the Software without restriction, including without limitation
-+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+# and/or sell copies of the Software, and to permit persons to whom the
-+# Software is furnished to do so, subject to the following conditions:
-+# 
-+# The above copyright notice and this permission notice shall be included
-+# in all copies or substantial portions of the Software.
-+# 
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-+# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+#
-+# BeOS driver makefile v1.0 for Mesa 4.1
-+#
-+#  Copyright (C) 2002 - Philippe Houdoin
-+#  Email : philippe.houdoin@free.fr
-+#  Web   : http://philippe.houdoin.free.fr/phil/beos/index-en.html
-+#
-+# -------------------------------------------------------------------
-+
-+## BeOS Generic Makefile v2.0 ##
-+
-+## Fill in this file to specify the project being created, and the referenced
-+## makefile-engine will do all of the hard work for you.  This handles both
-+## Intel and PowerPC builds of the BeOS.
-+
-+## Application Specific Settings ---------------------------------------------
-+
-+# specify the name of the binary
-+NAME= libGL.so
-+
-+# specify the type of binary
-+#     APP:    Application
-+#     SHARED: Shared library or add-on
-+#     STATIC: Static library archive
-+#     DRIVER: Kernel Driver
-+TYPE= SHARED
-+
-+#     specify the source files to use
-+#     full paths or paths relative to the makefile can be included
-+#     all files, regardless of directory, will have their object
-+#     files created in the common object directory.
-+#     Note that this means this makefile will not work correctly
-+#     if two source files with the same name (source.c or source.cpp)
-+#     are included from different directories.  Also note that spaces
-+#     in folder names do not work well with this makefile.
-+
-+MESA_CORE_SRCS = \
-+      api_arrayelt.c \
-+      api_loopback.c \
-+      api_noop.c \
-+      api_validate.c \
-+      accum.c \
-+      arbprogram.c \
-+      attrib.c \
-+      blend.c \
-+      bufferobj.c \
-+      buffers.c \
-+      clip.c \
-+      colortab.c \
-+      context.c \
-+      convolve.c \
-+      debug.c \
-+      depth.c \
-+      dispatch.c \
-+      dlist.c \
-+      drawpix.c \
-+      enable.c \
-+      enums.c \
-+      eval.c \
-+      extensions.c \
-+      feedback.c \
-+      fog.c \
-+      get.c \
-+      glapi.c \
-+      glthread.c \
-+      hash.c \
-+      hint.c \
-+      histogram.c \
-+      image.c \
-+      imports.c \
-+      light.c \
-+      lines.c \
-+      matrix.c \
-+      pixel.c \
-+      points.c \
-+      polygon.c \
-+      rastpos.c \
-+      state.c \
-+      stencil.c \
-+      texcompress.c \
-+      texcompress_fxt1.c \
-+      texcompress_s3tc.c \
-+      texformat.c \
-+      teximage.c \
-+      texobj.c \
-+      texstate.c \
-+      texstore.c \
-+      varray.c \
-+      vpexec.c \
-+      vpparse.c \
-+      vpstate.c \
-+      vtxfmt.c \
-+      math/m_debug_clip.c \
-+      math/m_debug_norm.c \
-+      math/m_debug_xform.c \
-+      math/m_eval.c \
-+      math/m_matrix.c \
-+      math/m_translate.c \
-+      math/m_vector.c \
-+      math/m_xform.c \
-+      array_cache/ac_context.c \
-+      array_cache/ac_import.c \
-+      swrast/s_aaline.c \
-+      swrast/s_aatriangle.c \
-+      swrast/s_accum.c \
-+      swrast/s_alpha.c \
-+      swrast/s_alphabuf.c \
-+      swrast/s_bitmap.c \
-+      swrast/s_blend.c \
-+      swrast/s_buffers.c \
-+      swrast/s_copypix.c \
-+      swrast/s_context.c \
-+      swrast/s_depth.c \
-+      swrast/s_drawpix.c \
-+      swrast/s_feedback.c \
-+      swrast/s_fog.c \
-+      swrast/s_imaging.c \
-+      swrast/s_lines.c \
-+      swrast/s_logic.c \
-+      swrast/s_masking.c \
-+      swrast/s_pixeltex.c \
-+      swrast/s_points.c \
-+      swrast/s_readpix.c \
-+      swrast/s_span.c \
-+      swrast/s_stencil.c \
-+      swrast/s_texture.c \
-+      swrast/s_texstore.c \
-+      swrast/s_triangle.c \
-+      swrast/s_zoom.c \
-+      swrast_setup/ss_context.c \
-+      swrast_setup/ss_triangle.c \
-+      swrast_setup/ss_vb.c \
-+      tnl/t_array_api.c \
-+      tnl/t_array_import.c \
-+      tnl/t_context.c \
-+      tnl/t_eval_api.c \
-+      tnl/t_imm_alloc.c \
-+      tnl/t_imm_api.c \
-+      tnl/t_imm_debug.c \
-+      tnl/t_imm_dlist.c \
-+      tnl/t_imm_elt.c \
-+      tnl/t_imm_eval.c \
-+      tnl/t_imm_exec.c \
-+      tnl/t_imm_fixup.c \
-+      tnl/t_pipeline.c \
-+      tnl/t_vb_fog.c \
-+      tnl/t_vb_light.c \
-+      tnl/t_vb_normals.c \
-+      tnl/t_vb_points.c \
-+      tnl/t_vb_program.c \
-+      tnl/t_vb_render.c \
-+      tnl/t_vb_texgen.c \
-+      tnl/t_vb_texmat.c \
-+      tnl/t_vb_vertex.c
-+      
-+MESA_BEOS_DRIVER_SRCS = \
-+      BeOS/GLView.cpp
-+      
-+MESA_X86_SRCS = \
-+      X86/x86.c \
-+      X86/glapi_x86.S \
-+      X86/common_x86.c \
-+      X86/common_x86_asm.S \
-+      X86/x86_xform2.S \
-+      X86/x86_xform3.S \
-+      X86/x86_xform4.S \
-+      X86/x86_cliptest.S
-+
-+MESA_MMX_SRCS = \
-+      X86/mmx_blend.S
-+
-+MESA_SSE_SRCS = \
-+      X86/sse.c \
-+      X86/sse_xform2.S \
-+      X86/sse_xform3.S \
-+      X86/sse_xform4.S \
-+      X86/sse_normal.S
-+
-+MESA_3DNOW_SRCS = \
-+      X86/3dnow.c \
-+      X86/3dnow_normal.S \
-+      X86/3dnow_xform1.S \
-+      X86/3dnow_xform2.S \
-+      X86/3dnow_xform3.S \
-+      X86/3dnow_xform4.S
-+
-+MESA_DEFINES =
-+# To use GAS assembler, uncomment this line instead:
-+MESA_DEFINES += GNU_ASSEMBLER
-+# To use NASM assembler, uncomment this line instead:
-+# MESA_DEFINES += NASM_ASSEMBLER
-+# To build a DEBUG version of Mesa, uncomment this line instead:
-+# MESA_DEFINES += DEBUG
-+
-+# x86-optimized code
-+MACHINE=$(shell uname -m)
-+ifeq ($(MACHINE), BePC)
-+      HAVE_MMX = 1
-+      HAVE_SSE = 1
-+      HAVE_3DNOW = 1
-+else
-+      # No assembly optimization for PowerPC...
-+      # HAVE_ALTIVEC=1
-+endif
-+
-+ifdef HAVE_MMX
-+      MESA_X86_SRCS += $(MESA_MMX_SRCS)
-+      MESA_DEFINES += USE_MMX_ASM
-+      HAVE_X86 = 1
-+endif
-+ifdef HAVE_SSE
-+      MESA_X86_SRCS += $(MESA_SSE_SRCS)
-+      MESA_DEFINES += USE_SSE_ASM
-+      HAVE_X86 = 1
-+endif
-+ifdef HAVE_3DNOW
-+      MESA_X86_SRCS += $(MESA_3DNOW_SRCS)
-+      MESA_DEFINES += USE_3DNOW_ASM
-+      HAVE_X86 = 1
-+endif
-+ifdef HAVE_X86
-+      MESA_DEFINES += USE_X86_ASM
-+else
-+      MESA_X86_SRCS =
-+endif
-+
-+# FIXME: SI-GLU version support currently broken
-+# USE_SI_GLU=1
-+ifdef USE_SI_GLU
-+      GLU_SRCS = \
-+      ../si-glu/libutil/error.c               \
-+      ../si-glu/libutil/glue.c                \
-+      ../si-glu/libutil/mipmap.c      \
-+      ../si-glu/libutil/project.c     \
-+      ../si-glu/libutil/quad.c                \
-+      ../si-glu/libutil/registry.c    \
-+      ../si-glu/libtess/dict.c                \
-+      ../si-glu/libtess/geom.c                \
-+      ../si-glu/libtess/memalloc.c    \
-+      ../si-glu/libtess/mesh.c                \
-+      ../si-glu/libtess/normal.c      \
-+      ../si-glu/libtess/priorityq.c   \
-+      ../si-glu/libtess/render.c      \
-+      ../si-glu/libtess/sweep.c               \
-+      ../si-glu/libtess/tess.c                \
-+      ../si-glu/libtess/tessmono.c    \
-+      ../si-glu/libnurbs/interface/bezierEval.cc              \
-+      ../si-glu/libnurbs/interface/bezierPatch.cc             \
-+      ../si-glu/libnurbs/interface/bezierPatchMesh.cc         \
-+      ../si-glu/libnurbs/interface/glcurveval.cc              \
-+      ../si-glu/libnurbs/interface/glinterface.cc             \
-+      ../si-glu/libnurbs/interface/glrenderer.cc              \
-+      ../si-glu/libnurbs/interface/glsurfeval.cc              \
-+      ../si-glu/libnurbs/interface/incurveeval.cc             \
-+      ../si-glu/libnurbs/interface/insurfeval.cc              \
-+      ../si-glu/libnurbs/internals/arc.cc                     \
-+      ../si-glu/libnurbs/internals/arcsorter.cc                       \
-+      ../si-glu/libnurbs/internals/arctess.cc                 \
-+      ../si-glu/libnurbs/internals/backend.cc                 \
-+      ../si-glu/libnurbs/internals/basiccrveval.cc            \
-+      ../si-glu/libnurbs/internals/basicsurfeval.cc           \
-+      ../si-glu/libnurbs/internals/bin.cc                     \
-+      ../si-glu/libnurbs/internals/bufpool.cc                 \
-+      ../si-glu/libnurbs/internals/cachingeval.cc             \
-+      ../si-glu/libnurbs/internals/ccw.cc                     \
-+      ../si-glu/libnurbs/internals/coveandtiler.cc            \
-+      ../si-glu/libnurbs/internals/curve.cc                   \
-+      ../si-glu/libnurbs/internals/curvelist.cc                       \
-+      ../si-glu/libnurbs/internals/curvesub.cc                        \
-+      ../si-glu/libnurbs/internals/dataTransform.cc           \
-+      ../si-glu/libnurbs/internals/displaylist.cc             \
-+      ../si-glu/libnurbs/internals/flist.cc                   \
-+      ../si-glu/libnurbs/internals/flistsorter.cc             \
-+      ../si-glu/libnurbs/internals/hull.cc                    \
-+      ../si-glu/libnurbs/internals/intersect.cc                       \
-+      ../si-glu/libnurbs/internals/knotvector.cc              \
-+      ../si-glu/libnurbs/internals/mapdesc.cc                 \
-+      ../si-glu/libnurbs/internals/mapdescv.cc                        \
-+      ../si-glu/libnurbs/internals/maplist.cc                 \
-+      ../si-glu/libnurbs/internals/mesher.cc                  \
-+      ../si-glu/libnurbs/internals/monoTriangulationBackend.cc        \
-+      ../si-glu/libnurbs/internals/monotonizer.cc             \
-+      ../si-glu/libnurbs/internals/mycode.cc                  \
-+      ../si-glu/libnurbs/internals/nurbsinterfac.cc           \
-+      ../si-glu/libnurbs/internals/nurbstess.cc                       \
-+      ../si-glu/libnurbs/internals/patch.cc                   \
-+      ../si-glu/libnurbs/internals/patchlist.cc                       \
-+      ../si-glu/libnurbs/internals/quilt.cc                   \
-+      ../si-glu/libnurbs/internals/reader.cc                  \
-+      ../si-glu/libnurbs/internals/renderhints.cc             \
-+      ../si-glu/libnurbs/internals/slicer.cc                  \
-+      ../si-glu/libnurbs/internals/sorter.cc                  \
-+      ../si-glu/libnurbs/internals/splitarcs.cc                       \
-+      ../si-glu/libnurbs/internals/subdivider.cc              \
-+      ../si-glu/libnurbs/internals/tobezier.cc                        \
-+      ../si-glu/libnurbs/internals/trimline.cc                        \
-+      ../si-glu/libnurbs/internals/trimregion.cc              \
-+      ../si-glu/libnurbs/internals/trimvertpool.cc            \
-+      ../si-glu/libnurbs/internals/uarray.cc                  \
-+      ../si-glu/libnurbs/internals/varray.cc                  \
-+      ../si-glu/libnurbs/nurbtess/directedLine.cc             \
-+      ../si-glu/libnurbs/nurbtess/gridWrap.cc                 \
-+      ../si-glu/libnurbs/nurbtess/monoChain.cc                        \
-+      ../si-glu/libnurbs/nurbtess/monoPolyPart.cc             \
-+      ../si-glu/libnurbs/nurbtess/monoTriangulation.cc                \
-+      ../si-glu/libnurbs/nurbtess/partitionX.cc                       \
-+      ../si-glu/libnurbs/nurbtess/partitionY.cc                       \
-+      ../si-glu/libnurbs/nurbtess/polyDBG.cc                  \
-+      ../si-glu/libnurbs/nurbtess/polyUtil.cc                 \
-+      ../si-glu/libnurbs/nurbtess/primitiveStream.cc          \
-+      ../si-glu/libnurbs/nurbtess/quicksort.cc                        \
-+      ../si-glu/libnurbs/nurbtess/rectBlock.cc                        \
-+      ../si-glu/libnurbs/nurbtess/sampleComp.cc                       \
-+      ../si-glu/libnurbs/nurbtess/sampleCompBot.cc            \
-+      ../si-glu/libnurbs/nurbtess/sampleCompRight.cc          \
-+      ../si-glu/libnurbs/nurbtess/sampleCompTop.cc            \
-+      ../si-glu/libnurbs/nurbtess/sampleMonoPoly.cc           \
-+      ../si-glu/libnurbs/nurbtess/sampledLine.cc              \
-+      ../si-glu/libnurbs/nurbtess/searchTree.cc
-+else
-+      GLU_SRCS = \
-+              ../src-glu/glu.c \
-+              ../src-glu/mipmap.c \
-+              ../src-glu/project.c \
-+              ../src-glu/quadric.c \
-+              ../src-glu/tess.c \
-+              ../src-glu/tesselat.c \
-+              ../src-glu/polytest.c \
-+              ../src-glu/nurbs.c \
-+              ../src-glu/nurbscrv.c \
-+              ../src-glu/nurbssrf.c \
-+              ../src-glu/nurbsutl.c
-+endif
-+
-+SRCS =  $(MESA_CORE_SRCS) $(MESA_X86_SRCS) $(GLU_SRCS) $(MESA_BEOS_DRIVER_SRCS) 
-+              
-+#     specify the resource files to use
-+#     full path or a relative path to the resource file can be used.
-+RSRCS = 
-+
-+#     specify additional libraries to link against
-+#     there are two acceptable forms of library specifications
-+#     -       if your library follows the naming pattern of:
-+#             libXXX.so or libXXX.a you can simply specify XXX
-+#             library: libbe.so entry: be
-+#             
-+#     -       if your library does not follow the standard library
-+#             naming scheme you need to specify the path to the library
-+#             and it's name
-+#             library: my_lib.a entry: my_lib.a or path/my_lib.a
-+LIBS = be
-+              
-+#     specify additional paths to directories following the standard
-+#     libXXX.so or libXXX.a naming scheme.  You can specify full paths
-+#     or paths relative to the makefile.  The paths included may not
-+#     be recursive, so include all of the paths where libraries can
-+#     be found.  Directories where source files are found are
-+#     automatically included.
-+LIBPATHS =
-+
-+#     additional paths to look for system headers
-+#     thes use the form: #include <header>
-+#     source file directories are NOT auto-included here
-+SYSTEM_INCLUDE_PATHS = ../include
-+ifdef USE_SI_GLU
-+      SYSTEM_INCLUDE_PATHS += ../si-glu/include
-+endif
-+
-+#     additional paths to look for local headers
-+#     thes use the form: #include "header"
-+#     source file directories are automatically included
-+LOCAL_INCLUDE_PATHS = 
-+
-+#     specify the level of optimization that you desire
-+#     NONE, SOME, FULL
-+OPTIMIZE = FULL
-+
-+#     specify any preprocessor symbols to be defined.  The symbols
-+#     will be set to a value of 1.  For example specify DEBUG if you want
-+#     DEBUG=1 to be set when compiling.
-+DEFINES = $(MESA_DEFINES)
-+
-+#     specify special warning levels
-+#     if unspecified default warnings will be used
-+#     NONE = suppress all warnings
-+#     ALL = enable all warnings
-+WARNINGS = ALL
-+
-+#     specify whether image symbols will be created
-+#     so that stack crawls in the debugger are meaningful
-+#     if TRUE symbols will be created
-+SYMBOLS = TRUE 
-+
-+#     specify debug settings
-+#     if TRUE will allow application to be run from
-+#     a source-level debugger
-+# DEBUGGER = TRUE
-+DEBUGGER = FALSE
-+
-+#     specify additional compiler flags for all files
-+COMPILER_FLAGS = 
-+
-+#     specify additional linker flags
-+LINKER_FLAGS =
-+
-+
-+
-+## include the makefile-engine
-+include /boot/develop/etc/makefile-engine
-+
-+
-+
-+# X86/matypes.h include file is *generated*!
-+# Rules to (re)generate it as needed:
-+
-+X86/common_x86_asm.S : X86/matypes.h
-+
-+X86/matypes.h : X86/gen_matypes.c
-+      @echo "(Re-)Generating $@ ..."
-+      $(CC) $< $(INCLUDES) $(CFLAGS)  -o X86/gen_matypes
-+      X86/gen_matypes > $@
-+      rm -f X86/gen_matypes
-+
-+## Add NASM support for assembly code compilation...
-+# $(OBJ_DIR)/%.o : %.nasm
-+#     nasm -f elf $(MESA_DEFINES) -o $@ $<
-+
-+$(OBJ_DIR)/%.o : %.S
-+      gcc -c $< $(INCLUDES) $(CFLAGS) -o $@
-+#     gcc $(INCLUDES) $(CFLAGS) -E $< | grep -v '^$$' > $(addsuffix .nasm, $(basename $<))
-+#     nasm -f elf $(MESA_DEFINES) -o $@ $(addsuffix .nasm, $(basename $<))
-+
-Index: extras/Mesa/src/mesa/main/api_arrayelt.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/api_arrayelt.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/api_arrayelt.c   16 Jun 2004 09:19:08 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/api_arrayelt.c   15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -64,79 +64,274 @@
-  */
- #define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 )
-+static void GLAPIENTRY Color3bv(const GLbyte *v)
-+{
-+   GL_CALL(Color3bv)(v);
-+}
-+
-+static void GLAPIENTRY Color3ubv(const GLubyte *v)
-+{
-+   GL_CALL(Color3ubv)(v);
-+}
-+
-+static void GLAPIENTRY Color3sv(const GLshort *v)
-+{
-+   GL_CALL(Color3sv)(v);
-+}
-+
-+static void GLAPIENTRY Color3usv(const GLushort *v)
-+{
-+   GL_CALL(Color3usv)(v);
-+}
-+
-+static void GLAPIENTRY Color3iv(const GLint *v)
-+{
-+   GL_CALL(Color3iv)(v);
-+}
-+
-+static void GLAPIENTRY Color3uiv(const GLuint *v)
-+{
-+   GL_CALL(Color3uiv)(v);
-+}
-+
-+static void GLAPIENTRY Color3fv(const GLfloat *v)
-+{
-+   GL_CALL(Color3fv)(v);
-+}
-+
-+static void GLAPIENTRY Color3dv(const GLdouble *v)
-+{
-+   GL_CALL(Color3dv)(v);
-+}
-+
-+static void GLAPIENTRY Color4bv(const GLbyte *v)
-+{
-+   GL_CALL(Color4bv)(v);
-+}
-+
-+static void GLAPIENTRY Color4ubv(const GLubyte *v)
-+{
-+   GL_CALL(Color4ubv)(v);
-+}
-+
-+static void GLAPIENTRY Color4sv(const GLshort *v)
-+{
-+   GL_CALL(Color4sv)(v);
-+}
--static array_func ColorFuncs[2][8] = {
--   { (array_func)glColor3bv,
--     (array_func)glColor3ubv,
--     (array_func)glColor3sv,
--     (array_func)glColor3usv,
--     (array_func)glColor3iv,
--     (array_func)glColor3uiv,
--     (array_func)glColor3fv,
--     (array_func)glColor3dv },
--
--   { (array_func)glColor4bv,
--     (array_func)glColor4ubv,
--     (array_func)glColor4sv,
--     (array_func)glColor4usv,
--     (array_func)glColor4iv,
--     (array_func)glColor4uiv,
--     (array_func)glColor4fv,
--     (array_func)glColor4dv }
-+static void GLAPIENTRY Color4usv(const GLushort *v)
-+{
-+   GL_CALL(Color4usv)(v);
-+}
-+
-+static void GLAPIENTRY Color4iv(const GLint *v)
-+{
-+   GL_CALL(Color4iv)(v);
-+}
-+
-+static void GLAPIENTRY Color4uiv(const GLuint *v)
-+{
-+   GL_CALL(Color4uiv)(v);
-+}
-+
-+static void GLAPIENTRY Color4fv(const GLfloat *v)
-+{
-+   GL_CALL(Color4fv)(v);
-+}
-+
-+static void GLAPIENTRY Color4dv(const GLdouble *v)
-+{
-+   GL_CALL(Color4dv)(v);
-+}
-+
-+static const array_func ColorFuncs[2][8] = {
-+   {
-+      (array_func) Color3bv,
-+      (array_func) Color3ubv,
-+      (array_func) Color3sv,
-+      (array_func) Color3usv,
-+      (array_func) Color3iv,
-+      (array_func) Color3uiv,
-+      (array_func) Color3fv,
-+      (array_func) Color3dv,
-+   },
-+   {
-+      (array_func) Color4bv,
-+      (array_func) Color4ubv,
-+      (array_func) Color4sv,
-+      (array_func) Color4usv,
-+      (array_func) Color4iv,
-+      (array_func) Color4uiv,
-+      (array_func) Color4fv,
-+      (array_func) Color4dv,
-+   },
- };
--static array_func VertexFuncs[3][8] = {
--   { 0,
--     0,
--     (array_func)glVertex2sv,
--     0,
--     (array_func)glVertex2iv,
--     0,
--     (array_func)glVertex2fv,
--     (array_func)glVertex2dv },
--
--   { 0,
--     0,
--     (array_func)glVertex3sv,
--     0,
--     (array_func)glVertex3iv,
--     0,
--     (array_func)glVertex3fv,
--     (array_func)glVertex3dv },
--
--   { 0,
--     0,
--     (array_func)glVertex4sv,
--     0,
--     (array_func)glVertex4iv,
--     0,
--     (array_func)glVertex4fv,
--     (array_func)glVertex4dv }
-+static void GLAPIENTRY Vertex2sv(const GLshort *v)
-+{
-+   GL_CALL(Vertex2sv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex2iv(const GLint *v)
-+{
-+   GL_CALL(Vertex2iv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex2fv(const GLfloat *v)
-+{
-+   GL_CALL(Vertex2fv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex2dv(const GLdouble *v)
-+{
-+   GL_CALL(Vertex2dv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex3sv(const GLshort *v)
-+{
-+   GL_CALL(Vertex3sv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex3iv(const GLint *v)
-+{
-+   GL_CALL(Vertex3iv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex3fv(const GLfloat *v)
-+{
-+   GL_CALL(Vertex3fv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex3dv(const GLdouble *v)
-+{
-+   GL_CALL(Vertex3dv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex4sv(const GLshort *v)
-+{
-+   GL_CALL(Vertex4sv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex4iv(const GLint *v)
-+{
-+   GL_CALL(Vertex4iv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex4fv(const GLfloat *v)
-+{
-+   GL_CALL(Vertex4fv)(v);
-+}
-+
-+static void GLAPIENTRY Vertex4dv(const GLdouble *v)
-+{
-+   GL_CALL(Vertex4dv)(v);
-+}
-+
-+static const array_func VertexFuncs[3][8] = {
-+   {
-+      0,
-+      0,
-+      (array_func) Vertex2sv,
-+      0,
-+      (array_func) Vertex2iv,
-+      0,
-+      (array_func) Vertex2fv,
-+      (array_func) Vertex2dv,
-+   },
-+   {
-+      0,
-+      0,
-+      (array_func) Vertex3sv,
-+      0,
-+      (array_func) Vertex3iv,
-+      0,
-+      (array_func) Vertex3fv,
-+      (array_func) Vertex3dv,
-+   },
-+   {
-+      0,
-+      0,
-+      (array_func) Vertex4sv,
-+      0,
-+      (array_func) Vertex4iv,
-+      0,
-+      (array_func) Vertex4fv,
-+      (array_func) Vertex4dv,
-+   },
- };
--static array_func IndexFuncs[8] = {
-+static void GLAPIENTRY Indexubv(const GLubyte *c)
-+{
-+   GL_CALL(Indexubv)(c);
-+}
-+
-+static void GLAPIENTRY Indexsv(const GLshort *c)
-+{
-+   GL_CALL(Indexsv)(c);
-+}
-+
-+static void GLAPIENTRY Indexiv(const GLint *c)
-+{
-+   GL_CALL(Indexiv)(c);
-+}
-+
-+static void GLAPIENTRY Indexfv(const GLfloat *c)
-+{
-+   GL_CALL(Indexfv)(c);
-+}
-+
-+static void GLAPIENTRY Indexdv(const GLdouble *c)
-+{
-+   GL_CALL(Indexdv)(c);
-+}
-+
-+static const array_func IndexFuncs[8] = {
-    0,
--   (array_func)glIndexubv,
--   (array_func)glIndexsv,
-+   (array_func) Indexubv,
-+   (array_func) Indexsv,
-    0,
--   (array_func)glIndexiv,
-+   (array_func) Indexiv,
-    0,
--   (array_func)glIndexfv,
--   (array_func)glIndexdv
-+   (array_func) Indexfv,
-+   (array_func) Indexdv,
- };
--static array_func NormalFuncs[8] = {
--   (array_func)glNormal3bv,
-+static void GLAPIENTRY Normal3bv(const GLbyte *v)
-+{
-+   GL_CALL(Normal3bv)(v);
-+}
-+
-+static void GLAPIENTRY Normal3sv(const GLshort *v)
-+{
-+   GL_CALL(Normal3sv)(v);
-+}
-+
-+static void GLAPIENTRY Normal3iv(const GLint *v)
-+{
-+   GL_CALL(Normal3iv)(v);
-+}
-+
-+static void GLAPIENTRY Normal3fv(const GLfloat *v)
-+{
-+   GL_CALL(Normal3fv)(v);
-+}
-+
-+static void GLAPIENTRY Normal3dv(const GLdouble *v)
-+{
-+   GL_CALL(Normal3dv)(v);
-+}
-+
-+static const array_func NormalFuncs[8] = {
-+   (array_func) Normal3bv,
-    0,
--   (array_func)glNormal3sv,
-+   (array_func) Normal3sv,
-    0,
--   (array_func)glNormal3iv,
-+   (array_func) Normal3iv,
-    0,
--   (array_func)glNormal3fv,
--   (array_func)glNormal3dv,
-+   (array_func) Normal3fv,
-+   (array_func) Normal3dv,
- };
--
- /* Wrapper functions in case glSecondaryColor*EXT doesn't exist */
- static void GLAPIENTRY SecondaryColor3bvEXT(const GLbyte *c)
- {
-@@ -178,7 +373,7 @@
-    GL_CALL(SecondaryColor3dvEXT)(c);
- }
--static array_func SecondaryColorFuncs[8] = {
-+static const array_func SecondaryColorFuncs[8] = {
-    (array_func) SecondaryColor3bvEXT,
-    (array_func) SecondaryColor3ubvEXT,
-    (array_func) SecondaryColor3svEXT,
-@@ -201,7 +396,7 @@
-    GL_CALL(FogCoorddvEXT)(f);
- }
--static array_func FogCoordFuncs[8] = {
-+static const array_func FogCoordFuncs[8] = {
-    0,
-    0,
-    0,
-@@ -212,7 +407,6 @@
-    (array_func) FogCoorddvEXT
- };
--
- /**********************************************************************/
- /* GL_BYTE attributes */
-@@ -549,7 +743,7 @@
- /*
-  * Array [size][type] of VertexAttrib functions
-  */
--static attrib_func AttribFuncs[2][4][8] = {
-+static const attrib_func AttribFuncs[2][4][8] = {
-    {
-       /* non-normalized */
-       {
-@@ -646,6 +840,11 @@
-    }
- };
-+static void GLAPIENTRY EdgeFlagv(const GLboolean *flag)
-+{
-+   GL_CALL(EdgeFlagv)(flag);
-+}
-+
- /**********************************************************************/
-@@ -693,7 +892,7 @@
-    }
-    if (ctx->Array.EdgeFlag.Enabled) {
-       aa->array = &ctx->Array.EdgeFlag;
--      aa->func = (array_func) glEdgeFlagv;
-+      aa->func = (array_func) EdgeFlagv;
-       aa++;
-    }
-    if (ctx->Array.Normal.Enabled) {
-Index: extras/Mesa/src/mesa/main/api_loopback.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/api_loopback.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/api_loopback.c   16 Jun 2004 09:19:08 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/api_loopback.c   15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -6,7 +6,7 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.3
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -1066,7 +1066,7 @@
- static void GLAPIENTRY
- loopback_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
- {
--   ATTRIB3(index, (GLfloat) x, y, z);
-+   ATTRIB3(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
- }
- static void GLAPIENTRY
-@@ -1139,7 +1139,7 @@
- static void GLAPIENTRY
- loopback_VertexAttrib3svNV(GLuint index, const GLshort *v)
- {
--   ATTRIB2(index, (GLfloat) v[0], (GLfloat) v[1]);
-+   ATTRIB3(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
- }
- static void GLAPIENTRY
-Index: extras/Mesa/src/mesa/main/api_noop.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/api_noop.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/api_noop.c       16 Jun 2004 09:19:08 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/api_noop.c       15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -568,6 +568,7 @@
-  */
- void GLAPIENTRY _mesa_noop_Begin( GLenum mode )
- {
-+   (void) mode;
- }
-Index: extras/Mesa/src/mesa/main/attrib.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/attrib.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/attrib.c 16 Jun 2004 09:19:09 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/attrib.c 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -1017,6 +1017,8 @@
-                   _mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite);
-                   _mesa_PointParameteriNV(GL_POINT_SPRITE_R_MODE_NV,
-                                           ctx->Point.SpriteRMode);
-+                  _mesa_PointParameterfEXT(GL_POINT_SPRITE_COORD_ORIGIN,
-+                                           (GLfloat)ctx->Point.SpriteOrigin);
-                }
-             }
-             break;
-Index: extras/Mesa/src/mesa/main/bufferobj.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/bufferobj.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/bufferobj.c      16 Jun 2004 09:19:09 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/bufferobj.c      15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -113,17 +113,17 @@
-    }
-    bufObj = buffer_object_get_target( ctx, target, str );
--   if ( bufObj == NULL ) {
-+   if (!bufObj || bufObj->Name == 0) {
-       return NULL;
-    }
--   if ( (GLuint)(offset + size) > bufObj->Size ) {
-+   if ((GLuint) (offset + size) > bufObj->Size) {
-       _mesa_error(ctx, GL_INVALID_VALUE,
-                 "%s(size + offset > buffer size)", str);
-       return NULL;
-    }
--   if ( bufObj->Pointer != NULL ) {
-+   if (bufObj->Pointer) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "%s", str);
-       return NULL;
-    }
-@@ -142,6 +142,9 @@
- _mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
- {
-    struct gl_buffer_object *obj;
-+
-+   (void) ctx;
-+
-    obj = MALLOC_STRUCT(gl_buffer_object);
-    _mesa_initialize_buffer_object(obj, name, target);
-    return obj;
-@@ -157,6 +160,8 @@
- void
- _mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
- {
-+   (void) ctx;
-+
-    if (bufObj->Data)
-       _mesa_free(bufObj->Data);
-    _mesa_free(bufObj);
-@@ -170,6 +175,8 @@
- _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
-                               GLuint name, GLenum target )
- {
-+   (void) target;
-+
-    _mesa_bzero(obj, sizeof(struct gl_buffer_object));
-    obj->RefCount = 1;
-    obj->Name = name;
-@@ -231,15 +238,15 @@
- {
-    void * new_data;
--   (void) target;
-+   (void) ctx; (void) target;
-    new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size );
--   if ( new_data != NULL ) {
-+   if (new_data) {
-       bufObj->Data = (GLubyte *) new_data;
-       bufObj->Size = size;
-       bufObj->Usage = usage;
--      if ( data != NULL ) {
-+      if (data) {
-        _mesa_memcpy( bufObj->Data, data, size );
-       }
-    }
-@@ -269,8 +276,9 @@
-                     GLsizeiptrARB size, const GLvoid * data,
-                     struct gl_buffer_object * bufObj )
- {
--   if ( (bufObj->Data != NULL)
--      && ((GLuint)(size + offset) <= bufObj->Size) ) {
-+   (void) ctx; (void) target;
-+
-+   if (bufObj->Data && ((GLuint) (size + offset) <= bufObj->Size)) {
-       _mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size );
-    }
- }
-@@ -299,8 +307,9 @@
-                         GLsizeiptrARB size, GLvoid * data,
-                         struct gl_buffer_object * bufObj )
- {
--   if ( (bufObj->Data != NULL)
--      && ((GLuint)(size + offset) <= bufObj->Size) ) {
-+   (void) ctx; (void) target;
-+
-+   if (bufObj->Data && ((GLuint) (size + offset) <= bufObj->Size)) {
-       _mesa_memcpy( data, (GLubyte *) bufObj->Data + offset, size );
-    }
- }
-@@ -326,6 +335,7 @@
- _mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
-                 struct gl_buffer_object * bufObj )
- {
-+   (void) ctx; (void) target; (void) access;
-    return bufObj->Data;
- }
-@@ -371,7 +381,6 @@
-  * glGetTexImage, etc) we call this function to check that we're not
-  * going to read out of bounds.
-  *
-- * \param ctx  the rendering context
-  * \param width  width of image to read/write
-  * \param height  height of image to read/write
-  * \param depth  depth of image to read/write
-@@ -432,13 +441,13 @@
-    ASSERT_OUTSIDE_BEGIN_END(ctx);
-    oldBufObj = buffer_object_get_target( ctx, target, "BindBufferARB" );
--   if ( (oldBufObj != NULL) && (oldBufObj->Name == buffer) )
-+   if (oldBufObj && oldBufObj->Name == buffer)
-       return;   /* rebinding the same buffer object- no change */
-    /*
-     * Get pointer to new buffer object (newBufObj)
-     */
--   if ( buffer == 0 ) {
-+   if (buffer == 0) {
-       /* The spec says there's not a buffer object named 0, but we use
-        * one internally because it simplifies things.
-        */
-@@ -479,10 +488,10 @@
-    }
-    /* Pass BindBuffer call to device driver */
--   if ( (ctx->Driver.BindBuffer != NULL) && (newBufObj != NULL) )
-+   if (ctx->Driver.BindBuffer && newBufObj)
-       (*ctx->Driver.BindBuffer)( ctx, target, newBufObj );
--   if ( oldBufObj != NULL ) {
-+   if (oldBufObj) {
-       oldBufObj->RefCount--;
-       assert(oldBufObj->RefCount >= 0);
-       if (oldBufObj->RefCount == 0) {
-@@ -499,7 +508,7 @@
-  * Delete a set of buffer objects.
-  * 
-  * \param n      Number of buffer objects to delete.
-- * \param buffer Array of \c n buffer object IDs.
-+ * \param ids    Array of \c n buffer object IDs.
-  */
- void GLAPIENTRY
- _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
-@@ -528,41 +537,50 @@
-             if (ctx->Array.Vertex.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.Vertex.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             if (ctx->Array.Normal.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.Normal.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             if (ctx->Array.Color.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.Color.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             if (ctx->Array.SecondaryColor.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.SecondaryColor.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             if (ctx->Array.FogCoord.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.FogCoord.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             if (ctx->Array.Index.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.Index.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             if (ctx->Array.EdgeFlag.BufferObj == bufObj) {
-                bufObj->RefCount--;
-                ctx->Array.EdgeFlag.BufferObj = ctx->Array.NullBufferObj;
-+               ctx->Array.NullBufferObj->RefCount++;
-             }
-             for (j = 0; j < MAX_TEXTURE_UNITS; j++) {
-                if (ctx->Array.TexCoord[j].BufferObj == bufObj) {
-                   bufObj->RefCount--;
-                   ctx->Array.TexCoord[j].BufferObj = ctx->Array.NullBufferObj;
-+                  ctx->Array.NullBufferObj->RefCount++;
-                }
-             }
-             for (j = 0; j < VERT_ATTRIB_MAX; j++) {
-                if (ctx->Array.VertexAttrib[j].BufferObj == bufObj) {
-                   bufObj->RefCount--;
-                   ctx->Array.VertexAttrib[j].BufferObj = ctx->Array.NullBufferObj;
-+                  ctx->Array.NullBufferObj->RefCount++;
-                }
-             }
-@@ -581,8 +599,11 @@
-             }
-             /* decrement refcount and delete if <= 0 */
--            bufObj->DeletePending = GL_TRUE;
--            bufObj->RefCount--;
-+            if (!bufObj->DeletePending) {
-+               bufObj->DeletePending = GL_TRUE;
-+               bufObj->RefCount--;
-+            }
-+
-             if (bufObj->RefCount <= 0) {
-                /* buffer should not be bound anymore! */
-                ASSERT(ctx->Array.ArrayBufferObj != bufObj);
-@@ -619,7 +640,7 @@
-       return;
-    }
--   if ( buffer == NULL ) {
-+   if (!buffer) {
-       return;
-    }
-@@ -704,7 +725,7 @@
-    }
-    bufObj = buffer_object_get_target( ctx, target, "BufferDataARB" );
--   if ( bufObj == NULL ) {
-+   if (!bufObj || bufObj->Name ==0) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "glBufferDataARB" );
-       return;
-    }
-@@ -790,19 +811,19 @@
-    }
-    bufObj = buffer_object_get_target( ctx, target, "MapBufferARB" );
--   if ( bufObj == NULL ) {
-+   if (!bufObj || bufObj->Name == 0) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "glMapBufferARB" );
-       return NULL;
-    }
--   if ( bufObj->Pointer != NULL ) {
-+   if (bufObj->Pointer) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "glMapBufferARB(already mapped)");
-       return NULL;
-    }
-    ASSERT(ctx->Driver.MapBuffer);
-    bufObj->Pointer = (*ctx->Driver.MapBuffer)( ctx, target, access, bufObj );
--   if ( bufObj->Pointer == NULL ) {
-+   if (!bufObj->Pointer) {
-       _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(access)");
-    }
-@@ -821,17 +842,17 @@
-    ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
-    bufObj = buffer_object_get_target( ctx, target, "UnmapBufferARB" );
--   if ( bufObj == NULL ) {
-+   if (!bufObj || bufObj->Name == 0) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "glUnmapBufferARB" );
-       return GL_FALSE;
-    }
--   if ( bufObj->Pointer == NULL ) {
-+   if (!bufObj->Pointer) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "glUnmapBufferARB");
-       return GL_FALSE;
-    }
--   if ( ctx->Driver.UnmapBuffer != NULL ) {
-+   if (ctx->Driver.UnmapBuffer) {
-       status = (*ctx->Driver.UnmapBuffer)( ctx, target, bufObj );
-    }
-@@ -850,7 +871,7 @@
-    ASSERT_OUTSIDE_BEGIN_END(ctx);
-    bufObj = buffer_object_get_target( ctx, target, "GetBufferParameterivARB" );
--   if (!bufObj) {
-+   if (!bufObj || bufObj->Name == 0) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "GetBufferParameterivARB" );
-       return;
-    }
-@@ -888,7 +909,7 @@
-    }
-    bufObj = buffer_object_get_target( ctx, target, "GetBufferPointervARB" );
--   if ( bufObj == NULL ) {
-+   if (!bufObj || bufObj->Name == 0) {
-       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetBufferPointervARB" );
-       return;
-    }
-Index: extras/Mesa/src/mesa/main/colormac.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/colormac.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/main/colormac.h       22 Jul 2004 06:53:01 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/colormac.h       15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -221,5 +221,7 @@
- #define PACK_COLOR_233( B, G, R )                                     \
-    (((B) & 0xc0) | (((G) & 0xe0) >> 2) | (((R) & 0xe0) >> 5))
-+/*@}*/
-+
- #endif /* COLORMAC_H */
-Index: extras/Mesa/src/mesa/main/colortab.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/colortab.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/colortab.c       16 Jun 2004 09:19:10 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/colortab.c       15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -175,11 +175,11 @@
-  * Update/replace all or part of a color table.  Helper function
-  * used by _mesa_ColorTable() and _mesa_ColorSubTable().
-  * The table->Table buffer should already be allocated.
-- * \param start - first entry to update
-- * \param count - number of entries to update
-- * \param format - format of user-provided table data
-- * \param type - datatype of user-provided table data
-- * \param data - user-provided table data
-+ * \param start first entry to update
-+ * \param count number of entries to update
-+ * \param format format of user-provided table data
-+ * \param type datatype of user-provided table data
-+ * \param data user-provided table data
-  * \param [rgba]Scale - RGBA scale factors
-  * \param [rgba]Bias - RGBA bias factors
-  */
-Index: extras/Mesa/src/mesa/main/config.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/config.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/config.h 16 Jun 2004 09:19:20 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/config.h 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -201,8 +201,6 @@
- #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4
- /*@}*/
--/*@}*/
--
- /**
-  * \name Mesa-specific parameters
-Index: extras/Mesa/src/mesa/main/context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/context.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/main/context.c        28 Aug 2004 04:27:58 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/main/context.c        15 Dec 2004 01:51:02 -0000      1.1.1.3.2.1
-@@ -30,18 +30,23 @@
- /**
-- * \mainpage Mesa Core Module
-+ * \mainpage Mesa Main Module
-  *
-- * \section CoreIntroduction Introduction
-+ * \section MainIntroduction Introduction
-  *
-- * The Mesa core module consists of all the top-level files in the src
-- * directory.  The core module basically takes care of API dispatch,
-- * and OpenGL state management.
-- *
-- * For example, calls to glPolygonMode() are routed to _mesa_PolygonMode()
-- * which updates the state related to polygonmode.  Furthermore, dirty
-- * state flags related to polygon mode are set and if the device driver
-- * implements a special routine for PolygonMode, it will be called.
-+ * The Mesa Main module consists of all the files in the main/ directory.
-+ * Among the features of this module are:
-+ * <UL>
-+ * <LI> Structures to represent most GL state </LI>
-+ * <LI> State set/get functions </LI>
-+ * <LI> Display lists </LI>
-+ * <LI> Texture unit, object and image handling </LI>
-+ * <LI> Matrix and attribute stacks </LI>
-+ * </UL>
-+ *
-+ * Other modules are responsible for API dispatch, vertex transformation,
-+ * point/line/triangle setup, rasterization, vertex array caching,
-+ * vertex/fragment programs/shaders, etc.
-  *
-  *
-  * \section AboutDoxygen About Doxygen
-@@ -192,6 +197,7 @@
- _mesa_loseCurrent(__GLcontext *gc)
- {
-    /* XXX unbind context from thread */
-+   (void) gc;
-    return GL_TRUE;
- }
-@@ -212,6 +218,7 @@
- _mesa_makeCurrent(__GLcontext *gc)
- {
-    /* XXX bind context to thread */
-+   (void) gc;
-    return GL_TRUE;
- }
-@@ -267,6 +274,7 @@
- GLboolean
- _mesa_forceCurrent(__GLcontext *gc)
- {
-+   (void) gc;
-    return GL_TRUE;
- }
-@@ -302,6 +310,7 @@
- _mesa_notifyDestroy(__GLcontext *gc)
- {
-    /* Unbind from it. */
-+   (void) gc;
- }
- /**
-@@ -322,6 +331,7 @@
- struct __GLdispatchStateRec *
- _mesa_dispatchExec(__GLcontext *gc)
- {
-+   (void) gc;
-    return NULL;
- }
-@@ -329,12 +339,14 @@
- void
- _mesa_beginDispatchOverride(__GLcontext *gc)
- {
-+   (void) gc;
- }
- /** No-op */
- void
- _mesa_endDispatchOverride(__GLcontext *gc)
- {
-+   (void) gc;
- }
- /**
-@@ -372,6 +384,8 @@
-     exports->dispatchExec = _mesa_dispatchExec;
-     exports->beginDispatchOverride = _mesa_beginDispatchOverride;
-     exports->endDispatchOverride = _mesa_endDispatchOverride;
-+#else
-+    (void) exports;
- #endif
- }
-@@ -759,6 +773,7 @@
- one_time_init( GLcontext *ctx )
- {
-    static GLboolean alreadyCalled = GL_FALSE;
-+   (void) ctx;
-    _glthread_LOCK_MUTEX(OneTimeLock);
-    if (!alreadyCalled) {
-       GLuint i;
-@@ -1597,7 +1612,7 @@
-  * \param mask bitwise OR of GL_*_BIT flags
-  *
-  * According to the bits specified in \p mask, copies the corresponding
-- * attributes from \p src into \dst.  For many of the attributes a simple \c
-+ * attributes from \p src into \p dst.  For many of the attributes a simple \c
-  * memcpy is not enough due to the existence of internal pointers in their data
-  * structures.
-  */
-Index: extras/Mesa/src/mesa/main/convolve.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/convolve.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/convolve.c       16 Jun 2004 09:19:20 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/convolve.c       15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -834,7 +834,7 @@
-    }
-    /* unpack column filter */
--   _mesa_unpack_color_span_float(ctx, width, GL_RGBA,
-+   _mesa_unpack_color_span_float(ctx, height, GL_RGBA,
-                                  &ctx->Separable2D.Filter[colStart],
-                                  format, type, column, &ctx->Unpack,
-                                  0); /* transferOps */
-@@ -844,7 +844,7 @@
-       const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[2];
-       const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[2];
-       GLint i;
--      for (i = 0; i < width; i++) {
-+      for (i = 0; i < height; i++) {
-          GLfloat r = ctx->Separable2D.Filter[i * 4 + 0 + colStart];
-          GLfloat g = ctx->Separable2D.Filter[i * 4 + 1 + colStart];
-          GLfloat b = ctx->Separable2D.Filter[i * 4 + 2 + colStart];
-Index: extras/Mesa/src/mesa/main/debug.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/debug.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/debug.c  16 Jun 2004 09:19:11 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/debug.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -180,6 +180,8 @@
-     */
-    if (_mesa_strstr(debug, "flush")) 
-       MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH;
-+#else
-+   (void) debug;
- #endif
- }
-Index: extras/Mesa/src/mesa/main/descrip.mms
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/descrip.mms,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/main/descrip.mms      28 Aug 2004 04:27:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/descrip.mms      15 Dec 2004 01:51:02 -0000      1.1.1.2.2.1
-@@ -2,11 +2,11 @@
- # contributed by Jouk Jansen  joukj@hrem.stm.tudelft.nl
- # Last revision : 18 August 2004
--first
-+.first
-       define gl [---.include.gl]
-       define math [-.math]
--include [---]mms-config.
-+.include [---]mms-config.
- ##### MACROS #####
-Index: extras/Mesa/src/mesa/main/dlist.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/dlist.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/main/dlist.c  22 Jul 2004 06:52:51 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/dlist.c  15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -165,6 +165,7 @@
-  * integer values starting at 0 is very important, see InstSize array usage)
-  */
- typedef enum {
-+      OPCODE_INVALID = -1,                    /* Force signed enum */
-       OPCODE_ACCUM,
-       OPCODE_ALPHA_FUNC,
-         OPCODE_BIND_TEXTURE,
-@@ -7659,7 +7660,7 @@
-    Node *n;
-    GLboolean done;
--   if (!glIsList(list)) {
-+   if (!GL_CALL(IsList)(list)) {
-       _mesa_printf("%u is not a display list ID\n", list);
-       return;
-    }
-Index: extras/Mesa/src/mesa/main/extensions.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/extensions.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/main/extensions.c     28 Aug 2004 04:28:00 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/extensions.c     15 Dec 2004 01:51:02 -0000      1.1.1.2.2.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -65,6 +65,7 @@
-    { OFF, "GL_MESAX_texture_float",            F(ARB_texture_float) },
-    { OFF, "GL_ARB_texture_mirrored_repeat",    F(ARB_texture_mirrored_repeat)},
-    { OFF, "GL_ARB_texture_non_power_of_two",   F(ARB_texture_non_power_of_two)},
-+   { OFF, "GL_ARB_texture_rectangle",          F(NV_texture_rectangle) },
-    { ON,  "GL_ARB_transpose_matrix",           F(ARB_transpose_matrix) },
-    { OFF, "GL_ARB_vertex_buffer_object",       F(ARB_vertex_buffer_object) },
-    { OFF, "GL_ARB_vertex_program",             F(ARB_vertex_program) },
-@@ -325,7 +326,6 @@
- {
-    ctx->Extensions.ARB_occlusion_query = GL_TRUE;
-    ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;
--   ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
-    ctx->Extensions.EXT_shadow_funcs = GL_TRUE;
- }
-Index: extras/Mesa/src/mesa/main/get.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/get.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/get.c    16 Jun 2004 09:19:13 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/get.c    15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -5,7 +5,7 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -1390,6 +1390,10 @@
-          CHECK_EXTENSION_B(NV_point_sprite, pname);
-          *params = ENUM_TO_BOOL(ctx->Point.SpriteRMode);
-          break;
-+      case GL_POINT_SPRITE_COORD_ORIGIN:
-+         CHECK_EXTENSION_B(ARB_point_sprite, pname);
-+         *params = ENUM_TO_BOOL(ctx->Point.SpriteOrigin);
-+         break;
-       /* GL_SGIS_generate_mipmap */
-       case GL_GENERATE_MIPMAP_HINT_SGIS:
-@@ -1620,6 +1624,14 @@
-          break;
- #endif
-+#if FEATURE_ARB_vertex_program
-+      /* GL_NV_vertex_program and GL_ARB_fragment_program define others */
-+      case GL_MAX_VERTEX_ATTRIBS_ARB:
-+         CHECK_EXTENSION_B(ARB_vertex_program, pname);
-+         *params = (ctx->Const.MaxVertexProgramAttribs > 0) ? GL_TRUE : GL_FALSE;
-+         break;
-+#endif
-+
- #if FEATURE_ARB_fragment_program
-       case GL_FRAGMENT_PROGRAM_ARB:
-          CHECK_EXTENSION_B(ARB_fragment_program, pname);
-@@ -2942,6 +2954,10 @@
-          CHECK_EXTENSION_D(NV_point_sprite, pname);
-          *params = (GLdouble) ctx->Point.SpriteRMode;
-          break;
-+      case GL_POINT_SPRITE_COORD_ORIGIN:
-+         CHECK_EXTENSION_D(ARB_point_sprite, pname);
-+         *params = (GLdouble) ctx->Point.SpriteOrigin;
-+         break;
-       /* GL_SGIS_generate_mipmap */
-       case GL_GENERATE_MIPMAP_HINT_SGIS:
-@@ -3170,6 +3186,14 @@
-          break;
- #endif
-+#if FEATURE_ARB_vertex_program
-+      /* GL_NV_vertex_program and GL_ARB_fragment_program define others */
-+      case GL_MAX_VERTEX_ATTRIBS_ARB:
-+         CHECK_EXTENSION_D(ARB_vertex_program, pname);
-+         *params = (GLdouble) ctx->Const.MaxVertexProgramAttribs;
-+         break;
-+#endif
-+
- #if FEATURE_ARB_fragment_program
-       case GL_FRAGMENT_PROGRAM_ARB:
-          CHECK_EXTENSION_D(ARB_fragment_program, pname);
-@@ -4468,6 +4492,10 @@
-          CHECK_EXTENSION_F(NV_point_sprite, pname);
-          *params = (GLfloat) ctx->Point.SpriteRMode;
-          break;
-+      case GL_POINT_SPRITE_COORD_ORIGIN:
-+         CHECK_EXTENSION_F(ARB_point_sprite, pname);
-+         *params = (GLfloat) ctx->Point.SpriteOrigin;
-+         break;
-       /* GL_SGIS_generate_mipmap */
-       case GL_GENERATE_MIPMAP_HINT_SGIS:
-@@ -4696,6 +4724,14 @@
-          break;
- #endif
-+#if FEATURE_ARB_vertex_program
-+      /* GL_NV_vertex_program and GL_ARB_fragment_program define others */
-+      case GL_MAX_VERTEX_ATTRIBS_ARB:
-+         CHECK_EXTENSION_F(ARB_vertex_program, pname);
-+         *params = (GLfloat) ctx->Const.MaxVertexProgramAttribs;
-+         break;
-+#endif
-+
- #if FEATURE_ARB_fragment_program
-       case GL_FRAGMENT_PROGRAM_ARB:
-          CHECK_EXTENSION_F(ARB_fragment_program, pname);
-@@ -6032,6 +6068,10 @@
-          CHECK_EXTENSION_I(NV_point_sprite, pname);
-          *params = (GLint) ctx->Point.SpriteRMode;
-          break;
-+      case GL_POINT_SPRITE_COORD_ORIGIN:
-+         CHECK_EXTENSION_I(ARB_point_sprite, pname);
-+         *params = (GLint) ctx->Point.SpriteOrigin;
-+         break;
-       /* GL_SGIS_generate_mipmap */
-       case GL_GENERATE_MIPMAP_HINT_SGIS:
-@@ -6260,6 +6300,14 @@
-          break;
- #endif
-+#if FEATURE_ARB_vertex_program
-+      /* GL_NV_vertex_program and GL_ARB_fragment_program define others */
-+      case GL_MAX_VERTEX_ATTRIBS_ARB:
-+         CHECK_EXTENSION_I(ARB_vertex_program, pname);
-+         *params = (GLint) ctx->Const.MaxVertexProgramAttribs;
-+         break;
-+#endif
-+
- #if FEATURE_ARB_fragment_program
-       case GL_FRAGMENT_PROGRAM_ARB:
-          CHECK_EXTENSION_I(ARB_fragment_program, pname);
-@@ -6390,7 +6438,7 @@
-             _mesa_error(ctx, GL_INVALID_ENUM, "glGetPointerv");
-             return;
-          }
--         *params = (GLvoid *) ctx->FragmentProgram.Callback;
-+         *params = *(GLvoid **) &ctx->FragmentProgram.Callback;
-          break;
-       case GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA:
-          if (!ctx->Extensions.MESA_program_debug) {
-@@ -6404,7 +6452,7 @@
-             _mesa_error(ctx, GL_INVALID_ENUM, "glGetPointerv");
-             return;
-          }
--         *params = (GLvoid *) ctx->VertexProgram.Callback;
-+         *params = *(GLvoid **) &ctx->VertexProgram.Callback;
-          break;
-       case GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA:
-          if (!ctx->Extensions.MESA_program_debug) {
-@@ -6484,7 +6532,6 @@
-                    ctx->Extensions.SGIS_generate_mipmap) {
-                   if (ctx->Extensions.ARB_occlusion_query &&
-                       ctx->Extensions.ARB_vertex_buffer_object &&
--                      ctx->Extensions.ARB_texture_non_power_of_two &&
-                       ctx->Extensions.EXT_shadow_funcs) {
-                      return (const GLubyte *) version_1_5;
-                   }
-Index: extras/Mesa/src/mesa/main/glheader.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/glheader.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/main/glheader.h       22 Jul 2004 06:52:55 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/glheader.h       15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -20,7 +20,7 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -85,16 +85,18 @@
- #endif
- #if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
--#  pragma warning( disable : 4068 ) /* unknown pragma */
--#  pragma warning( disable : 4710 ) /* function 'foo' not inlined */
--#  pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
--#  pragma warning( disable : 4127 ) /* conditional expression is constant */
--#  if defined(MESA_MINWARN)
--#    pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
--#    pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
--#    pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
--#    pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
--#    pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-+#  if !defined(__GNUC__) /* mingw environment */
-+#    pragma warning( disable : 4068 ) /* unknown pragma */
-+#    pragma warning( disable : 4710 ) /* function 'foo' not inlined */
-+#    pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
-+#    pragma warning( disable : 4127 ) /* conditional expression is constant */
-+#    if defined(MESA_MINWARN)
-+#      pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-+#      pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-+#      pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-+#      pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
-+#      pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-+#    endif
- #  endif
- #  if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
- #    define GLAPI __declspec(dllexport)
-@@ -211,24 +213,14 @@
- #include <GL/internal/glcore.h>
--/* XXX temporary hack */
--#ifndef GL_PIXEL_PACK_BUFFER_EXT
--#define GL_PIXEL_PACK_BUFFER_EXT                        0x88EB
--#define GL_PIXEL_UNPACK_BUFFER_EXT                      0x88EC
--#define GL_PIXEL_PACK_BUFFER_BINDING_EXT                0x88ED
--#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT              0x88EF
--#endif
--
--
--/* XXX temporary hack */
-+/* XXX temporary hack - remove when glext.h is updated */
- #ifndef GL_ARB_half_float_pixel
- #define GL_ARB_half_float_pixel 1
- #define GL_HALF_FLOAT_ARB 0x140B
- typedef GLushort GLhalfARB;
- #endif
--
--/* XXX temporary hack */
-+/* XXX temporary hack - remove when glext.h is updated */
- #ifndef GL_ARB_texture_float
- #define GL_ARB_texture_float 1
- #define GL_TEXTURE_RED_TYPE_ARB             0x9000
-@@ -253,6 +245,12 @@
- #define GL_LUMINANCE_ALPHA16F_ARB           0x881F
- #endif
-+/* XXX temporary hack - remove when glext.h is updated */
-+#ifndef GL_POINT_SPRITE_COORD_ORIGIN
-+#define GL_POINT_SPRITE_COORD_ORIGIN        0x10000
-+#define GL_LOWER_LEFT                       0x10001
-+#define GL_UPPER_LEFT                       0x10002
-+#endif
-Index: extras/Mesa/src/mesa/main/image.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/image.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/image.c  16 Jun 2004 09:19:22 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/image.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -3778,6 +3778,8 @@
-                          GLenum srcType, const GLvoid *source,
-                          const struct gl_pixelstore_attrib *srcPacking )
- {
-+   (void) srcPacking;
-+
-    switch (srcType) {
-       case GL_BYTE:
-          {
-Index: extras/Mesa/src/mesa/main/imports.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/imports.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/imports.c        16 Jun 2004 09:19:14 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/imports.c        15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -32,7 +32,7 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2.1
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -58,6 +58,7 @@
- #include "imports.h"
- #include "context.h"
-+#include "version.h"
- #define MAXSTRING 4000  /* for vsnprintf() */
-@@ -536,7 +537,7 @@
- GLhalfARB
- _mesa_float_to_half(float val)
- {
--   const int flt = *((int *) &val);
-+   const int flt = *((int *) (void *) &val);
-    const int flt_m = flt & 0x7fffff;
-    const int flt_e = (flt >> 23) & 0xff;
-    const int flt_s = (flt >> 31) & 0x1;
-@@ -662,7 +663,7 @@
-    }
-    flt = (flt_s << 31) | (flt_e << 23) | flt_m;
--   result = *((float *) &flt);
-+   result = *((float *) (void *) &flt);
-    return result;
- }
-@@ -905,11 +906,11 @@
-    va_end( args );
- #if defined(XFree86LOADER) && defined(IN_MODULE)
--   xf86fprintf(stderr, "Mesa implementation error: %s\n", str);
--   xf86fprintf(stderr, "Please report to the DRI project at dri.sourceforge.net\n");
-+   xf86fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
-+   xf86fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
- #else
--   fprintf(stderr, "Mesa implementation error: %s\n", str);
--   fprintf(stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
-+   fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
-+   fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
- #endif
- }
-@@ -1004,6 +1005,7 @@
- {
-    char s[MAXSTRING];
-    va_list args;
-+   (void) ctx;
-    va_start(args, fmtString);
-    vsnprintf(s, MAXSTRING, fmtString, args);
-    va_end(args);
-@@ -1094,6 +1096,7 @@
- {
-    int r;
-    va_list args;
-+   (void) gc;
-    va_start( args, fmt );  
-    r = vsprintf( str, fmt, args );
-    va_end( args );
-@@ -1104,6 +1107,7 @@
- static void * CAPI
- default_fopen(__GLcontext *gc, const char *path, const char *mode)
- {
-+   (void) gc;
-    return fopen(path, mode);
- }
-@@ -1111,6 +1115,7 @@
- static int CAPI
- default_fclose(__GLcontext *gc, void *stream)
- {
-+   (void) gc;
-    return fclose((FILE *) stream);
- }
-@@ -1120,6 +1125,7 @@
- {
-    int r;
-    va_list args;
-+   (void) gc;
-    va_start( args, fmt );  
-    r = vfprintf( (FILE *) stream, fmt, args );
-    va_end( args );
-@@ -1132,6 +1138,7 @@
- static __GLdrawablePrivate *
- default_GetDrawablePrivate(__GLcontext *gc)
- {
-+   (void) gc;
-    return NULL;
- }
-Index: extras/Mesa/src/mesa/main/imports.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/imports.h,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- extras/Mesa/src/mesa/main/imports.h        1 Sep 2004 19:29:50 -0000       1.4
-+++ extras/Mesa/src/mesa/main/imports.h        15 Dec 2004 01:51:02 -0000      1.4.2.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -224,7 +224,7 @@
-  ***/
- #if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
-     defined(__s390x__) || defined(__powerpc__) || \
--    defined(__AMD64__) || defined(__amd64__) || \
-+    defined(__amd64__) || \
-     defined(ia64) || defined(__ia64__) || \
-     defined(__hppa__) || defined(hpux) || \
-     defined(__mips) || defined(_MIPS_ARCH) || \
-@@ -378,7 +378,8 @@
-    return r;
- }
- #define IROUND(x)  iround(x)
--#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
-+#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \
-+                      (!defined(__BEOS__) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
- static INLINE int iround(float f)
- {
-    int r;
-@@ -556,7 +557,7 @@
-  ***/
- #if defined(USE_IEEE) && !defined(DEBUG)
- #define COPY_FLOAT( dst, src )                                        \
--      ((fi_type *) &(dst))->i = ((fi_type *) &(src))->i
-+      ((fi_type *) &(dst))->i = ((fi_type *) (void *) &(src))->i
- #else
- #define COPY_FLOAT( dst, src )                (dst) = (src)
- #endif
-Index: extras/Mesa/src/mesa/main/light.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/light.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/light.c  16 Jun 2004 09:19:14 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/light.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1129,6 +1129,7 @@
- {
-    const GLuint oldneedeyecoords = ctx->_NeedEyeCoords;
-+   (void) new_state;
-    ctx->_NeedEyeCoords = 0;
-    if (ctx->_ForceEyeCoords ||
-Index: extras/Mesa/src/mesa/main/macros.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/macros.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/macros.h 16 Jun 2004 09:19:16 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/macros.h 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -654,7 +654,4 @@
- #define LEN_SQUARED_2FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1])
--/*@}*/
--
--
- #endif
-Index: extras/Mesa/src/mesa/main/mtypes.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/mtypes.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/main/mtypes.h 22 Jul 2004 06:53:00 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/mtypes.h 15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -890,6 +890,7 @@
-    GLboolean PointSprite;     /**< GL_NV_point_sprite / GL_NV_point_sprite */
-    GLboolean CoordReplace[MAX_TEXTURE_UNITS]; /**< GL_NV_point_sprite / GL_NV_point_sprite */
-    GLenum SpriteRMode;                /**< GL_NV_point_sprite (only!) */
-+   GLenum SpriteOrigin;               /**< GL_ARB_point_sprite */
- };
-@@ -1146,6 +1147,7 @@
- struct gl_texture_object {
-    _glthread_Mutex Mutex;     /**< for thread safety */
-    GLint RefCount;            /**< reference count */
-+   GLboolean DeletePending;   /**< Has glDeleteTexture been called? */
-    GLuint Name;                       /**< an unsigned integer */
-    GLenum Target;               /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
-    GLfloat Priority;          /**< in [0,1] */
-@@ -1572,10 +1574,11 @@
- struct program
- {
-    GLuint Id;
--   GLubyte *String;    /* Null-terminated program text */
--   GLenum Target;
--   GLenum Format;      /* String encoding format */
-+   GLubyte *String;          /**< Null-terminated program text */
-+   GLboolean DeletePending;  /**< User called glDeletePrograms? */
-    GLint RefCount;
-+   GLenum Target;
-+   GLenum Format;            /**< String encoding format */
-    GLboolean Resident;
-    GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4];
-    GLuint NumInstructions;  /* GL_ARB_vertex/fragment_program */
-Index: extras/Mesa/src/mesa/main/pixel.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/pixel.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/pixel.c  16 Jun 2004 09:19:15 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/pixel.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -791,6 +791,8 @@
-                           GLfloat rBias, GLfloat gBias,
-                           GLfloat bBias, GLfloat aBias)
- {
-+   (void) ctx;
-+
-    if (rScale != 1.0 || rBias != 0.0) {
-       GLuint i;
-       for (i = 0; i < n; i++) {
-Index: extras/Mesa/src/mesa/main/points.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/points.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/points.c 16 Jun 2004 09:19:15 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/points.c 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -5,9 +5,9 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  5.1
-+ * Version:  6.2
-  *
-- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -229,6 +229,25 @@
-             return;
-          }
-          break;
-+      case GL_POINT_SPRITE_COORD_ORIGIN:
-+         if (ctx->Extensions.ARB_point_sprite) {
-+            GLenum value = (GLenum) params[0];
-+            if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) {
-+               _mesa_error(ctx, GL_INVALID_VALUE,
-+                           "glPointParameterf[v]{EXT,ARB}(param)");
-+               return;
-+            }
-+            if (ctx->Point.SpriteOrigin == value)
-+               return;
-+            FLUSH_VERTICES(ctx, _NEW_POINT);
-+            ctx->Point.SpriteOrigin = value;
-+         }
-+         else {
-+            _mesa_error(ctx, GL_INVALID_ENUM,
-+                        "glPointParameterf[v]{EXT,ARB}(pname)");
-+            return;
-+         }
-+         break;
-       default:
-          _mesa_error( ctx, GL_INVALID_ENUM,
-                       "glPointParameterf[v]{EXT,ARB}(pname)" );
-@@ -266,6 +285,7 @@
-    ctx->Point.Threshold = 1.0;
-    ctx->Point.PointSprite = GL_FALSE; /* GL_ARB_point_sprite / GL_NV_point_sprite */
-    ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
-+   ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */
-    for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
-       ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_ARB_point_sprite / GL_NV_point_sprite */
-    }
-Index: extras/Mesa/src/mesa/main/state.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/state.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/state.c  16 Jun 2004 09:19:21 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/state.c  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -104,7 +104,7 @@
- static int
- generic_noop(void)
- {
--   _mesa_problem(NULL, "User called no-op dispatch function (not part of Mesa subset?)");
-+   _mesa_problem(NULL, "User called no-op dispatch function (an unsupported extension function?)");
-    return 0;
- }
-@@ -119,10 +119,11 @@
- void
- _mesa_init_no_op_table(struct _glapi_table *table, GLuint tableSize)
- {
-+   typedef void (*func_ptr_t)(void);
-    GLuint i;
--   void **dispatch = (void **) table;
-+   func_ptr_t *dispatch = (func_ptr_t *) table;
-    for (i = 0; i < tableSize; i++) {
--      dispatch[i] = (void *) generic_noop;
-+      dispatch[i] = (func_ptr_t)generic_noop;
-    }
- }
-Index: extras/Mesa/src/mesa/main/texcompress.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texcompress.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/texcompress.c    16 Jun 2004 09:19:21 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/texcompress.c    15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -113,6 +113,7 @@
-    GLuint size;
-    ASSERT(depth == 1);
-+   (void) depth;
-    switch (format) {
-    case GL_COMPRESSED_RGB_FXT1_3DFX:
-Index: extras/Mesa/src/mesa/main/texcompress_fxt1.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texcompress_fxt1.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/main/texcompress_fxt1.c       28 Aug 2004 04:28:04 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/main/texcompress_fxt1.c       15 Dec 2004 01:51:02 -0000      1.1.1.3.2.1
-@@ -57,6 +57,7 @@
- void
- _mesa_init_texture_fxt1( GLcontext *ctx )
- {
-+   (void) ctx;
- }
-@@ -76,6 +77,7 @@
-    ASSERT(dstXoffset % 8 == 0);
-    ASSERT(dstYoffset % 4 == 0);
-    ASSERT(dstZoffset     == 0);
-+   (void) dstZoffset; (void) dstImageStride;
-    if (srcFormat != GL_RGB ||
-        srcType != CHAN_TYPE ||
-@@ -131,6 +133,7 @@
-    ASSERT(dstXoffset % 8 == 0);
-    ASSERT(dstYoffset % 4 == 0);
-    ASSERT(dstZoffset     == 0);
-+   (void) dstZoffset; (void) dstImageStride;
-    if (srcFormat != GL_RGBA ||
-        srcType != CHAN_TYPE ||
-@@ -174,6 +177,7 @@
- fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
-                           GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) k;
-    fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
- }
-@@ -184,6 +188,7 @@
- {
-    /* just sample as GLchan and convert to float here */
-    GLchan rgba[4];
-+   (void) k;
-    fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
-    texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
-    texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
-@@ -196,6 +201,7 @@
- fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
-                          GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) k;
-    fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
-    texel[ACOMP] = 255;
- }
-@@ -207,6 +213,7 @@
- {
-    /* just sample as GLchan and convert to float here */
-    GLchan rgba[4];
-+   (void) k;
-    fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
-    texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
-    texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
-@@ -288,9 +295,9 @@
- typedef unsigned long long Fx64;
--#define FX64_MOV32(a, b) a = b;
--#define FX64_OR32(a, b)  a |= b;
--#define FX64_SHL(a, c)   a <<= c;
-+#define FX64_MOV32(a, b) a = b
-+#define FX64_OR32(a, b)  a |= b
-+#define FX64_SHL(a, c)   a <<= c
- #else  /* !__GNUC__ */
-@@ -1284,7 +1291,7 @@
-       }
-       /* funky encoding for LSB of green */
--      if (((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
-+      if ((int)((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
-          for (i = 0; i < n_comp; i++) {
-             vec[1][i] = input[minColL][i];
-             vec[0][i] = input[maxColL][i];
-@@ -1339,7 +1346,7 @@
-       }
-       /* funky encoding for LSB of green */
--      if (((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
-+      if ((int)((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
-          for (i = 0; i < n_comp; i++) {
-             vec[3][i] = input[minColR][i];
-             vec[2][i] = input[maxColR][i];
-@@ -1387,7 +1394,7 @@
-       }
-    }
--   /* block looks like this:
-+   /* block layout:
-     * 00, 01, 02, 03, 08, 09, 0a, 0b
-     * 10, 11, 12, 13, 18, 19, 1a, 1b
-     * 04, 05, 06, 07, 0c, 0d, 0e, 0f
-@@ -1427,6 +1434,9 @@
-    } else {
-       fxt1_quantize_CHROMA(cc, input);
-    }
-+   (void)fxt1_quantize_ALPHA1;
-+   (void)fxt1_quantize_MIXED1;
-+   (void)fxt1_quantize_MIXED0;
- #else
-    if (trualpha) {
-       fxt1_quantize_ALPHA1(cc, input);
-@@ -1438,6 +1448,9 @@
-    } else {
-       fxt1_quantize_MIXED0(cc, input);
-    }
-+   (void)fxt1_quantize_ALPHA0;
-+   (void)fxt1_quantize_HI;
-+   (void)fxt1_quantize_CHROMA;
- #endif
- }
-@@ -1455,6 +1468,8 @@
-    unsigned long *encoded = dest;
-    GLubyte *newSource = NULL;
-+   (void) ctx;
-+
-    /*
-     * Rescale image if width is less than 8 or height is less than 4.
-     */
-Index: extras/Mesa/src/mesa/main/texcompress_s3tc.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texcompress_s3tc.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/texcompress_s3tc.c       16 Jun 2004 09:19:15 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/texcompress_s3tc.c       15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -45,6 +45,7 @@
- _mesa_init_texture_s3tc( GLcontext *ctx )
- {
-    /* called during context initialization */
-+   (void) ctx;
- }
-@@ -64,6 +65,7 @@
-    ASSERT(dstXoffset % 4 == 0);
-    ASSERT(dstYoffset % 4 == 0);
-    ASSERT(dstZoffset % 4 == 0);
-+   (void) dstZoffset; (void) dstImageStride;
-    if (srcFormat != GL_RGB ||
-        srcType != CHAN_TYPE ||
-@@ -121,6 +123,7 @@
-    ASSERT(dstXoffset % 4 == 0);
-    ASSERT(dstYoffset % 4 == 0);
-    ASSERT(dstZoffset % 4 == 0);
-+   (void) dstZoffset; (void) dstImageStride;
-    if (srcFormat != GL_RGBA ||
-        srcType != CHAN_TYPE ||
-@@ -176,6 +179,7 @@
-    ASSERT(dstXoffset % 4 == 0);
-    ASSERT(dstYoffset % 4 == 0);
-    ASSERT(dstZoffset % 4 == 0);
-+   (void) dstZoffset; (void) dstImageStride;
-    if (srcFormat != GL_RGBA ||
-        srcType != CHAN_TYPE ||
-@@ -230,6 +234,7 @@
-    ASSERT(dstXoffset % 4 == 0);
-    ASSERT(dstYoffset % 4 == 0);
-    ASSERT(dstZoffset % 4 == 0);
-+   (void) dstZoffset; (void) dstImageStride;
-    if (srcFormat != GL_RGBA ||
-        srcType != CHAN_TYPE ||
-@@ -272,6 +277,7 @@
- fetch_texel_2d_rgb_dxt1( const struct gl_texture_image *texImage,
-                          GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) texImage; (void) i; (void) j; (void) k; (void) texel;
- }
-@@ -293,6 +299,7 @@
- fetch_texel_2d_rgba_dxt1( const struct gl_texture_image *texImage,
-                           GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) texImage; (void) i; (void) j; (void) k; (void) texel;
- }
-@@ -314,6 +321,7 @@
- fetch_texel_2d_rgba_dxt3( const struct gl_texture_image *texImage,
-                           GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) texImage; (void) i; (void) j; (void) k; (void) texel;
- }
-@@ -335,6 +343,7 @@
- fetch_texel_2d_rgba_dxt5( const struct gl_texture_image *texImage,
-                           GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) texImage; (void) i; (void) j; (void) k; (void) texel;
- }
-Index: extras/Mesa/src/mesa/main/texformat.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texformat.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/texformat.c      16 Jun 2004 09:19:15 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/texformat.c      15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -63,6 +63,7 @@
- static void fetch_null_texel( const struct gl_texture_image *texImage,
-                             GLint i, GLint j, GLint k, GLchan *texel )
- {
-+   (void) texImage; (void) i; (void) j; (void) k;
-    texel[RCOMP] = 0;
-    texel[GCOMP] = 0;
-    texel[BCOMP] = 0;
-@@ -73,6 +74,7 @@
- static void fetch_null_texelf( const struct gl_texture_image *texImage,
-                                GLint i, GLint j, GLint k, GLfloat *texel )
- {
-+   (void) texImage; (void) i; (void) j; (void) k;
-    texel[RCOMP] = 0.0;
-    texel[GCOMP] = 0.0;
-    texel[BCOMP] = 0.0;
-Index: extras/Mesa/src/mesa/main/texformat_tmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texformat_tmp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/texformat_tmp.h  16 Jun 2004 09:19:16 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/texformat_tmp.h  15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -44,34 +44,46 @@
- #if DIM == 1
- #define CHAN_SRC( t, i, j, k, sz )                                    \
--      ((GLchan *)(t)->Data + (i) * (sz))
-+      ((void) (j), (void) (k),                                        \
-+       ((GLchan *)(t)->Data + (i) * (sz)))
- #define UBYTE_SRC( t, i, j, k, sz )                                   \
--      ((GLubyte *)(t)->Data + (i) * (sz))
-+      ((void) (j), (void) (k),                                        \
-+       ((GLubyte *)(t)->Data + (i) * (sz)))
- #define USHORT_SRC( t, i, j, k )                                      \
--      ((GLushort *)(t)->Data + (i))
-+      ((void) (j), (void) (k),                                        \
-+       ((GLushort *)(t)->Data + (i)))
- #define UINT_SRC( t, i, j, k )                                                \
--      ((GLuint *)(t)->Data + (i))
-+      ((void) (j), (void) (k),                                        \
-+       ((GLuint *)(t)->Data + (i)))
- #define FLOAT_SRC( t, i, j, k, sz )                                   \
--      ((GLfloat *)(t)->Data + (i) * (sz))
-+      ((void) (j), (void) (k),                                        \
-+       ((GLfloat *)(t)->Data + (i) * (sz)))
- #define HALF_SRC( t, i, j, k, sz )                                    \
--      ((GLhalfARB *)(t)->Data + (i) * (sz))
-+      ((void) (j), (void) (k),                                        \
-+       ((GLhalfARB *)(t)->Data + (i) * (sz)))
- #define FETCH(x) fetch_texel_1d_##x
- #elif DIM == 2
- #define CHAN_SRC( t, i, j, k, sz )                                    \
--      ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
-+      ((void) (k),                                                    \
-+       ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
- #define UBYTE_SRC( t, i, j, k, sz )                                   \
--      ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
-+      ((void) (k),                                                    \
-+       ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
- #define USHORT_SRC( t, i, j, k )                                      \
--      ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i)))
-+      ((void) (k),                                                    \
-+       ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i))))
- #define UINT_SRC( t, i, j, k )                                                \
--      ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i)))
-+      ((void) (k),                                                    \
-+       ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i))))
- #define FLOAT_SRC( t, i, j, k, sz )                                   \
--      ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
-+      ((void) (k),                                                    \
-+       ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
- #define HALF_SRC( t, i, j, k, sz )                                    \
--      ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
-+      ((void) (k),                                                    \
-+       ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
- #define FETCH(x) fetch_texel_2d_##x
-@@ -1011,9 +1023,9 @@
-                       GLint i, GLint j, GLint k, GLchan *texel )
- {
-    const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 );
--   const GLuint index = *src;
-    const struct gl_color_table *palette;
-    const GLchan *table;
-+   GLuint index;
-    GET_CURRENT_CONTEXT(ctx);
-    if (ctx->Texture.SharedPalette) {
-@@ -1027,6 +1039,9 @@
-    ASSERT(palette->Type != GL_FLOAT);
-    table = (const GLchan *) palette->Table;
-+   /* Mask the index against size of palette to avoid going out of bounds */
-+   index = (*src) & (palette->Size - 1);
-+
-    switch (palette->Format) {
-       case GL_ALPHA:
-          texel[RCOMP] =
-Index: extras/Mesa/src/mesa/main/teximage.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/teximage.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/main/teximage.c       22 Jul 2004 06:52:58 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/teximage.c       15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -330,6 +330,9 @@
- is_color_format(GLenum format)
- {
-    switch (format) {
-+      case GL_RED:
-+      case GL_GREEN:
-+      case GL_BLUE:
-       case GL_ALPHA:
-       case GL_ALPHA4:
-       case GL_ALPHA8:
-@@ -481,6 +484,7 @@
- static GLboolean
- is_compressed_format(GLcontext *ctx, GLenum internalFormat)
- {
-+   (void) ctx;
-    switch (internalFormat) {
-       case GL_COMPRESSED_RGB_FXT1_3DFX:
-       case GL_COMPRESSED_RGBA_FXT1_3DFX:
-@@ -881,11 +885,9 @@
-    case GL_TEXTURE_CUBE_MAP_ARB:
-    case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
-       return ctx->Const.MaxCubeTextureLevels;
--      break;
-    case GL_TEXTURE_RECTANGLE_NV:
-    case GL_PROXY_TEXTURE_RECTANGLE_NV:
-       return 1;
--      break;
-    default:
-       return 0; /* bad target */
-    }
-@@ -1978,6 +1980,9 @@
-       return;
-    }
-+   /*
-+    * XXX Move this code into a new driver fall-back function
-+    */
-    {
-       const GLint width = texImage->Width;
-       const GLint height = texImage->Height;
-@@ -2395,7 +2400,7 @@
-    texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
-    assert(texImage);
--   if (width == 0 || !pixels)
-+   if (width == 0)
-       return;  /* no-op, not an error */
-    /* If we have a border, xoffset=-1 is legal.  Bias by border width */
-@@ -2442,7 +2447,7 @@
-    texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
-    assert(texImage);
--   if (width == 0 || height == 0 || !pixels)
-+   if (width == 0 || height == 0)
-       return;  /* no-op, not an error */
-    /* If we have a border, xoffset=-1 is legal.  Bias by border width */
-@@ -2484,7 +2489,7 @@
-    texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
-    assert(texImage);
--   if (width == 0 || height == 0 || height == 0 || !pixels)
-+   if (width == 0 || height == 0 || height == 0)
-       return;  /* no-op, not an error */
-    /* If we have a border, xoffset=-1 is legal.  Bias by border width */
-@@ -2794,6 +2799,9 @@
-    if (!is_compressed_format(ctx, internalFormat))
-       return GL_INVALID_ENUM;
-+   if (_mesa_base_tex_format(ctx, internalFormat) < 0)
-+      return GL_INVALID_ENUM;
-+
-    if (border != 0)
-       return GL_INVALID_VALUE;
-@@ -2846,6 +2854,7 @@
-                                   GLenum format, GLsizei imageSize)
- {
-    GLint expectedSize, maxLevels = 0, maxTextureSize;
-+   (void) zoffset;
-    if (dimensions == 1) {
-       /* 1D compressed textures not allowed */
-@@ -3193,7 +3202,7 @@
-       return;
-    }
-       
--   if (width == 0 || !data)
-+   if (width == 0)
-       return;  /* no-op, not an error */
-    if (ctx->Driver.CompressedTexSubImage1D) {
-@@ -3244,7 +3253,7 @@
-       return;
-    }
-       
--   if (width == 0 || height == 0 || !data)
-+   if (width == 0 || height == 0)
-       return;  /* no-op, not an error */
-    if (ctx->Driver.CompressedTexSubImage2D) {
-@@ -3295,7 +3304,7 @@
-       return;
-    }
-       
--   if (width == 0 || height == 0 || depth == 0 || !data)
-+   if (width == 0 || height == 0 || depth == 0)
-       return;  /* no-op, not an error */
-    if (ctx->Driver.CompressedTexSubImage3D) {
-Index: extras/Mesa/src/mesa/main/texobj.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texobj.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/texobj.c 16 Jun 2004 09:19:18 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/texobj.c 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -5,7 +5,7 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -64,6 +64,7 @@
- _mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target )
- {
-    struct gl_texture_object *obj;
-+   (void) ctx;
-    obj = MALLOC_STRUCT(gl_texture_object);
-    _mesa_initialize_texture_object(obj, name, target);
-    return obj;
-@@ -71,7 +72,7 @@
- /**
-- * Initialize a texture object to default values.
-+ * Initialize a new texture object to default values.
-  * \param obj  the texture object
-  * \param name  the texture name
-  * \param target  the texture target
-@@ -87,9 +88,9 @@
-           target == GL_TEXTURE_CUBE_MAP_ARB ||
-           target == GL_TEXTURE_RECTANGLE_NV);
-+   _mesa_bzero(obj, sizeof(*obj));
-    /* init the non-zero fields */
-    _glthread_INIT_MUTEX(obj->Mutex);
--   _mesa_bzero(obj, sizeof(*obj));
-    obj->RefCount = 1;
-    obj->Name = name;
-    obj->Target = target;
-@@ -137,8 +138,6 @@
-    (void) ctx;
--   assert(texObj);
--
-    _mesa_free_colortable_data(&texObj->Palette);
-    /* free the texture images */
-@@ -702,12 +701,16 @@
-             }
-             ctx->NewState |= _NEW_TEXTURE;
--            /* Decrement reference count and delete if zero */
--            delObj->RefCount--;
--            ASSERT(delObj->RefCount >= 0);
-+            /* If user hasn't already tried to delete the texture... */
-+            if (!delObj->DeletePending) {
-+               delObj->DeletePending = GL_TRUE;
-+               delObj->RefCount--;
-+               ASSERT(delObj->RefCount >= 0);
-+            }
-+            /* See if we can really delete the texture now */
-             if (delObj->RefCount == 0) {
--               ASSERT(delObj->Name != 0);
-+               ASSERT(delObj->Name != 0); /* Never delete default tex objects */
-                _mesa_remove_texture_object(ctx, delObj);
-                ASSERT(ctx->Driver.DeleteTexture);
-                (*ctx->Driver.DeleteTexture)(ctx, delObj);
-@@ -717,6 +720,7 @@
-    }
- }
-+
- /**
-  * Bind a named texture to a texturing target.
-  * 
-@@ -746,6 +750,9 @@
-       _mesa_debug(ctx, "glBindTexture %s %d\n",
-                   _mesa_lookup_enum_by_nr(target), (GLint) texName);
-+   /*
-+    * Get pointer to currently bound texture object (oldTexObj)
-+    */
-    switch (target) {
-       case GL_TEXTURE_1D:
-          oldTexObj = texUnit->Current1D;
-@@ -776,6 +783,10 @@
-    }
-    if (oldTexObj->Name == texName)
-+      /* XXX this might be wrong.  If the texobj is in use by another
-+       * context and a texobj parameter was changed, this might be our
-+       * only chance to update this context's hardware state.
-+       */
-       return;   /* rebinding the same texture- no change */
-    /*
-@@ -874,16 +885,21 @@
-    if (ctx->Driver.BindTexture)
-       (*ctx->Driver.BindTexture)( ctx, target, newTexObj );
-+   /* Decrement the reference count on the old texture and check if it's
-+    * time to delete it.
-+    */
-    oldTexObj->RefCount--;
--   assert(oldTexObj->RefCount >= 0);
-+   ASSERT(oldTexObj->RefCount >= 0);
-    if (oldTexObj->RefCount == 0) {
--      assert(oldTexObj->Name != 0);
-+      ASSERT(oldTexObj->Name != 0);
-+      ASSERT(oldTexObj->DeletePending);
-       _mesa_remove_texture_object(ctx, oldTexObj);
-       ASSERT(ctx->Driver.DeleteTexture);
-       (*ctx->Driver.DeleteTexture)( ctx, oldTexObj );
-    }
- }
-+
- /**
-  * Set texture priorities.
-  * 
-Index: extras/Mesa/src/mesa/main/texstore.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/texstore.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/main/texstore.c       22 Jul 2004 06:53:01 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/main/texstore.c       15 Dec 2004 01:51:02 -0000      1.1.1.2.4.1
-@@ -701,6 +701,7 @@
- GLboolean
- _mesa_texstore_depth_component_float32(STORE_PARAMS)
- {
-+   (void) dims;
-    ASSERT(dstFormat == &_mesa_texformat_depth_component_float32);
-    ASSERT(dstFormat->TexelBytes == sizeof(GLfloat));
-@@ -744,6 +745,7 @@
- GLboolean
- _mesa_texstore_depth_component16(STORE_PARAMS)
- {
-+   (void) dims;
-    ASSERT(dstFormat == &_mesa_texformat_depth_component16);
-    ASSERT(dstFormat->TexelBytes == sizeof(GLushort));
-@@ -1103,7 +1105,7 @@
-                                                  srcWidth, srcHeight, srcDepth,
-                                                  srcFormat, srcType, srcAddr,
-                                                  srcPacking);
--      const GLchan *src = (const GLubyte *) tempImage;
-+      const GLchan *src = (const GLchan *) tempImage;
-       GLubyte *dstImage = (GLubyte *) dstAddr
-                         + dstZoffset * dstImageStride
-                         + dstYoffset * dstRowStride
-@@ -1207,7 +1209,7 @@
-                                                  srcWidth, srcHeight, srcDepth,
-                                                  srcFormat, srcType, srcAddr,
-                                                  srcPacking);
--      const GLchan *src = (const GLubyte *) tempImage;
-+      const GLchan *src = (const GLchan *) tempImage;
-       GLubyte *dstImage = (GLubyte *) dstAddr
-                         + dstZoffset * dstImageStride
-                         + dstYoffset * dstRowStride
-@@ -1553,6 +1555,7 @@
- GLboolean
- _mesa_texstore_ci8(STORE_PARAMS)
- {
-+   (void) dims; (void) baseInternalFormat;
-    ASSERT(dstFormat == &_mesa_texformat_ci8);
-    ASSERT(dstFormat->TexelBytes == 1);
-    ASSERT(baseInternalFormat == GL_COLOR_INDEX);
-@@ -1599,6 +1602,7 @@
- {
-    const GLuint ui = 1;
-    const GLubyte littleEndian = *((const GLubyte *) &ui);
-+   (void) ctx; (void) dims; (void) baseInternalFormat;
-    ASSERT((dstFormat == &_mesa_texformat_ycbcr) ||
-           (dstFormat == &_mesa_texformat_ycbcr_rev));
-@@ -1852,6 +1856,7 @@
- {
-    GLint postConvWidth = width;
-    GLint sizeInBytes;
-+   (void) border;
-    if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
-       _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
-@@ -1925,6 +1930,7 @@
- {
-    GLint postConvWidth = width, postConvHeight = height;
-    GLint texelBytes, sizeInBytes;
-+   (void) border;
-    if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
-       _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
-@@ -2004,6 +2010,7 @@
-                        struct gl_texture_image *texImage)
- {
-    GLint texelBytes, sizeInBytes;
-+   (void) border;
-    /* choose the texture format */
-    assert(ctx->Driver.ChooseTextureFormat);
-@@ -2228,6 +2235,13 @@
-                                   struct gl_texture_image *texImage)
- {
-    /* this space intentionally left blank */
-+   (void) ctx;
-+   (void) target; (void) level;
-+   (void) internalFormat;
-+   (void) width; (void) border;
-+   (void) imageSize; (void) data;
-+   (void) texObj;
-+   (void) texImage;
- }
-@@ -2243,6 +2257,8 @@
-                                   struct gl_texture_object *texObj,
-                                   struct gl_texture_image *texImage)
- {
-+   (void) width; (void) height; (void) border;
-+
-    /* This is pretty simple, basically just do a memcpy without worrying
-     * about the usual image unpacking or image transfer operations.
-     */
-@@ -2299,6 +2315,14 @@
-                                   struct gl_texture_image *texImage)
- {
-    /* this space intentionally left blank */
-+   (void) ctx;
-+   (void) target; (void) level;
-+   (void) internalFormat;
-+   (void) width; (void) height; (void) depth;
-+   (void) border;
-+   (void) imageSize; (void) data;
-+   (void) texObj;
-+   (void) texImage;
- }
-@@ -2316,6 +2340,13 @@
-                                      struct gl_texture_image *texImage)
- {
-    /* this space intentionally left blank */
-+   (void) ctx;
-+   (void) target; (void) level;
-+   (void) xoffset; (void) width;
-+   (void) format;
-+   (void) imageSize; (void) data;
-+   (void) texObj;
-+   (void) texImage;
- }
-@@ -2336,6 +2367,7 @@
-    GLint i, rows;
-    GLubyte *dest;
-    const GLubyte *src;
-+   (void) format;
-    /* these should have been caught sooner */
-    ASSERT((width & 3) == 0 || width == 2 || width == 1);
-@@ -2389,6 +2421,14 @@
-                                 struct gl_texture_image *texImage)
- {
-    /* this space intentionally left blank */
-+   (void) ctx;
-+   (void) target; (void) level;
-+   (void) xoffset; (void) yoffset; (void) zoffset;
-+   (void) width; (void) height; (void) depth;
-+   (void) format;
-+   (void) imageSize; (void) data;
-+   (void) texObj;
-+   (void) texImage;
- }
-Index: extras/Mesa/src/mesa/main/varray.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/varray.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/varray.c 16 Jun 2004 09:19:19 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/varray.c 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -60,6 +60,7 @@
- #if FEATURE_ARB_vertex_buffer_object
-    array->BufferObj->RefCount--;
-    if (array->BufferObj->RefCount <= 0) {
-+      ASSERT(array->BufferObj->Name);
-       _mesa_remove_buffer_object( ctx, array->BufferObj );
-       (*ctx->Driver.DeleteBuffer)( ctx, array->BufferObj );
-    }
-Index: extras/Mesa/src/mesa/main/version.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/version.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/version.h        16 Jun 2004 09:19:19 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/version.h        15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2.1
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -29,9 +29,9 @@
- /* Mesa version */
- #define MESA_MAJOR 6
--#define MESA_MINOR 1
--#define MESA_PATCH 0
--#define MESA_VERSION_STRING "6.1"
-+#define MESA_MINOR 2
-+#define MESA_PATCH 1
-+#define MESA_VERSION_STRING "6.2.1"
- /* To make version comparison easy */
- #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-Index: extras/Mesa/src/mesa/main/vtxfmt.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/main/vtxfmt.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/main/vtxfmt.c 16 Jun 2004 09:19:19 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/main/vtxfmt.c 15 Dec 2004 01:51:02 -0000      1.1.1.1.4.1
-@@ -49,6 +49,7 @@
- {                                                                     \
-    GET_CURRENT_CONTEXT(ctx);                                          \
-    struct gl_tnl_module *tnl = &(ctx->TnlModule);                     \
-+   typedef void (*func_ptr_t)(void);                                  \
-                                                                       \
-    ASSERT( tnl->Current );                                            \
-    ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES );              \
-@@ -56,7 +57,7 @@
-    /* Save the swapped function's dispatch entry so it can be */      \
-    /* restored later. */                                              \
-    tnl->Swapped[tnl->SwapCount][0] = (void *)&(ctx->Exec->FUNC);      \
--   tnl->Swapped[tnl->SwapCount][1] = (void *)TAG(FUNC);                       \
-+   *(func_ptr_t *)(tnl->Swapped[tnl->SwapCount]+1) = (func_ptr_t)TAG(FUNC);   \
-    tnl->SwapCount++;                                                  \
-                                                                       \
-    if ( 0 )                                                           \
-Index: extras/Mesa/src/mesa/math/m_clip_tmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/math/m_clip_tmp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/math/m_clip_tmp.h     16 Jun 2004 09:19:22 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/math/m_clip_tmp.h     15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -1,9 +1,8 @@
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  5.1
-+ * Version:  6.2
-  *
-- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -129,6 +128,7 @@
-    GLubyte tmpAndMask = *andMask;
-    GLubyte tmpOrMask = *orMask;
-    GLuint i;
-+   (void) proj_vec;
-    STRIDE_LOOP {
-       const GLfloat cx = from[0];
-       const GLfloat cy = from[1];
-@@ -176,10 +176,10 @@
-    const GLuint stride = clip_vec->stride;
-    const GLuint count = clip_vec->count;
-    const GLfloat *from = (GLfloat *)clip_vec->start;
--
-    GLubyte tmpOrMask = *orMask;
-    GLubyte tmpAndMask = *andMask;
-    GLuint i;
-+   (void) proj_vec;
-    STRIDE_LOOP {
-       const GLfloat cx = from[0], cy = from[1], cz = from[2];
-       GLubyte mask = 0;
-@@ -209,10 +209,10 @@
-    const GLuint stride = clip_vec->stride;
-    const GLuint count = clip_vec->count;
-    const GLfloat *from = (GLfloat *)clip_vec->start;
--
-    GLubyte tmpOrMask = *orMask;
-    GLubyte tmpAndMask = *andMask;
-    GLuint i;
-+   (void) proj_vec;
-    STRIDE_LOOP {
-       const GLfloat cx = from[0], cy = from[1];
-       GLubyte mask = 0;
-Index: extras/Mesa/src/mesa/math/m_matrix.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/math/m_matrix.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/math/m_matrix.c       16 Jun 2004 09:19:23 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/math/m_matrix.c       15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -1,16 +1,6 @@
--/**
-- * \file m_matrix.c
-- * Matrix operations.
-- *
-- * \note
-- * -# 4x4 transformation matrices are stored in memory in column major order.
-- * -# Points/vertices are to be thought of as column vectors.
-- * -# Transformation of a point p by a matrix M is: p' = M * p
-- */
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.0.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -33,6 +23,17 @@
-  */
-+/**
-+ * \file m_matrix.c
-+ * Matrix operations.
-+ *
-+ * \note
-+ * -# 4x4 transformation matrices are stored in memory in column major order.
-+ * -# Points/vertices are to be thought of as column vectors.
-+ * -# Transformation of a point p by a matrix M is: p' = M * p
-+ */
-+
-+
- #include "glheader.h"
- #include "imports.h"
- #include "macros.h"
-@@ -1142,7 +1143,7 @@
-       mat->type = MATRIX_2D_NO_ROT;
-       if ((mask & MASK_NO_2D_SCALE) != MASK_NO_2D_SCALE)
--       mat->flags = MAT_FLAG_GENERAL_SCALE;
-+       mat->flags |= MAT_FLAG_GENERAL_SCALE;
-    }
-    else if ((mask & MASK_2D) == (GLuint) MASK_2D) {
-       GLfloat mm = DOT2(m, m);
-Index: extras/Mesa/src/mesa/math/m_matrix.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/math/m_matrix.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/math/m_matrix.h       16 Jun 2004 09:19:23 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/math/m_matrix.h       15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -1,13 +1,8 @@
--/**
-- * \file math/m_matrix.h
-- * Defines basic structures for matrix-handling.
-- */
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  3.5
-+ * Version:  6.2
-  *
-- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -28,6 +23,11 @@
-  */
-+/**
-+ * \file math/m_matrix.h
-+ * Defines basic structures for matrix-handling.
-+ */
-+
- #ifndef _M_MATRIX_H
- #define _M_MATRIX_H
-@@ -36,7 +36,7 @@
- /**
-  * \name Symbolic names to some of the entries in the matrix
-  *
-- * To help out with the rework of the viewport_map as a matrix transform.
-+ * These are handy for the viewport mapping, which is expressed as a matrix.
-  */
- /*@{*/
- #define MAT_SX 0
-@@ -47,29 +47,30 @@
- #define MAT_TZ 14
- /*@}*/
-+
- /**
-  * \defgroup MatFlags MAT_FLAG_XXX-flags
-  *
-- * Bitmasks to indicate different kinds of 4x4 matrices in
-- * GLmatrix::flags
-+ * Bitmasks to indicate different kinds of 4x4 matrices in GLmatrix::flags
-+ * It would be nice to make all these flags private to m_matrix.c
-  */
- /*@{*/
--
--#define MAT_FLAG_IDENTITY       0     /**< is an identity matrix flag.
--                                       *   (Not actually used - the identity
--                                       *   matrix is identified by the absense
--                                       /   of all other flags.) */
--#define MAT_FLAG_GENERAL        0x1   /**< is a general matrix flag */
--#define MAT_FLAG_ROTATION       0x2   /**< is a rotation matrix flag */
--#define MAT_FLAG_TRANSLATION    0x4   /**< is a translation matrix flag */
--#define MAT_FLAG_UNIFORM_SCALE  0x8   /**< is an uniform scaling matrix flag */
--#define MAT_FLAG_GENERAL_SCALE  0x10  /**< is a general scaling matrix flag */
--#define MAT_FLAG_GENERAL_3D     0x20  /**< general 3D matrix flag */
--#define MAT_FLAG_PERSPECTIVE    0x40  /**< is a perspective projection matrix flag */
--#define MAT_FLAG_SINGULAR       0x80  /**< is a singular matrix flag */
--#define MAT_DIRTY_TYPE          0x100 /**< matrix type is dirty */
--#define MAT_DIRTY_FLAGS         0x200 /**< matrix flags are dirty */
--#define MAT_DIRTY_INVERSE       0x400 /**< matrix inverse is dirty */
-+#define MAT_FLAG_IDENTITY       0     /**< is an identity matrix flag.
-+                                       *   (Not actually used - the identity
-+                                       *   matrix is identified by the absense
-+                                       *   of all other flags.)
-+                                       */
-+#define MAT_FLAG_GENERAL        0x1   /**< is a general matrix flag */
-+#define MAT_FLAG_ROTATION       0x2   /**< is a rotation matrix flag */
-+#define MAT_FLAG_TRANSLATION    0x4   /**< is a translation matrix flag */
-+#define MAT_FLAG_UNIFORM_SCALE  0x8   /**< is an uniform scaling matrix flag */
-+#define MAT_FLAG_GENERAL_SCALE  0x10  /**< is a general scaling matrix flag */
-+#define MAT_FLAG_GENERAL_3D     0x20  /**< general 3D matrix flag */
-+#define MAT_FLAG_PERSPECTIVE    0x40  /**< is a perspective proj matrix flag */
-+#define MAT_FLAG_SINGULAR       0x80  /**< is a singular matrix flag */
-+#define MAT_DIRTY_TYPE          0x100  /**< matrix type is dirty */
-+#define MAT_DIRTY_FLAGS         0x200  /**< matrix flags are dirty */
-+#define MAT_DIRTY_INVERSE       0x400  /**< matrix inverse is dirty */
- /** angle preserving matrix flags mask */
- #define MAT_FLAGS_ANGLE_PRESERVING (MAT_FLAG_ROTATION | \
-@@ -120,25 +121,27 @@
- /**
-  * Different kinds of 4x4 transformation matrices.
-+ * We use these to select specific optimized vertex transformation routines.
-  */
- enum GLmatrixtype {
--      MATRIX_GENERAL,         /**< general 4x4 matrix */
--      MATRIX_IDENTITY,        /**< identity matrix */
--      MATRIX_3D_NO_ROT,       /**< orthogonal projection and others... */
--      MATRIX_PERSPECTIVE,     /**< perspective projection matrix */
--      MATRIX_2D,              /**< 2-D transformation */
--      MATRIX_2D_NO_ROT,       /**< 2-D scale & translate only */
--      MATRIX_3D               /**< 3-D transformation */
-+   MATRIX_GENERAL,    /**< general 4x4 matrix */
-+   MATRIX_IDENTITY,   /**< identity matrix */
-+   MATRIX_3D_NO_ROT,  /**< orthogonal projection and others... */
-+   MATRIX_PERSPECTIVE,        /**< perspective projection matrix */
-+   MATRIX_2D,         /**< 2-D transformation */
-+   MATRIX_2D_NO_ROT,  /**< 2-D scale & translate only */
-+   MATRIX_3D          /**< 3-D transformation */
- } ;
- /**
-- * Matrix.
-+ * Matrix type to represent 4x4 transformation matrices.
-  */
- typedef struct {
--   GLfloat *m;                /**< matrix, 16-byte aligned */
--   GLfloat *inv;      /**< optional inverse, 16-byte aligned */
-+   GLfloat *m;                /**< 16 matrix elements (16-byte aligned) */
-+   GLfloat *inv;      /**< optional 16-element inverse (16-byte aligned) */
-    GLuint flags;        /**< possible values determined by (of \link
--                         MatFlags MAT_FLAG_* flags\endlink) */
-+                         * MatFlags MAT_FLAG_* flags\endlink)
-+                         */
-    enum GLmatrixtype type;
- } GLmatrix;
-Index: extras/Mesa/src/mesa/math/m_xform_tmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/math/m_xform_tmp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/math/m_xform_tmp.h    16 Jun 2004 09:19:23 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/math/m_xform_tmp.h    15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -106,6 +106,7 @@
-    GLuint count = from_vec->count;
-    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
-    GLuint i;
-+   (void) m;
-    if (to_vec == from_vec) return;
-    STRIDE_LOOP {
-       to[i][0] = from[0];
-@@ -271,6 +272,7 @@
-    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
-    GLuint count = from_vec->count;
-    GLuint i;
-+   (void) m;
-    if (to_vec == from_vec) return;
-    STRIDE_LOOP {
-       to[i][0] = from[0];
-@@ -441,6 +443,7 @@
-    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
-    GLuint count = from_vec->count;
-    GLuint i;
-+   (void) m;
-    if (to_vec == from_vec) return;
-    STRIDE_LOOP {
-       to[i][0] = from[0];
-@@ -608,6 +611,7 @@
-    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
-    GLuint count = from_vec->count;
-    GLuint i;
-+   (void) m;
-    if (to_vec == from_vec) return;
-    STRIDE_LOOP {
-       to[i][0] = from[0];
-@@ -740,10 +744,10 @@
-    to_vec->count = from_vec->count;
- }
--static transform_func _XFORMAPI TAG(transform_tab_1)[7];
--static transform_func _XFORMAPI TAG(transform_tab_2)[7];
--static transform_func _XFORMAPI TAG(transform_tab_3)[7];
--static transform_func _XFORMAPI TAG(transform_tab_4)[7];
-+static transform_func TAG(transform_tab_1)[7];
-+static transform_func TAG(transform_tab_2)[7];
-+static transform_func TAG(transform_tab_3)[7];
-+static transform_func TAG(transform_tab_4)[7];
- /* Similar functions could be called several times, with more highly
-  * optimized routines overwriting the arrays.  This only occurs during
-Index: extras/Mesa/src/mesa/shader/arbfragparse.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/arbfragparse.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/shader/arbfragparse.c 16 Jun 2004 09:17:47 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/shader/arbfragparse.c 15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -186,6 +186,7 @@
- {
-    GLuint a, retval;
-    struct arb_program ap;
-+   (void) target;
-    /* set the program target before parsing */
-    ap.Base.Target = GL_FRAGMENT_PROGRAM_ARB;
-Index: extras/Mesa/src/mesa/shader/arbprogparse.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/arbprogparse.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/shader/arbprogparse.c 22 Jul 2004 06:51:14 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/shader/arbprogparse.c 15 Dec 2004 01:51:03 -0000      1.1.1.2.4.1
-@@ -42,6 +42,10 @@
- #include "arbprogparse.h"
- #include "grammar_mesa.h"
-+#if !defined(__GNUC__) && !defined(__extension__)
-+# define __extension__
-+#endif
-+
- /* TODO:
-  *    Fragment Program Stuff:
-  *    -----------------------------------------------------
-@@ -129,7 +133,7 @@
- /**
-  * This is the text describing the rules to parse the grammar
-  */
--static char arb_grammar_text[] =
-+__extension__ static char arb_grammar_text[] =
- #include "arbprogram_syn.h"
- ;
-@@ -591,6 +595,7 @@
- {
-    GLubyte *i = *inst;
-    struct var_cache *va = NULL;
-+   (void) Program;
-    *inst += _mesa_strlen ((char *) i) + 1;
-@@ -614,7 +619,8 @@
- parse_string_without_adding (GLubyte ** inst, struct arb_program *Program)
- {
-    GLubyte *i = *inst;
--
-+   (void) Program;
-+   
-    *inst += _mesa_strlen ((char *) i) + 1;
-    return (char *) i;
-@@ -788,6 +794,7 @@
- parse_color_type (GLcontext * ctx, GLubyte ** inst, struct arb_program *Program,
-                   GLint * color)
- {
-+   (void) ctx; (void) Program;
-    *color = *(*inst)++ != COLOR_PRIMARY;
-    return 0;
- }
-@@ -828,7 +835,7 @@
- {
-    GLint i = parse_integer (inst, Program);
--   if ((i < 0) || (i >= ctx->Const.MaxTextureUnits)) {
-+   if ((i < 0) || (i >= (int)ctx->Const.MaxTextureUnits)) {
-       _mesa_set_program_error (ctx, Program->Position,
-                                "Invalid texture unit index");
-       _mesa_error (ctx, GL_INVALID_OPERATION, "Invalid texture unit index");
-@@ -1890,7 +1897,7 @@
-    /* Test array length here! */
-    if (specified_length) {
--      if (specified_length != param_var->param_binding_length) {
-+      if (specified_length != (int)param_var->param_binding_length) {
-          _mesa_set_program_error (ctx, Program->Position,
-                                   "Declared parameter array lenght does not match parameter list");
-          _mesa_error (ctx, GL_INVALID_OPERATION,
-@@ -2282,6 +2289,7 @@
- {
-    struct var_cache *dst;
-    GLuint result;
-+   (void) Index;
-    dst = parse_string (inst, vc_head, Program, &result);
-    Program->Position = parse_position (inst);
-@@ -2492,7 +2500,7 @@
-                      offset = parse_integer (inst, Program);
-                      if ((offset < 0)
--                         || (offset >= src->param_binding_length)) {
-+                         || (offset >= (int)src->param_binding_length)) {
-                         _mesa_set_program_error (ctx, Program->Position,
-                                                  "Index out of range");
-                         _mesa_error (ctx, GL_INVALID_OPERATION,
-@@ -3686,7 +3694,7 @@
- }
- /* XXX temporary */
--static char core_grammar_text[] =
-+__extension__ static char core_grammar_text[] =
- #include "grammar_syn.h"
- ;
-@@ -3706,7 +3714,7 @@
- static int extension_is_supported (const GLubyte *ext)
- {
--   const GLubyte *extensions = glGetString (GL_EXTENSIONS);
-+   const GLubyte *extensions = GL_CALL(GetString)(GL_EXTENSIONS);
-    const GLubyte *end = extensions + _mesa_strlen ((const char *) extensions);
-    const GLint ext_len = _mesa_strlen ((const char *) ext);
-@@ -3754,6 +3762,9 @@
-    GLubyte *strz = NULL;
-    static int arbprogram_syn_is_ok = 0;               /* XXX temporary */
-+   /* Reset error state */
-+   _mesa_set_program_error(ctx, -1, NULL);
-+
- #if DEBUG_PARSING
-    fprintf (stderr, "Loading grammar text!\n");
- #endif
-@@ -3827,6 +3838,8 @@
-        enable_ext (ctx, arbprogram_syn_id,
-           (byte *) "fog_coord", (byte *) "GL_EXT_fog_coord") ||
-        enable_ext (ctx, arbprogram_syn_id,
-+          (byte *) "texture_rectangle", (byte *) "GL_ARB_texture_rectangle") ||
-+       enable_ext (ctx, arbprogram_syn_id,
-           (byte *) "texture_rectangle", (byte *) "GL_EXT_texture_rectangle") ||
-        enable_ext (ctx, arbprogram_syn_id,
-           (byte *) "texture_rectangle", (byte *) "GL_NV_texture_rectangle") ||
-@@ -3871,7 +3884,7 @@
-       if (0) {
-          int line, col;
-          char *s;
--         printf("Program: %s\n", strz);
-+         printf("Program: %s\n", (char *) strz);
-          printf("Error Pos: %d\n", ctx->Program.ErrorPos);
-          s = (char *) _mesa_find_line_column(strz, strz+ctx->Program.ErrorPos, &line, &col);
-          printf("line %d col %d: %s\n", line, col, s);
-Index: extras/Mesa/src/mesa/shader/arbprogram.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/arbprogram.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/shader/arbprogram.c   16 Jun 2004 09:17:48 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/shader/arbprogram.c   15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -262,7 +262,7 @@
-       }
-       ASSIGN_4V(ctx->FragmentProgram.Parameters[index], x, y, z, w);
-    }
--   if (target == GL_VERTEX_PROGRAM_ARB
-+   else if (target == GL_VERTEX_PROGRAM_ARB
-        && ctx->Extensions.ARB_vertex_program) {
-       if (index >= ctx->Const.MaxVertexProgramEnvParams) {
-          _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)");
-@@ -322,7 +322,7 @@
-       }
-       COPY_4V(params, ctx->FragmentProgram.Parameters[index]);
-    }
--   if (target == GL_VERTEX_PROGRAM_ARB
-+   else if (target == GL_VERTEX_PROGRAM_ARB
-        && ctx->Extensions.ARB_vertex_program) {
-       if (index >= ctx->Const.MaxVertexProgramEnvParams) {
-          _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramEnvParameter(index)");
-Index: extras/Mesa/src/mesa/shader/arbvertparse.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/arbvertparse.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/shader/arbvertparse.c 16 Jun 2004 09:17:49 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/shader/arbvertparse.c 15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -175,6 +175,7 @@
- {
-    GLuint retval;
-    struct arb_program ap;
-+   (void) target;
-    /* set the program target before parsing */
-    ap.Base.Target = GL_VERTEX_PROGRAM_ARB;
-Index: extras/Mesa/src/mesa/shader/grammar.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/grammar.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/shader/grammar.c      22 Jul 2004 06:51:17 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/shader/grammar.c      15 Dec 2004 01:51:03 -0000      1.1.1.2.4.1
-@@ -277,14 +277,14 @@
- static byte *unknown = (byte *) "???";
--static void clear_last_error ()
-+static void clear_last_error (void)
- {
-     /* reset error message */
-     error_message = NULL;
-     /* free error parameter - if error_param is a "???" don't free it - it's static */
-     if (error_param != unknown)
--        mem_free ((void **) &error_param);
-+        mem_free ((void **) (void *) &error_param);
-     else
-         error_param = NULL;
-@@ -297,7 +297,7 @@
-     /* error message can only be set only once */
-     if (error_message != NULL)
-     {
--        mem_free ((void **) &param);
-+        mem_free ((void **) (void *) &param);
-         return;
-     }
-@@ -768,7 +768,7 @@
- /*
-     returns unique grammar id
- */
--static grammar next_valid_grammar_id ()
-+static grammar next_valid_grammar_id (void)
- {
-     static grammar id = 0;
-@@ -1230,7 +1230,7 @@
-     {
-         if (string_grow (&p, &len, *t++))
-         {
--            mem_free ((void **) &p);
-+            mem_free ((void **) (void *) &p);
-             return 1;
-         }
-     }
-@@ -1379,7 +1379,7 @@
-         if (string_grow (&p, &len, c))
-         {
--            mem_free ((void **) &p);
-+            mem_free ((void **) (void *) &p);
-             return 1;
-         }
-     }
-@@ -1424,7 +1424,7 @@
-         }
-         m->data = (byte) c[0];
--        mem_free ((void **) &c);
-+        mem_free ((void **) (void *) &c);
-     }
-     else
-     {
-@@ -1502,11 +1502,11 @@
-     if (!str_equal ((byte *) "error", temp))
-     {
--        mem_free ((void **) &temp);
-+        mem_free ((void **) (void *) &temp);
-         return 0;
-     }
--    mem_free ((void **) &temp);
-+    mem_free ((void **) (void *) &temp);
-     error_create (er);
-     if (*er == NULL)
-@@ -1532,12 +1532,12 @@
-         if (map_str_find (&maps, temp, &(**er).m_text))
-         {
--            mem_free ((void **) &temp);
-+            mem_free ((void **) (void *) &temp);
-             error_destroy (er);
-             return 1;
-         }
--        mem_free ((void **) &temp);
-+        mem_free ((void **) (void *) &temp);
-     }
-     /* try to extract "token" from "...$token$..." */
-@@ -1558,7 +1558,7 @@
-             {
-                 if (string_grow (&processed, &len, '$'))
-                 {
--                    mem_free ((void **) &processed);
-+                    mem_free ((void **) (void *) &processed);
-                     error_destroy (er);
-                     return 1;
-                 }
-@@ -1569,7 +1569,7 @@
-             {
-                 if (string_grow (&processed, &len, (**er).m_text[i]))
-                 {
--                    mem_free ((void **) &processed);
-+                    mem_free ((void **) (void *) &processed);
-                     error_destroy (er);
-                     return 1;
-                 }
-@@ -1580,7 +1580,7 @@
-             {
-                 if (string_grow (&processed, &len, '$'))
-                 {
--                    mem_free ((void **) &processed);
-+                    mem_free ((void **) (void *) &processed);
-                     error_destroy (er);
-                     return 1;
-                 }
-@@ -1591,7 +1591,7 @@
-                     if (string_grow (&(**er).m_token_name, &tlen, '\0'))
-                     {
--                        mem_free ((void **) &processed);
-+                        mem_free ((void **) (void *) &processed);
-                         error_destroy (er);
-                         return 1;
-                     }
-@@ -1603,7 +1603,7 @@
-                     {
-                         if (string_grow (&(**er).m_token_name, &tlen, (**er).m_text[i]))
-                         {
--                            mem_free ((void **) &processed);
-+                            mem_free ((void **) (void *) &processed);
-                             error_destroy (er);
-                             return 1;
-                         }
-@@ -1652,11 +1652,11 @@
-         dest = ed_regbyte;
-     else
-     {
--        mem_free ((void **) &temp);
-+        mem_free ((void **) (void *) &temp);
-         return 0;
-     }
--    mem_free ((void **) &temp);
-+    mem_free ((void **) (void *) &temp);
-     emit_create (&e);
-     if (e == NULL)
-@@ -1706,7 +1706,7 @@
-         }
-         e->m_byte = (byte) temp[0];
--        mem_free ((void **) &temp);
-+        mem_free ((void **) (void *) &temp);
-         e->m_emit_type = et_byte;
-     }
-@@ -1720,12 +1720,12 @@
-         if (map_byte_find (&mapb, temp, &e->m_byte))
-         {
--            mem_free ((void **) &temp);
-+            mem_free ((void **) (void *) &temp);
-             emit_destroy (&e);
-             return 1;
-         }
--        mem_free ((void **) &temp);
-+        mem_free ((void **) (void *) &temp);
-         e->m_emit_type = et_byte;
-     }
-@@ -1819,7 +1819,7 @@
-             t = u;
-         }
--        mem_free ((void **) &keyword);
-+        mem_free ((void **) (void *) &keyword);
-     }
-     if (*t == '\'')
-@@ -1843,7 +1843,7 @@
-             if (get_string (&t, &temp2))
-             {
--                mem_free ((void **) &temp);
-+                mem_free ((void **) (void *) &temp);
-                 spec_destroy (&s);
-                 return 1;
-             }
-@@ -1853,7 +1853,7 @@
-             s->m_byte[0] = *temp;
-             s->m_byte[1] = *temp2;
--            mem_free ((void **) &temp2);
-+            mem_free ((void **) (void *) &temp2);
-         }
-         else
-         {
-@@ -1861,7 +1861,7 @@
-             *s->m_byte = *temp;
-         }
--        mem_free ((void **) &temp);
-+        mem_free ((void **) (void *) &temp);
-     }
-     else if (*t == '"')
-     {
-@@ -1908,7 +1908,7 @@
-         {
-             if (get_identifier (&t, &s->m_string))
-             {
--                mem_free ((void **) &keyword);
-+                mem_free ((void **) (void *) &keyword);
-                 spec_destroy (&s);
-                 return 1;
-             }
-@@ -1917,7 +1917,7 @@
-             s->m_spec_type = st_identifier_loop;
-         }
--        mem_free ((void **) &keyword);
-+        mem_free ((void **) (void *) &keyword);
-     }
-     else
-     {
-@@ -1993,7 +1993,7 @@
-                 r->m_oper = op_or;
-         }
--        mem_free ((void **) &op);
-+        mem_free ((void **) (void *) &op);
-         if (get_spec (&t, &sp, maps, mapb))
-         {
-@@ -2550,7 +2550,7 @@
-         {
-             map_byte *ma = NULL;
--            mem_free ((void **) &symbol);
-+            mem_free ((void **) (void *) &symbol);
-             if (get_emtcode (&text, &ma))
-             {
-@@ -2565,7 +2565,7 @@
-         {
-             map_byte *ma = NULL;
--            mem_free ((void **) &symbol);
-+            mem_free ((void **) (void *) &symbol);
-             if (get_regbyte (&text, &ma))
-             {
-@@ -2580,7 +2580,7 @@
-         {
-             map_str *ma = NULL;
--            mem_free ((void **) &symbol);
-+            mem_free ((void **) (void *) &symbol);
-             if (get_errtext (&text, &ma))
-             {
-@@ -2593,7 +2593,7 @@
-         /* .string */
-         else if (is_dot && str_equal (symbol, (byte *) "string"))
-         {
--            mem_free ((void **) &symbol);
-+            mem_free ((void **) (void *) &symbol);
-             if (g->di->m_string != NULL)
-             {
-@@ -2760,7 +2760,7 @@
-     *text = '\0';
- #define APPEND_CHARACTER(x) if (dots_made == 0) {\
--                                if (len < size - 1) {\
-+                                if (len < (int)size - 1) {\
-                                     text[len++] = (x); text[len] = '\0';\
-                                 } else {\
-                                     int i;\
-Index: extras/Mesa/src/mesa/shader/nvfragprog.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/nvfragprog.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/shader/nvfragprog.h   16 Jun 2004 09:17:51 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/shader/nvfragprog.h   15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -62,6 +62,7 @@
- /* Fragment program instruction opcodes */
- enum fp_opcode {
-+   FP_OPCODE_INVALID = -1,   /* Force signed enum */
-    FP_OPCODE_ABS = 1000,     /* ARB_f_p only */
-    FP_OPCODE_ADD,
-    FP_OPCODE_CMP,            /* ARB_f_p only */
-Index: extras/Mesa/src/mesa/shader/nvprogram.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/nvprogram.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/shader/nvprogram.c    22 Jul 2004 06:51:17 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/shader/nvprogram.c    15 Dec 2004 01:51:03 -0000      1.1.1.2.4.1
-@@ -160,12 +160,12 @@
-       }
-       prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, ids[i]);
--
-       if (!prog) {
-          _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)");
-          return;
-       }
-+      /* XXX this is really a hardware thing we should hook out */
-       prog->Resident = GL_TRUE;
-    }
- }
-@@ -529,7 +529,7 @@
-         target == GL_VERTEX_STATE_PROGRAM_NV)
-        && ctx->Extensions.NV_vertex_program) {
-       struct vertex_program *vprog = (struct vertex_program *) prog;
--      if (!vprog) {
-+      if (!vprog || prog == &_mesa_DummyProgram) {
-          vprog = (struct vertex_program *)
-             ctx->Driver.NewProgram(ctx, target, id);
-          if (!vprog) {
-@@ -543,7 +543,7 @@
-    else if (target == GL_FRAGMENT_PROGRAM_NV
-             && ctx->Extensions.NV_fragment_program) {
-       struct fragment_program *fprog = (struct fragment_program *) prog;
--      if (!fprog) {
-+      if (!fprog || prog == &_mesa_DummyProgram) {
-          fprog = (struct fragment_program *)
-             ctx->Driver.NewProgram(ctx, target, id);
-          if (!fprog) {
-@@ -776,7 +776,7 @@
-    }
-    if (len <= 0) {
--      _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV");
-+      _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(len)");
-       return;
-    }
-@@ -790,7 +790,7 @@
-       return;
-    }
--   _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV");
-+   _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(name)");
- }
-Index: extras/Mesa/src/mesa/shader/nvvertexec.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/nvvertexec.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/shader/nvvertexec.c   22 Jul 2004 06:51:17 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/shader/nvvertexec.c   15 Dec 2004 01:51:03 -0000      1.1.1.2.4.1
-@@ -358,8 +358,8 @@
-  * Set x to positive or negative infinity.
-  */
- #if defined(USE_IEEE) || defined(_WIN32)
--#define SET_POS_INFINITY(x)  ( *((GLuint *) &x) = 0x7F800000 )
--#define SET_NEG_INFINITY(x)  ( *((GLuint *) &x) = 0xFF800000 )
-+#define SET_POS_INFINITY(x)  ( *((GLuint *) (void *)&x) = 0x7F800000 )
-+#define SET_NEG_INFINITY(x)  ( *((GLuint *) (void *)&x) = 0xFF800000 )
- #elif defined(VMS)
- #define SET_POS_INFINITY(x)  x = __MAXFLOAT
- #define SET_NEG_INFINITY(x)  x = -__MAXFLOAT
-@@ -368,7 +368,7 @@
- #define SET_NEG_INFINITY(x)  x = (GLfloat) -HUGE_VAL
- #endif
--#define SET_FLOAT_BITS(x, bits) ((fi_type *) &(x))->i = bits
-+#define SET_FLOAT_BITS(x, bits) ((fi_type *) (void *) &(x))->i = bits
- /**
-@@ -467,7 +467,7 @@
-                   GLint ii = (GLint) floor_t0;
-                   ii = (ii < 23) + 0x3f800000;
-                   SET_FLOAT_BITS(q[0], ii);
--                  q[0] = *((GLfloat *) &ii);
-+                  q[0] = *((GLfloat *) (void *)&ii);
- #else
-                   q[0] = (GLfloat) pow(2.0, floor_t0);
- #endif
-Index: extras/Mesa/src/mesa/shader/nvvertparse.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/nvvertparse.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/shader/nvvertparse.c  22 Jul 2004 06:51:18 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/shader/nvvertparse.c  15 Dec 2004 01:51:03 -0000      1.1.1.2.4.1
-@@ -1023,6 +1023,7 @@
- Parse_OptionSequence(struct parse_state *parseState,
-                      struct vp_instruction program[])
- {
-+   (void) program;
-    while (1) {
-       if (!Parse_String(parseState, "OPTION"))
-          return GL_TRUE;  /* ok, not an OPTION statement */
-Index: extras/Mesa/src/mesa/shader/program.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/program.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/shader/program.c      28 Aug 2004 04:28:10 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/shader/program.c      15 Dec 2004 01:51:03 -0000      1.1.1.3.2.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -46,6 +46,12 @@
- /**********************************************************************/
-+/* A pointer to this dummy program is put into the hash table when
-+ * glGenPrograms is called.
-+ */
-+struct program _mesa_DummyProgram;
-+
-+
- /**
-  * Init context's vertex/fragment program state
-  */
-@@ -163,10 +169,14 @@
- }
--static struct program * _mesa_init_program_struct( GLcontext *ctx, 
--                                                 struct program *prog,
--                                                 GLenum target, GLuint id)
-+/**
-+ * Initialize a new vertex/fragment program object.
-+ */
-+static struct program *
-+_mesa_init_program_struct( GLcontext *ctx, struct program *prog,
-+                           GLenum target, GLuint id)
- {
-+   (void) ctx;
-    if (prog) {
-       prog->Id = id;
-       prog->Target = target;
-@@ -177,9 +187,13 @@
-    return prog;
- }
--struct program * _mesa_init_fragment_program( GLcontext *ctx, 
--                                            struct fragment_program *prog,
--                                            GLenum target, GLuint id)
-+
-+/**
-+ * Initialize a new fragment program object.
-+ */
-+struct program *
-+_mesa_init_fragment_program( GLcontext *ctx, struct fragment_program *prog,
-+                             GLenum target, GLuint id)
- {
-    if (prog) 
-       return _mesa_init_program_struct( ctx, &prog->Base, target, id );
-@@ -187,9 +201,13 @@
-       return NULL;
- }
--struct program * _mesa_init_vertex_program( GLcontext *ctx, 
--                                          struct vertex_program *prog,
--                                          GLenum target, GLuint id)
-+
-+/**
-+ * Initialize a new vertex program object.
-+ */
-+struct program *
-+_mesa_init_vertex_program( GLcontext *ctx, struct vertex_program *prog,
-+                           GLenum target, GLuint id)
- {
-    if (prog) 
-       return _mesa_init_program_struct( ctx, &prog->Base, target, id );
-@@ -217,12 +235,10 @@
-    case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
-       return _mesa_init_vertex_program( ctx, CALLOC_STRUCT(vertex_program),
-                                       target, id );
--
-    case GL_FRAGMENT_PROGRAM_NV:
-    case GL_FRAGMENT_PROGRAM_ARB:
-       return _mesa_init_fragment_program( ctx, CALLOC_STRUCT(fragment_program),
-                                         target, id );
--
-    default:
-       _mesa_problem(ctx, "bad target in _mesa_new_program");
-       return NULL;
-@@ -239,6 +255,7 @@
- void
- _mesa_delete_program(GLcontext *ctx, struct program *prog)
- {
-+   (void) ctx;
-    ASSERT(prog);
-    if (prog->String)
-@@ -524,8 +541,7 @@
-             _mesa_problem(ctx, "Invalid material state in fetch_state");
-             return;
-          }
--      };
--      return;
-+      }
-    case STATE_LIGHT:
-       {
-          /* state[1] is the light number */
-@@ -573,7 +589,6 @@
-             return;
-          }
-       }
--      return;
-    case STATE_LIGHTMODEL_AMBIENT:
-       COPY_4V(value, ctx->Light.Model.Ambient);
-       return;
-@@ -633,7 +648,6 @@
-                return;
-          }
-       }
--      return;
-    case STATE_TEXGEN:
-       {
-          /* state[1] is the texture unit */
-@@ -669,7 +683,6 @@
-             return;
-          }
-       }
--      return;
-    case STATE_TEXENV_COLOR:
-       {               
-          /* state[1] is the texture unit */
-@@ -864,15 +877,19 @@
-         && ctx->Extensions.NV_vertex_program) ||
-        (target == GL_VERTEX_PROGRAM_ARB
-         && ctx->Extensions.ARB_vertex_program)) {
--      if (ctx->VertexProgram.Current &&
--          ctx->VertexProgram.Current->Base.Id == id)
-+      /*** Vertex program binding ***/
-+      struct vertex_program *curProg = ctx->VertexProgram.Current;
-+      if (curProg->Base.Id == id) {
-+         /* binding same program - no change */
-          return;
--      /* decrement refcount on previously bound vertex program */
--      if (ctx->VertexProgram.Current) {
--         ctx->VertexProgram.Current->Base.RefCount--;
-+      }
-+      if (curProg->Base.Id != 0) {
-+         /* decrement refcount on previously bound vertex program */
-+         curProg->Base.RefCount--;
-          /* and delete if refcount goes below one */
--         if (ctx->VertexProgram.Current->Base.RefCount <= 0) {
--            ctx->Driver.DeleteProgram(ctx, &(ctx->VertexProgram.Current->Base));
-+         if (curProg->Base.RefCount <= 0) {
-+            ASSERT(curProg->Base.DeletePending);
-+            ctx->Driver.DeleteProgram(ctx, &(curProg->Base));
-             _mesa_HashRemove(ctx->Shared->Programs, id);
-          }
-       }
-@@ -881,15 +898,19 @@
-              && ctx->Extensions.NV_fragment_program) ||
-             (target == GL_FRAGMENT_PROGRAM_ARB
-              && ctx->Extensions.ARB_fragment_program)) {
--      if (ctx->FragmentProgram.Current &&
--          ctx->FragmentProgram.Current->Base.Id == id)
-+      /*** Fragment program binding ***/
-+      struct fragment_program *curProg = ctx->FragmentProgram.Current;
-+      if (curProg->Base.Id == id) {
-+         /* binding same program - no change */
-          return;
--      /* decrement refcount on previously bound fragment program */
--      if (ctx->FragmentProgram.Current) {
--         ctx->FragmentProgram.Current->Base.RefCount--;
-+      }
-+      if (curProg->Base.Id != 0) {
-+         /* decrement refcount on previously bound fragment program */
-+         curProg->Base.RefCount--;
-          /* and delete if refcount goes below one */
--         if (ctx->FragmentProgram.Current->Base.RefCount <= 0) {
--            ctx->Driver.DeleteProgram(ctx, &(ctx->FragmentProgram.Current->Base));
-+         if (curProg->Base.RefCount <= 0) {
-+            ASSERT(curProg->Base.DeletePending);
-+            ctx->Driver.DeleteProgram(ctx, &(curProg->Base));
-             _mesa_HashRemove(ctx->Shared->Programs, id);
-          }
-       }
-@@ -903,7 +924,7 @@
-     * That's supposed to be caught in glBegin.
-     */
-    if (id == 0) {
--      /* default program */
-+      /* Bind default program */
-       prog = NULL;
-       if (target == GL_VERTEX_PROGRAM_NV || target == GL_VERTEX_PROGRAM_ARB)
-          prog = ctx->Shared->DefaultVertexProgram;
-@@ -911,19 +932,9 @@
-          prog = ctx->Shared->DefaultFragmentProgram;
-    }
-    else {
-+      /* Bind user program */
-       prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, id);
--      if (prog) {
--         if (prog->Target == 0) {
--            /* prog was allocated with glGenProgramsNV */
--            prog->Target = target;
--         }
--         else if (prog->Target != target) {
--            _mesa_error(ctx, GL_INVALID_OPERATION,
--                        "glBindProgramNV/ARB(target mismatch)");
--            return;
--         }
--      }
--      else {
-+      if (!prog || prog == &_mesa_DummyProgram) {
-          /* allocate a new program now */
-          prog = ctx->Driver.NewProgram(ctx, target, id);
-          if (!prog) {
-@@ -932,6 +943,11 @@
-          }
-          _mesa_HashInsert(ctx->Shared->Programs, id, prog);
-       }
-+      else if (prog->Target != target) {
-+         _mesa_error(ctx, GL_INVALID_OPERATION,
-+                     "glBindProgramNV/ARB(target mismatch)");
-+         return;
-+      }
-    }
-    /* bind now */
-@@ -942,6 +958,10 @@
-       ctx->FragmentProgram.Current = (struct fragment_program *) prog;
-    }
-+   /* Never null pointers */
-+   ASSERT(ctx->VertexProgram.Current);
-+   ASSERT(ctx->FragmentProgram.Current);
-+
-    if (prog)
-       prog->RefCount++;
-@@ -971,7 +991,11 @@
-       if (ids[i] != 0) {
-          struct program *prog = (struct program *)
-             _mesa_HashLookup(ctx->Shared->Programs, ids[i]);
--         if (prog) {
-+         if (prog == &_mesa_DummyProgram) {
-+            _mesa_HashRemove(ctx->Shared->Programs, ids[i]);
-+         }
-+         else if (prog) {
-+            /* Unbind program if necessary */
-             if (prog->Target == GL_VERTEX_PROGRAM_NV ||
-                 prog->Target == GL_VERTEX_STATE_PROGRAM_NV) {
-                if (ctx->VertexProgram.Current &&
-@@ -992,18 +1016,16 @@
-                _mesa_problem(ctx, "bad target in glDeleteProgramsNV");
-                return;
-             }
--            prog->RefCount--;
-+            /* Decrement reference count if not already marked for delete */
-+            if (!prog->DeletePending) {
-+               prog->DeletePending = GL_TRUE;
-+               prog->RefCount--;
-+            }
-             if (prog->RefCount <= 0) {
-+               _mesa_HashRemove(ctx->Shared->Programs, ids[i]);
-                ctx->Driver.DeleteProgram(ctx, prog);
-             }
-          }
--         /* Always remove entry from hash table.
--          * This is necessary as we can't tell from HashLookup
--          * whether the entry exists with data == 0, or if it
--          * doesn't exist at all.  As GenPrograms creates the first
--          * case below, need to call Remove() to avoid memory leak:
--          */
--         _mesa_HashRemove(ctx->Shared->Programs, ids[i]);
-       }
-    }
- }
-@@ -1032,8 +1054,9 @@
-    first = _mesa_HashFindFreeKeyBlock(ctx->Shared->Programs, n);
-+   /* Insert pointer to dummy program as placeholder */
-    for (i = 0; i < (GLuint) n; i++) {
--      _mesa_HashInsert(ctx->Shared->Programs, first + i, 0);
-+      _mesa_HashInsert(ctx->Shared->Programs, first + i, &_mesa_DummyProgram);
-    }
-    /* Return the program names */
-@@ -1044,7 +1067,7 @@
- /**
-- * Determine if id names a program.
-+ * Determine if id names a vertex or fragment program.
-  * \note Not compiled into display lists.
-  * \note Called from both glIsProgramNV and glIsProgramARB.
-  * \param id is the program identifier
-Index: extras/Mesa/src/mesa/shader/program.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/shader/program.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/shader/program.h      28 Aug 2004 04:28:10 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/shader/program.h      15 Dec 2004 01:51:03 -0000      1.1.1.2.2.1
-@@ -1,8 +1,8 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  5.1
-+ * Version:  6.2
-  *
-- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -29,6 +29,14 @@
-  */
-+/**
-+ * \mainpage Mesa vertex and fragment program module
-+ *
-+ * This module or directory contains most of the code for vertex and
-+ * fragment programs and shaders, including state management, parsers,
-+ * and (some) software routines for executing programs
-+ */
-+
- #ifndef PROGRAM_H
- #define PROGRAM_H
-@@ -44,6 +52,9 @@
- #define SWIZZLE_ONE  5                /* keep these values together: KW */
-+extern struct program _mesa_DummyProgram;
-+
-+
- /*
-  * Internal functions
-  */
-Index: extras/Mesa/src/mesa/sparc/clip.S
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/sparc/clip.S,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/sparc/clip.S  16 Jun 2004 09:19:23 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/sparc/clip.S  15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -2,7 +2,7 @@
-  * Clip testing in SPARC assembly
-  */
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
- #define LDPTR         ldx
- #define V4F_DATA      0x00
- #define V4F_START     0x08
-Index: extras/Mesa/src/mesa/sparc/glapi_sparc.S
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/sparc/glapi_sparc.S,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/sparc/glapi_sparc.S   16 Jun 2004 09:19:24 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/sparc/glapi_sparc.S   15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -24,7 +24,7 @@
- .globl glNewList
- .type glNewList,#function
- glNewList:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -45,7 +45,7 @@
- .globl glEndList
- .type glEndList,#function
- glEndList:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -66,7 +66,7 @@
- .globl glCallList
- .type glCallList,#function
- glCallList:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -87,7 +87,7 @@
- .globl glCallLists
- .type glCallLists,#function
- glCallLists:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -108,7 +108,7 @@
- .globl glDeleteLists
- .type glDeleteLists,#function
- glDeleteLists:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -129,7 +129,7 @@
- .globl glGenLists
- .type glGenLists,#function
- glGenLists:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -150,7 +150,7 @@
- .globl glListBase
- .type glListBase,#function
- glListBase:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -171,7 +171,7 @@
- .globl glBegin
- .type glBegin,#function
- glBegin:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -192,7 +192,7 @@
- .globl glBitmap
- .type glBitmap,#function
- glBitmap:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -213,7 +213,7 @@
- .globl glColor3b
- .type glColor3b,#function
- glColor3b:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -234,7 +234,7 @@
- .globl glColor3bv
- .type glColor3bv,#function
- glColor3bv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -255,7 +255,7 @@
- .globl glColor3d
- .type glColor3d,#function
- glColor3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -276,7 +276,7 @@
- .globl glColor3dv
- .type glColor3dv,#function
- glColor3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -297,7 +297,7 @@
- .globl glColor3f
- .type glColor3f,#function
- glColor3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -318,7 +318,7 @@
- .globl glColor3fv
- .type glColor3fv,#function
- glColor3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -339,7 +339,7 @@
- .globl glColor3i
- .type glColor3i,#function
- glColor3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -360,7 +360,7 @@
- .globl glColor3iv
- .type glColor3iv,#function
- glColor3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -381,7 +381,7 @@
- .globl glColor3s
- .type glColor3s,#function
- glColor3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -402,7 +402,7 @@
- .globl glColor3sv
- .type glColor3sv,#function
- glColor3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -423,7 +423,7 @@
- .globl glColor3ub
- .type glColor3ub,#function
- glColor3ub:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -444,7 +444,7 @@
- .globl glColor3ubv
- .type glColor3ubv,#function
- glColor3ubv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -465,7 +465,7 @@
- .globl glColor3ui
- .type glColor3ui,#function
- glColor3ui:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -486,7 +486,7 @@
- .globl glColor3uiv
- .type glColor3uiv,#function
- glColor3uiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -507,7 +507,7 @@
- .globl glColor3us
- .type glColor3us,#function
- glColor3us:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -528,7 +528,7 @@
- .globl glColor3usv
- .type glColor3usv,#function
- glColor3usv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -549,7 +549,7 @@
- .globl glColor4b
- .type glColor4b,#function
- glColor4b:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -570,7 +570,7 @@
- .globl glColor4bv
- .type glColor4bv,#function
- glColor4bv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -591,7 +591,7 @@
- .globl glColor4d
- .type glColor4d,#function
- glColor4d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -612,7 +612,7 @@
- .globl glColor4dv
- .type glColor4dv,#function
- glColor4dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -633,7 +633,7 @@
- .globl glColor4f
- .type glColor4f,#function
- glColor4f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -654,7 +654,7 @@
- .globl glColor4fv
- .type glColor4fv,#function
- glColor4fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -675,7 +675,7 @@
- .globl glColor4i
- .type glColor4i,#function
- glColor4i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -696,7 +696,7 @@
- .globl glColor4iv
- .type glColor4iv,#function
- glColor4iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -717,7 +717,7 @@
- .globl glColor4s
- .type glColor4s,#function
- glColor4s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -738,7 +738,7 @@
- .globl glColor4sv
- .type glColor4sv,#function
- glColor4sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -759,7 +759,7 @@
- .globl glColor4ub
- .type glColor4ub,#function
- glColor4ub:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -780,7 +780,7 @@
- .globl glColor4ubv
- .type glColor4ubv,#function
- glColor4ubv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -801,7 +801,7 @@
- .globl glColor4ui
- .type glColor4ui,#function
- glColor4ui:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -822,7 +822,7 @@
- .globl glColor4uiv
- .type glColor4uiv,#function
- glColor4uiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -843,7 +843,7 @@
- .globl glColor4us
- .type glColor4us,#function
- glColor4us:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -864,7 +864,7 @@
- .globl glColor4usv
- .type glColor4usv,#function
- glColor4usv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -885,7 +885,7 @@
- .globl glEdgeFlag
- .type glEdgeFlag,#function
- glEdgeFlag:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -906,7 +906,7 @@
- .globl glEdgeFlagv
- .type glEdgeFlagv,#function
- glEdgeFlagv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -927,7 +927,7 @@
- .globl glEnd
- .type glEnd,#function
- glEnd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -948,7 +948,7 @@
- .globl glIndexd
- .type glIndexd,#function
- glIndexd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -969,7 +969,7 @@
- .globl glIndexdv
- .type glIndexdv,#function
- glIndexdv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -990,7 +990,7 @@
- .globl glIndexf
- .type glIndexf,#function
- glIndexf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1011,7 +1011,7 @@
- .globl glIndexfv
- .type glIndexfv,#function
- glIndexfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1032,7 +1032,7 @@
- .globl glIndexi
- .type glIndexi,#function
- glIndexi:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1053,7 +1053,7 @@
- .globl glIndexiv
- .type glIndexiv,#function
- glIndexiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1074,7 +1074,7 @@
- .globl glIndexs
- .type glIndexs,#function
- glIndexs:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1095,7 +1095,7 @@
- .globl glIndexsv
- .type glIndexsv,#function
- glIndexsv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1116,7 +1116,7 @@
- .globl glNormal3b
- .type glNormal3b,#function
- glNormal3b:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1137,7 +1137,7 @@
- .globl glNormal3bv
- .type glNormal3bv,#function
- glNormal3bv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1158,7 +1158,7 @@
- .globl glNormal3d
- .type glNormal3d,#function
- glNormal3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1179,7 +1179,7 @@
- .globl glNormal3dv
- .type glNormal3dv,#function
- glNormal3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1200,7 +1200,7 @@
- .globl glNormal3f
- .type glNormal3f,#function
- glNormal3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1221,7 +1221,7 @@
- .globl glNormal3fv
- .type glNormal3fv,#function
- glNormal3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1242,7 +1242,7 @@
- .globl glNormal3i
- .type glNormal3i,#function
- glNormal3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1263,7 +1263,7 @@
- .globl glNormal3iv
- .type glNormal3iv,#function
- glNormal3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1284,7 +1284,7 @@
- .globl glNormal3s
- .type glNormal3s,#function
- glNormal3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1305,7 +1305,7 @@
- .globl glNormal3sv
- .type glNormal3sv,#function
- glNormal3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1326,7 +1326,7 @@
- .globl glRasterPos2d
- .type glRasterPos2d,#function
- glRasterPos2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1347,7 +1347,7 @@
- .globl glRasterPos2dv
- .type glRasterPos2dv,#function
- glRasterPos2dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1368,7 +1368,7 @@
- .globl glRasterPos2f
- .type glRasterPos2f,#function
- glRasterPos2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1389,7 +1389,7 @@
- .globl glRasterPos2fv
- .type glRasterPos2fv,#function
- glRasterPos2fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1410,7 +1410,7 @@
- .globl glRasterPos2i
- .type glRasterPos2i,#function
- glRasterPos2i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1431,7 +1431,7 @@
- .globl glRasterPos2iv
- .type glRasterPos2iv,#function
- glRasterPos2iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1452,7 +1452,7 @@
- .globl glRasterPos2s
- .type glRasterPos2s,#function
- glRasterPos2s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1473,7 +1473,7 @@
- .globl glRasterPos2sv
- .type glRasterPos2sv,#function
- glRasterPos2sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1494,7 +1494,7 @@
- .globl glRasterPos3d
- .type glRasterPos3d,#function
- glRasterPos3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1515,7 +1515,7 @@
- .globl glRasterPos3dv
- .type glRasterPos3dv,#function
- glRasterPos3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1536,7 +1536,7 @@
- .globl glRasterPos3f
- .type glRasterPos3f,#function
- glRasterPos3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1557,7 +1557,7 @@
- .globl glRasterPos3fv
- .type glRasterPos3fv,#function
- glRasterPos3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1578,7 +1578,7 @@
- .globl glRasterPos3i
- .type glRasterPos3i,#function
- glRasterPos3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1599,7 +1599,7 @@
- .globl glRasterPos3iv
- .type glRasterPos3iv,#function
- glRasterPos3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1620,7 +1620,7 @@
- .globl glRasterPos3s
- .type glRasterPos3s,#function
- glRasterPos3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1641,7 +1641,7 @@
- .globl glRasterPos3sv
- .type glRasterPos3sv,#function
- glRasterPos3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1662,7 +1662,7 @@
- .globl glRasterPos4d
- .type glRasterPos4d,#function
- glRasterPos4d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1683,7 +1683,7 @@
- .globl glRasterPos4dv
- .type glRasterPos4dv,#function
- glRasterPos4dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1704,7 +1704,7 @@
- .globl glRasterPos4f
- .type glRasterPos4f,#function
- glRasterPos4f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1725,7 +1725,7 @@
- .globl glRasterPos4fv
- .type glRasterPos4fv,#function
- glRasterPos4fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1746,7 +1746,7 @@
- .globl glRasterPos4i
- .type glRasterPos4i,#function
- glRasterPos4i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1767,7 +1767,7 @@
- .globl glRasterPos4iv
- .type glRasterPos4iv,#function
- glRasterPos4iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1788,7 +1788,7 @@
- .globl glRasterPos4s
- .type glRasterPos4s,#function
- glRasterPos4s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1809,7 +1809,7 @@
- .globl glRasterPos4sv
- .type glRasterPos4sv,#function
- glRasterPos4sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1830,7 +1830,7 @@
- .globl glRectd
- .type glRectd,#function
- glRectd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1851,7 +1851,7 @@
- .globl glRectdv
- .type glRectdv,#function
- glRectdv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1872,7 +1872,7 @@
- .globl glRectf
- .type glRectf,#function
- glRectf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1893,7 +1893,7 @@
- .globl glRectfv
- .type glRectfv,#function
- glRectfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1914,7 +1914,7 @@
- .globl glRecti
- .type glRecti,#function
- glRecti:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1935,7 +1935,7 @@
- .globl glRectiv
- .type glRectiv,#function
- glRectiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1956,7 +1956,7 @@
- .globl glRects
- .type glRects,#function
- glRects:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1977,7 +1977,7 @@
- .globl glRectsv
- .type glRectsv,#function
- glRectsv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -1998,7 +1998,7 @@
- .globl glTexCoord1d
- .type glTexCoord1d,#function
- glTexCoord1d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2019,7 +2019,7 @@
- .globl glTexCoord1dv
- .type glTexCoord1dv,#function
- glTexCoord1dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2040,7 +2040,7 @@
- .globl glTexCoord1f
- .type glTexCoord1f,#function
- glTexCoord1f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2061,7 +2061,7 @@
- .globl glTexCoord1fv
- .type glTexCoord1fv,#function
- glTexCoord1fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2082,7 +2082,7 @@
- .globl glTexCoord1i
- .type glTexCoord1i,#function
- glTexCoord1i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2103,7 +2103,7 @@
- .globl glTexCoord1iv
- .type glTexCoord1iv,#function
- glTexCoord1iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2124,7 +2124,7 @@
- .globl glTexCoord1s
- .type glTexCoord1s,#function
- glTexCoord1s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2145,7 +2145,7 @@
- .globl glTexCoord1sv
- .type glTexCoord1sv,#function
- glTexCoord1sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2166,7 +2166,7 @@
- .globl glTexCoord2d
- .type glTexCoord2d,#function
- glTexCoord2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2187,7 +2187,7 @@
- .globl glTexCoord2dv
- .type glTexCoord2dv,#function
- glTexCoord2dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2208,7 +2208,7 @@
- .globl glTexCoord2f
- .type glTexCoord2f,#function
- glTexCoord2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2229,7 +2229,7 @@
- .globl glTexCoord2fv
- .type glTexCoord2fv,#function
- glTexCoord2fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2250,7 +2250,7 @@
- .globl glTexCoord2i
- .type glTexCoord2i,#function
- glTexCoord2i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2271,7 +2271,7 @@
- .globl glTexCoord2iv
- .type glTexCoord2iv,#function
- glTexCoord2iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2292,7 +2292,7 @@
- .globl glTexCoord2s
- .type glTexCoord2s,#function
- glTexCoord2s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2313,7 +2313,7 @@
- .globl glTexCoord2sv
- .type glTexCoord2sv,#function
- glTexCoord2sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2334,7 +2334,7 @@
- .globl glTexCoord3d
- .type glTexCoord3d,#function
- glTexCoord3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2355,7 +2355,7 @@
- .globl glTexCoord3dv
- .type glTexCoord3dv,#function
- glTexCoord3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2376,7 +2376,7 @@
- .globl glTexCoord3f
- .type glTexCoord3f,#function
- glTexCoord3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2397,7 +2397,7 @@
- .globl glTexCoord3fv
- .type glTexCoord3fv,#function
- glTexCoord3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2418,7 +2418,7 @@
- .globl glTexCoord3i
- .type glTexCoord3i,#function
- glTexCoord3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2439,7 +2439,7 @@
- .globl glTexCoord3iv
- .type glTexCoord3iv,#function
- glTexCoord3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2460,7 +2460,7 @@
- .globl glTexCoord3s
- .type glTexCoord3s,#function
- glTexCoord3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2481,7 +2481,7 @@
- .globl glTexCoord3sv
- .type glTexCoord3sv,#function
- glTexCoord3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2502,7 +2502,7 @@
- .globl glTexCoord4d
- .type glTexCoord4d,#function
- glTexCoord4d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2523,7 +2523,7 @@
- .globl glTexCoord4dv
- .type glTexCoord4dv,#function
- glTexCoord4dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2544,7 +2544,7 @@
- .globl glTexCoord4f
- .type glTexCoord4f,#function
- glTexCoord4f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2565,7 +2565,7 @@
- .globl glTexCoord4fv
- .type glTexCoord4fv,#function
- glTexCoord4fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2586,7 +2586,7 @@
- .globl glTexCoord4i
- .type glTexCoord4i,#function
- glTexCoord4i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2607,7 +2607,7 @@
- .globl glTexCoord4iv
- .type glTexCoord4iv,#function
- glTexCoord4iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2628,7 +2628,7 @@
- .globl glTexCoord4s
- .type glTexCoord4s,#function
- glTexCoord4s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2649,7 +2649,7 @@
- .globl glTexCoord4sv
- .type glTexCoord4sv,#function
- glTexCoord4sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2670,7 +2670,7 @@
- .globl glVertex2d
- .type glVertex2d,#function
- glVertex2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2691,7 +2691,7 @@
- .globl glVertex2dv
- .type glVertex2dv,#function
- glVertex2dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2712,7 +2712,7 @@
- .globl glVertex2f
- .type glVertex2f,#function
- glVertex2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2733,7 +2733,7 @@
- .globl glVertex2fv
- .type glVertex2fv,#function
- glVertex2fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2754,7 +2754,7 @@
- .globl glVertex2i
- .type glVertex2i,#function
- glVertex2i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2775,7 +2775,7 @@
- .globl glVertex2iv
- .type glVertex2iv,#function
- glVertex2iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2796,7 +2796,7 @@
- .globl glVertex2s
- .type glVertex2s,#function
- glVertex2s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2817,7 +2817,7 @@
- .globl glVertex2sv
- .type glVertex2sv,#function
- glVertex2sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2838,7 +2838,7 @@
- .globl glVertex3d
- .type glVertex3d,#function
- glVertex3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2859,7 +2859,7 @@
- .globl glVertex3dv
- .type glVertex3dv,#function
- glVertex3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2880,7 +2880,7 @@
- .globl glVertex3f
- .type glVertex3f,#function
- glVertex3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2901,7 +2901,7 @@
- .globl glVertex3fv
- .type glVertex3fv,#function
- glVertex3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2922,7 +2922,7 @@
- .globl glVertex3i
- .type glVertex3i,#function
- glVertex3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2943,7 +2943,7 @@
- .globl glVertex3iv
- .type glVertex3iv,#function
- glVertex3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2964,7 +2964,7 @@
- .globl glVertex3s
- .type glVertex3s,#function
- glVertex3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -2985,7 +2985,7 @@
- .globl glVertex3sv
- .type glVertex3sv,#function
- glVertex3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3006,7 +3006,7 @@
- .globl glVertex4d
- .type glVertex4d,#function
- glVertex4d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3027,7 +3027,7 @@
- .globl glVertex4dv
- .type glVertex4dv,#function
- glVertex4dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3048,7 +3048,7 @@
- .globl glVertex4f
- .type glVertex4f,#function
- glVertex4f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3069,7 +3069,7 @@
- .globl glVertex4fv
- .type glVertex4fv,#function
- glVertex4fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3090,7 +3090,7 @@
- .globl glVertex4i
- .type glVertex4i,#function
- glVertex4i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3111,7 +3111,7 @@
- .globl glVertex4iv
- .type glVertex4iv,#function
- glVertex4iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3132,7 +3132,7 @@
- .globl glVertex4s
- .type glVertex4s,#function
- glVertex4s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3153,7 +3153,7 @@
- .globl glVertex4sv
- .type glVertex4sv,#function
- glVertex4sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3174,7 +3174,7 @@
- .globl glClipPlane
- .type glClipPlane,#function
- glClipPlane:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3195,7 +3195,7 @@
- .globl glColorMaterial
- .type glColorMaterial,#function
- glColorMaterial:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3216,7 +3216,7 @@
- .globl glCullFace
- .type glCullFace,#function
- glCullFace:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3237,7 +3237,7 @@
- .globl glFogf
- .type glFogf,#function
- glFogf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3258,7 +3258,7 @@
- .globl glFogfv
- .type glFogfv,#function
- glFogfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3279,7 +3279,7 @@
- .globl glFogi
- .type glFogi,#function
- glFogi:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3300,7 +3300,7 @@
- .globl glFogiv
- .type glFogiv,#function
- glFogiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3321,7 +3321,7 @@
- .globl glFrontFace
- .type glFrontFace,#function
- glFrontFace:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3342,7 +3342,7 @@
- .globl glHint
- .type glHint,#function
- glHint:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3363,7 +3363,7 @@
- .globl glLightf
- .type glLightf,#function
- glLightf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3384,7 +3384,7 @@
- .globl glLightfv
- .type glLightfv,#function
- glLightfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3405,7 +3405,7 @@
- .globl glLighti
- .type glLighti,#function
- glLighti:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3426,7 +3426,7 @@
- .globl glLightiv
- .type glLightiv,#function
- glLightiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3447,7 +3447,7 @@
- .globl glLightModelf
- .type glLightModelf,#function
- glLightModelf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3468,7 +3468,7 @@
- .globl glLightModelfv
- .type glLightModelfv,#function
- glLightModelfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3489,7 +3489,7 @@
- .globl glLightModeli
- .type glLightModeli,#function
- glLightModeli:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3510,7 +3510,7 @@
- .globl glLightModeliv
- .type glLightModeliv,#function
- glLightModeliv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3531,7 +3531,7 @@
- .globl glLineStipple
- .type glLineStipple,#function
- glLineStipple:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3552,7 +3552,7 @@
- .globl glLineWidth
- .type glLineWidth,#function
- glLineWidth:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3573,7 +3573,7 @@
- .globl glMaterialf
- .type glMaterialf,#function
- glMaterialf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3594,7 +3594,7 @@
- .globl glMaterialfv
- .type glMaterialfv,#function
- glMaterialfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3615,7 +3615,7 @@
- .globl glMateriali
- .type glMateriali,#function
- glMateriali:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3636,7 +3636,7 @@
- .globl glMaterialiv
- .type glMaterialiv,#function
- glMaterialiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3657,7 +3657,7 @@
- .globl glPointSize
- .type glPointSize,#function
- glPointSize:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3678,7 +3678,7 @@
- .globl glPolygonMode
- .type glPolygonMode,#function
- glPolygonMode:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3699,7 +3699,7 @@
- .globl glPolygonStipple
- .type glPolygonStipple,#function
- glPolygonStipple:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3720,7 +3720,7 @@
- .globl glScissor
- .type glScissor,#function
- glScissor:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3741,7 +3741,7 @@
- .globl glShadeModel
- .type glShadeModel,#function
- glShadeModel:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3762,7 +3762,7 @@
- .globl glTexParameterf
- .type glTexParameterf,#function
- glTexParameterf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3783,7 +3783,7 @@
- .globl glTexParameterfv
- .type glTexParameterfv,#function
- glTexParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3804,7 +3804,7 @@
- .globl glTexParameteri
- .type glTexParameteri,#function
- glTexParameteri:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3825,7 +3825,7 @@
- .globl glTexParameteriv
- .type glTexParameteriv,#function
- glTexParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3846,7 +3846,7 @@
- .globl glTexImage1D
- .type glTexImage1D,#function
- glTexImage1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3867,7 +3867,7 @@
- .globl glTexImage2D
- .type glTexImage2D,#function
- glTexImage2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3888,7 +3888,7 @@
- .globl glTexEnvf
- .type glTexEnvf,#function
- glTexEnvf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3909,7 +3909,7 @@
- .globl glTexEnvfv
- .type glTexEnvfv,#function
- glTexEnvfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3930,7 +3930,7 @@
- .globl glTexEnvi
- .type glTexEnvi,#function
- glTexEnvi:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3951,7 +3951,7 @@
- .globl glTexEnviv
- .type glTexEnviv,#function
- glTexEnviv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3972,7 +3972,7 @@
- .globl glTexGend
- .type glTexGend,#function
- glTexGend:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -3993,7 +3993,7 @@
- .globl glTexGendv
- .type glTexGendv,#function
- glTexGendv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4014,7 +4014,7 @@
- .globl glTexGenf
- .type glTexGenf,#function
- glTexGenf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4035,7 +4035,7 @@
- .globl glTexGenfv
- .type glTexGenfv,#function
- glTexGenfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4056,7 +4056,7 @@
- .globl glTexGeni
- .type glTexGeni,#function
- glTexGeni:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4077,7 +4077,7 @@
- .globl glTexGeniv
- .type glTexGeniv,#function
- glTexGeniv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4098,7 +4098,7 @@
- .globl glFeedbackBuffer
- .type glFeedbackBuffer,#function
- glFeedbackBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4119,7 +4119,7 @@
- .globl glSelectBuffer
- .type glSelectBuffer,#function
- glSelectBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4140,7 +4140,7 @@
- .globl glRenderMode
- .type glRenderMode,#function
- glRenderMode:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4161,7 +4161,7 @@
- .globl glInitNames
- .type glInitNames,#function
- glInitNames:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4182,7 +4182,7 @@
- .globl glLoadName
- .type glLoadName,#function
- glLoadName:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4203,7 +4203,7 @@
- .globl glPassThrough
- .type glPassThrough,#function
- glPassThrough:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4224,7 +4224,7 @@
- .globl glPopName
- .type glPopName,#function
- glPopName:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4245,7 +4245,7 @@
- .globl glPushName
- .type glPushName,#function
- glPushName:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4266,7 +4266,7 @@
- .globl glDrawBuffer
- .type glDrawBuffer,#function
- glDrawBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4287,7 +4287,7 @@
- .globl glClear
- .type glClear,#function
- glClear:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4308,7 +4308,7 @@
- .globl glClearAccum
- .type glClearAccum,#function
- glClearAccum:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4329,7 +4329,7 @@
- .globl glClearIndex
- .type glClearIndex,#function
- glClearIndex:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4350,7 +4350,7 @@
- .globl glClearColor
- .type glClearColor,#function
- glClearColor:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4371,7 +4371,7 @@
- .globl glClearStencil
- .type glClearStencil,#function
- glClearStencil:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4392,7 +4392,7 @@
- .globl glClearDepth
- .type glClearDepth,#function
- glClearDepth:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4413,7 +4413,7 @@
- .globl glStencilMask
- .type glStencilMask,#function
- glStencilMask:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4434,7 +4434,7 @@
- .globl glColorMask
- .type glColorMask,#function
- glColorMask:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4455,7 +4455,7 @@
- .globl glDepthMask
- .type glDepthMask,#function
- glDepthMask:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4476,7 +4476,7 @@
- .globl glIndexMask
- .type glIndexMask,#function
- glIndexMask:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4497,7 +4497,7 @@
- .globl glAccum
- .type glAccum,#function
- glAccum:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4518,7 +4518,7 @@
- .globl glDisable
- .type glDisable,#function
- glDisable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4539,7 +4539,7 @@
- .globl glEnable
- .type glEnable,#function
- glEnable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4560,7 +4560,7 @@
- .globl glFinish
- .type glFinish,#function
- glFinish:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4581,7 +4581,7 @@
- .globl glFlush
- .type glFlush,#function
- glFlush:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4602,7 +4602,7 @@
- .globl glPopAttrib
- .type glPopAttrib,#function
- glPopAttrib:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4623,7 +4623,7 @@
- .globl glPushAttrib
- .type glPushAttrib,#function
- glPushAttrib:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4644,7 +4644,7 @@
- .globl glMap1d
- .type glMap1d,#function
- glMap1d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4665,7 +4665,7 @@
- .globl glMap1f
- .type glMap1f,#function
- glMap1f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4686,7 +4686,7 @@
- .globl glMap2d
- .type glMap2d,#function
- glMap2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4707,7 +4707,7 @@
- .globl glMap2f
- .type glMap2f,#function
- glMap2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4728,7 +4728,7 @@
- .globl glMapGrid1d
- .type glMapGrid1d,#function
- glMapGrid1d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4749,7 +4749,7 @@
- .globl glMapGrid1f
- .type glMapGrid1f,#function
- glMapGrid1f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4770,7 +4770,7 @@
- .globl glMapGrid2d
- .type glMapGrid2d,#function
- glMapGrid2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4791,7 +4791,7 @@
- .globl glMapGrid2f
- .type glMapGrid2f,#function
- glMapGrid2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4812,7 +4812,7 @@
- .globl glEvalCoord1d
- .type glEvalCoord1d,#function
- glEvalCoord1d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4833,7 +4833,7 @@
- .globl glEvalCoord1dv
- .type glEvalCoord1dv,#function
- glEvalCoord1dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4854,7 +4854,7 @@
- .globl glEvalCoord1f
- .type glEvalCoord1f,#function
- glEvalCoord1f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4875,7 +4875,7 @@
- .globl glEvalCoord1fv
- .type glEvalCoord1fv,#function
- glEvalCoord1fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4896,7 +4896,7 @@
- .globl glEvalCoord2d
- .type glEvalCoord2d,#function
- glEvalCoord2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4917,7 +4917,7 @@
- .globl glEvalCoord2dv
- .type glEvalCoord2dv,#function
- glEvalCoord2dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4938,7 +4938,7 @@
- .globl glEvalCoord2f
- .type glEvalCoord2f,#function
- glEvalCoord2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4959,7 +4959,7 @@
- .globl glEvalCoord2fv
- .type glEvalCoord2fv,#function
- glEvalCoord2fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -4980,7 +4980,7 @@
- .globl glEvalMesh1
- .type glEvalMesh1,#function
- glEvalMesh1:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5001,7 +5001,7 @@
- .globl glEvalPoint1
- .type glEvalPoint1,#function
- glEvalPoint1:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5022,7 +5022,7 @@
- .globl glEvalMesh2
- .type glEvalMesh2,#function
- glEvalMesh2:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5043,7 +5043,7 @@
- .globl glEvalPoint2
- .type glEvalPoint2,#function
- glEvalPoint2:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5064,7 +5064,7 @@
- .globl glAlphaFunc
- .type glAlphaFunc,#function
- glAlphaFunc:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5085,7 +5085,7 @@
- .globl glBlendFunc
- .type glBlendFunc,#function
- glBlendFunc:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5106,7 +5106,7 @@
- .globl glLogicOp
- .type glLogicOp,#function
- glLogicOp:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5127,7 +5127,7 @@
- .globl glStencilFunc
- .type glStencilFunc,#function
- glStencilFunc:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5148,7 +5148,7 @@
- .globl glStencilOp
- .type glStencilOp,#function
- glStencilOp:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5169,7 +5169,7 @@
- .globl glDepthFunc
- .type glDepthFunc,#function
- glDepthFunc:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5190,7 +5190,7 @@
- .globl glPixelZoom
- .type glPixelZoom,#function
- glPixelZoom:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5211,7 +5211,7 @@
- .globl glPixelTransferf
- .type glPixelTransferf,#function
- glPixelTransferf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5232,7 +5232,7 @@
- .globl glPixelTransferi
- .type glPixelTransferi,#function
- glPixelTransferi:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5253,7 +5253,7 @@
- .globl glPixelStoref
- .type glPixelStoref,#function
- glPixelStoref:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5274,7 +5274,7 @@
- .globl glPixelStorei
- .type glPixelStorei,#function
- glPixelStorei:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5295,7 +5295,7 @@
- .globl glPixelMapfv
- .type glPixelMapfv,#function
- glPixelMapfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5316,7 +5316,7 @@
- .globl glPixelMapuiv
- .type glPixelMapuiv,#function
- glPixelMapuiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5337,7 +5337,7 @@
- .globl glPixelMapusv
- .type glPixelMapusv,#function
- glPixelMapusv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5358,7 +5358,7 @@
- .globl glReadBuffer
- .type glReadBuffer,#function
- glReadBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5379,7 +5379,7 @@
- .globl glCopyPixels
- .type glCopyPixels,#function
- glCopyPixels:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5400,7 +5400,7 @@
- .globl glReadPixels
- .type glReadPixels,#function
- glReadPixels:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5421,7 +5421,7 @@
- .globl glDrawPixels
- .type glDrawPixels,#function
- glDrawPixels:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5442,7 +5442,7 @@
- .globl glGetBooleanv
- .type glGetBooleanv,#function
- glGetBooleanv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5463,7 +5463,7 @@
- .globl glGetClipPlane
- .type glGetClipPlane,#function
- glGetClipPlane:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5484,7 +5484,7 @@
- .globl glGetDoublev
- .type glGetDoublev,#function
- glGetDoublev:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5505,7 +5505,7 @@
- .globl glGetError
- .type glGetError,#function
- glGetError:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5526,7 +5526,7 @@
- .globl glGetFloatv
- .type glGetFloatv,#function
- glGetFloatv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5547,7 +5547,7 @@
- .globl glGetIntegerv
- .type glGetIntegerv,#function
- glGetIntegerv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5568,7 +5568,7 @@
- .globl glGetLightfv
- .type glGetLightfv,#function
- glGetLightfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5589,7 +5589,7 @@
- .globl glGetLightiv
- .type glGetLightiv,#function
- glGetLightiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5610,7 +5610,7 @@
- .globl glGetMapdv
- .type glGetMapdv,#function
- glGetMapdv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5631,7 +5631,7 @@
- .globl glGetMapfv
- .type glGetMapfv,#function
- glGetMapfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5652,7 +5652,7 @@
- .globl glGetMapiv
- .type glGetMapiv,#function
- glGetMapiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5673,7 +5673,7 @@
- .globl glGetMaterialfv
- .type glGetMaterialfv,#function
- glGetMaterialfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5694,7 +5694,7 @@
- .globl glGetMaterialiv
- .type glGetMaterialiv,#function
- glGetMaterialiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5715,7 +5715,7 @@
- .globl glGetPixelMapfv
- .type glGetPixelMapfv,#function
- glGetPixelMapfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5736,7 +5736,7 @@
- .globl glGetPixelMapuiv
- .type glGetPixelMapuiv,#function
- glGetPixelMapuiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5757,7 +5757,7 @@
- .globl glGetPixelMapusv
- .type glGetPixelMapusv,#function
- glGetPixelMapusv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5778,7 +5778,7 @@
- .globl glGetPolygonStipple
- .type glGetPolygonStipple,#function
- glGetPolygonStipple:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5799,7 +5799,7 @@
- .globl glGetString
- .type glGetString,#function
- glGetString:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5820,7 +5820,7 @@
- .globl glGetTexEnvfv
- .type glGetTexEnvfv,#function
- glGetTexEnvfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5841,7 +5841,7 @@
- .globl glGetTexEnviv
- .type glGetTexEnviv,#function
- glGetTexEnviv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5862,7 +5862,7 @@
- .globl glGetTexGendv
- .type glGetTexGendv,#function
- glGetTexGendv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5883,7 +5883,7 @@
- .globl glGetTexGenfv
- .type glGetTexGenfv,#function
- glGetTexGenfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5904,7 +5904,7 @@
- .globl glGetTexGeniv
- .type glGetTexGeniv,#function
- glGetTexGeniv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5925,7 +5925,7 @@
- .globl glGetTexImage
- .type glGetTexImage,#function
- glGetTexImage:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5946,7 +5946,7 @@
- .globl glGetTexParameterfv
- .type glGetTexParameterfv,#function
- glGetTexParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5967,7 +5967,7 @@
- .globl glGetTexParameteriv
- .type glGetTexParameteriv,#function
- glGetTexParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -5988,7 +5988,7 @@
- .globl glGetTexLevelParameterfv
- .type glGetTexLevelParameterfv,#function
- glGetTexLevelParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6009,7 +6009,7 @@
- .globl glGetTexLevelParameteriv
- .type glGetTexLevelParameteriv,#function
- glGetTexLevelParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6030,7 +6030,7 @@
- .globl glIsEnabled
- .type glIsEnabled,#function
- glIsEnabled:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6051,7 +6051,7 @@
- .globl glIsList
- .type glIsList,#function
- glIsList:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6072,7 +6072,7 @@
- .globl glDepthRange
- .type glDepthRange,#function
- glDepthRange:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6093,7 +6093,7 @@
- .globl glFrustum
- .type glFrustum,#function
- glFrustum:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6114,7 +6114,7 @@
- .globl glLoadIdentity
- .type glLoadIdentity,#function
- glLoadIdentity:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6135,7 +6135,7 @@
- .globl glLoadMatrixf
- .type glLoadMatrixf,#function
- glLoadMatrixf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6156,7 +6156,7 @@
- .globl glLoadMatrixd
- .type glLoadMatrixd,#function
- glLoadMatrixd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6177,7 +6177,7 @@
- .globl glMatrixMode
- .type glMatrixMode,#function
- glMatrixMode:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6198,7 +6198,7 @@
- .globl glMultMatrixf
- .type glMultMatrixf,#function
- glMultMatrixf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6219,7 +6219,7 @@
- .globl glMultMatrixd
- .type glMultMatrixd,#function
- glMultMatrixd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6240,7 +6240,7 @@
- .globl glOrtho
- .type glOrtho,#function
- glOrtho:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6261,7 +6261,7 @@
- .globl glPopMatrix
- .type glPopMatrix,#function
- glPopMatrix:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6282,7 +6282,7 @@
- .globl glPushMatrix
- .type glPushMatrix,#function
- glPushMatrix:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6303,7 +6303,7 @@
- .globl glRotated
- .type glRotated,#function
- glRotated:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6324,7 +6324,7 @@
- .globl glRotatef
- .type glRotatef,#function
- glRotatef:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6345,7 +6345,7 @@
- .globl glScaled
- .type glScaled,#function
- glScaled:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6366,7 +6366,7 @@
- .globl glScalef
- .type glScalef,#function
- glScalef:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6387,7 +6387,7 @@
- .globl glTranslated
- .type glTranslated,#function
- glTranslated:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6408,7 +6408,7 @@
- .globl glTranslatef
- .type glTranslatef,#function
- glTranslatef:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6429,7 +6429,7 @@
- .globl glViewport
- .type glViewport,#function
- glViewport:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6450,7 +6450,7 @@
- .globl glArrayElement
- .type glArrayElement,#function
- glArrayElement:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6471,7 +6471,7 @@
- .globl glColorPointer
- .type glColorPointer,#function
- glColorPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6492,7 +6492,7 @@
- .globl glDisableClientState
- .type glDisableClientState,#function
- glDisableClientState:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6513,7 +6513,7 @@
- .globl glDrawArrays
- .type glDrawArrays,#function
- glDrawArrays:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6534,7 +6534,7 @@
- .globl glDrawElements
- .type glDrawElements,#function
- glDrawElements:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6555,7 +6555,7 @@
- .globl glEdgeFlagPointer
- .type glEdgeFlagPointer,#function
- glEdgeFlagPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6576,7 +6576,7 @@
- .globl glEnableClientState
- .type glEnableClientState,#function
- glEnableClientState:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6597,7 +6597,7 @@
- .globl glGetPointerv
- .type glGetPointerv,#function
- glGetPointerv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6618,7 +6618,7 @@
- .globl glIndexPointer
- .type glIndexPointer,#function
- glIndexPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6639,7 +6639,7 @@
- .globl glInterleavedArrays
- .type glInterleavedArrays,#function
- glInterleavedArrays:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6660,7 +6660,7 @@
- .globl glNormalPointer
- .type glNormalPointer,#function
- glNormalPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6681,7 +6681,7 @@
- .globl glTexCoordPointer
- .type glTexCoordPointer,#function
- glTexCoordPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6702,7 +6702,7 @@
- .globl glVertexPointer
- .type glVertexPointer,#function
- glVertexPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6723,7 +6723,7 @@
- .globl glPolygonOffset
- .type glPolygonOffset,#function
- glPolygonOffset:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6744,7 +6744,7 @@
- .globl glCopyTexImage1D
- .type glCopyTexImage1D,#function
- glCopyTexImage1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6765,7 +6765,7 @@
- .globl glCopyTexImage2D
- .type glCopyTexImage2D,#function
- glCopyTexImage2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6786,7 +6786,7 @@
- .globl glCopyTexSubImage1D
- .type glCopyTexSubImage1D,#function
- glCopyTexSubImage1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6807,7 +6807,7 @@
- .globl glCopyTexSubImage2D
- .type glCopyTexSubImage2D,#function
- glCopyTexSubImage2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6828,7 +6828,7 @@
- .globl glTexSubImage1D
- .type glTexSubImage1D,#function
- glTexSubImage1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6849,7 +6849,7 @@
- .globl glTexSubImage2D
- .type glTexSubImage2D,#function
- glTexSubImage2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6870,7 +6870,7 @@
- .globl glAreTexturesResident
- .type glAreTexturesResident,#function
- glAreTexturesResident:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6891,7 +6891,7 @@
- .globl glBindTexture
- .type glBindTexture,#function
- glBindTexture:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6912,7 +6912,7 @@
- .globl glDeleteTextures
- .type glDeleteTextures,#function
- glDeleteTextures:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6933,7 +6933,7 @@
- .globl glGenTextures
- .type glGenTextures,#function
- glGenTextures:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6954,7 +6954,7 @@
- .globl glIsTexture
- .type glIsTexture,#function
- glIsTexture:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6975,7 +6975,7 @@
- .globl glPrioritizeTextures
- .type glPrioritizeTextures,#function
- glPrioritizeTextures:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -6996,7 +6996,7 @@
- .globl glIndexub
- .type glIndexub,#function
- glIndexub:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7017,7 +7017,7 @@
- .globl glIndexubv
- .type glIndexubv,#function
- glIndexubv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7038,7 +7038,7 @@
- .globl glPopClientAttrib
- .type glPopClientAttrib,#function
- glPopClientAttrib:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7059,7 +7059,7 @@
- .globl glPushClientAttrib
- .type glPushClientAttrib,#function
- glPushClientAttrib:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7080,7 +7080,7 @@
- .globl glBlendColor
- .type glBlendColor,#function
- glBlendColor:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7101,7 +7101,7 @@
- .globl glBlendEquation
- .type glBlendEquation,#function
- glBlendEquation:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7122,7 +7122,7 @@
- .globl glDrawRangeElements
- .type glDrawRangeElements,#function
- glDrawRangeElements:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7143,7 +7143,7 @@
- .globl glColorTable
- .type glColorTable,#function
- glColorTable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7164,7 +7164,7 @@
- .globl glColorTableParameterfv
- .type glColorTableParameterfv,#function
- glColorTableParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7185,7 +7185,7 @@
- .globl glColorTableParameteriv
- .type glColorTableParameteriv,#function
- glColorTableParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7206,7 +7206,7 @@
- .globl glCopyColorTable
- .type glCopyColorTable,#function
- glCopyColorTable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7227,7 +7227,7 @@
- .globl glGetColorTable
- .type glGetColorTable,#function
- glGetColorTable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7248,7 +7248,7 @@
- .globl glGetColorTableParameterfv
- .type glGetColorTableParameterfv,#function
- glGetColorTableParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7269,7 +7269,7 @@
- .globl glGetColorTableParameteriv
- .type glGetColorTableParameteriv,#function
- glGetColorTableParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7290,7 +7290,7 @@
- .globl glColorSubTable
- .type glColorSubTable,#function
- glColorSubTable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7311,7 +7311,7 @@
- .globl glCopyColorSubTable
- .type glCopyColorSubTable,#function
- glCopyColorSubTable:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7332,7 +7332,7 @@
- .globl glConvolutionFilter1D
- .type glConvolutionFilter1D,#function
- glConvolutionFilter1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7353,7 +7353,7 @@
- .globl glConvolutionFilter2D
- .type glConvolutionFilter2D,#function
- glConvolutionFilter2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7374,7 +7374,7 @@
- .globl glConvolutionParameterf
- .type glConvolutionParameterf,#function
- glConvolutionParameterf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7395,7 +7395,7 @@
- .globl glConvolutionParameterfv
- .type glConvolutionParameterfv,#function
- glConvolutionParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7416,7 +7416,7 @@
- .globl glConvolutionParameteri
- .type glConvolutionParameteri,#function
- glConvolutionParameteri:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7437,7 +7437,7 @@
- .globl glConvolutionParameteriv
- .type glConvolutionParameteriv,#function
- glConvolutionParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7458,7 +7458,7 @@
- .globl glCopyConvolutionFilter1D
- .type glCopyConvolutionFilter1D,#function
- glCopyConvolutionFilter1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7479,7 +7479,7 @@
- .globl glCopyConvolutionFilter2D
- .type glCopyConvolutionFilter2D,#function
- glCopyConvolutionFilter2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7500,7 +7500,7 @@
- .globl glGetConvolutionFilter
- .type glGetConvolutionFilter,#function
- glGetConvolutionFilter:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7521,7 +7521,7 @@
- .globl glGetConvolutionParameterfv
- .type glGetConvolutionParameterfv,#function
- glGetConvolutionParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7542,7 +7542,7 @@
- .globl glGetConvolutionParameteriv
- .type glGetConvolutionParameteriv,#function
- glGetConvolutionParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7563,7 +7563,7 @@
- .globl glGetSeparableFilter
- .type glGetSeparableFilter,#function
- glGetSeparableFilter:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7584,7 +7584,7 @@
- .globl glSeparableFilter2D
- .type glSeparableFilter2D,#function
- glSeparableFilter2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7605,7 +7605,7 @@
- .globl glGetHistogram
- .type glGetHistogram,#function
- glGetHistogram:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7626,7 +7626,7 @@
- .globl glGetHistogramParameterfv
- .type glGetHistogramParameterfv,#function
- glGetHistogramParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7647,7 +7647,7 @@
- .globl glGetHistogramParameteriv
- .type glGetHistogramParameteriv,#function
- glGetHistogramParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7668,7 +7668,7 @@
- .globl glGetMinmax
- .type glGetMinmax,#function
- glGetMinmax:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7689,7 +7689,7 @@
- .globl glGetMinmaxParameterfv
- .type glGetMinmaxParameterfv,#function
- glGetMinmaxParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7710,7 +7710,7 @@
- .globl glGetMinmaxParameteriv
- .type glGetMinmaxParameteriv,#function
- glGetMinmaxParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7731,7 +7731,7 @@
- .globl glHistogram
- .type glHistogram,#function
- glHistogram:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7752,7 +7752,7 @@
- .globl glMinmax
- .type glMinmax,#function
- glMinmax:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7773,7 +7773,7 @@
- .globl glResetHistogram
- .type glResetHistogram,#function
- glResetHistogram:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7794,7 +7794,7 @@
- .globl glResetMinmax
- .type glResetMinmax,#function
- glResetMinmax:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7815,7 +7815,7 @@
- .globl glTexImage3D
- .type glTexImage3D,#function
- glTexImage3D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7836,7 +7836,7 @@
- .globl glTexSubImage3D
- .type glTexSubImage3D,#function
- glTexSubImage3D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7857,7 +7857,7 @@
- .globl glCopyTexSubImage3D
- .type glCopyTexSubImage3D,#function
- glCopyTexSubImage3D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7878,7 +7878,7 @@
- .globl glActiveTextureARB
- .type glActiveTextureARB,#function
- glActiveTextureARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7899,7 +7899,7 @@
- .globl glClientActiveTextureARB
- .type glClientActiveTextureARB,#function
- glClientActiveTextureARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7920,7 +7920,7 @@
- .globl glMultiTexCoord1dARB
- .type glMultiTexCoord1dARB,#function
- glMultiTexCoord1dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7941,7 +7941,7 @@
- .globl glMultiTexCoord1dvARB
- .type glMultiTexCoord1dvARB,#function
- glMultiTexCoord1dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7962,7 +7962,7 @@
- .globl glMultiTexCoord1fARB
- .type glMultiTexCoord1fARB,#function
- glMultiTexCoord1fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -7983,7 +7983,7 @@
- .globl glMultiTexCoord1fvARB
- .type glMultiTexCoord1fvARB,#function
- glMultiTexCoord1fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8004,7 +8004,7 @@
- .globl glMultiTexCoord1iARB
- .type glMultiTexCoord1iARB,#function
- glMultiTexCoord1iARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8025,7 +8025,7 @@
- .globl glMultiTexCoord1ivARB
- .type glMultiTexCoord1ivARB,#function
- glMultiTexCoord1ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8046,7 +8046,7 @@
- .globl glMultiTexCoord1sARB
- .type glMultiTexCoord1sARB,#function
- glMultiTexCoord1sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8067,7 +8067,7 @@
- .globl glMultiTexCoord1svARB
- .type glMultiTexCoord1svARB,#function
- glMultiTexCoord1svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8088,7 +8088,7 @@
- .globl glMultiTexCoord2dARB
- .type glMultiTexCoord2dARB,#function
- glMultiTexCoord2dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8109,7 +8109,7 @@
- .globl glMultiTexCoord2dvARB
- .type glMultiTexCoord2dvARB,#function
- glMultiTexCoord2dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8130,7 +8130,7 @@
- .globl glMultiTexCoord2fARB
- .type glMultiTexCoord2fARB,#function
- glMultiTexCoord2fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8151,7 +8151,7 @@
- .globl glMultiTexCoord2fvARB
- .type glMultiTexCoord2fvARB,#function
- glMultiTexCoord2fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8172,7 +8172,7 @@
- .globl glMultiTexCoord2iARB
- .type glMultiTexCoord2iARB,#function
- glMultiTexCoord2iARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8193,7 +8193,7 @@
- .globl glMultiTexCoord2ivARB
- .type glMultiTexCoord2ivARB,#function
- glMultiTexCoord2ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8214,7 +8214,7 @@
- .globl glMultiTexCoord2sARB
- .type glMultiTexCoord2sARB,#function
- glMultiTexCoord2sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8235,7 +8235,7 @@
- .globl glMultiTexCoord2svARB
- .type glMultiTexCoord2svARB,#function
- glMultiTexCoord2svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8256,7 +8256,7 @@
- .globl glMultiTexCoord3dARB
- .type glMultiTexCoord3dARB,#function
- glMultiTexCoord3dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8277,7 +8277,7 @@
- .globl glMultiTexCoord3dvARB
- .type glMultiTexCoord3dvARB,#function
- glMultiTexCoord3dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8298,7 +8298,7 @@
- .globl glMultiTexCoord3fARB
- .type glMultiTexCoord3fARB,#function
- glMultiTexCoord3fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8319,7 +8319,7 @@
- .globl glMultiTexCoord3fvARB
- .type glMultiTexCoord3fvARB,#function
- glMultiTexCoord3fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8340,7 +8340,7 @@
- .globl glMultiTexCoord3iARB
- .type glMultiTexCoord3iARB,#function
- glMultiTexCoord3iARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8361,7 +8361,7 @@
- .globl glMultiTexCoord3ivARB
- .type glMultiTexCoord3ivARB,#function
- glMultiTexCoord3ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8382,7 +8382,7 @@
- .globl glMultiTexCoord3sARB
- .type glMultiTexCoord3sARB,#function
- glMultiTexCoord3sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8403,7 +8403,7 @@
- .globl glMultiTexCoord3svARB
- .type glMultiTexCoord3svARB,#function
- glMultiTexCoord3svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8424,7 +8424,7 @@
- .globl glMultiTexCoord4dARB
- .type glMultiTexCoord4dARB,#function
- glMultiTexCoord4dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8445,7 +8445,7 @@
- .globl glMultiTexCoord4dvARB
- .type glMultiTexCoord4dvARB,#function
- glMultiTexCoord4dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8466,7 +8466,7 @@
- .globl glMultiTexCoord4fARB
- .type glMultiTexCoord4fARB,#function
- glMultiTexCoord4fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8487,7 +8487,7 @@
- .globl glMultiTexCoord4fvARB
- .type glMultiTexCoord4fvARB,#function
- glMultiTexCoord4fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8508,7 +8508,7 @@
- .globl glMultiTexCoord4iARB
- .type glMultiTexCoord4iARB,#function
- glMultiTexCoord4iARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8529,7 +8529,7 @@
- .globl glMultiTexCoord4ivARB
- .type glMultiTexCoord4ivARB,#function
- glMultiTexCoord4ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8550,7 +8550,7 @@
- .globl glMultiTexCoord4sARB
- .type glMultiTexCoord4sARB,#function
- glMultiTexCoord4sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8571,7 +8571,7 @@
- .globl glMultiTexCoord4svARB
- .type glMultiTexCoord4svARB,#function
- glMultiTexCoord4svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8592,7 +8592,7 @@
- .globl glLoadTransposeMatrixfARB
- .type glLoadTransposeMatrixfARB,#function
- glLoadTransposeMatrixfARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8613,7 +8613,7 @@
- .globl glLoadTransposeMatrixdARB
- .type glLoadTransposeMatrixdARB,#function
- glLoadTransposeMatrixdARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8634,7 +8634,7 @@
- .globl glMultTransposeMatrixfARB
- .type glMultTransposeMatrixfARB,#function
- glMultTransposeMatrixfARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8655,7 +8655,7 @@
- .globl glMultTransposeMatrixdARB
- .type glMultTransposeMatrixdARB,#function
- glMultTransposeMatrixdARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8676,7 +8676,7 @@
- .globl glSampleCoverageARB
- .type glSampleCoverageARB,#function
- glSampleCoverageARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8697,7 +8697,7 @@
- .globl gl__unused413
- .type gl__unused413,#function
- gl__unused413:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8718,7 +8718,7 @@
- .globl glCompressedTexImage3DARB
- .type glCompressedTexImage3DARB,#function
- glCompressedTexImage3DARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8739,7 +8739,7 @@
- .globl glCompressedTexImage2DARB
- .type glCompressedTexImage2DARB,#function
- glCompressedTexImage2DARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8760,7 +8760,7 @@
- .globl glCompressedTexImage1DARB
- .type glCompressedTexImage1DARB,#function
- glCompressedTexImage1DARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8781,7 +8781,7 @@
- .globl glCompressedTexSubImage3DARB
- .type glCompressedTexSubImage3DARB,#function
- glCompressedTexSubImage3DARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8802,7 +8802,7 @@
- .globl glCompressedTexSubImage2DARB
- .type glCompressedTexSubImage2DARB,#function
- glCompressedTexSubImage2DARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8823,7 +8823,7 @@
- .globl glCompressedTexSubImage1DARB
- .type glCompressedTexSubImage1DARB,#function
- glCompressedTexSubImage1DARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8844,7 +8844,7 @@
- .globl glGetCompressedTexImageARB
- .type glGetCompressedTexImageARB,#function
- glGetCompressedTexImageARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8865,7 +8865,7 @@
- .globl glActiveTexture
- .type glActiveTexture,#function
- glActiveTexture:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8886,7 +8886,7 @@
- .globl glClientActiveTexture
- .type glClientActiveTexture,#function
- glClientActiveTexture:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8907,7 +8907,7 @@
- .globl glMultiTexCoord1d
- .type glMultiTexCoord1d,#function
- glMultiTexCoord1d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8928,7 +8928,7 @@
- .globl glMultiTexCoord1dv
- .type glMultiTexCoord1dv,#function
- glMultiTexCoord1dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8949,7 +8949,7 @@
- .globl glMultiTexCoord1f
- .type glMultiTexCoord1f,#function
- glMultiTexCoord1f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8970,7 +8970,7 @@
- .globl glMultiTexCoord1fv
- .type glMultiTexCoord1fv,#function
- glMultiTexCoord1fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -8991,7 +8991,7 @@
- .globl glMultiTexCoord1i
- .type glMultiTexCoord1i,#function
- glMultiTexCoord1i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9012,7 +9012,7 @@
- .globl glMultiTexCoord1iv
- .type glMultiTexCoord1iv,#function
- glMultiTexCoord1iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9033,7 +9033,7 @@
- .globl glMultiTexCoord1s
- .type glMultiTexCoord1s,#function
- glMultiTexCoord1s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9054,7 +9054,7 @@
- .globl glMultiTexCoord1sv
- .type glMultiTexCoord1sv,#function
- glMultiTexCoord1sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9075,7 +9075,7 @@
- .globl glMultiTexCoord2d
- .type glMultiTexCoord2d,#function
- glMultiTexCoord2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9096,7 +9096,7 @@
- .globl glMultiTexCoord2dv
- .type glMultiTexCoord2dv,#function
- glMultiTexCoord2dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9117,7 +9117,7 @@
- .globl glMultiTexCoord2f
- .type glMultiTexCoord2f,#function
- glMultiTexCoord2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9138,7 +9138,7 @@
- .globl glMultiTexCoord2fv
- .type glMultiTexCoord2fv,#function
- glMultiTexCoord2fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9159,7 +9159,7 @@
- .globl glMultiTexCoord2i
- .type glMultiTexCoord2i,#function
- glMultiTexCoord2i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9180,7 +9180,7 @@
- .globl glMultiTexCoord2iv
- .type glMultiTexCoord2iv,#function
- glMultiTexCoord2iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9201,7 +9201,7 @@
- .globl glMultiTexCoord2s
- .type glMultiTexCoord2s,#function
- glMultiTexCoord2s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9222,7 +9222,7 @@
- .globl glMultiTexCoord2sv
- .type glMultiTexCoord2sv,#function
- glMultiTexCoord2sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9243,7 +9243,7 @@
- .globl glMultiTexCoord3d
- .type glMultiTexCoord3d,#function
- glMultiTexCoord3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9264,7 +9264,7 @@
- .globl glMultiTexCoord3dv
- .type glMultiTexCoord3dv,#function
- glMultiTexCoord3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9285,7 +9285,7 @@
- .globl glMultiTexCoord3f
- .type glMultiTexCoord3f,#function
- glMultiTexCoord3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9306,7 +9306,7 @@
- .globl glMultiTexCoord3fv
- .type glMultiTexCoord3fv,#function
- glMultiTexCoord3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9327,7 +9327,7 @@
- .globl glMultiTexCoord3i
- .type glMultiTexCoord3i,#function
- glMultiTexCoord3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9348,7 +9348,7 @@
- .globl glMultiTexCoord3iv
- .type glMultiTexCoord3iv,#function
- glMultiTexCoord3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9369,7 +9369,7 @@
- .globl glMultiTexCoord3s
- .type glMultiTexCoord3s,#function
- glMultiTexCoord3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9390,7 +9390,7 @@
- .globl glMultiTexCoord3sv
- .type glMultiTexCoord3sv,#function
- glMultiTexCoord3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9411,7 +9411,7 @@
- .globl glMultiTexCoord4d
- .type glMultiTexCoord4d,#function
- glMultiTexCoord4d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9432,7 +9432,7 @@
- .globl glMultiTexCoord4dv
- .type glMultiTexCoord4dv,#function
- glMultiTexCoord4dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9453,7 +9453,7 @@
- .globl glMultiTexCoord4f
- .type glMultiTexCoord4f,#function
- glMultiTexCoord4f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9474,7 +9474,7 @@
- .globl glMultiTexCoord4fv
- .type glMultiTexCoord4fv,#function
- glMultiTexCoord4fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9495,7 +9495,7 @@
- .globl glMultiTexCoord4i
- .type glMultiTexCoord4i,#function
- glMultiTexCoord4i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9516,7 +9516,7 @@
- .globl glMultiTexCoord4iv
- .type glMultiTexCoord4iv,#function
- glMultiTexCoord4iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9537,7 +9537,7 @@
- .globl glMultiTexCoord4s
- .type glMultiTexCoord4s,#function
- glMultiTexCoord4s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9558,7 +9558,7 @@
- .globl glMultiTexCoord4sv
- .type glMultiTexCoord4sv,#function
- glMultiTexCoord4sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9579,7 +9579,7 @@
- .globl glLoadTransposeMatrixf
- .type glLoadTransposeMatrixf,#function
- glLoadTransposeMatrixf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9600,7 +9600,7 @@
- .globl glLoadTransposeMatrixd
- .type glLoadTransposeMatrixd,#function
- glLoadTransposeMatrixd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9621,7 +9621,7 @@
- .globl glMultTransposeMatrixf
- .type glMultTransposeMatrixf,#function
- glMultTransposeMatrixf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9642,7 +9642,7 @@
- .globl glMultTransposeMatrixd
- .type glMultTransposeMatrixd,#function
- glMultTransposeMatrixd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9663,7 +9663,7 @@
- .globl glSampleCoverage
- .type glSampleCoverage,#function
- glSampleCoverage:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9684,7 +9684,7 @@
- .globl glCompressedTexImage3D
- .type glCompressedTexImage3D,#function
- glCompressedTexImage3D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9705,7 +9705,7 @@
- .globl glCompressedTexImage2D
- .type glCompressedTexImage2D,#function
- glCompressedTexImage2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9726,7 +9726,7 @@
- .globl glCompressedTexImage1D
- .type glCompressedTexImage1D,#function
- glCompressedTexImage1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9747,7 +9747,7 @@
- .globl glCompressedTexSubImage3D
- .type glCompressedTexSubImage3D,#function
- glCompressedTexSubImage3D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9768,7 +9768,7 @@
- .globl glCompressedTexSubImage2D
- .type glCompressedTexSubImage2D,#function
- glCompressedTexSubImage2D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9789,7 +9789,7 @@
- .globl glCompressedTexSubImage1D
- .type glCompressedTexSubImage1D,#function
- glCompressedTexSubImage1D:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9810,7 +9810,7 @@
- .globl glGetCompressedTexImage
- .type glGetCompressedTexImage,#function
- glGetCompressedTexImage:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9831,7 +9831,7 @@
- .globl glBlendColorEXT
- .type glBlendColorEXT,#function
- glBlendColorEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9852,7 +9852,7 @@
- .globl glPolygonOffsetEXT
- .type glPolygonOffsetEXT,#function
- glPolygonOffsetEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9873,7 +9873,7 @@
- .globl glTexImage3DEXT
- .type glTexImage3DEXT,#function
- glTexImage3DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9894,7 +9894,7 @@
- .globl glTexSubImage3DEXT
- .type glTexSubImage3DEXT,#function
- glTexSubImage3DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9915,7 +9915,7 @@
- .globl glGetTexFilterFuncSGIS
- .type glGetTexFilterFuncSGIS,#function
- glGetTexFilterFuncSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9936,7 +9936,7 @@
- .globl glTexFilterFuncSGIS
- .type glTexFilterFuncSGIS,#function
- glTexFilterFuncSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9957,7 +9957,7 @@
- .globl glTexSubImage1DEXT
- .type glTexSubImage1DEXT,#function
- glTexSubImage1DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9978,7 +9978,7 @@
- .globl glTexSubImage2DEXT
- .type glTexSubImage2DEXT,#function
- glTexSubImage2DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -9999,7 +9999,7 @@
- .globl glCopyTexImage1DEXT
- .type glCopyTexImage1DEXT,#function
- glCopyTexImage1DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10020,7 +10020,7 @@
- .globl glCopyTexImage2DEXT
- .type glCopyTexImage2DEXT,#function
- glCopyTexImage2DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10041,7 +10041,7 @@
- .globl glCopyTexSubImage1DEXT
- .type glCopyTexSubImage1DEXT,#function
- glCopyTexSubImage1DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10062,7 +10062,7 @@
- .globl glCopyTexSubImage2DEXT
- .type glCopyTexSubImage2DEXT,#function
- glCopyTexSubImage2DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10083,7 +10083,7 @@
- .globl glCopyTexSubImage3DEXT
- .type glCopyTexSubImage3DEXT,#function
- glCopyTexSubImage3DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10104,7 +10104,7 @@
- .globl glGetHistogramEXT
- .type glGetHistogramEXT,#function
- glGetHistogramEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10125,7 +10125,7 @@
- .globl glGetHistogramParameterfvEXT
- .type glGetHistogramParameterfvEXT,#function
- glGetHistogramParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10146,7 +10146,7 @@
- .globl glGetHistogramParameterivEXT
- .type glGetHistogramParameterivEXT,#function
- glGetHistogramParameterivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10167,7 +10167,7 @@
- .globl glGetMinmaxEXT
- .type glGetMinmaxEXT,#function
- glGetMinmaxEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10188,7 +10188,7 @@
- .globl glGetMinmaxParameterfvEXT
- .type glGetMinmaxParameterfvEXT,#function
- glGetMinmaxParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10209,7 +10209,7 @@
- .globl glGetMinmaxParameterivEXT
- .type glGetMinmaxParameterivEXT,#function
- glGetMinmaxParameterivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10230,7 +10230,7 @@
- .globl glHistogramEXT
- .type glHistogramEXT,#function
- glHistogramEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10251,7 +10251,7 @@
- .globl glMinmaxEXT
- .type glMinmaxEXT,#function
- glMinmaxEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10272,7 +10272,7 @@
- .globl glResetHistogramEXT
- .type glResetHistogramEXT,#function
- glResetHistogramEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10293,7 +10293,7 @@
- .globl glResetMinmaxEXT
- .type glResetMinmaxEXT,#function
- glResetMinmaxEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10314,7 +10314,7 @@
- .globl glConvolutionFilter1DEXT
- .type glConvolutionFilter1DEXT,#function
- glConvolutionFilter1DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10335,7 +10335,7 @@
- .globl glConvolutionFilter2DEXT
- .type glConvolutionFilter2DEXT,#function
- glConvolutionFilter2DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10356,7 +10356,7 @@
- .globl glConvolutionParameterfEXT
- .type glConvolutionParameterfEXT,#function
- glConvolutionParameterfEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10377,7 +10377,7 @@
- .globl glConvolutionParameterfvEXT
- .type glConvolutionParameterfvEXT,#function
- glConvolutionParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10398,7 +10398,7 @@
- .globl glConvolutionParameteriEXT
- .type glConvolutionParameteriEXT,#function
- glConvolutionParameteriEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10419,7 +10419,7 @@
- .globl glConvolutionParameterivEXT
- .type glConvolutionParameterivEXT,#function
- glConvolutionParameterivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10440,7 +10440,7 @@
- .globl glCopyConvolutionFilter1DEXT
- .type glCopyConvolutionFilter1DEXT,#function
- glCopyConvolutionFilter1DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10461,7 +10461,7 @@
- .globl glCopyConvolutionFilter2DEXT
- .type glCopyConvolutionFilter2DEXT,#function
- glCopyConvolutionFilter2DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10482,7 +10482,7 @@
- .globl glGetConvolutionFilterEXT
- .type glGetConvolutionFilterEXT,#function
- glGetConvolutionFilterEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10503,7 +10503,7 @@
- .globl glGetConvolutionParameterfvEXT
- .type glGetConvolutionParameterfvEXT,#function
- glGetConvolutionParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10524,7 +10524,7 @@
- .globl glGetConvolutionParameterivEXT
- .type glGetConvolutionParameterivEXT,#function
- glGetConvolutionParameterivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10545,7 +10545,7 @@
- .globl glGetSeparableFilterEXT
- .type glGetSeparableFilterEXT,#function
- glGetSeparableFilterEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10566,7 +10566,7 @@
- .globl glSeparableFilter2DEXT
- .type glSeparableFilter2DEXT,#function
- glSeparableFilter2DEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10587,7 +10587,7 @@
- .globl glColorTableSGI
- .type glColorTableSGI,#function
- glColorTableSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10608,7 +10608,7 @@
- .globl glColorTableParameterfvSGI
- .type glColorTableParameterfvSGI,#function
- glColorTableParameterfvSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10629,7 +10629,7 @@
- .globl glColorTableParameterivSGI
- .type glColorTableParameterivSGI,#function
- glColorTableParameterivSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10650,7 +10650,7 @@
- .globl glCopyColorTableSGI
- .type glCopyColorTableSGI,#function
- glCopyColorTableSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10671,7 +10671,7 @@
- .globl glGetColorTableSGI
- .type glGetColorTableSGI,#function
- glGetColorTableSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10692,7 +10692,7 @@
- .globl glGetColorTableParameterfvSGI
- .type glGetColorTableParameterfvSGI,#function
- glGetColorTableParameterfvSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10713,7 +10713,7 @@
- .globl glGetColorTableParameterivSGI
- .type glGetColorTableParameterivSGI,#function
- glGetColorTableParameterivSGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10734,7 +10734,7 @@
- .globl glPixelTexGenSGIX
- .type glPixelTexGenSGIX,#function
- glPixelTexGenSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10755,7 +10755,7 @@
- .globl glPixelTexGenParameteriSGIS
- .type glPixelTexGenParameteriSGIS,#function
- glPixelTexGenParameteriSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10776,7 +10776,7 @@
- .globl glPixelTexGenParameterivSGIS
- .type glPixelTexGenParameterivSGIS,#function
- glPixelTexGenParameterivSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10797,7 +10797,7 @@
- .globl glPixelTexGenParameterfSGIS
- .type glPixelTexGenParameterfSGIS,#function
- glPixelTexGenParameterfSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10818,7 +10818,7 @@
- .globl glPixelTexGenParameterfvSGIS
- .type glPixelTexGenParameterfvSGIS,#function
- glPixelTexGenParameterfvSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10839,7 +10839,7 @@
- .globl glGetPixelTexGenParameterivSGIS
- .type glGetPixelTexGenParameterivSGIS,#function
- glGetPixelTexGenParameterivSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10860,7 +10860,7 @@
- .globl glGetPixelTexGenParameterfvSGIS
- .type glGetPixelTexGenParameterfvSGIS,#function
- glGetPixelTexGenParameterfvSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10881,7 +10881,7 @@
- .globl glTexImage4DSGIS
- .type glTexImage4DSGIS,#function
- glTexImage4DSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10902,7 +10902,7 @@
- .globl glTexSubImage4DSGIS
- .type glTexSubImage4DSGIS,#function
- glTexSubImage4DSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10923,7 +10923,7 @@
- .globl glAreTexturesResidentEXT
- .type glAreTexturesResidentEXT,#function
- glAreTexturesResidentEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10944,7 +10944,7 @@
- .globl glBindTextureEXT
- .type glBindTextureEXT,#function
- glBindTextureEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10965,7 +10965,7 @@
- .globl glDeleteTexturesEXT
- .type glDeleteTexturesEXT,#function
- glDeleteTexturesEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -10986,7 +10986,7 @@
- .globl glGenTexturesEXT
- .type glGenTexturesEXT,#function
- glGenTexturesEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11007,7 +11007,7 @@
- .globl glIsTextureEXT
- .type glIsTextureEXT,#function
- glIsTextureEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11028,7 +11028,7 @@
- .globl glPrioritizeTexturesEXT
- .type glPrioritizeTexturesEXT,#function
- glPrioritizeTexturesEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11049,7 +11049,7 @@
- .globl glDetailTexFuncSGIS
- .type glDetailTexFuncSGIS,#function
- glDetailTexFuncSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11070,7 +11070,7 @@
- .globl glGetDetailTexFuncSGIS
- .type glGetDetailTexFuncSGIS,#function
- glGetDetailTexFuncSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11091,7 +11091,7 @@
- .globl glSharpenTexFuncSGIS
- .type glSharpenTexFuncSGIS,#function
- glSharpenTexFuncSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11112,7 +11112,7 @@
- .globl glGetSharpenTexFuncSGIS
- .type glGetSharpenTexFuncSGIS,#function
- glGetSharpenTexFuncSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11133,7 +11133,7 @@
- .globl glSampleMaskSGIS
- .type glSampleMaskSGIS,#function
- glSampleMaskSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11154,7 +11154,7 @@
- .globl glSamplePatternSGIS
- .type glSamplePatternSGIS,#function
- glSamplePatternSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11175,7 +11175,7 @@
- .globl glArrayElementEXT
- .type glArrayElementEXT,#function
- glArrayElementEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11196,7 +11196,7 @@
- .globl glColorPointerEXT
- .type glColorPointerEXT,#function
- glColorPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11217,7 +11217,7 @@
- .globl glDrawArraysEXT
- .type glDrawArraysEXT,#function
- glDrawArraysEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11238,7 +11238,7 @@
- .globl glEdgeFlagPointerEXT
- .type glEdgeFlagPointerEXT,#function
- glEdgeFlagPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11259,7 +11259,7 @@
- .globl glGetPointervEXT
- .type glGetPointervEXT,#function
- glGetPointervEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11280,7 +11280,7 @@
- .globl glIndexPointerEXT
- .type glIndexPointerEXT,#function
- glIndexPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11301,7 +11301,7 @@
- .globl glNormalPointerEXT
- .type glNormalPointerEXT,#function
- glNormalPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11322,7 +11322,7 @@
- .globl glTexCoordPointerEXT
- .type glTexCoordPointerEXT,#function
- glTexCoordPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11343,7 +11343,7 @@
- .globl glVertexPointerEXT
- .type glVertexPointerEXT,#function
- glVertexPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11364,7 +11364,7 @@
- .globl glBlendEquationEXT
- .type glBlendEquationEXT,#function
- glBlendEquationEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11385,7 +11385,7 @@
- .globl glSpriteParameterfSGIX
- .type glSpriteParameterfSGIX,#function
- glSpriteParameterfSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11406,7 +11406,7 @@
- .globl glSpriteParameterfvSGIX
- .type glSpriteParameterfvSGIX,#function
- glSpriteParameterfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11427,7 +11427,7 @@
- .globl glSpriteParameteriSGIX
- .type glSpriteParameteriSGIX,#function
- glSpriteParameteriSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11448,7 +11448,7 @@
- .globl glSpriteParameterivSGIX
- .type glSpriteParameterivSGIX,#function
- glSpriteParameterivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11469,7 +11469,7 @@
- .globl glPointParameterfEXT
- .type glPointParameterfEXT,#function
- glPointParameterfEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11490,7 +11490,7 @@
- .globl glPointParameterfvEXT
- .type glPointParameterfvEXT,#function
- glPointParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11511,7 +11511,7 @@
- .globl glPointParameterfARB
- .type glPointParameterfARB,#function
- glPointParameterfARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11532,7 +11532,7 @@
- .globl glPointParameterfvARB
- .type glPointParameterfvARB,#function
- glPointParameterfvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11553,7 +11553,7 @@
- .globl glPointParameterfSGIS
- .type glPointParameterfSGIS,#function
- glPointParameterfSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11574,7 +11574,7 @@
- .globl glPointParameterfvSGIS
- .type glPointParameterfvSGIS,#function
- glPointParameterfvSGIS:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11595,7 +11595,7 @@
- .globl glGetInstrumentsSGIX
- .type glGetInstrumentsSGIX,#function
- glGetInstrumentsSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11616,7 +11616,7 @@
- .globl glInstrumentsBufferSGIX
- .type glInstrumentsBufferSGIX,#function
- glInstrumentsBufferSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11637,7 +11637,7 @@
- .globl glPollInstrumentsSGIX
- .type glPollInstrumentsSGIX,#function
- glPollInstrumentsSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11658,7 +11658,7 @@
- .globl glReadInstrumentsSGIX
- .type glReadInstrumentsSGIX,#function
- glReadInstrumentsSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11679,7 +11679,7 @@
- .globl glStartInstrumentsSGIX
- .type glStartInstrumentsSGIX,#function
- glStartInstrumentsSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11700,7 +11700,7 @@
- .globl glStopInstrumentsSGIX
- .type glStopInstrumentsSGIX,#function
- glStopInstrumentsSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11721,7 +11721,7 @@
- .globl glFrameZoomSGIX
- .type glFrameZoomSGIX,#function
- glFrameZoomSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11742,7 +11742,7 @@
- .globl glTagSampleBufferSGIX
- .type glTagSampleBufferSGIX,#function
- glTagSampleBufferSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11763,7 +11763,7 @@
- .globl glReferencePlaneSGIX
- .type glReferencePlaneSGIX,#function
- glReferencePlaneSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11784,7 +11784,7 @@
- .globl glFlushRasterSGIX
- .type glFlushRasterSGIX,#function
- glFlushRasterSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11805,7 +11805,7 @@
- .globl glColorSubTableEXT
- .type glColorSubTableEXT,#function
- glColorSubTableEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11826,7 +11826,7 @@
- .globl glCopyColorSubTableEXT
- .type glCopyColorSubTableEXT,#function
- glCopyColorSubTableEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11847,7 +11847,7 @@
- .globl glHintPGI
- .type glHintPGI,#function
- glHintPGI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11868,7 +11868,7 @@
- .globl glColorTableEXT
- .type glColorTableEXT,#function
- glColorTableEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11889,7 +11889,7 @@
- .globl glGetColorTableEXT
- .type glGetColorTableEXT,#function
- glGetColorTableEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11910,7 +11910,7 @@
- .globl glGetColorTableParameterivEXT
- .type glGetColorTableParameterivEXT,#function
- glGetColorTableParameterivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11931,7 +11931,7 @@
- .globl glGetColorTableParameterfvEXT
- .type glGetColorTableParameterfvEXT,#function
- glGetColorTableParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11952,7 +11952,7 @@
- .globl glGetListParameterfvSGIX
- .type glGetListParameterfvSGIX,#function
- glGetListParameterfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11973,7 +11973,7 @@
- .globl glGetListParameterivSGIX
- .type glGetListParameterivSGIX,#function
- glGetListParameterivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -11994,7 +11994,7 @@
- .globl glListParameterfSGIX
- .type glListParameterfSGIX,#function
- glListParameterfSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12015,7 +12015,7 @@
- .globl glListParameterfvSGIX
- .type glListParameterfvSGIX,#function
- glListParameterfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12036,7 +12036,7 @@
- .globl glListParameteriSGIX
- .type glListParameteriSGIX,#function
- glListParameteriSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12057,7 +12057,7 @@
- .globl glListParameterivSGIX
- .type glListParameterivSGIX,#function
- glListParameterivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12078,7 +12078,7 @@
- .globl glIndexMaterialEXT
- .type glIndexMaterialEXT,#function
- glIndexMaterialEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12099,7 +12099,7 @@
- .globl glIndexFuncEXT
- .type glIndexFuncEXT,#function
- glIndexFuncEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12120,7 +12120,7 @@
- .globl glLockArraysEXT
- .type glLockArraysEXT,#function
- glLockArraysEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12141,7 +12141,7 @@
- .globl glUnlockArraysEXT
- .type glUnlockArraysEXT,#function
- glUnlockArraysEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12162,7 +12162,7 @@
- .globl glCullParameterdvEXT
- .type glCullParameterdvEXT,#function
- glCullParameterdvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12183,7 +12183,7 @@
- .globl glCullParameterfvEXT
- .type glCullParameterfvEXT,#function
- glCullParameterfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12204,7 +12204,7 @@
- .globl glFragmentColorMaterialSGIX
- .type glFragmentColorMaterialSGIX,#function
- glFragmentColorMaterialSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12225,7 +12225,7 @@
- .globl glFragmentLightfSGIX
- .type glFragmentLightfSGIX,#function
- glFragmentLightfSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12246,7 +12246,7 @@
- .globl glFragmentLightfvSGIX
- .type glFragmentLightfvSGIX,#function
- glFragmentLightfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12267,7 +12267,7 @@
- .globl glFragmentLightiSGIX
- .type glFragmentLightiSGIX,#function
- glFragmentLightiSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12288,7 +12288,7 @@
- .globl glFragmentLightivSGIX
- .type glFragmentLightivSGIX,#function
- glFragmentLightivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12309,7 +12309,7 @@
- .globl glFragmentLightModelfSGIX
- .type glFragmentLightModelfSGIX,#function
- glFragmentLightModelfSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12330,7 +12330,7 @@
- .globl glFragmentLightModelfvSGIX
- .type glFragmentLightModelfvSGIX,#function
- glFragmentLightModelfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12351,7 +12351,7 @@
- .globl glFragmentLightModeliSGIX
- .type glFragmentLightModeliSGIX,#function
- glFragmentLightModeliSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12372,7 +12372,7 @@
- .globl glFragmentLightModelivSGIX
- .type glFragmentLightModelivSGIX,#function
- glFragmentLightModelivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12393,7 +12393,7 @@
- .globl glFragmentMaterialfSGIX
- .type glFragmentMaterialfSGIX,#function
- glFragmentMaterialfSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12414,7 +12414,7 @@
- .globl glFragmentMaterialfvSGIX
- .type glFragmentMaterialfvSGIX,#function
- glFragmentMaterialfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12435,7 +12435,7 @@
- .globl glFragmentMaterialiSGIX
- .type glFragmentMaterialiSGIX,#function
- glFragmentMaterialiSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12456,7 +12456,7 @@
- .globl glFragmentMaterialivSGIX
- .type glFragmentMaterialivSGIX,#function
- glFragmentMaterialivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12477,7 +12477,7 @@
- .globl glGetFragmentLightfvSGIX
- .type glGetFragmentLightfvSGIX,#function
- glGetFragmentLightfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12498,7 +12498,7 @@
- .globl glGetFragmentLightivSGIX
- .type glGetFragmentLightivSGIX,#function
- glGetFragmentLightivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12519,7 +12519,7 @@
- .globl glGetFragmentMaterialfvSGIX
- .type glGetFragmentMaterialfvSGIX,#function
- glGetFragmentMaterialfvSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12540,7 +12540,7 @@
- .globl glGetFragmentMaterialivSGIX
- .type glGetFragmentMaterialivSGIX,#function
- glGetFragmentMaterialivSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12561,7 +12561,7 @@
- .globl glLightEnviSGIX
- .type glLightEnviSGIX,#function
- glLightEnviSGIX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12582,7 +12582,7 @@
- .globl glDrawRangeElementsEXT
- .type glDrawRangeElementsEXT,#function
- glDrawRangeElementsEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12603,7 +12603,7 @@
- .globl glSecondaryColor3bEXT
- .type glSecondaryColor3bEXT,#function
- glSecondaryColor3bEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12624,7 +12624,7 @@
- .globl glSecondaryColor3bvEXT
- .type glSecondaryColor3bvEXT,#function
- glSecondaryColor3bvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12645,7 +12645,7 @@
- .globl glSecondaryColor3dEXT
- .type glSecondaryColor3dEXT,#function
- glSecondaryColor3dEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12666,7 +12666,7 @@
- .globl glSecondaryColor3dvEXT
- .type glSecondaryColor3dvEXT,#function
- glSecondaryColor3dvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12687,7 +12687,7 @@
- .globl glSecondaryColor3fEXT
- .type glSecondaryColor3fEXT,#function
- glSecondaryColor3fEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12708,7 +12708,7 @@
- .globl glSecondaryColor3fvEXT
- .type glSecondaryColor3fvEXT,#function
- glSecondaryColor3fvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12729,7 +12729,7 @@
- .globl glSecondaryColor3iEXT
- .type glSecondaryColor3iEXT,#function
- glSecondaryColor3iEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12750,7 +12750,7 @@
- .globl glSecondaryColor3ivEXT
- .type glSecondaryColor3ivEXT,#function
- glSecondaryColor3ivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12771,7 +12771,7 @@
- .globl glSecondaryColor3sEXT
- .type glSecondaryColor3sEXT,#function
- glSecondaryColor3sEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12792,7 +12792,7 @@
- .globl glSecondaryColor3svEXT
- .type glSecondaryColor3svEXT,#function
- glSecondaryColor3svEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12813,7 +12813,7 @@
- .globl glSecondaryColor3ubEXT
- .type glSecondaryColor3ubEXT,#function
- glSecondaryColor3ubEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12834,7 +12834,7 @@
- .globl glSecondaryColor3ubvEXT
- .type glSecondaryColor3ubvEXT,#function
- glSecondaryColor3ubvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12855,7 +12855,7 @@
- .globl glSecondaryColor3uiEXT
- .type glSecondaryColor3uiEXT,#function
- glSecondaryColor3uiEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12876,7 +12876,7 @@
- .globl glSecondaryColor3uivEXT
- .type glSecondaryColor3uivEXT,#function
- glSecondaryColor3uivEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12897,7 +12897,7 @@
- .globl glSecondaryColor3usEXT
- .type glSecondaryColor3usEXT,#function
- glSecondaryColor3usEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12918,7 +12918,7 @@
- .globl glSecondaryColor3usvEXT
- .type glSecondaryColor3usvEXT,#function
- glSecondaryColor3usvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12939,7 +12939,7 @@
- .globl glSecondaryColorPointerEXT
- .type glSecondaryColorPointerEXT,#function
- glSecondaryColorPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12960,7 +12960,7 @@
- .globl glMultiDrawArraysEXT
- .type glMultiDrawArraysEXT,#function
- glMultiDrawArraysEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -12981,7 +12981,7 @@
- .globl glMultiDrawElementsEXT
- .type glMultiDrawElementsEXT,#function
- glMultiDrawElementsEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13002,7 +13002,7 @@
- .globl glFogCoordfEXT
- .type glFogCoordfEXT,#function
- glFogCoordfEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13023,7 +13023,7 @@
- .globl glFogCoordfvEXT
- .type glFogCoordfvEXT,#function
- glFogCoordfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13044,7 +13044,7 @@
- .globl glFogCoorddEXT
- .type glFogCoorddEXT,#function
- glFogCoorddEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13065,7 +13065,7 @@
- .globl glFogCoorddvEXT
- .type glFogCoorddvEXT,#function
- glFogCoorddvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13086,7 +13086,7 @@
- .globl glFogCoordPointerEXT
- .type glFogCoordPointerEXT,#function
- glFogCoordPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13107,7 +13107,7 @@
- .globl glBlendFuncSeparateEXT
- .type glBlendFuncSeparateEXT,#function
- glBlendFuncSeparateEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13128,7 +13128,7 @@
- .globl glBlendFuncSeparateINGR
- .type glBlendFuncSeparateINGR,#function
- glBlendFuncSeparateINGR:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13149,7 +13149,7 @@
- .globl glVertexWeightfEXT
- .type glVertexWeightfEXT,#function
- glVertexWeightfEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13170,7 +13170,7 @@
- .globl glVertexWeightfvEXT
- .type glVertexWeightfvEXT,#function
- glVertexWeightfvEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13191,7 +13191,7 @@
- .globl glVertexWeightPointerEXT
- .type glVertexWeightPointerEXT,#function
- glVertexWeightPointerEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13212,7 +13212,7 @@
- .globl glFlushVertexArrayRangeNV
- .type glFlushVertexArrayRangeNV,#function
- glFlushVertexArrayRangeNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13233,7 +13233,7 @@
- .globl glVertexArrayRangeNV
- .type glVertexArrayRangeNV,#function
- glVertexArrayRangeNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13254,7 +13254,7 @@
- .globl glCombinerParameterfvNV
- .type glCombinerParameterfvNV,#function
- glCombinerParameterfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13275,7 +13275,7 @@
- .globl glCombinerParameterfNV
- .type glCombinerParameterfNV,#function
- glCombinerParameterfNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13296,7 +13296,7 @@
- .globl glCombinerParameterivNV
- .type glCombinerParameterivNV,#function
- glCombinerParameterivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13317,7 +13317,7 @@
- .globl glCombinerParameteriNV
- .type glCombinerParameteriNV,#function
- glCombinerParameteriNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13338,7 +13338,7 @@
- .globl glCombinerInputNV
- .type glCombinerInputNV,#function
- glCombinerInputNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13359,7 +13359,7 @@
- .globl glCombinerOutputNV
- .type glCombinerOutputNV,#function
- glCombinerOutputNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13380,7 +13380,7 @@
- .globl glFinalCombinerInputNV
- .type glFinalCombinerInputNV,#function
- glFinalCombinerInputNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13401,7 +13401,7 @@
- .globl glGetCombinerInputParameterfvNV
- .type glGetCombinerInputParameterfvNV,#function
- glGetCombinerInputParameterfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13422,7 +13422,7 @@
- .globl glGetCombinerInputParameterivNV
- .type glGetCombinerInputParameterivNV,#function
- glGetCombinerInputParameterivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13443,7 +13443,7 @@
- .globl glGetCombinerOutputParameterfvNV
- .type glGetCombinerOutputParameterfvNV,#function
- glGetCombinerOutputParameterfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13464,7 +13464,7 @@
- .globl glGetCombinerOutputParameterivNV
- .type glGetCombinerOutputParameterivNV,#function
- glGetCombinerOutputParameterivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13485,7 +13485,7 @@
- .globl glGetFinalCombinerInputParameterfvNV
- .type glGetFinalCombinerInputParameterfvNV,#function
- glGetFinalCombinerInputParameterfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13506,7 +13506,7 @@
- .globl glGetFinalCombinerInputParameterivNV
- .type glGetFinalCombinerInputParameterivNV,#function
- glGetFinalCombinerInputParameterivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13527,7 +13527,7 @@
- .globl glResizeBuffersMESA
- .type glResizeBuffersMESA,#function
- glResizeBuffersMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13548,7 +13548,7 @@
- .globl glWindowPos2dMESA
- .type glWindowPos2dMESA,#function
- glWindowPos2dMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13569,7 +13569,7 @@
- .globl glWindowPos2dvMESA
- .type glWindowPos2dvMESA,#function
- glWindowPos2dvMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13590,7 +13590,7 @@
- .globl glWindowPos2fMESA
- .type glWindowPos2fMESA,#function
- glWindowPos2fMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13611,7 +13611,7 @@
- .globl glWindowPos2fvMESA
- .type glWindowPos2fvMESA,#function
- glWindowPos2fvMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13632,7 +13632,7 @@
- .globl glWindowPos2iMESA
- .type glWindowPos2iMESA,#function
- glWindowPos2iMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13653,7 +13653,7 @@
- .globl glWindowPos2ivMESA
- .type glWindowPos2ivMESA,#function
- glWindowPos2ivMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13674,7 +13674,7 @@
- .globl glWindowPos2sMESA
- .type glWindowPos2sMESA,#function
- glWindowPos2sMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13695,7 +13695,7 @@
- .globl glWindowPos2svMESA
- .type glWindowPos2svMESA,#function
- glWindowPos2svMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13716,7 +13716,7 @@
- .globl glWindowPos3dMESA
- .type glWindowPos3dMESA,#function
- glWindowPos3dMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13737,7 +13737,7 @@
- .globl glWindowPos3dvMESA
- .type glWindowPos3dvMESA,#function
- glWindowPos3dvMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13758,7 +13758,7 @@
- .globl glWindowPos3fMESA
- .type glWindowPos3fMESA,#function
- glWindowPos3fMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13779,7 +13779,7 @@
- .globl glWindowPos3fvMESA
- .type glWindowPos3fvMESA,#function
- glWindowPos3fvMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13800,7 +13800,7 @@
- .globl glWindowPos3iMESA
- .type glWindowPos3iMESA,#function
- glWindowPos3iMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13821,7 +13821,7 @@
- .globl glWindowPos3ivMESA
- .type glWindowPos3ivMESA,#function
- glWindowPos3ivMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13842,7 +13842,7 @@
- .globl glWindowPos3sMESA
- .type glWindowPos3sMESA,#function
- glWindowPos3sMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13863,7 +13863,7 @@
- .globl glWindowPos3svMESA
- .type glWindowPos3svMESA,#function
- glWindowPos3svMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13884,7 +13884,7 @@
- .globl glWindowPos4dMESA
- .type glWindowPos4dMESA,#function
- glWindowPos4dMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13905,7 +13905,7 @@
- .globl glWindowPos4dvMESA
- .type glWindowPos4dvMESA,#function
- glWindowPos4dvMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13926,7 +13926,7 @@
- .globl glWindowPos4fMESA
- .type glWindowPos4fMESA,#function
- glWindowPos4fMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13947,7 +13947,7 @@
- .globl glWindowPos4fvMESA
- .type glWindowPos4fvMESA,#function
- glWindowPos4fvMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13968,7 +13968,7 @@
- .globl glWindowPos4iMESA
- .type glWindowPos4iMESA,#function
- glWindowPos4iMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -13989,7 +13989,7 @@
- .globl glWindowPos4ivMESA
- .type glWindowPos4ivMESA,#function
- glWindowPos4ivMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14010,7 +14010,7 @@
- .globl glWindowPos4sMESA
- .type glWindowPos4sMESA,#function
- glWindowPos4sMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14031,7 +14031,7 @@
- .globl glWindowPos4svMESA
- .type glWindowPos4svMESA,#function
- glWindowPos4svMESA:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14052,7 +14052,7 @@
- .globl glMultiModeDrawArraysIBM
- .type glMultiModeDrawArraysIBM,#function
- glMultiModeDrawArraysIBM:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14073,7 +14073,7 @@
- .globl glMultiModeDrawElementsIBM
- .type glMultiModeDrawElementsIBM,#function
- glMultiModeDrawElementsIBM:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14094,7 +14094,7 @@
- .globl glTbufferMask3DFX
- .type glTbufferMask3DFX,#function
- glTbufferMask3DFX:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14115,7 +14115,7 @@
- .globl glSampleMaskEXT
- .type glSampleMaskEXT,#function
- glSampleMaskEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14136,7 +14136,7 @@
- .globl glSamplePatternEXT
- .type glSamplePatternEXT,#function
- glSamplePatternEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14157,7 +14157,7 @@
- .globl glWindowPos2dARB
- .type glWindowPos2dARB,#function
- glWindowPos2dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14178,7 +14178,7 @@
- .globl glWindowPos2fARB
- .type glWindowPos2fARB,#function
- glWindowPos2fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14199,7 +14199,7 @@
- .globl glWindowPos2iARB
- .type glWindowPos2iARB,#function
- glWindowPos2iARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14220,7 +14220,7 @@
- .globl glWindowPos2sARB
- .type glWindowPos2sARB,#function
- glWindowPos2sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14241,7 +14241,7 @@
- .globl glWindowPos2dvARB
- .type glWindowPos2dvARB,#function
- glWindowPos2dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14262,7 +14262,7 @@
- .globl glWindowPos2fvARB
- .type glWindowPos2fvARB,#function
- glWindowPos2fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14283,7 +14283,7 @@
- .globl glWindowPos2ivARB
- .type glWindowPos2ivARB,#function
- glWindowPos2ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14304,7 +14304,7 @@
- .globl glWindowPos2svARB
- .type glWindowPos2svARB,#function
- glWindowPos2svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14325,7 +14325,7 @@
- .globl glWindowPos3dARB
- .type glWindowPos3dARB,#function
- glWindowPos3dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14346,7 +14346,7 @@
- .globl glWindowPos3fARB
- .type glWindowPos3fARB,#function
- glWindowPos3fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14367,7 +14367,7 @@
- .globl glWindowPos3iARB
- .type glWindowPos3iARB,#function
- glWindowPos3iARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14388,7 +14388,7 @@
- .globl glWindowPos3sARB
- .type glWindowPos3sARB,#function
- glWindowPos3sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14409,7 +14409,7 @@
- .globl glWindowPos3dvARB
- .type glWindowPos3dvARB,#function
- glWindowPos3dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14430,7 +14430,7 @@
- .globl glWindowPos3fvARB
- .type glWindowPos3fvARB,#function
- glWindowPos3fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14451,7 +14451,7 @@
- .globl glWindowPos3ivARB
- .type glWindowPos3ivARB,#function
- glWindowPos3ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14472,7 +14472,7 @@
- .globl glWindowPos3svARB
- .type glWindowPos3svARB,#function
- glWindowPos3svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14493,7 +14493,7 @@
- .globl glAreProgramsResidentNV
- .type glAreProgramsResidentNV,#function
- glAreProgramsResidentNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14514,7 +14514,7 @@
- .globl glBindProgramNV
- .type glBindProgramNV,#function
- glBindProgramNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14535,7 +14535,7 @@
- .globl glDeleteProgramsNV
- .type glDeleteProgramsNV,#function
- glDeleteProgramsNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14556,7 +14556,7 @@
- .globl glExecuteProgramNV
- .type glExecuteProgramNV,#function
- glExecuteProgramNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14577,7 +14577,7 @@
- .globl glGenProgramsNV
- .type glGenProgramsNV,#function
- glGenProgramsNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14598,7 +14598,7 @@
- .globl glGetProgramParameterdvNV
- .type glGetProgramParameterdvNV,#function
- glGetProgramParameterdvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14619,7 +14619,7 @@
- .globl glGetProgramParameterfvNV
- .type glGetProgramParameterfvNV,#function
- glGetProgramParameterfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14640,7 +14640,7 @@
- .globl glGetProgramivNV
- .type glGetProgramivNV,#function
- glGetProgramivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14661,7 +14661,7 @@
- .globl glGetProgramStringNV
- .type glGetProgramStringNV,#function
- glGetProgramStringNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14682,7 +14682,7 @@
- .globl glGetTrackMatrixivNV
- .type glGetTrackMatrixivNV,#function
- glGetTrackMatrixivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14703,7 +14703,7 @@
- .globl glGetVertexAttribdvNV
- .type glGetVertexAttribdvNV,#function
- glGetVertexAttribdvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14724,7 +14724,7 @@
- .globl glGetVertexAttribfvNV
- .type glGetVertexAttribfvNV,#function
- glGetVertexAttribfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14745,7 +14745,7 @@
- .globl glGetVertexAttribivNV
- .type glGetVertexAttribivNV,#function
- glGetVertexAttribivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14766,7 +14766,7 @@
- .globl glGetVertexAttribPointervNV
- .type glGetVertexAttribPointervNV,#function
- glGetVertexAttribPointervNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14787,7 +14787,7 @@
- .globl glIsProgramNV
- .type glIsProgramNV,#function
- glIsProgramNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14808,7 +14808,7 @@
- .globl glLoadProgramNV
- .type glLoadProgramNV,#function
- glLoadProgramNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14829,7 +14829,7 @@
- .globl glProgramParameter4dNV
- .type glProgramParameter4dNV,#function
- glProgramParameter4dNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14850,7 +14850,7 @@
- .globl glProgramParameter4dvNV
- .type glProgramParameter4dvNV,#function
- glProgramParameter4dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14871,7 +14871,7 @@
- .globl glProgramParameter4fNV
- .type glProgramParameter4fNV,#function
- glProgramParameter4fNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14892,7 +14892,7 @@
- .globl glProgramParameter4fvNV
- .type glProgramParameter4fvNV,#function
- glProgramParameter4fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14913,7 +14913,7 @@
- .globl glProgramParameters4dvNV
- .type glProgramParameters4dvNV,#function
- glProgramParameters4dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14934,7 +14934,7 @@
- .globl glProgramParameters4fvNV
- .type glProgramParameters4fvNV,#function
- glProgramParameters4fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14955,7 +14955,7 @@
- .globl glRequestResidentProgramsNV
- .type glRequestResidentProgramsNV,#function
- glRequestResidentProgramsNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14976,7 +14976,7 @@
- .globl glTrackMatrixNV
- .type glTrackMatrixNV,#function
- glTrackMatrixNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -14997,7 +14997,7 @@
- .globl glVertexAttribPointerNV
- .type glVertexAttribPointerNV,#function
- glVertexAttribPointerNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15018,7 +15018,7 @@
- .globl glVertexAttrib1dNV
- .type glVertexAttrib1dNV,#function
- glVertexAttrib1dNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15039,7 +15039,7 @@
- .globl glVertexAttrib1dvNV
- .type glVertexAttrib1dvNV,#function
- glVertexAttrib1dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15060,7 +15060,7 @@
- .globl glVertexAttrib1fNV
- .type glVertexAttrib1fNV,#function
- glVertexAttrib1fNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15081,7 +15081,7 @@
- .globl glVertexAttrib1fvNV
- .type glVertexAttrib1fvNV,#function
- glVertexAttrib1fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15102,7 +15102,7 @@
- .globl glVertexAttrib1sNV
- .type glVertexAttrib1sNV,#function
- glVertexAttrib1sNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15123,7 +15123,7 @@
- .globl glVertexAttrib1svNV
- .type glVertexAttrib1svNV,#function
- glVertexAttrib1svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15144,7 +15144,7 @@
- .globl glVertexAttrib2dNV
- .type glVertexAttrib2dNV,#function
- glVertexAttrib2dNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15165,7 +15165,7 @@
- .globl glVertexAttrib2dvNV
- .type glVertexAttrib2dvNV,#function
- glVertexAttrib2dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15186,7 +15186,7 @@
- .globl glVertexAttrib2fNV
- .type glVertexAttrib2fNV,#function
- glVertexAttrib2fNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15207,7 +15207,7 @@
- .globl glVertexAttrib2fvNV
- .type glVertexAttrib2fvNV,#function
- glVertexAttrib2fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15228,7 +15228,7 @@
- .globl glVertexAttrib2sNV
- .type glVertexAttrib2sNV,#function
- glVertexAttrib2sNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15249,7 +15249,7 @@
- .globl glVertexAttrib2svNV
- .type glVertexAttrib2svNV,#function
- glVertexAttrib2svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15270,7 +15270,7 @@
- .globl glVertexAttrib3dNV
- .type glVertexAttrib3dNV,#function
- glVertexAttrib3dNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15291,7 +15291,7 @@
- .globl glVertexAttrib3dvNV
- .type glVertexAttrib3dvNV,#function
- glVertexAttrib3dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15312,7 +15312,7 @@
- .globl glVertexAttrib3fNV
- .type glVertexAttrib3fNV,#function
- glVertexAttrib3fNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15333,7 +15333,7 @@
- .globl glVertexAttrib3fvNV
- .type glVertexAttrib3fvNV,#function
- glVertexAttrib3fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15354,7 +15354,7 @@
- .globl glVertexAttrib3sNV
- .type glVertexAttrib3sNV,#function
- glVertexAttrib3sNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15375,7 +15375,7 @@
- .globl glVertexAttrib3svNV
- .type glVertexAttrib3svNV,#function
- glVertexAttrib3svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15396,7 +15396,7 @@
- .globl glVertexAttrib4dNV
- .type glVertexAttrib4dNV,#function
- glVertexAttrib4dNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15417,7 +15417,7 @@
- .globl glVertexAttrib4dvNV
- .type glVertexAttrib4dvNV,#function
- glVertexAttrib4dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15438,7 +15438,7 @@
- .globl glVertexAttrib4fNV
- .type glVertexAttrib4fNV,#function
- glVertexAttrib4fNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15459,7 +15459,7 @@
- .globl glVertexAttrib4fvNV
- .type glVertexAttrib4fvNV,#function
- glVertexAttrib4fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15480,7 +15480,7 @@
- .globl glVertexAttrib4sNV
- .type glVertexAttrib4sNV,#function
- glVertexAttrib4sNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15501,7 +15501,7 @@
- .globl glVertexAttrib4svNV
- .type glVertexAttrib4svNV,#function
- glVertexAttrib4svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15522,7 +15522,7 @@
- .globl glVertexAttrib4ubNV
- .type glVertexAttrib4ubNV,#function
- glVertexAttrib4ubNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15543,7 +15543,7 @@
- .globl glVertexAttrib4ubvNV
- .type glVertexAttrib4ubvNV,#function
- glVertexAttrib4ubvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15564,7 +15564,7 @@
- .globl glVertexAttribs1dvNV
- .type glVertexAttribs1dvNV,#function
- glVertexAttribs1dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15585,7 +15585,7 @@
- .globl glVertexAttribs1fvNV
- .type glVertexAttribs1fvNV,#function
- glVertexAttribs1fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15606,7 +15606,7 @@
- .globl glVertexAttribs1svNV
- .type glVertexAttribs1svNV,#function
- glVertexAttribs1svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15627,7 +15627,7 @@
- .globl glVertexAttribs2dvNV
- .type glVertexAttribs2dvNV,#function
- glVertexAttribs2dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15648,7 +15648,7 @@
- .globl glVertexAttribs2fvNV
- .type glVertexAttribs2fvNV,#function
- glVertexAttribs2fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15669,7 +15669,7 @@
- .globl glVertexAttribs2svNV
- .type glVertexAttribs2svNV,#function
- glVertexAttribs2svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15690,7 +15690,7 @@
- .globl glVertexAttribs3dvNV
- .type glVertexAttribs3dvNV,#function
- glVertexAttribs3dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15711,7 +15711,7 @@
- .globl glVertexAttribs3fvNV
- .type glVertexAttribs3fvNV,#function
- glVertexAttribs3fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15732,7 +15732,7 @@
- .globl glVertexAttribs3svNV
- .type glVertexAttribs3svNV,#function
- glVertexAttribs3svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15753,7 +15753,7 @@
- .globl glVertexAttribs4dvNV
- .type glVertexAttribs4dvNV,#function
- glVertexAttribs4dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15774,7 +15774,7 @@
- .globl glVertexAttribs4fvNV
- .type glVertexAttribs4fvNV,#function
- glVertexAttribs4fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15795,7 +15795,7 @@
- .globl glVertexAttribs4svNV
- .type glVertexAttribs4svNV,#function
- glVertexAttribs4svNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15816,7 +15816,7 @@
- .globl glVertexAttribs4ubvNV
- .type glVertexAttribs4ubvNV,#function
- glVertexAttribs4ubvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15837,7 +15837,7 @@
- .globl glPointParameteriNV
- .type glPointParameteriNV,#function
- glPointParameteriNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15858,7 +15858,7 @@
- .globl glPointParameterivNV
- .type glPointParameterivNV,#function
- glPointParameterivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15879,7 +15879,7 @@
- .globl glBlendFuncSeparate
- .type glBlendFuncSeparate,#function
- glBlendFuncSeparate:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15900,7 +15900,7 @@
- .globl glFogCoordf
- .type glFogCoordf,#function
- glFogCoordf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15921,7 +15921,7 @@
- .globl glFogCoordfv
- .type glFogCoordfv,#function
- glFogCoordfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15942,7 +15942,7 @@
- .globl glFogCoordd
- .type glFogCoordd,#function
- glFogCoordd:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15963,7 +15963,7 @@
- .globl glFogCoorddv
- .type glFogCoorddv,#function
- glFogCoorddv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -15984,7 +15984,7 @@
- .globl glFogCoordPointer
- .type glFogCoordPointer,#function
- glFogCoordPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16005,7 +16005,7 @@
- .globl glMultiDrawArrays
- .type glMultiDrawArrays,#function
- glMultiDrawArrays:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16026,7 +16026,7 @@
- .globl glMultiDrawElements
- .type glMultiDrawElements,#function
- glMultiDrawElements:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16047,7 +16047,7 @@
- .globl glPointParameterf
- .type glPointParameterf,#function
- glPointParameterf:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16068,7 +16068,7 @@
- .globl glPointParameterfv
- .type glPointParameterfv,#function
- glPointParameterfv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16089,7 +16089,7 @@
- .globl glPointParameteri
- .type glPointParameteri,#function
- glPointParameteri:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16110,7 +16110,7 @@
- .globl glPointParameteriv
- .type glPointParameteriv,#function
- glPointParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16131,7 +16131,7 @@
- .globl glSecondaryColor3b
- .type glSecondaryColor3b,#function
- glSecondaryColor3b:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16152,7 +16152,7 @@
- .globl glSecondaryColor3bv
- .type glSecondaryColor3bv,#function
- glSecondaryColor3bv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16173,7 +16173,7 @@
- .globl glSecondaryColor3d
- .type glSecondaryColor3d,#function
- glSecondaryColor3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16194,7 +16194,7 @@
- .globl glSecondaryColor3dv
- .type glSecondaryColor3dv,#function
- glSecondaryColor3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16215,7 +16215,7 @@
- .globl glSecondaryColor3f
- .type glSecondaryColor3f,#function
- glSecondaryColor3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16236,7 +16236,7 @@
- .globl glSecondaryColor3fv
- .type glSecondaryColor3fv,#function
- glSecondaryColor3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16257,7 +16257,7 @@
- .globl glSecondaryColor3i
- .type glSecondaryColor3i,#function
- glSecondaryColor3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16278,7 +16278,7 @@
- .globl glSecondaryColor3iv
- .type glSecondaryColor3iv,#function
- glSecondaryColor3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16299,7 +16299,7 @@
- .globl glSecondaryColor3s
- .type glSecondaryColor3s,#function
- glSecondaryColor3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16320,7 +16320,7 @@
- .globl glSecondaryColor3sv
- .type glSecondaryColor3sv,#function
- glSecondaryColor3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16341,7 +16341,7 @@
- .globl glSecondaryColor3ub
- .type glSecondaryColor3ub,#function
- glSecondaryColor3ub:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16362,7 +16362,7 @@
- .globl glSecondaryColor3ubv
- .type glSecondaryColor3ubv,#function
- glSecondaryColor3ubv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16383,7 +16383,7 @@
- .globl glSecondaryColor3ui
- .type glSecondaryColor3ui,#function
- glSecondaryColor3ui:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16404,7 +16404,7 @@
- .globl glSecondaryColor3uiv
- .type glSecondaryColor3uiv,#function
- glSecondaryColor3uiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16425,7 +16425,7 @@
- .globl glSecondaryColor3us
- .type glSecondaryColor3us,#function
- glSecondaryColor3us:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16446,7 +16446,7 @@
- .globl glSecondaryColor3usv
- .type glSecondaryColor3usv,#function
- glSecondaryColor3usv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16467,7 +16467,7 @@
- .globl glSecondaryColorPointer
- .type glSecondaryColorPointer,#function
- glSecondaryColorPointer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16488,7 +16488,7 @@
- .globl glWindowPos2d
- .type glWindowPos2d,#function
- glWindowPos2d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16509,7 +16509,7 @@
- .globl glWindowPos2dv
- .type glWindowPos2dv,#function
- glWindowPos2dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16530,7 +16530,7 @@
- .globl glWindowPos2f
- .type glWindowPos2f,#function
- glWindowPos2f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16551,7 +16551,7 @@
- .globl glWindowPos2fv
- .type glWindowPos2fv,#function
- glWindowPos2fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16572,7 +16572,7 @@
- .globl glWindowPos2i
- .type glWindowPos2i,#function
- glWindowPos2i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16593,7 +16593,7 @@
- .globl glWindowPos2iv
- .type glWindowPos2iv,#function
- glWindowPos2iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16614,7 +16614,7 @@
- .globl glWindowPos2s
- .type glWindowPos2s,#function
- glWindowPos2s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16635,7 +16635,7 @@
- .globl glWindowPos2sv
- .type glWindowPos2sv,#function
- glWindowPos2sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16656,7 +16656,7 @@
- .globl glWindowPos3d
- .type glWindowPos3d,#function
- glWindowPos3d:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16677,7 +16677,7 @@
- .globl glWindowPos3dv
- .type glWindowPos3dv,#function
- glWindowPos3dv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16698,7 +16698,7 @@
- .globl glWindowPos3f
- .type glWindowPos3f,#function
- glWindowPos3f:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16719,7 +16719,7 @@
- .globl glWindowPos3fv
- .type glWindowPos3fv,#function
- glWindowPos3fv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16740,7 +16740,7 @@
- .globl glWindowPos3i
- .type glWindowPos3i,#function
- glWindowPos3i:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16761,7 +16761,7 @@
- .globl glWindowPos3iv
- .type glWindowPos3iv,#function
- glWindowPos3iv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16782,7 +16782,7 @@
- .globl glWindowPos3s
- .type glWindowPos3s,#function
- glWindowPos3s:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16803,7 +16803,7 @@
- .globl glWindowPos3sv
- .type glWindowPos3sv,#function
- glWindowPos3sv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16824,7 +16824,7 @@
- .globl glActiveStencilFaceEXT
- .type glActiveStencilFaceEXT,#function
- glActiveStencilFaceEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16845,7 +16845,7 @@
- .globl glDeleteFencesNV
- .type glDeleteFencesNV,#function
- glDeleteFencesNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16866,7 +16866,7 @@
- .globl glGenFencesNV
- .type glGenFencesNV,#function
- glGenFencesNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16887,7 +16887,7 @@
- .globl glIsFenceNV
- .type glIsFenceNV,#function
- glIsFenceNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16908,7 +16908,7 @@
- .globl glTestFenceNV
- .type glTestFenceNV,#function
- glTestFenceNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16929,7 +16929,7 @@
- .globl glGetFenceivNV
- .type glGetFenceivNV,#function
- glGetFenceivNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16950,7 +16950,7 @@
- .globl glFinishFenceNV
- .type glFinishFenceNV,#function
- glFinishFenceNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16971,7 +16971,7 @@
- .globl glSetFenceNV
- .type glSetFenceNV,#function
- glSetFenceNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -16992,7 +16992,7 @@
- .globl glVertexAttrib1sARB
- .type glVertexAttrib1sARB,#function
- glVertexAttrib1sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17013,7 +17013,7 @@
- .globl glVertexAttrib1fARB
- .type glVertexAttrib1fARB,#function
- glVertexAttrib1fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17034,7 +17034,7 @@
- .globl glVertexAttrib1dARB
- .type glVertexAttrib1dARB,#function
- glVertexAttrib1dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17055,7 +17055,7 @@
- .globl glVertexAttrib2sARB
- .type glVertexAttrib2sARB,#function
- glVertexAttrib2sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17076,7 +17076,7 @@
- .globl glVertexAttrib2fARB
- .type glVertexAttrib2fARB,#function
- glVertexAttrib2fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17097,7 +17097,7 @@
- .globl glVertexAttrib2dARB
- .type glVertexAttrib2dARB,#function
- glVertexAttrib2dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17118,7 +17118,7 @@
- .globl glVertexAttrib3sARB
- .type glVertexAttrib3sARB,#function
- glVertexAttrib3sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17139,7 +17139,7 @@
- .globl glVertexAttrib3fARB
- .type glVertexAttrib3fARB,#function
- glVertexAttrib3fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17160,7 +17160,7 @@
- .globl glVertexAttrib3dARB
- .type glVertexAttrib3dARB,#function
- glVertexAttrib3dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17181,7 +17181,7 @@
- .globl glVertexAttrib4sARB
- .type glVertexAttrib4sARB,#function
- glVertexAttrib4sARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17202,7 +17202,7 @@
- .globl glVertexAttrib4fARB
- .type glVertexAttrib4fARB,#function
- glVertexAttrib4fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17223,7 +17223,7 @@
- .globl glVertexAttrib4dARB
- .type glVertexAttrib4dARB,#function
- glVertexAttrib4dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17244,7 +17244,7 @@
- .globl glVertexAttrib4NubARB
- .type glVertexAttrib4NubARB,#function
- glVertexAttrib4NubARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17265,7 +17265,7 @@
- .globl glVertexAttrib1svARB
- .type glVertexAttrib1svARB,#function
- glVertexAttrib1svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17286,7 +17286,7 @@
- .globl glVertexAttrib1fvARB
- .type glVertexAttrib1fvARB,#function
- glVertexAttrib1fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17307,7 +17307,7 @@
- .globl glVertexAttrib1dvARB
- .type glVertexAttrib1dvARB,#function
- glVertexAttrib1dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17328,7 +17328,7 @@
- .globl glVertexAttrib2svARB
- .type glVertexAttrib2svARB,#function
- glVertexAttrib2svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17349,7 +17349,7 @@
- .globl glVertexAttrib2fvARB
- .type glVertexAttrib2fvARB,#function
- glVertexAttrib2fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17370,7 +17370,7 @@
- .globl glVertexAttrib2dvARB
- .type glVertexAttrib2dvARB,#function
- glVertexAttrib2dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17391,7 +17391,7 @@
- .globl glVertexAttrib3svARB
- .type glVertexAttrib3svARB,#function
- glVertexAttrib3svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17412,7 +17412,7 @@
- .globl glVertexAttrib3fvARB
- .type glVertexAttrib3fvARB,#function
- glVertexAttrib3fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17433,7 +17433,7 @@
- .globl glVertexAttrib3dvARB
- .type glVertexAttrib3dvARB,#function
- glVertexAttrib3dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17454,7 +17454,7 @@
- .globl glVertexAttrib4bvARB
- .type glVertexAttrib4bvARB,#function
- glVertexAttrib4bvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17475,7 +17475,7 @@
- .globl glVertexAttrib4svARB
- .type glVertexAttrib4svARB,#function
- glVertexAttrib4svARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17496,7 +17496,7 @@
- .globl glVertexAttrib4ivARB
- .type glVertexAttrib4ivARB,#function
- glVertexAttrib4ivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17517,7 +17517,7 @@
- .globl glVertexAttrib4ubvARB
- .type glVertexAttrib4ubvARB,#function
- glVertexAttrib4ubvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17538,7 +17538,7 @@
- .globl glVertexAttrib4usvARB
- .type glVertexAttrib4usvARB,#function
- glVertexAttrib4usvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17559,7 +17559,7 @@
- .globl glVertexAttrib4uivARB
- .type glVertexAttrib4uivARB,#function
- glVertexAttrib4uivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17580,7 +17580,7 @@
- .globl glVertexAttrib4fvARB
- .type glVertexAttrib4fvARB,#function
- glVertexAttrib4fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17601,7 +17601,7 @@
- .globl glVertexAttrib4dvARB
- .type glVertexAttrib4dvARB,#function
- glVertexAttrib4dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17622,7 +17622,7 @@
- .globl glVertexAttrib4NbvARB
- .type glVertexAttrib4NbvARB,#function
- glVertexAttrib4NbvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17643,7 +17643,7 @@
- .globl glVertexAttrib4NsvARB
- .type glVertexAttrib4NsvARB,#function
- glVertexAttrib4NsvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17664,7 +17664,7 @@
- .globl glVertexAttrib4NivARB
- .type glVertexAttrib4NivARB,#function
- glVertexAttrib4NivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17685,7 +17685,7 @@
- .globl glVertexAttrib4NubvARB
- .type glVertexAttrib4NubvARB,#function
- glVertexAttrib4NubvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17706,7 +17706,7 @@
- .globl glVertexAttrib4NusvARB
- .type glVertexAttrib4NusvARB,#function
- glVertexAttrib4NusvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17727,7 +17727,7 @@
- .globl glVertexAttrib4NuivARB
- .type glVertexAttrib4NuivARB,#function
- glVertexAttrib4NuivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17748,7 +17748,7 @@
- .globl glVertexAttribPointerARB
- .type glVertexAttribPointerARB,#function
- glVertexAttribPointerARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17769,7 +17769,7 @@
- .globl glEnableVertexAttribArrayARB
- .type glEnableVertexAttribArrayARB,#function
- glEnableVertexAttribArrayARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17790,7 +17790,7 @@
- .globl glDisableVertexAttribArrayARB
- .type glDisableVertexAttribArrayARB,#function
- glDisableVertexAttribArrayARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17811,7 +17811,7 @@
- .globl glProgramStringARB
- .type glProgramStringARB,#function
- glProgramStringARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17832,7 +17832,7 @@
- .globl glBindProgramARB
- .type glBindProgramARB,#function
- glBindProgramARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17853,7 +17853,7 @@
- .globl glDeleteProgramsARB
- .type glDeleteProgramsARB,#function
- glDeleteProgramsARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17874,7 +17874,7 @@
- .globl glGenProgramsARB
- .type glGenProgramsARB,#function
- glGenProgramsARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17895,7 +17895,7 @@
- .globl glIsProgramARB
- .type glIsProgramARB,#function
- glIsProgramARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17916,7 +17916,7 @@
- .globl glProgramEnvParameter4dARB
- .type glProgramEnvParameter4dARB,#function
- glProgramEnvParameter4dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17937,7 +17937,7 @@
- .globl glProgramEnvParameter4dvARB
- .type glProgramEnvParameter4dvARB,#function
- glProgramEnvParameter4dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17958,7 +17958,7 @@
- .globl glProgramEnvParameter4fARB
- .type glProgramEnvParameter4fARB,#function
- glProgramEnvParameter4fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -17979,7 +17979,7 @@
- .globl glProgramEnvParameter4fvARB
- .type glProgramEnvParameter4fvARB,#function
- glProgramEnvParameter4fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18000,7 +18000,7 @@
- .globl glProgramLocalParameter4dARB
- .type glProgramLocalParameter4dARB,#function
- glProgramLocalParameter4dARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18021,7 +18021,7 @@
- .globl glProgramLocalParameter4dvARB
- .type glProgramLocalParameter4dvARB,#function
- glProgramLocalParameter4dvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18042,7 +18042,7 @@
- .globl glProgramLocalParameter4fARB
- .type glProgramLocalParameter4fARB,#function
- glProgramLocalParameter4fARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18063,7 +18063,7 @@
- .globl glProgramLocalParameter4fvARB
- .type glProgramLocalParameter4fvARB,#function
- glProgramLocalParameter4fvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18084,7 +18084,7 @@
- .globl glGetProgramEnvParameterdvARB
- .type glGetProgramEnvParameterdvARB,#function
- glGetProgramEnvParameterdvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18105,7 +18105,7 @@
- .globl glGetProgramEnvParameterfvARB
- .type glGetProgramEnvParameterfvARB,#function
- glGetProgramEnvParameterfvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18126,7 +18126,7 @@
- .globl glGetProgramLocalParameterdvARB
- .type glGetProgramLocalParameterdvARB,#function
- glGetProgramLocalParameterdvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18147,7 +18147,7 @@
- .globl glGetProgramLocalParameterfvARB
- .type glGetProgramLocalParameterfvARB,#function
- glGetProgramLocalParameterfvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18168,7 +18168,7 @@
- .globl glGetProgramivARB
- .type glGetProgramivARB,#function
- glGetProgramivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18189,7 +18189,7 @@
- .globl glGetProgramStringARB
- .type glGetProgramStringARB,#function
- glGetProgramStringARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18210,7 +18210,7 @@
- .globl glGetVertexAttribdvARB
- .type glGetVertexAttribdvARB,#function
- glGetVertexAttribdvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18231,7 +18231,7 @@
- .globl glGetVertexAttribfvARB
- .type glGetVertexAttribfvARB,#function
- glGetVertexAttribfvARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18252,7 +18252,7 @@
- .globl glGetVertexAttribivARB
- .type glGetVertexAttribivARB,#function
- glGetVertexAttribivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18273,7 +18273,7 @@
- .globl glGetVertexAttribPointervARB
- .type glGetVertexAttribPointervARB,#function
- glGetVertexAttribPointervARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18294,7 +18294,7 @@
- .globl glProgramNamedParameter4fNV
- .type glProgramNamedParameter4fNV,#function
- glProgramNamedParameter4fNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18315,7 +18315,7 @@
- .globl glProgramNamedParameter4dNV
- .type glProgramNamedParameter4dNV,#function
- glProgramNamedParameter4dNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18336,7 +18336,7 @@
- .globl glProgramNamedParameter4fvNV
- .type glProgramNamedParameter4fvNV,#function
- glProgramNamedParameter4fvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18357,7 +18357,7 @@
- .globl glProgramNamedParameter4dvNV
- .type glProgramNamedParameter4dvNV,#function
- glProgramNamedParameter4dvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18378,7 +18378,7 @@
- .globl glGetProgramNamedParameterfvNV
- .type glGetProgramNamedParameterfvNV,#function
- glGetProgramNamedParameterfvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18399,7 +18399,7 @@
- .globl glGetProgramNamedParameterdvNV
- .type glGetProgramNamedParameterdvNV,#function
- glGetProgramNamedParameterdvNV:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18420,7 +18420,7 @@
- .globl glBindBufferARB
- .type glBindBufferARB,#function
- glBindBufferARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18441,7 +18441,7 @@
- .globl glBufferDataARB
- .type glBufferDataARB,#function
- glBufferDataARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18462,7 +18462,7 @@
- .globl glBufferSubDataARB
- .type glBufferSubDataARB,#function
- glBufferSubDataARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18483,7 +18483,7 @@
- .globl glDeleteBuffersARB
- .type glDeleteBuffersARB,#function
- glDeleteBuffersARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18504,7 +18504,7 @@
- .globl glGenBuffersARB
- .type glGenBuffersARB,#function
- glGenBuffersARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18525,7 +18525,7 @@
- .globl glGetBufferParameterivARB
- .type glGetBufferParameterivARB,#function
- glGetBufferParameterivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18546,7 +18546,7 @@
- .globl glGetBufferPointervARB
- .type glGetBufferPointervARB,#function
- glGetBufferPointervARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18567,7 +18567,7 @@
- .globl glGetBufferSubDataARB
- .type glGetBufferSubDataARB,#function
- glGetBufferSubDataARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18588,7 +18588,7 @@
- .globl glIsBufferARB
- .type glIsBufferARB,#function
- glIsBufferARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18609,7 +18609,7 @@
- .globl glMapBufferARB
- .type glMapBufferARB,#function
- glMapBufferARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18630,7 +18630,7 @@
- .globl glUnmapBufferARB
- .type glUnmapBufferARB,#function
- glUnmapBufferARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18651,7 +18651,7 @@
- .globl glDepthBoundsEXT
- .type glDepthBoundsEXT,#function
- glDepthBoundsEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18672,7 +18672,7 @@
- .globl glGenQueriesARB
- .type glGenQueriesARB,#function
- glGenQueriesARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18693,7 +18693,7 @@
- .globl glDeleteQueriesARB
- .type glDeleteQueriesARB,#function
- glDeleteQueriesARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18714,7 +18714,7 @@
- .globl glIsQueryARB
- .type glIsQueryARB,#function
- glIsQueryARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18735,7 +18735,7 @@
- .globl glBeginQueryARB
- .type glBeginQueryARB,#function
- glBeginQueryARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18756,7 +18756,7 @@
- .globl glEndQueryARB
- .type glEndQueryARB,#function
- glEndQueryARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18777,7 +18777,7 @@
- .globl glGetQueryivARB
- .type glGetQueryivARB,#function
- glGetQueryivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18798,7 +18798,7 @@
- .globl glGetQueryObjectivARB
- .type glGetQueryObjectivARB,#function
- glGetQueryObjectivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18819,7 +18819,7 @@
- .globl glGetQueryObjectuivARB
- .type glGetQueryObjectuivARB,#function
- glGetQueryObjectuivARB:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18840,7 +18840,7 @@
- .globl glBindBuffer
- .type glBindBuffer,#function
- glBindBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18861,7 +18861,7 @@
- .globl glBufferData
- .type glBufferData,#function
- glBufferData:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18882,7 +18882,7 @@
- .globl glBufferSubData
- .type glBufferSubData,#function
- glBufferSubData:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18903,7 +18903,7 @@
- .globl glDeleteBuffers
- .type glDeleteBuffers,#function
- glDeleteBuffers:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18924,7 +18924,7 @@
- .globl glGenBuffers
- .type glGenBuffers,#function
- glGenBuffers:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18945,7 +18945,7 @@
- .globl glGetBufferParameteriv
- .type glGetBufferParameteriv,#function
- glGetBufferParameteriv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18966,7 +18966,7 @@
- .globl glGetBufferPointerv
- .type glGetBufferPointerv,#function
- glGetBufferPointerv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -18987,7 +18987,7 @@
- .globl glGetBufferSubData
- .type glGetBufferSubData,#function
- glGetBufferSubData:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19008,7 +19008,7 @@
- .globl glIsBuffer
- .type glIsBuffer,#function
- glIsBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19029,7 +19029,7 @@
- .globl glMapBuffer
- .type glMapBuffer,#function
- glMapBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19050,7 +19050,7 @@
- .globl glUnmapBuffer
- .type glUnmapBuffer,#function
- glUnmapBuffer:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19071,7 +19071,7 @@
- .globl glGenQueries
- .type glGenQueries,#function
- glGenQueries:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19092,7 +19092,7 @@
- .globl glDeleteQueries
- .type glDeleteQueries,#function
- glDeleteQueries:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19113,7 +19113,7 @@
- .globl glIsQuery
- .type glIsQuery,#function
- glIsQuery:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19134,7 +19134,7 @@
- .globl glBeginQuery
- .type glBeginQuery,#function
- glBeginQuery:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19155,7 +19155,7 @@
- .globl glEndQuery
- .type glEndQuery,#function
- glEndQuery:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19176,7 +19176,7 @@
- .globl glGetQueryiv
- .type glGetQueryiv,#function
- glGetQueryiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19197,7 +19197,7 @@
- .globl glGetQueryObjectiv
- .type glGetQueryObjectiv,#function
- glGetQueryObjectiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19218,7 +19218,7 @@
- .globl glGetQueryObjectuiv
- .type glGetQueryObjectuiv,#function
- glGetQueryObjectuiv:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19239,7 +19239,7 @@
- .globl glBlendEquationSeparateEXT
- .type glBlendEquationSeparateEXT,#function
- glBlendEquationSeparateEXT:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-@@ -19260,7 +19260,7 @@
- .globl glBlendEquationSeparateATI
- .type glBlendEquationSeparateATI,#function
- glBlendEquationSeparateATI:
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-       sethi   %hi(0x00000000), %g2
-       sethi   %hi(0x00000000), %g1
-       or      %g2, %lo(0x00000000), %g2
-Index: extras/Mesa/src/mesa/sparc/norm.S
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/sparc/norm.S,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/sparc/norm.S  16 Jun 2004 09:19:24 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/sparc/norm.S  15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -1,4 +1,4 @@
--/* $Id$ */
-+/* $Id$ */
- #include "sparc_matrix.h"
-@@ -10,7 +10,7 @@
-       .text
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
- #define STACK_VAR_OFF (2047 + (8 * 16))
- #else
- #define STACK_VAR_OFF (4 * 16)
-Index: extras/Mesa/src/mesa/sparc/sparc.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/sparc/sparc.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/sparc/sparc.c 22 Jul 2004 06:53:06 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/sparc/sparc.c 15 Dec 2004 01:51:03 -0000      1.1.1.2.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  5.1
-+ * Version:  6.3
-  * 
-  * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
-  * 
-@@ -27,12 +27,13 @@
-  */
-+#include "sparc.h"
-+
- #ifdef USE_SPARC_ASM
- #include "context.h"
- #include "math/m_xform.h"
- #include "tnl/t_context.h"
--#include "sparc.h"
- #ifdef DEBUG
- #include "math/m_debug.h"
-@@ -68,7 +69,6 @@
-       _mesa_##pfx##_transform_points##sz##_3d;
--#ifdef USE_SPARC_ASM
- DECLARE_XFORM_GROUP(sparc, 1)
- DECLARE_XFORM_GROUP(sparc, 2)
- DECLARE_XFORM_GROUP(sparc, 3)
-@@ -101,11 +101,10 @@
- extern void _mesa_sparc_normalize_normals(NORM_ARGS);
- extern void _mesa_sparc_rescale_normals(NORM_ARGS);
--#endif
-+
- void _mesa_init_all_sparc_transform_asm(void)
- {
--#ifdef USE_SPARC_ASM
-    ASSIGN_XFORM_GROUP(sparc, 1)
-    ASSIGN_XFORM_GROUP(sparc, 2)
-    ASSIGN_XFORM_GROUP(sparc, 3)
-@@ -143,8 +142,6 @@
-    _math_test_all_cliptest_functions("sparc");
-    _math_test_all_normal_transform_functions("sparc");
- #endif
--
--#endif
- }
- extern unsigned int _mesa_sparc_glapi_begin;
-@@ -165,7 +162,7 @@
-       disp_addr = (unsigned long) &_glapi_Dispatch;
-       while (insn_ptr < end_ptr) {
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
-               insn_ptr[0] |= (disp_addr >> (32 + 10));
-               insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10);
-               __glapi_sparc_icache_flush(&insn_ptr[0]);
-Index: extras/Mesa/src/mesa/sparc/sparc_matrix.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/sparc/sparc_matrix.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/sparc/sparc_matrix.h  16 Jun 2004 09:19:24 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/sparc/sparc_matrix.h  15 Dec 2004 01:51:03 -0000      1.1.1.1.4.1
-@@ -5,7 +5,7 @@
- #ifndef _SPARC_MATRIX_H
- #define _SPARC_MATRIX_H
--#if defined(__sparc_v9__) && !defined(__linux__)
-+#if (defined(__sparc_v9__) && (!defined(__linux__) || defined(__linux_sparc_64__)))
- #define LDPTR         ldx
- #define MAT_M         0x00
- #define MAT_INV               0x08
-Index: extras/Mesa/src/mesa/swrast/s_alphabuf.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_alphabuf.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_alphabuf.c   16 Jun 2004 09:19:25 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_alphabuf.c   15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -178,16 +178,12 @@
-    switch (swrast->CurrentBufferBit) {
-    case DD_FRONT_LEFT_BIT:
-       return ctx->DrawBuffer->FrontLeftAlpha;
--      break;
-    case DD_BACK_LEFT_BIT:
-       return ctx->DrawBuffer->BackLeftAlpha;
--      break;
-    case DD_FRONT_RIGHT_BIT:
-       return ctx->DrawBuffer->FrontRightAlpha;
--      break;
-    case DD_BACK_RIGHT_BIT:
-       return ctx->DrawBuffer->BackRightAlpha;
--      break;
-    default:
-       _mesa_problem(ctx, "Bad CurrentBuffer in get_alpha_buffer()");
-       return (GLchan *) ctx->DrawBuffer->FrontLeftAlpha;
-Index: extras/Mesa/src/mesa/swrast/s_auxbuffer.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_auxbuffer.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_auxbuffer.c  16 Jun 2004 09:19:30 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_auxbuffer.c  15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -93,6 +93,7 @@
- _swrast_use_aux_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit)
- {
-    SWcontext *swrast = SWRAST_CONTEXT(ctx);
-+   (void) buffer;
-    switch (bufferBit) {
-    case DD_AUX0_BIT:
-Index: extras/Mesa/src/mesa/swrast/s_buffers.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_buffers.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_buffers.c    16 Jun 2004 09:19:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_buffers.c    15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -176,6 +176,7 @@
-              GLint x, GLint y, GLint width, GLint height )
- {
-    SWcontext *swrast = SWRAST_CONTEXT(ctx);
-+   (void) all; (void) x; (void) y; (void) width; (void) height;
- #ifdef DEBUG
-    {
-       const GLbitfield legalBits =
-@@ -254,6 +255,7 @@
- void
- _swrast_DrawBuffer( GLcontext *ctx, GLenum mode )
- {
-+   (void) mode;
-    _swrast_use_draw_buffer(ctx);
- }
-Index: extras/Mesa/src/mesa/swrast/s_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_context.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/swrast/s_context.c    22 Jul 2004 06:53:08 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/swrast/s_context.c    15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -196,19 +196,22 @@
-    CLAMPED_FLOAT_TO_CHAN(swrast->_FogColor[GCOMP], ctx->Fog.Color[GCOMP]);
-    CLAMPED_FLOAT_TO_CHAN(swrast->_FogColor[BCOMP], ctx->Fog.Color[BCOMP]);
--   /* determine if fog is needed */
-+   /* determine if fog is needed, and if so, which fog mode */
-    swrast->_FogEnabled = GL_FALSE;
--   if (ctx->Fog.Enabled) {
--      swrast->_FogEnabled = GL_TRUE;
--   }
--   else if (ctx->FragmentProgram._Enabled &&
--        ctx->FragmentProgram.Current->Base.Target == GL_FRAGMENT_PROGRAM_ARB) {
--      const struct fragment_program *p;
--      p = (struct fragment_program *) ctx->FragmentProgram.Current;
--      if (p->FogOption != GL_NONE) {
--         swrast->_FogEnabled = GL_TRUE;
-+   if (ctx->FragmentProgram._Enabled) {
-+      if (ctx->FragmentProgram.Current->Base.Target==GL_FRAGMENT_PROGRAM_ARB) {
-+         const struct fragment_program *p
-+            = (struct fragment_program *) ctx->FragmentProgram.Current;
-+         if (p->FogOption != GL_NONE) {
-+            swrast->_FogEnabled = GL_TRUE;
-+            swrast->_FogMode = p->FogOption;
-+         }
-       }
-    }
-+   else if (ctx->Fog.Enabled) {
-+      swrast->_FogEnabled = GL_TRUE;
-+      swrast->_FogMode = ctx->Fog.Mode;
-+   }
- }
-@@ -403,6 +406,7 @@
- static void
- _swrast_sleep( GLcontext *ctx, GLuint new_state )
- {
-+   (void) ctx; (void) new_state;
- }
-@@ -479,7 +483,7 @@
-       if (swrast->NewState & _SWRAST_NEW_TEXTURE_ENV_MODE)
-        _swrast_update_texture_env( ctx );
--      if (swrast->NewState & _NEW_FOG)
-+      if (swrast->NewState & (_NEW_FOG | _NEW_PROGRAM))
-          _swrast_update_fog_state( ctx );
-       if (swrast->NewState & _NEW_PROGRAM)
-Index: extras/Mesa/src/mesa/swrast/s_context.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_context.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_context.h    16 Jun 2004 09:19:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_context.h    15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -29,6 +29,17 @@
-  * \author Keith Whitwell <keith@tungstengraphics.com>
-  */
-+/**
-+ * \mainpage swrast module
-+ *
-+ * This module, software rasterization, contains the software fallback
-+ * routines for drawing points, lines, triangles, bitmaps and images.
-+ * All rendering boils down to writing spans (arrays) of pixels with
-+ * particular colors.  The span-writing routines must be implemented
-+ * by the device driver.
-+ */
-+
-+
- #ifndef S_CONTEXT_H
- #define S_CONTEXT_H
-@@ -275,6 +286,7 @@
-    GLboolean _AnyTextureCombine;
-    GLchan _FogColor[3];
-    GLboolean _FogEnabled;
-+   GLenum _FogMode;  /* either GL_FOG_MODE or fragment program's fog mode */
-    /* Accum buffer temporaries.
-     */
-Index: extras/Mesa/src/mesa/swrast/s_copypix.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_copypix.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_copypix.c    16 Jun 2004 09:19:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_copypix.c    15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -175,8 +175,6 @@
-       return;
-    }
--   dest = tmpImage;
--
-    if (changeBuffer) {
-       /* choose the read buffer */
-       _swrast_use_read_buffer(ctx);
-@@ -191,6 +189,7 @@
-                              srcy + row, rgba);
-       chan_span_to_float(width, (CONST GLchan (*)[4]) rgba,
-                          (GLfloat (*)[4]) dest);
-+      dest += 4 * width;
-    }
-    if (changeBuffer) {
-Index: extras/Mesa/src/mesa/swrast/s_depth.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_depth.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_depth.c      16 Jun 2004 09:19:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_depth.c      15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -1665,13 +1665,33 @@
- void
- _swrast_clear_depth_buffer( GLcontext *ctx )
- {
-+   SWcontext *swrast = SWRAST_CONTEXT(ctx);
-+
-    if (ctx->Visual.depthBits == 0
--       || !ctx->DrawBuffer->DepthBuffer
-        || !ctx->Depth.Mask) {
-       /* no depth buffer, or writing to it is disabled */
-       return;
-    }
-+   if (swrast->Driver.WriteMonoDepthSpan) {
-+      const GLdepth clearValue = (GLdepth)(ctx->Depth.Clear * ctx->DepthMax);
-+      const GLint x = ctx->DrawBuffer->_Xmin;
-+      const GLint y = ctx->DrawBuffer->_Ymin;
-+      const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
-+      const GLint width  = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
-+      GLint i;
-+
-+      for (i = 0; i < height; i++) {
-+         (*swrast->Driver.WriteMonoDepthSpan)( ctx, width, x, y + i,
-+                                               clearValue, NULL );
-+      }
-+
-+      return;
-+   }
-+
-+   if (!ctx->DrawBuffer->DepthBuffer)
-+      return;
-+
-    /* The loops in this function have been written so the IRIX 5.3
-     * C compiler can unroll them.  Hopefully other compilers can too!
-     */
-Index: extras/Mesa/src/mesa/swrast/s_drawpix.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_drawpix.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/swrast/s_drawpix.c    12 Aug 2004 23:05:03 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/swrast/s_drawpix.c    15 Dec 2004 01:51:04 -0000      1.1.1.2.2.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -521,12 +521,12 @@
-       const GLint spanEnd = (width - skipPixels > MAX_WIDTH)
-                           ? MAX_WIDTH : (width - skipPixels);
-       ASSERT(spanEnd <= MAX_WIDTH);
--      for (row = 0; row < height; row++, span.y++) {
-+      for (row = 0; row < height; row++, spanY++) {
-          const GLvoid *source = _mesa_image_address(unpack, pixels,
-                                                     width, height,
-                                                     GL_COLOR_INDEX, type,
-                                                     0, row, skipPixels);
--         _mesa_unpack_index_span(ctx, span.end, GL_UNSIGNED_INT,
-+         _mesa_unpack_index_span(ctx, spanEnd, GL_UNSIGNED_INT,
-                                  span.array->index, type, source, unpack,
-                                  ctx->_ImageTransferState);
-@@ -659,17 +659,17 @@
-        && ctx->Visual.rgbMode
-        && width <= MAX_WIDTH) {
-       /* Special case: directly write 16-bit depth values */
--      GLint row;
--      span.x = x;
--      span.y = y;
--      span.end = width;
--      for (row = 0; row < height; row++, span.y++) {
-+      GLint row, spanY = y;
-+      for (row = 0; row < height; row++, spanY++) {
-          const GLushort *zSrc = (const GLushort *)
-             _mesa_image_address(unpack, pixels, width, height,
-                                 GL_DEPTH_COMPONENT, type, 0, row, 0);
-          GLint i;
-          for (i = 0; i < width; i++)
-             span.array->z[i] = zSrc[i];
-+         span.x = x;
-+         span.y = spanY;
-+         span.end = width;
-          _swrast_write_rgba_span(ctx, &span);
-       }
-    }
-@@ -681,11 +681,8 @@
-             && width <= MAX_WIDTH) {
-       /* Special case: shift 32-bit values down to ctx->Visual.depthBits */
-       const GLint shift = 32 - ctx->Visual.depthBits;
--      GLint row;
--      span.x = x;
--      span.y = y;
--      span.end = width;
--      for (row = 0; row < height; row++, span.y++) {
-+      GLint row, spanY = y;
-+      for (row = 0; row < height; row++, spanY++) {
-          const GLuint *zSrc = (const GLuint *)
-             _mesa_image_address(unpack, pixels, width, height,
-                                 GL_DEPTH_COMPONENT, type, 0, row, 0);
-@@ -697,6 +694,9 @@
-             for (col = 0; col < width; col++)
-                span.array->z[col] = zSrc[col] >> shift;
-          }
-+         span.x = x;
-+         span.y = spanY;
-+         span.end = width;
-          _swrast_write_rgba_span(ctx, &span);
-       }
-    }
-Index: extras/Mesa/src/mesa/swrast/s_fog.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_fog.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_fog.c        16 Jun 2004 09:19:26 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_fog.c        15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -1,9 +1,8 @@
--
- /*
-  * Mesa 3-D graphics library
-- * Version:  4.1
-+ * Version:  6.3
-  *
-- * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
-+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the "Software"),
-@@ -34,8 +33,6 @@
- #include "s_span.h"
--
--
- /**
-  * Used to convert current raster distance to a fog factor in [0,1].
-  */
-@@ -99,7 +96,7 @@
-       /* The span's fog values are fog coordinates, now compute blend factors
-        * and blend the fragment colors with the fog color.
-        */
--      switch (ctx->Fog.Mode) {
-+      switch (swrast->_FogMode) {
-       case GL_LINEAR:
-          {
-             const GLfloat fogEnd = ctx->Fog.End;
-Index: extras/Mesa/src/mesa/swrast/s_fragprog_to_c.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_fragprog_to_c.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_fragprog_to_c.c      16 Jun 2004 09:19:30 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_fragprog_to_c.c      15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -297,7 +297,7 @@
-    case UREG_TYPE_LOCAL_CONST: emit(p, "local_const"); break;
-    case UREG_TYPE_ENV_CONST: emit(p, "env_const"); break;
-    case UREG_TYPE_STATE_CONST: emit(p, "state_param"); break;
--   case UREG_TYPE_PARAM: emit(p, "param"); break;
-+   case UREG_TYPE_PARAM: emit(p, "local_param"); break;
-    };
-    
-    emit(p, "[%d]", GET_UREG_NR(arg));
-Index: extras/Mesa/src/mesa/swrast/s_lines.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_lines.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_lines.c      16 Jun 2004 09:19:27 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_lines.c      15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -258,7 +258,7 @@
-    else if (swrast->Line == multitextured_line)
-       _mesa_printf("multitextured_line\n");
-    else
--      _mesa_printf("Driver func %p\n", (void *) swrast->Line);
-+      _mesa_printf("Driver func %p\n", (void (*)()) swrast->Line);
- }
- #endif
-Index: extras/Mesa/src/mesa/swrast/s_linetemp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_linetemp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_linetemp.h   16 Jun 2004 09:19:27 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_linetemp.h   15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -425,6 +425,8 @@
-    RENDER_SPAN( span );
- #endif
-+   (void)span;
-+
- }
-Index: extras/Mesa/src/mesa/swrast/s_pointtemp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_pointtemp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_pointtemp.h  16 Jun 2004 09:19:28 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_pointtemp.h  15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -220,6 +220,21 @@
-       count = span->end;
-       (void) radius;
-       for (y = ymin; y <= ymax; y++) {
-+         /* check if we need to flush */
-+         if (count + (xmax-xmin+1) >= MAX_WIDTH) {
-+           span->end = count;
-+#if FLAGS & (TEXTURE | SPRITE)
-+            if (ctx->Texture._EnabledUnits)
-+               _swrast_write_texture_span(ctx, span);
-+            else
-+               _swrast_write_rgba_span(ctx, span);
-+#elif FLAGS & RGBA
-+            _swrast_write_rgba_span(ctx, span);
-+#else
-+            _swrast_write_index_span(ctx, span);
-+#endif
-+            count = span->end = 0;
-+         }
-          for (x = xmin; x <= xmax; x++) {
- #if FLAGS & (SPRITE | TEXTURE)
-             GLuint u;
-@@ -292,7 +307,11 @@
-                if (ctx->Texture.Unit[u]._ReallyEnabled) {
-                   if (ctx->Point.CoordReplace[u]) {
-                      GLfloat s = 0.5F + (x + 0.5F - vert->win[0]) / size;
--                     GLfloat t = 0.5F - (y + 0.5F - vert->win[1]) / size;
-+                     GLfloat t;
-+                     if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
-+                        t = 0.5F + (y + 0.5F - vert->win[1]) / size;
-+                     else /* GL_UPPER_LEFT */
-+                        t = 0.5F - (y + 0.5F - vert->win[1]) / size;
-                      span->array->texcoords[u][count][0] = s;
-                      span->array->texcoords[u][count][1] = t;
-                      span->array->texcoords[u][count][3] = 1.0F;
-Index: extras/Mesa/src/mesa/swrast/s_readpix.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_readpix.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_readpix.c    16 Jun 2004 09:19:28 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_readpix.c    15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.2.1
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -86,7 +86,7 @@
-                                  GL_COLOR_INDEX, type, 0, i, 0);
-       _mesa_pack_index_span(ctx, readWidth, type, dest, index,
--                            &ctx->Pack, ctx->_ImageTransferState);
-+                            packing, ctx->_ImageTransferState);
-    }
-    _swrast_use_draw_buffer(ctx);
-@@ -163,7 +163,7 @@
-                                     GL_DEPTH_COMPONENT, type, 0, j, 0);
-          _mesa_pack_depth_span(ctx, readWidth, (GLdepth *) dest, type,
--                               depth, &ctx->Pack);
-+                               depth, packing);
-       }
-    }
- }
-@@ -209,7 +209,7 @@
-       dest = _mesa_image_address(packing, pixels, width, height,
-                                  GL_STENCIL_INDEX, type, 0, j, 0);
--      _mesa_pack_stencil_span(ctx, readWidth, type, dest, stencil, &ctx->Pack);
-+      _mesa_pack_stencil_span(ctx, readWidth, type, dest, stencil, packing);
-    }
- }
-@@ -498,16 +498,15 @@
- _swrast_ReadPixels( GLcontext *ctx,
-                   GLint x, GLint y, GLsizei width, GLsizei height,
-                   GLenum format, GLenum type,
--                  const struct gl_pixelstore_attrib *pack,
-+                  const struct gl_pixelstore_attrib *packing,
-                   GLvoid *pixels )
- {
-    SWcontext *swrast = SWRAST_CONTEXT(ctx);
--   (void) pack;
-    if (swrast->NewState)
-       _swrast_validate_derived( ctx );
--   pixels = _swrast_validate_pbo_access(pack, width, height, 1,
-+   pixels = _swrast_validate_pbo_access(packing, width, height, 1,
-                                         format, type, (GLvoid *) pixels);
-    if (!pixels) {
-@@ -519,13 +518,13 @@
-    switch (format) {
-       case GL_COLOR_INDEX:
--         read_index_pixels(ctx, x, y, width, height, type, pixels, &ctx->Pack);
-+         read_index_pixels(ctx, x, y, width, height, type, pixels, packing);
-        break;
-       case GL_STENCIL_INDEX:
--       read_stencil_pixels(ctx, x,y, width,height, type, pixels, &ctx->Pack);
-+       read_stencil_pixels(ctx, x,y, width,height, type, pixels, packing);
-          break;
-       case GL_DEPTH_COMPONENT:
--       read_depth_pixels(ctx, x, y, width, height, type, pixels, &ctx->Pack);
-+       read_depth_pixels(ctx, x, y, width, height, type, pixels, packing);
-        break;
-       case GL_RED:
-       case GL_GREEN:
-@@ -539,7 +538,7 @@
-       case GL_BGRA:
-       case GL_ABGR_EXT:
-          read_rgba_pixels(ctx, x, y, width, height,
--                          format, type, pixels, &ctx->Pack);
-+                          format, type, pixels, packing);
-        break;
-       default:
-        _mesa_error( ctx, GL_INVALID_ENUM, "glReadPixels(format)" );
-Index: extras/Mesa/src/mesa/swrast/s_span.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_span.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/swrast/s_span.c       22 Jul 2004 06:53:10 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/swrast/s_span.c       15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -1,6 +1,6 @@
- /*
-  * Mesa 3-D graphics library
-- * Version:  6.1
-+ * Version:  6.3
-  *
-  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
-  *
-@@ -151,6 +151,7 @@
-    const GLuint n = span->end;
-    GLchan (*rgba)[4] = span->array->rgba;
-    GLuint i;
-+   (void) ctx;
-    ASSERT((span->interpMask & SPAN_RGBA)  &&
-         !(span->arrayMask & SPAN_RGBA));
-@@ -211,6 +212,7 @@
-    const GLuint n = span->end;
-    GLuint *indexes = span->array->index;
-    GLuint i;
-+   (void) ctx;
-    ASSERT((span->interpMask & SPAN_INDEX)  &&
-         !(span->arrayMask & SPAN_INDEX));
-@@ -236,6 +238,7 @@
- static void
- interpolate_specular(GLcontext *ctx, struct sw_span *span)
- {
-+   (void) ctx;
-    if (span->interpMask & SPAN_FLAT) {
-       /* constant color */
-       const GLchan r = FixedToChan(span->specRed);
-@@ -1470,15 +1473,17 @@
-    ASSERT(span->arrayMask & SPAN_RGBA);
--   /* Add base and specular colors */
--   if (ctx->Fog.ColorSumEnabled ||
--       (ctx->Light.Enabled &&
--        ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) {
--      if (span->interpMask & SPAN_SPEC) {
--         interpolate_specular(ctx, span);
-+   if (!ctx->FragmentProgram._Enabled) {
-+      /* Add base and specular colors */
-+      if (ctx->Fog.ColorSumEnabled ||
-+          (ctx->Light.Enabled &&
-+           ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) {
-+         if (span->interpMask & SPAN_SPEC) {
-+            interpolate_specular(ctx, span);
-+         }
-+         ASSERT(span->arrayMask & SPAN_SPEC);
-+         add_colors( span->end, span->array->rgba, span->array->spec );
-       }
--      ASSERT(span->arrayMask & SPAN_SPEC);
--      add_colors( span->end, span->array->rgba, span->array->spec );
-    }
-    /* Fog */
-Index: extras/Mesa/src/mesa/swrast/s_spantemp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_spantemp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_spantemp.h   16 Jun 2004 09:19:28 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_spantemp.h   15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -47,6 +47,7 @@
-  *   FETCH_CI_PIXEL(CI, P)  to fetch a pixel index from pixel P
-  */
-+#include "macros.h"
- #ifdef STORE_RGBA_PIXEL
-Index: extras/Mesa/src/mesa/swrast/s_tcc.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_tcc.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_tcc.c        16 Jun 2004 09:19:30 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_tcc.c        15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -179,6 +179,10 @@
-                        struct fp_machine *machine, const struct sw_span *span,
-                        GLuint column )
- {
-+   (void) ctx;
-+   (void) program; (void) maxInst;
-+   (void) machine; (void) span;
-+   (void) column;
-    return 0;
- }
-Index: extras/Mesa/src/mesa/swrast/s_texture.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_texture.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/s_texture.c    16 Jun 2004 09:19:29 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/s_texture.c    15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -456,6 +456,7 @@
- {
-    const GLint width = img->Width2;  /* without border, power of two */
-    GLint i;
-+   (void) ctx;
-    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width, i);
-@@ -486,6 +487,7 @@
-    GLint i0, i1;
-    GLfloat u;
-    GLuint useBorderColor;
-+   (void) ctx;
-    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width, i0, i1);
-@@ -657,6 +659,7 @@
- {
-    GLuint i;
-    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
-+   (void) texUnit;
-    (void) lambda;
-    for (i=0;i<n;i++) {
-       sample_1d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
-@@ -673,6 +676,7 @@
- {
-    GLuint i;
-    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
-+   (void) texUnit;
-    (void) lambda;
-    for (i=0;i<n;i++) {
-       sample_1d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
-@@ -774,6 +778,7 @@
-    const GLint width = img->Width2;    /* without border, power of two */
-    const GLint height = img->Height2;  /* without border, power of two */
-    GLint i, j;
-+   (void) ctx;
-    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width,  i);
-    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, texcoord[1], height, j);
-@@ -809,6 +814,7 @@
-    GLint i0, j0, i1, j1;
-    GLuint useBorderColor;
-    GLfloat u, v;
-+   (void) ctx;
-    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width,  i0, i1);
-    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapT, texcoord[1], v, height, j0, j1);
-@@ -917,7 +923,9 @@
-    const GLint height = img->Height2;
-    GLint i0, j0, i1, j1;
-    GLfloat u, v;
--
-+   (void) ctx;
-+   (void) tObj;
-+   
-    ASSERT(tObj->WrapS == GL_REPEAT);
-    ASSERT(tObj->WrapT == GL_REPEAT);
-    ASSERT(img->Border == 0);
-@@ -1117,6 +1125,7 @@
- {
-    GLuint i;
-    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
-+   (void) texUnit;
-    (void) lambda;
-    for (i=0;i<n;i++) {
-       sample_2d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
-@@ -1133,6 +1142,7 @@
- {
-    GLuint i;
-    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
-+   (void) texUnit;
-    (void) lambda;
-    for (i=0;i<n;i++) {
-       sample_2d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
-@@ -1161,6 +1171,8 @@
-    const GLint rowMask = img->Height - 1;
-    const GLint shift = img->WidthLog2;
-    GLuint k;
-+   (void) ctx;
-+   (void) texUnit;
-    (void) lambda;
-    ASSERT(tObj->WrapS==GL_REPEAT);
-    ASSERT(tObj->WrapT==GL_REPEAT);
-@@ -1201,6 +1213,8 @@
-    const GLint rowMask = img->Height - 1;
-    const GLint shift = img->WidthLog2;
-    GLuint i;
-+   (void) ctx;
-+   (void) texUnit;
-    (void) lambda;
-    ASSERT(tObj->WrapS==GL_REPEAT);
-    ASSERT(tObj->WrapT==GL_REPEAT);
-@@ -1366,6 +1380,7 @@
-    const GLint height = img->Height2;   /* without border, power of two */
-    const GLint depth = img->Depth2;     /* without border, power of two */
-    GLint i, j, k;
-+   (void) ctx;
-    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width,  i);
-    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, texcoord[1], height, j);
-@@ -1400,6 +1415,7 @@
-    GLint i0, j0, k0, i1, j1, k1;
-    GLuint useBorderColor;
-    GLfloat u, v, w;
-+   (void) ctx;
-    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width,  i0, i1);
-    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapT, texcoord[1], v, height, j0, j1);
-@@ -1651,6 +1667,7 @@
- {
-    GLuint i;
-    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
-+   (void) texUnit;
-    (void) lambda;
-    for (i=0;i<n;i++) {
-       sample_3d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
-@@ -1667,6 +1684,7 @@
- {
-    GLuint i;
-    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
-+   (void) texUnit;
-    (void) lambda;
-    for (i=0;i<n;i++) {
-       sample_3d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
-@@ -1836,6 +1854,7 @@
-                     GLchan rgba[][4])
- {
-    GLuint i;
-+   (void) texUnit;
-    (void) lambda;
-    for (i = 0; i < n; i++) {
-       const struct gl_texture_image **images;
-@@ -1854,6 +1873,7 @@
-                  const GLfloat lambda[], GLchan rgba[][4])
- {
-    GLuint i;
-+   (void) texUnit;
-    (void) lambda;
-    for (i = 0; i < n; i++) {
-       const struct gl_texture_image **images;
-@@ -1872,6 +1892,7 @@
-                                    const GLfloat lambda[], GLchan rgba[][4])
- {
-    GLuint i;
-+   (void) texUnit;
-    ASSERT(lambda != NULL);
-    for (i = 0; i < n; i++) {
-       const struct gl_texture_image **images;
-@@ -1891,6 +1912,7 @@
-                                   const GLfloat lambda[], GLchan rgba[][4])
- {
-    GLuint i;
-+   (void) texUnit;
-    ASSERT(lambda != NULL);
-    for (i = 0; i < n; i++) {
-       const struct gl_texture_image **images;
-@@ -1910,6 +1932,7 @@
-                                   const GLfloat lambda[], GLchan rgba[][4])
- {
-    GLuint i;
-+   (void) texUnit;
-    ASSERT(lambda != NULL);
-    for (i = 0; i < n; i++) {
-       const struct gl_texture_image **images;
-@@ -1942,6 +1965,7 @@
-                                  const GLfloat lambda[], GLchan rgba[][4])
- {
-    GLuint i;
-+   (void) texUnit;
-    ASSERT(lambda != NULL);
-    for (i = 0; i < n; i++) {
-       const struct gl_texture_image **images;
-@@ -2053,6 +2077,7 @@
-    const GLint height_minus_1 = img->Height - 1;
-    GLuint i;
-+   (void) ctx;
-    (void) texUnit;
-    (void) lambda;
-@@ -2108,6 +2133,7 @@
-    const GLint height_minus_1 = img->Height - 1;
-    GLuint i;
-+   (void) ctx;
-    (void) texUnit;
-    (void) lambda;
-@@ -2129,56 +2155,47 @@
-       /* NOTE: we DO NOT use [0, 1] texture coordinates! */
-       if (tObj->WrapS == GL_CLAMP) {
--         /* clamping to width-1 looks wrong, but it's really correct */
--         fcol = CLAMP(texcoords[i][0], 0.0F, width_minus_1);
-+         /* Not exactly what the spec says, but it matches NVIDIA output */
-+         fcol = CLAMP(texcoords[i][0] - 0.5F, 0.0, width_minus_1);
-          i0 = IFLOOR(fcol);
-          i1 = i0 + 1;
-       }
-       else if (tObj->WrapS == GL_CLAMP_TO_EDGE) {
-          fcol = CLAMP(texcoords[i][0], 0.5F, width - 0.5F);
-+         fcol -= 0.5F;
-          i0 = IFLOOR(fcol);
-          i1 = i0 + 1;
-          if (i1 > width_minus_1)
-             i1 = width_minus_1;
-       }
--      else { /* GL_CLAMP_TO_BORDER */
--#if 0
--         /* literal reading of GL_NV_texture_rectangle spec */
-+      else {
-+         ASSERT(tObj->WrapS == GL_CLAMP_TO_BORDER);
-          fcol = CLAMP(texcoords[i][0], -0.5F, width + 0.5F);
-+         fcol -= 0.5F;
-          i0 = IFLOOR(fcol);
-          i1 = i0 + 1;
--#else
--         /* Note: this produces results that matches NVIDIA, but it's not
--          * exactly what the GL_NV_texture_rectangle specifies!
--          */
--         fcol = texcoords[i][0];
--         i0 = IFLOOR(fcol);
--         i1 = i0 + 1;
--#endif
--
-       }
-+
-       if (tObj->WrapT == GL_CLAMP) {
--         frow = CLAMP(texcoords[i][1], 0.0F, height_minus_1);
-+         /* Not exactly what the spec says, but it matches NVIDIA output */
-+         frow = CLAMP(texcoords[i][1] - 0.5F, 0.0, width_minus_1);
-          j0 = IFLOOR(frow);
-          j1 = j0 + 1;
-       }
-       else if (tObj->WrapT == GL_CLAMP_TO_EDGE) {
-          frow = CLAMP(texcoords[i][1], 0.5F, height - 0.5F);
-+         frow -= 0.5F;
-          j0 = IFLOOR(frow);
-          j1 = j0 + 1;
-          if (j1 > height_minus_1)
-             j1 = height_minus_1;
-       }
--      else { /* GL_CLAMP_TO_BORDER */
--#if 0
-+      else {
-+         ASSERT(tObj->WrapT == GL_CLAMP_TO_BORDER);
-          frow = CLAMP(texcoords[i][1], -0.5F, height + 0.5F);
-+         frow -= 0.5F;
-          j0 = IFLOOR(frow);
-          j1 = j0 + 1;
--#else
--         frow = texcoords[i][1];
--         j0 = IFLOOR(frow);
--         j1 = j0 + 1;
--#endif
-       }
-       /* compute integer rows/columns */
-@@ -2284,6 +2301,7 @@
-    GLenum function;
-    GLchan result;
-+   (void) lambda;
-    (void) unit;
-    ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT);
-@@ -2709,7 +2727,6 @@
-             ASSERT(t->MinFilter == GL_NEAREST);
-             return &sample_nearest_1d;
-          }
--         break;
-       case GL_TEXTURE_2D:
-          if (format == GL_DEPTH_COMPONENT) {
-             return &sample_depth_texture;
-@@ -2741,7 +2758,6 @@
-                return &sample_nearest_2d;
-             }
-          }
--         break;
-       case GL_TEXTURE_3D:
-          if (needLambda) {
-             return &sample_lambda_3d;
-@@ -2753,7 +2769,6 @@
-             ASSERT(t->MinFilter == GL_NEAREST);
-             return &sample_nearest_3d;
-          }
--         break;
-       case GL_TEXTURE_CUBE_MAP:
-          if (needLambda) {
-             return &sample_lambda_cube;
-@@ -2765,7 +2780,6 @@
-             ASSERT(t->MinFilter == GL_NEAREST);
-             return &sample_nearest_cube;
-          }
--         break;
-       case GL_TEXTURE_RECTANGLE_NV:
-          if (needLambda) {
-             return &sample_lambda_rect;
-@@ -2777,7 +2791,6 @@
-             ASSERT(t->MinFilter == GL_NEAREST);
-             return &sample_nearest_rect;
-          }
--         break;
-       default:
-          _mesa_problem(ctx,
-                        "invalid target in _swrast_choose_texture_sample_func");
-@@ -3494,6 +3507,7 @@
-    GLuint i;
-    GLint Rc, Gc, Bc, Ac;
-    GLenum format;
-+   (void) primary_rgba;
-    ASSERT(texUnit);
-    ASSERT(texUnit->_Current);
-Index: extras/Mesa/src/mesa/swrast/s_triangle.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/s_triangle.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/swrast/s_triangle.c   22 Jul 2004 06:53:11 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/swrast/s_triangle.c   15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -927,7 +927,7 @@
-       const GLuint *zRow = (const GLuint *)                           \
-          _swrast_zbuffer_address(ctx, span.x, span.y);                        \
-       for (i = 0; i < span.end; i++) {                                        \
--         if (span.z < zRow[i]) {                                      \
-+         if ((GLuint)span.z < zRow[i]) {                              \
-             ctx->OcclusionResult = GL_TRUE;                           \
-             ctx->Occlusion.PassedCounter++;                           \
-          }                                                            \
-Index: extras/Mesa/src/mesa/swrast/swrast.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/swrast/swrast.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/swrast/swrast.h       16 Jun 2004 09:19:30 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/swrast/swrast.h       15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -403,6 +403,13 @@
-     * depth[i] value if mask[i] is nonzero.
-     */
-+   void (*WriteMonoDepthSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y,
-+                               const GLdepth depth, const GLubyte mask[] );
-+   /* Write a horizontal run of depth values.
-+    * If mask is NULL, draw all pixels.
-+    * If mask is not null, only draw pixel [i] when mask [i] is true.
-+    */
-+
-    void (*ReadDepthSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y,
-                           GLdepth depth[] );
-    /* Read a horizontal span of values from the depth buffer.
-Index: extras/Mesa/src/mesa/tnl/descrip.mms
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/descrip.mms,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.2.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.2.1
---- extras/Mesa/src/mesa/tnl/descrip.mms       28 Aug 2004 04:28:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/tnl/descrip.mms       15 Dec 2004 01:51:04 -0000      1.1.1.2.2.1
-@@ -2,12 +2,12 @@
- # contributed by Jouk Jansen  joukj@hrem.stm.tudelft.nl
- # Last revision : 18 August 2004
--first
-+.first
-       define gl [---.include.gl]
-       define math [-.math]
-       define array_cache [-.array_cache]
--include [---]mms-config.
-+.include [---]mms-config.
- ##### MACROS #####
-Index: extras/Mesa/src/mesa/tnl/t_array_api.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_array_api.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_array_api.c     16 Jun 2004 09:19:31 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_array_api.c     15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -438,4 +438,5 @@
-  */
- void _tnl_array_destroy( GLcontext *ctx )
- {
-+   (void) ctx;
- }
-Index: extras/Mesa/src/mesa/tnl/t_array_import.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_array_import.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_array_import.c  16 Jun 2004 09:19:31 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_array_import.c  15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -201,6 +201,7 @@
-    struct gl_client_array *tmp;
-    GLboolean is_writeable = 0;
-    const GLubyte *data;
-+   (void) writeable; (void) stride;
-    tmp = _ac_import_edgeflag(ctx, GL_UNSIGNED_BYTE,
-                            sizeof(GLubyte),
-Index: extras/Mesa/src/mesa/tnl/t_context.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_context.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_context.c       16 Jun 2004 09:19:31 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_context.c       15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -51,6 +51,7 @@
-                 GLframebuffer *drawBuffer,
-                 GLframebuffer *readBuffer )
- {
-+   (void) ctx; (void) drawBuffer; (void) readBuffer;
- }
-Index: extras/Mesa/src/mesa/tnl/t_save_api.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_save_api.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_save_api.c      16 Jun 2004 09:19:31 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_save_api.c      15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -179,6 +179,7 @@
- static struct tnl_vertex_store *alloc_vertex_store( GLcontext *ctx )
- {
-    struct tnl_vertex_store *store = MALLOC_STRUCT(tnl_vertex_store);
-+   (void) ctx;
-    store->used = 0;
-    store->refcount = 1;
-    return store;
-@@ -187,6 +188,7 @@
- static struct tnl_primitive_store *alloc_prim_store( GLcontext *ctx )
- {
-    struct tnl_primitive_store *store = MALLOC_STRUCT(tnl_primitive_store);
-+   (void) ctx;
-    store->used = 0;
-    store->refcount = 1;
-    return store;
-@@ -1241,6 +1243,7 @@
-                              const GLvoid *indices)
- {
-    GET_CURRENT_CONTEXT(ctx);
-+   (void) mode; (void) count; (void) type; (void) indices;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawElements" );
- }
-@@ -1251,24 +1254,28 @@
-                                   const GLvoid *indices)
- {
-    GET_CURRENT_CONTEXT(ctx);
-+   (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawRangeElements" );
- }
- static void GLAPIENTRY _save_DrawArrays(GLenum mode, GLint start, GLsizei count)
- {
-    GET_CURRENT_CONTEXT(ctx);
-+   (void) mode; (void) start; (void) count;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawArrays" );
- }
- static void GLAPIENTRY _save_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
- {
-    GET_CURRENT_CONTEXT(ctx);
-+   (void) x1; (void) y1; (void) x2; (void) y2;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glRectf" );
- }
- static void GLAPIENTRY _save_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
- {
-    GET_CURRENT_CONTEXT(ctx);
-+   (void) mode; (void) i1; (void) i2;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh1" );
- }
-@@ -1276,12 +1283,14 @@
-                                 GLint j1, GLint j2 )
- {
-    GET_CURRENT_CONTEXT(ctx);
-+   (void) mode; (void) i1; (void) i2; (void) j1; (void) j2;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh2" );
- }
- static void GLAPIENTRY _save_Begin( GLenum mode )
- {
-    GET_CURRENT_CONTEXT( ctx );
-+   (void) mode;
-    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "Recursive glBegin" );
- }
-@@ -1467,6 +1476,8 @@
- {
-    TNLcontext *tnl = TNL_CONTEXT(ctx);
-+   (void) list; (void) mode;
-+
-    if (!tnl->save.prim_store)
-       tnl->save.prim_store = alloc_prim_store( ctx );
-@@ -1481,21 +1492,25 @@
- void _tnl_EndList( GLcontext *ctx )
- {
-+   (void) ctx;
-    assert(TNL_CONTEXT(ctx)->save.vertex_size == 0);
- }
-  
- void _tnl_BeginCallList( GLcontext *ctx, GLuint list )
- {
-+   (void) ctx; (void) list;
- }
- void _tnl_EndCallList( GLcontext *ctx )
- {
-+   (void) ctx;
- }
- static void _tnl_destroy_vertex_list( GLcontext *ctx, void *data )
- {
-    struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
-+   (void) ctx;
-    if ( --node->vertex_store->refcount == 0 )
-       FREE( node->vertex_store );
-@@ -1512,6 +1527,7 @@
- {
-    struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
-    GLuint i;
-+   (void) ctx;
-    _mesa_debug(0, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n",
-                node->count,
-@@ -1597,4 +1613,5 @@
-  */
- void _tnl_save_destroy( GLcontext *ctx )
- {
-+   (void) ctx;
- }
-Index: extras/Mesa/src/mesa/tnl/t_save_loopback.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_save_loopback.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_save_loopback.c 16 Jun 2004 09:19:32 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_save_loopback.c 15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -164,11 +164,13 @@
- static void index_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
- {
-+   (void) target;
-    ctx->Exec->Indexf(v[0]);
- }
- static void edgeflag_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
- {
-+   (void) target;
-    ctx->Exec->EdgeFlag((GLboolean)(v[0] == 1.0));
- }
-@@ -194,7 +196,7 @@
-    GLuint k;
-    if (prim->mode & PRIM_BEGIN) {
--      glBegin( prim->mode & PRIM_MODE_MASK );
-+      GL_CALL(Begin)( prim->mode & PRIM_MODE_MASK );
-    }
-    else {
-       assert(i == 0);
-@@ -219,7 +221,7 @@
-    }
-    if (prim->mode & PRIM_END) {
--      glEnd();
-+      GL_CALL(End)();
-    }
-    else {
-       assert (i == list->prim_count-1);
-Index: extras/Mesa/src/mesa/tnl/t_vb_lighttmp.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vb_lighttmp.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_vb_lighttmp.h   16 Jun 2004 09:19:32 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_vb_lighttmp.h   15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -253,8 +253,9 @@
-    const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
-    GLfloat (*Fcolor)[4] = (GLfloat (*)[4]) store->LitColor[0].data;
-+#if IDX & LIGHT_TWOSIDE
-    GLfloat (*Bcolor)[4] = (GLfloat (*)[4]) store->LitColor[1].data;
--   GLfloat (*color[2])[4];
-+#endif
-    const GLuint nr = VB->Count;
-@@ -265,9 +266,6 @@
-    (void) nstride;
-    (void) vstride;
--   color[0] = Fcolor;
--   color[1] = Bcolor;
--
-    VB->ColorPtr[0] = &store->LitColor[0];
-    sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
-Index: extras/Mesa/src/mesa/tnl/t_vb_render.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vb_render.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/tnl/t_vb_render.c     22 Jul 2004 06:53:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/tnl/t_vb_render.c     15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -353,6 +353,7 @@
- static void dtr( struct tnl_pipeline_stage *stage )
- {
-+   (void) stage;
- }
-Index: extras/Mesa/src/mesa/tnl/t_vertex.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vertex.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/tnl/t_vertex.c        22 Jul 2004 06:53:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/tnl/t_vertex.c        15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -160,6 +160,7 @@
- static void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -170,6 +171,7 @@
- static void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -180,6 +182,7 @@
- static void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -190,6 +193,7 @@
- static void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = 0;
-@@ -200,6 +204,7 @@
- static void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -208,12 +213,14 @@
- static void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-+   (void) a; (void) v; (void) in;
-    abort();
- }
- static void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -223,6 +230,7 @@
- static void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -232,6 +240,7 @@
- static void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = 0;
-@@ -242,6 +251,7 @@
- static void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -250,6 +260,7 @@
- static void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = 0;
-@@ -258,7 +269,8 @@
- static void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
- {
-    GLfloat *out = (GLfloat *)(v);
--   
-+   (void) a;
-+
-    out[0] = in[0];
- }
-@@ -266,6 +278,7 @@
-                                 const GLfloat *in )
- {
-    GLchan *c = (GLchan *)v;
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
-    UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]); 
-    UNCLAMPED_FLOAT_TO_CHAN(c[2], in[2]); 
-@@ -276,6 +289,7 @@
-                                 const GLfloat *in )
- {
-    GLchan *c = (GLchan *)v;
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
-    UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]); 
-    UNCLAMPED_FLOAT_TO_CHAN(c[2], in[2]); 
-@@ -286,6 +300,7 @@
-                                 const GLfloat *in )
- {
-    GLchan *c = (GLchan *)v;
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
-    UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]); 
-    c[2] = 0;
-@@ -296,6 +311,7 @@
-                                 const GLfloat *in )
- {
-    GLchan *c = (GLchan *)v;
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
-    c[1] = 0;
-    c[2] = 0;
-@@ -305,6 +321,7 @@
- static void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
-@@ -314,6 +331,7 @@
- static void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
-@@ -323,6 +341,7 @@
- static void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    v[2] = 0;
-@@ -332,6 +351,7 @@
- static void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    v[1] = 0;
-    v[2] = 0;
-@@ -341,6 +361,7 @@
- static void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
-@@ -350,6 +371,7 @@
- static void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
-@@ -359,6 +381,7 @@
- static void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    v[0] = 0;
-@@ -368,15 +391,97 @@
- static void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                               const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    v[1] = 0;
-    v[0] = 0;
-    v[3] = 0xff;
- }
-+static void insert_4ub_4f_argb_4( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[0]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[1]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[2]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
-+}
-+
-+static void insert_4ub_4f_argb_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[0]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[1]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[2]);
-+   v[0] = 0xff;
-+}
-+
-+static void insert_4ub_4f_argb_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[0]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[1]);
-+   v[3] = 0x00;
-+   v[0] = 0xff;
-+}
-+
-+static void insert_4ub_4f_argb_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[0]);
-+   v[2] = 0x00;
-+   v[3] = 0x00;
-+   v[0] = 0xff;
-+}
-+
-+static void insert_4ub_4f_abgr_4( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[0]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[1]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[2]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
-+}
-+
-+static void insert_4ub_4f_abgr_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[0]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[1]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[2]);
-+   v[0] = 0xff;
-+}
-+
-+static void insert_4ub_4f_abgr_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[0]);
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[1]);
-+   v[1] = 0x00;
-+   v[0] = 0xff;
-+}
-+
-+static void insert_4ub_4f_abgr_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-+                              const GLfloat *in )
-+{
-+   (void) a;
-+   UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[0]);
-+   v[2] = 0x00;
-+   v[1] = 0x00;
-+   v[0] = 0xff;
-+}
-+
- static void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                              const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
-@@ -385,6 +490,7 @@
- static void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                              const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    v[2] = 0;
-@@ -393,6 +499,7 @@
- static void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                              const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
-    v[1] = 0;
-    v[2] = 0;
-@@ -401,6 +508,7 @@
- static void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                                const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
-@@ -409,6 +517,7 @@
- static void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                                const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
-    v[0] = 0;
-@@ -417,6 +526,7 @@
- static void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                                const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
-    v[1] = 0;
-    v[0] = 0;
-@@ -426,6 +536,7 @@
- static void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
-                          const GLfloat *in )
- {
-+   (void) a;
-    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
- }
-@@ -481,6 +592,7 @@
- static void extract_4f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v  )
- {
-    const GLfloat *in = (const GLfloat *)v;
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -491,6 +603,7 @@
- static void extract_3f_xyw( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
- {
-    const GLfloat *in = (const GLfloat *)v;
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -502,6 +615,7 @@
- static void extract_3f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
- {
-    const GLfloat *in = (const GLfloat *)v;
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -513,6 +627,7 @@
- static void extract_2f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
- {
-    const GLfloat *in = (const GLfloat *)v;
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = in[1];
-@@ -523,6 +638,7 @@
- static void extract_1f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
- {
-    const GLfloat *in = (const GLfloat *)v;
-+   (void) a;
-    
-    out[0] = in[0];
-    out[1] = 0;
-@@ -534,6 +650,7 @@
-                                const GLubyte *v )
- {
-    GLchan *c = (GLchan *)v;
-+   (void) a;
-    out[0] = CHAN_TO_FLOAT(c[0]);
-    out[1] = CHAN_TO_FLOAT(c[1]);
-@@ -544,6 +661,7 @@
- static void extract_4ub_4f_rgba( const struct tnl_clipspace_attr *a, GLfloat *out, 
-                                const GLubyte *v )
- {
-+   (void) a;
-    out[0] = UBYTE_TO_FLOAT(v[0]);
-    out[1] = UBYTE_TO_FLOAT(v[1]);
-    out[2] = UBYTE_TO_FLOAT(v[2]);
-@@ -553,15 +671,37 @@
- static void extract_4ub_4f_bgra( const struct tnl_clipspace_attr *a, GLfloat *out, 
-                                const GLubyte *v )
- {
-+   (void) a;
-    out[2] = UBYTE_TO_FLOAT(v[0]);
-    out[1] = UBYTE_TO_FLOAT(v[1]);
-    out[0] = UBYTE_TO_FLOAT(v[2]);
-    out[3] = UBYTE_TO_FLOAT(v[3]);
- }
-+static void extract_4ub_4f_argb( const struct tnl_clipspace_attr *a, GLfloat *out, 
-+                               const GLubyte *v )
-+{
-+   (void) a;
-+   out[3] = UBYTE_TO_FLOAT(v[0]);
-+   out[0] = UBYTE_TO_FLOAT(v[1]);
-+   out[1] = UBYTE_TO_FLOAT(v[2]);
-+   out[2] = UBYTE_TO_FLOAT(v[3]);
-+}
-+
-+static void extract_4ub_4f_abgr( const struct tnl_clipspace_attr *a, GLfloat *out, 
-+                               const GLubyte *v )
-+{
-+   (void) a;
-+   out[3] = UBYTE_TO_FLOAT(v[0]);
-+   out[2] = UBYTE_TO_FLOAT(v[1]);
-+   out[1] = UBYTE_TO_FLOAT(v[2]);
-+   out[0] = UBYTE_TO_FLOAT(v[3]);
-+}
-+
- static void extract_3ub_3f_rgb( const struct tnl_clipspace_attr *a, GLfloat *out, 
-                               const GLubyte *v )
- {
-+   (void) a;
-    out[0] = UBYTE_TO_FLOAT(v[0]);
-    out[1] = UBYTE_TO_FLOAT(v[1]);
-    out[2] = UBYTE_TO_FLOAT(v[2]);
-@@ -571,6 +711,7 @@
- static void extract_3ub_3f_bgr( const struct tnl_clipspace_attr *a, GLfloat *out, 
-                               const GLubyte *v )
- {
-+   (void) a;
-    out[2] = UBYTE_TO_FLOAT(v[0]);
-    out[1] = UBYTE_TO_FLOAT(v[1]);
-    out[0] = UBYTE_TO_FLOAT(v[2]);
-@@ -579,6 +720,7 @@
- static void extract_1ub_1f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
- {
-+   (void) a;
-    out[0] = UBYTE_TO_FLOAT(v[0]);
-    out[1] = 0;
-    out[2] = 0;
-@@ -666,6 +808,18 @@
-        insert_4ub_4f_bgra_4 },
-      4 * sizeof(GLubyte) },
-+   { "4ub_4f_argb",
-+     extract_4ub_4f_argb,
-+     { insert_4ub_4f_argb_1, insert_4ub_4f_argb_2, insert_4ub_4f_argb_3,
-+       insert_4ub_4f_argb_4 },
-+     4 * sizeof(GLubyte) },
-+
-+   { "4ub_4f_abgr",
-+     extract_4ub_4f_abgr,
-+     { insert_4ub_4f_abgr_1, insert_4ub_4f_abgr_2, insert_4ub_4f_abgr_3,
-+       insert_4ub_4f_abgr_4 },
-+     4 * sizeof(GLubyte) },
-+
-    { "4chan_4f_rgba",
-      extract_4chan_4f_rgba,
-      { insert_4chan_4f_rgba_1, insert_4chan_4f_rgba_2, insert_4chan_4f_rgba_3,
-@@ -731,6 +885,7 @@
-    const struct tnl_clipspace_attr *a = vtx->attr;
-    const GLuint attr_count = vtx->attr_count;
-    GLuint j;
-+   (void) force_boundary;
-    if (tnl->NeedNdcCoords) {
-       const GLfloat *dstclip = VB->ClipPtr->data[edst];
-Index: extras/Mesa/src/mesa/tnl/t_vertex.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vertex.h,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/tnl/t_vertex.h        22 Jul 2004 06:53:15 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/tnl/t_vertex.h        15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -53,6 +53,8 @@
-    EMIT_3UB_3F_BGR,           /* for specular color */
-    EMIT_4UB_4F_RGBA,          /* for color */
-    EMIT_4UB_4F_BGRA,          /* for color */
-+   EMIT_4UB_4F_ARGB,          /* for color */
-+   EMIT_4UB_4F_ABGR,          /* for color */
-    EMIT_4CHAN_4F_RGBA,                /* for swrast color */
-    EMIT_PAD,                  /* leave a hole of 'offset' bytes */
-    EMIT_MAX
-Index: extras/Mesa/src/mesa/tnl/t_vertex_c.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vertex_c.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- extras/Mesa/src/mesa/tnl/t_vertex_c.c      28 Aug 2004 05:35:25 -0000      1.3
-+++ extras/Mesa/src/mesa/tnl/t_vertex_c.c      15 Dec 2004 01:51:04 -0000      1.3.2.1
-@@ -228,25 +228,12 @@
- static GLboolean print_attr_footer( struct tnl_clipspace_codegen *p )
- {
--   return 
--      emit(p, "      }\n");
-+   return emit(p, "      }\n");
- }
- static tnl_emit_func print_store_func( struct tnl_clipspace_codegen *p ) 
- {
--#if defined( WIN32 ) || defined( __VMS )
--   fprintf(stderr, "%s: emitted:\n%s\n", "print_store_func", p->buf);
--#else
--/* C99 provides __func__, older gcc versions called it __FUNCTION__ */
--#if __STDC_VERSION__ < 199901L
--# if __GNUC__ >= 2
--#  define __func__ __FUNCTION__
--# else
--#  define __func__ "print_store_func"
--# endif
--#endif
--   fprintf(stderr, "%s: emitted:\n%s\n", __func__, p->buf);
--#endif   
-+   fprintf(stderr, "print_store_func: emitted:\n%s\n", p->buf);
-    return 0;
- }
-Index: extras/Mesa/src/mesa/tnl/t_vertex_codegen.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vertex_codegen.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_vertex_codegen.c        22 Jul 2004 06:53:16 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_vertex_codegen.c        15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -161,6 +161,7 @@
- static GLboolean emit_3f_xyw_err( struct tnl_clipspace_codegen *p )
- {
-+   (void) p;
-    assert(0);
-    return GL_FALSE;
- }
-Index: extras/Mesa/src/mesa/tnl/t_vtx_api.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vtx_api.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.4.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.4.1
---- extras/Mesa/src/mesa/tnl/t_vtx_api.c       22 Jul 2004 06:53:16 -0000      1.1.1.2
-+++ extras/Mesa/src/mesa/tnl/t_vtx_api.c       15 Dec 2004 01:51:04 -0000      1.1.1.2.4.1
-@@ -345,6 +345,7 @@
-       ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
- }
-+#ifdef USE_X86_ASM
- static struct _tnl_dynfn *lookup( struct _tnl_dynfn *l, GLuint key )
- {
-@@ -382,11 +383,13 @@
-    }
-    if (dfn) 
--      return (tnl_attrfv_func) dfn->code;
-+      return *(tnl_attrfv_func *) &dfn->code;
-    else
-       return 0;
- }
-+#endif /* USE_X86_ASM */
-+
- /* Helper function for 'CHOOSE' macro.  Do what's necessary when an
-  * entrypoint is called for the first time.
-  */
-@@ -824,6 +827,7 @@
- void _tnl_FlushVertices( GLcontext *ctx, GLuint flags )
- {
-    TNLcontext *tnl = TNL_CONTEXT(ctx);
-+   (void) flags;
-    if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END)
-       return;
-@@ -860,6 +864,7 @@
- static struct _tnl_dynfn *no_codegen( GLcontext *ctx, int key )
- {
-+   (void) ctx; (void) key;
-    return 0;
- }
-Index: extras/Mesa/src/mesa/tnl/t_vtx_eval.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vtx_eval.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_vtx_eval.c      16 Jun 2004 09:19:33 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_vtx_eval.c      15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -165,9 +165,9 @@
-                               map->Order);
-       if (tnl->vtx.eval.map1[0].sz == 4) 
--       glVertex4fv( vertex );
-+       GL_CALL(Vertex4fv)( vertex );
-       else
--       glVertex3fv( vertex ); 
-+       GL_CALL(Vertex3fv)( vertex ); 
-    }
- }
-@@ -244,9 +244,9 @@
-       }
-       if (tnl->vtx.attrsz[0] == 4) 
--       glVertex4fv( vertex );
-+       GL_CALL(Vertex4fv)( vertex );
-       else
--       glVertex3fv( vertex ); 
-+       GL_CALL(Vertex3fv)( vertex ); 
-    }
- }
-Index: extras/Mesa/src/mesa/tnl/t_vtx_x86_gcc.S
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl/t_vtx_x86_gcc.S,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl/t_vtx_x86_gcc.S   16 Jun 2004 09:19:33 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl/t_vtx_x86_gcc.S   13 Dec 2004 13:43:08 -0000      1.1.1.1.4.1
-@@ -31,15 +31,15 @@
-  *   Daniel Borca <dborca@yahoo.com>
-  */
--#if defined (__DJGPP__) || defined (__MINGW32__)
-+#if defined (__DJGPP__) || defined (__MINGW32__) || defined (__CYGWIN__)
- #define GLOBL( x )    \
- .globl _##x;          \
- _##x:
--#else  /* !defined (__DJGPP__) && !defined (__MINGW32__) */
-+#else  /* !defined (__DJGPP__) && !defined (__MINGW32__) && !defined (__CYGWIN__) */
- #define GLOBL( x )    \
- .globl x;             \
- x:
--#endif /* !defined (__DJGPP__) && !defined (__MINGW32__) */
-+#endif /* !defined (__DJGPP__) && !defined (__MINGW32__) && !defined (__CYGWIN__) */
- #if !defined (STDCALL_API)
-Index: extras/Mesa/src/mesa/tnl_dd/t_dd_triemit.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/tnl_dd/t_dd_triemit.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/tnl_dd/t_dd_triemit.h 16 Jun 2004 09:19:34 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/tnl_dd/t_dd_triemit.h 15 Dec 2004 01:51:04 -0000      1.1.1.1.4.1
-@@ -16,6 +16,13 @@
-                               "D" ((long)vb),                         \
-                               "S" ((long)v) );                        \
- } while (0)
-+#elif defined(HAVE_LE32_VERTS)
-+#define COPY_DWORDS( j, vb, vertsize, v )                             \
-+do {                                                                  \
-+   for ( j = 0 ; j < vertsize ; j++ )                                 \
-+      vb[j] = CPU_TO_LE32(((GLuint *)v)[j]);                          \
-+   vb += vertsize;                                                    \
-+} while (0)
- #else
- #define COPY_DWORDS( j, vb, vertsize, v )                             \
- do {                                                                  \
-Index: extras/Mesa/src/mesa/x86/Makefile
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/x86/Makefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.4.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.4.1
---- extras/Mesa/src/mesa/x86/Makefile  16 Jun 2004 09:19:37 -0000      1.1.1.1
-+++ extras/Mesa/src/mesa/x86/Makefile  15 Dec 2004 01:51:06 -0000      1.1.1.1.4.1
-@@ -11,6 +11,7 @@
-       -I$(TOP)/include \
-       -I.. \
-       -I../main \
-+      -I../math \
-       -I../glapi \
-       -I../tnl
-Index: extras/Mesa/src/mesa/x86/glapi_x86.S
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/x86/glapi_x86.S,v
-retrieving revision 1.1.1.3
-retrieving revision 1.1.1.3.2.1
-diff -u -u -r1.1.1.3 -r1.1.1.3.2.1
---- extras/Mesa/src/mesa/x86/glapi_x86.S       28 Aug 2004 04:28:19 -0000      1.1.1.3
-+++ extras/Mesa/src/mesa/x86/glapi_x86.S       15 Dec 2004 01:51:06 -0000      1.1.1.3.2.1
-@@ -32,11 +32,17 @@
- #ifndef __WIN32__
- #if defined(STDCALL_API)
--#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))
--#elif defined(USE_MGL_NAMESPACE)
--#define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))
-+# if defined(USE_MGL_NAMESPACE)
-+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))
-+# else
-+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))
-+# endif
- #else
--#define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))
-+# if defined(USE_MGL_NAMESPACE)
-+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))
-+# else
-+#  define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))
-+# endif
- #endif
- #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
-Index: extras/Xpm/lib/Attrib.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/Attrib.c,v
-retrieving revision 1.1.1.1.6.1
-retrieving revision 1.1.1.1.6.2
-diff -u -u -r1.1.1.1.6.1 -r1.1.1.1.6.2
---- extras/Xpm/lib/Attrib.c    15 Sep 2004 15:47:39 -0000      1.1.1.1.6.1
-+++ extras/Xpm/lib/Attrib.c    17 Dec 2004 01:09:36 -0000      1.1.1.1.6.2
-@@ -32,13 +32,15 @@
- *  Developed by Arnaud Le Hors                                                *
- \*****************************************************************************/
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- /* 3.2 backward compatibility code */
- LFUNC(CreateOldColorTable, int, (XpmColor *ct, unsigned int ncolors,
-                                XpmColor ***oldct));
--LFUNC(FreeOldColorTable, void, (XpmColor **colorTable, int ncolors));
-+LFUNC(FreeOldColorTable, void, (XpmColor **colorTable, unsigned int ncolors));
- /*
-  * Create a colortable compatible with the old style colortable
-@@ -50,9 +52,9 @@
-     XpmColor ***oldct;
- {
-     XpmColor **colorTable, **color;
--    int a;
-+    unsigned int a;
--    if (ncolors >= SIZE_MAX / sizeof(XpmColor *)) 
-+    if (ncolors >= UINT_MAX / sizeof(XpmColor *)) 
-       return XpmNoMemory;
-     colorTable = (XpmColor **) XpmMalloc(ncolors * sizeof(XpmColor *));
-@@ -69,9 +71,9 @@
- static void
- FreeOldColorTable(colorTable, ncolors)
-     XpmColor **colorTable;
--    int ncolors;
-+    unsigned int ncolors;
- {
--    int a, b;
-+    unsigned int a, b;
-     XpmColor **color;
-     char **sptr;
-@@ -122,7 +124,7 @@
-     XpmExtension *ext;
-     char **sptr;
--    if (extensions) {
-+    if (extensions  && nextensions > 0) {
-       for (i = 0, ext = extensions; i < nextensions; i++, ext++) {
-           if (ext->name)
-               XpmFree(ext->name);
-Index: extras/Xpm/lib/CrBufFrI.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/CrBufFrI.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- extras/Xpm/lib/CrBufFrI.c  23 Apr 2004 18:42:32 -0000      1.2
-+++ extras/Xpm/lib/CrBufFrI.c  17 Dec 2004 01:09:36 -0000      1.2.4.1
-@@ -31,6 +31,9 @@
- *                                                                             *
- *  Developed by Arnaud Le Hors                                                *
- \*****************************************************************************/
-+
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- /* $XFree86$ */
- #include "XpmI.h"
-@@ -39,15 +42,17 @@
-                        unsigned int *used_size, XpmColor *colors,
-                        unsigned int ncolors, unsigned int cpp));
--LFUNC(WritePixels, void, (char *dataptr, unsigned int *used_size,
-+LFUNC(WritePixels, void, (char *dataptr, unsigned int data_size,
-+                        unsigned int *used_size,
-                         unsigned int width, unsigned int height,
-                         unsigned int cpp, unsigned int *pixels,
-                         XpmColor *colors));
--LFUNC(WriteExtensions, void, (char *dataptr, unsigned int *used_size,
-+LFUNC(WriteExtensions, void, (char *dataptr, unsigned int data_size,
-+                            unsigned int *used_size,
-                             XpmExtension *ext, unsigned int num));
--LFUNC(ExtensionsSize, int, (XpmExtension *ext, unsigned int num));
-+LFUNC(ExtensionsSize, unsigned int, (XpmExtension *ext, unsigned int num));
- LFUNC(CommentsSize, int, (XpmInfo *info));
- int
-@@ -90,10 +95,11 @@
- #undef RETURN
- #define RETURN(status) \
-+do \
- { \
-       ErrorStatus = status; \
-       goto error; \
--}
-+}while(0)
- int
- XpmCreateBufferFromXpmImage(buffer_return, image, info)
-@@ -107,7 +113,7 @@
-     unsigned int cmts, extensions, ext_size = 0;
-     unsigned int l, cmt_size = 0;
-     char *ptr = NULL, *p;
--    unsigned int ptr_size, used_size;
-+    unsigned int ptr_size, used_size, tmp;
-     *buffer_return = NULL;
-@@ -129,7 +135,13 @@
- #ifdef VOID_SPRINTF
-     used_size = strlen(buf);
- #endif
--    ptr_size = used_size + ext_size + cmt_size + 1;
-+    ptr_size = used_size + ext_size + cmt_size + 1; /* ptr_size can't be 0 */
-+    if(ptr_size <= used_size ||
-+       ptr_size <= ext_size  ||
-+       ptr_size <= cmt_size)
-+    {
-+        return XpmNoMemory;
-+    }
-     ptr = (char *) XpmMalloc(ptr_size);
-     if (!ptr)
-       return XpmNoMemory;
-@@ -140,7 +152,7 @@
- #ifndef VOID_SPRINTF
-       used_size +=
- #endif
--      sprintf(ptr + used_size, "/*%s*/\n", info->hints_cmt);
-+      snprintf(ptr + used_size, ptr_size-used_size, "/*%s*/\n", info->hints_cmt);
- #ifdef VOID_SPRINTF
-       used_size += strlen(info->hints_cmt) + 5;
- #endif
-@@ -158,7 +170,7 @@
- #ifndef VOID_SPRINTF
-       l +=
- #endif
--      sprintf(buf + l, " %d %d", info->x_hotspot, info->y_hotspot);
-+      snprintf(buf + l, sizeof(buf)-l, " %d %d", info->x_hotspot, info->y_hotspot);
- #ifdef VOID_SPRINTF
-       l = strlen(buf);
- #endif
-@@ -180,6 +192,8 @@
-     l = strlen(buf);
- #endif
-     ptr_size += l;
-+    if(ptr_size <= l)
-+        RETURN(XpmNoMemory);
-     p = (char *) XpmRealloc(ptr, ptr_size);
-     if (!p)
-       RETURN(XpmNoMemory);
-@@ -192,7 +206,7 @@
- #ifndef VOID_SPRINTF
-       used_size +=
- #endif
--      sprintf(ptr + used_size, "/*%s*/\n", info->colors_cmt);
-+      snprintf(ptr + used_size, ptr_size-used_size, "/*%s*/\n", info->colors_cmt);
- #ifdef VOID_SPRINTF
-       used_size += strlen(info->colors_cmt) + 5;
- #endif
-@@ -208,7 +222,12 @@
-      * 4 = 1 (for '"') + 3 (for '",\n')
-      * 1 = - 2 (because the last line does not end with ',\n') + 3 (for '};\n')
-      */
--    ptr_size += image->height * (image->width * image->cpp + 4) + 1;
-+     if(image->width  > UINT_MAX / image->cpp ||
-+       (tmp = image->width * image->cpp + 4) <= 4 ||
-+        image->height > UINT_MAX / tmp ||
-+       (tmp = image->height * tmp + 1) <= 1 ||
-+       (ptr_size += tmp) <= tmp)
-+      RETURN(XpmNoMemory);
-     p = (char *) XpmRealloc(ptr, ptr_size);
-     if (!p)
-@@ -220,17 +239,17 @@
- #ifndef VOID_SPRINTF
-       used_size +=
- #endif
--      sprintf(ptr + used_size, "/*%s*/\n", info->pixels_cmt);
-+      snprintf(ptr + used_size, ptr_size-used_size, "/*%s*/\n", info->pixels_cmt);
- #ifdef VOID_SPRINTF
-       used_size += strlen(info->pixels_cmt) + 5;
- #endif
-     }
--    WritePixels(ptr + used_size, &used_size, image->width, image->height,
-+    WritePixels(ptr + used_size, ptr_size - used_size, &used_size, image->width, image->height,
-               image->cpp, image->data, image->colorTable);
-     /* print extensions */
-     if (extensions)
--      WriteExtensions(ptr + used_size, &used_size,
-+      WriteExtensions(ptr + used_size, ptr_size-used_size, &used_size,
-                       info->extensions, info->nextensions);
-     /* close the array */
-@@ -247,6 +266,7 @@
-     return (ErrorStatus);
- }
-+
- static int
- WriteColors(dataptr, data_size, used_size, colors, ncolors, cpp)
-     char **dataptr;
-@@ -256,7 +276,7 @@
-     unsigned int ncolors;
-     unsigned int cpp;
- {
--    char buf[BUFSIZ];
-+    char buf[BUFSIZ] = {0};
-     unsigned int a, key, l;
-     char *s, *s2;
-     char **defaults;
-@@ -266,6 +286,8 @@
-       defaults = (char **) colors;
-       s = buf + 1;
-+      if(cpp > (sizeof(buf) - (s-buf)))
-+              return(XpmNoMemory);
-       strncpy(s, *defaults++, cpp);
-       s += cpp;
-@@ -274,14 +296,24 @@
- #ifndef VOID_SPRINTF
-               s +=
- #endif
--              sprintf(s, "\t%s %s", xpmColorKeys[key - 1], s2);
-+              /* assume C99 compliance */
-+              snprintf(s, sizeof(buf) - (s-buf), "\t%s %s", xpmColorKeys[key - 1], s2);
- #ifdef VOID_SPRINTF
-               s += strlen(s);
- #endif
-+              /* now let's check if s points out-of-bounds */
-+              if((s-buf) > sizeof(buf))
-+                      return(XpmNoMemory);
-           }
-       }
-+      if(sizeof(buf) - (s-buf) < 4)
-+              return(XpmNoMemory);
-       strcpy(s, "\",\n");
-       l = s + 3 - buf;
-+      if( *data_size                   >= UINT_MAX-l ||
-+          *data_size + l               <= *used_size ||
-+         (*data_size + l - *used_size) <= sizeof(buf))
-+              return(XpmNoMemory);
-       s = (char *) XpmRealloc(*dataptr, *data_size + l);
-       if (!s)
-           return (XpmNoMemory);
-@@ -294,8 +326,9 @@
- }
- static void
--WritePixels(dataptr, used_size, width, height, cpp, pixels, colors)
-+WritePixels(dataptr, data_size, used_size, width, height, cpp, pixels, colors)
-     char *dataptr;
-+    unsigned int data_size;
-     unsigned int *used_size;
-     unsigned int width;
-     unsigned int height;
-@@ -306,27 +339,36 @@
-     char *s = dataptr;
-     unsigned int x, y, h;
-+    if(height <= 1)
-+      return;
-+
-     h = height - 1;
-     for (y = 0; y < h; y++) {
-       *s++ = '"';
-       for (x = 0; x < width; x++, pixels++) {
--          strncpy(s, colors[*pixels].string, cpp);
-+          if(cpp >= (data_size - (s-dataptr)))
-+              return;
-+          strncpy(s, colors[*pixels].string, cpp); /* how can we trust *pixels? :-\ */
-           s += cpp;
-       }
-+      if((data_size - (s-dataptr)) < 4)
-+              return;
-       strcpy(s, "\",\n");
-       s += 3;
-     }
-     /* duplicate some code to avoid a test in the loop */
-     *s++ = '"';
-     for (x = 0; x < width; x++, pixels++) {
--      strncpy(s, colors[*pixels].string, cpp);
-+      if(cpp >= (data_size - (s-dataptr)))
-+          return;
-+      strncpy(s, colors[*pixels].string, cpp); /* how can we trust *pixels? */
-       s += cpp;
-     }
-     *s++ = '"';
-     *used_size += s - dataptr;
- }
--static int
-+static unsigned int
- ExtensionsSize(ext, num)
-     XpmExtension *ext;
-     unsigned int num;
-@@ -335,21 +377,26 @@
-     char **line;
-     size = 0;
-+    if(num == 0)
-+      return(0); /* ok? */
-     for (x = 0; x < num; x++, ext++) {
-       /* 11 = 10 (for ',\n"XPMEXT ') + 1 (for '"') */
-       size += strlen(ext->name) + 11;
--      a = ext->nlines;
-+      a = ext->nlines; /* how can we trust ext->nlines to be not out-of-bounds? */
-       for (y = 0, line = ext->lines; y < a; y++, line++)
-           /* 4 = 3 (for ',\n"') + 1 (for '"') */
-           size += strlen(*line) + 4;
-     }
-     /* 13 is for ',\n"XPMENDEXT"' */
-+    if(size > UINT_MAX - 13) /* unlikely */
-+      return(0);
-     return size + 13;
- }
- static void
--WriteExtensions(dataptr, used_size, ext, num)
-+WriteExtensions(dataptr, data_size, used_size, ext, num)
-     char *dataptr;
-+    unsigned int data_size;
-     unsigned int *used_size;
-     XpmExtension *ext;
-     unsigned int num;
-@@ -362,7 +409,7 @@
- #ifndef VOID_SPRINTF
-       s +=
- #endif
--      sprintf(s, ",\n\"XPMEXT %s\"", ext->name);
-+      snprintf(s, data_size - (s-dataptr), ",\n\"XPMEXT %s\"", ext->name);
- #ifdef VOID_SPRINTF
-       s += strlen(ext->name) + 11;
- #endif
-@@ -371,13 +418,13 @@
- #ifndef VOID_SPRINTF
-           s +=
- #endif
--          sprintf(s, ",\n\"%s\"", *line);
-+          snprintf(s, data_size - (s-dataptr), ",\n\"%s\"", *line);
- #ifdef VOID_SPRINTF
-           s += strlen(*line) + 4;
- #endif
-       }
-     }
--    strcpy(s, ",\n\"XPMENDEXT\"");
-+    strncpy(s, ",\n\"XPMENDEXT\"", data_size - (s-dataptr)-1);
-     *used_size += s - dataptr + 13;
- }
-@@ -388,6 +435,7 @@
-     int size = 0;
-     /* 5 = 2 (for "/_*") + 3 (for "*_/\n") */
-+    /* wrap possible but *very* unlikely */
-     if (info->hints_cmt)
-       size += 5 + strlen(info->hints_cmt);
-Index: extras/Xpm/lib/CrDatFrI.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/CrDatFrI.c,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/CrDatFrI.c  15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/CrDatFrI.c  17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -33,13 +33,16 @@
- \*****************************************************************************/
- /* $XFree86$ */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- LFUNC(CreateColors, int, (char **dataptr, unsigned int *data_size,
-                         XpmColor *colors, unsigned int ncolors,
-                         unsigned int cpp));
--LFUNC(CreatePixels, void, (char **dataptr, unsigned int width,
-+LFUNC(CreatePixels, void, (char **dataptr, unsigned int data_size,
-+                         unsigned int width,
-                          unsigned int height, unsigned int cpp,
-                          unsigned int *pixels, XpmColor *colors));
-@@ -47,7 +50,8 @@
-                             unsigned int *ext_size,
-                             unsigned int *ext_nlines));
--LFUNC(CreateExtensions, void, (char **dataptr, unsigned int offset,
-+LFUNC(CreateExtensions, void, (char **dataptr, unsigned int data_size,
-+                             unsigned int offset,
-                              XpmExtension *ext, unsigned int num,
-                              unsigned int ext_nlines));
-@@ -88,10 +92,11 @@
- #undef RETURN
- #define RETURN(status) \
-+do \
- { \
-       ErrorStatus = status; \
-       goto exit; \
--}
-+} while(0)
- int
- XpmCreateDataFromXpmImage(data_return, image, info)
-@@ -122,11 +127,17 @@
-      * alloc a temporary array of char pointer for the header section which
-      * is the hints line + the color table lines
-      */
--    header_nlines = 1 + image->ncolors;
-+    header_nlines = 1 + image->ncolors; /* this may wrap and/or become 0 */
-+
-+    /* 2nd check superfluous if we do not need header_nlines any further */
-+    if(header_nlines <= image->ncolors ||
-+       header_nlines >= UINT_MAX / sizeof(char *))
-+      return(XpmNoMemory);
-+
-     header_size = sizeof(char *) * header_nlines;
--    if (header_size >= SIZE_MAX / sizeof(char *))
-+    if (header_size >= UINT_MAX / sizeof(char *))
-       return (XpmNoMemory);
--    header = (char **) XpmCalloc(header_size, sizeof(char *));
-+    header = (char **) XpmCalloc(header_size, sizeof(char *)); /* can we trust image->ncolors */
-     if (!header)
-       return (XpmNoMemory);
-@@ -170,8 +181,22 @@
-     /* now we know the size needed, alloc the data and copy the header lines */
-     offset = image->width * image->cpp + 1;
--    data_size = header_size + (image->height + ext_nlines) * sizeof(char *)
--      + image->height * offset + ext_size;
-+
-+    if(offset <= image->width || offset <= image->cpp)
-+      RETURN(XpmNoMemory);
-+
-+    if( (image->height + ext_nlines) >= UINT_MAX / sizeof(char *))
-+      RETURN(XpmNoMemory);
-+    data_size = (image->height + ext_nlines) * sizeof(char *);
-+
-+    if (image->height > UINT_MAX / offset ||
-+        image->height * offset > UINT_MAX - data_size)
-+      RETURN(XpmNoMemory);
-+    data_size += image->height * offset;
-+
-+    if( (header_size + ext_size) >= (UINT_MAX - data_size) )
-+      RETURN(XpmNoMemory);
-+    data_size += header_size + ext_size;
-     data = (char **) XpmMalloc(data_size);
-     if (!data)
-@@ -179,8 +204,10 @@
-     data_nlines = header_nlines + image->height + ext_nlines;
-     *data = (char *) (data + data_nlines);
-+
-+    /* can header have less elements then n suggests? */
-     n = image->ncolors;
--    for (l = 0, sptr = data, sptr2 = header; l <= n; l++, sptr++, sptr2++) {
-+    for (l = 0, sptr = data, sptr2 = header; l <= n && sptr && sptr2; l++, sptr++, sptr2++) {
-       strcpy(*sptr, *sptr2);
-       *(sptr + 1) = *sptr + strlen(*sptr2) + 1;
-     }
-@@ -189,12 +216,13 @@
-     data[header_nlines] = (char *) data + header_size
-       + (image->height + ext_nlines) * sizeof(char *);
--    CreatePixels(data + header_nlines, image->width, image->height,
-+    CreatePixels(data + header_nlines, data_size-header_nlines, image->width, image->height,
-                image->cpp, image->data, image->colorTable);
-     /* print extensions */
-     if (extensions)
--      CreateExtensions(data + header_nlines + image->height - 1, offset,
-+      CreateExtensions(data + header_nlines + image->height - 1,
-+                       data_size - header_nlines - image->height + 1, offset,
-                        info->extensions, info->nextensions,
-                        ext_nlines);
-@@ -225,23 +253,34 @@
-     char *s, *s2;
-     char **defaults;
-+    /* can ncolors be trusted here? */
-     for (a = 0; a < ncolors; a++, colors++, dataptr++) {
-       defaults = (char **) colors;
-+      if(sizeof(buf) <= cpp)
-+          return(XpmNoMemory);
-       strncpy(buf, *defaults++, cpp);
-       s = buf + cpp;
-+      if(sizeof(buf) <= (s-buf))
-+              return XpmNoMemory;
-+
-       for (key = 1; key <= NKEYS; key++, defaults++) {
-           if ((s2 = *defaults)) {
- #ifndef VOID_SPRINTF
-               s +=
- #endif
--              sprintf(s, "\t%s %s", xpmColorKeys[key - 1], s2);
-+              /* assume C99 compliance */
-+                      snprintf(s, sizeof(buf)-(s-buf), "\t%s %s", xpmColorKeys[key - 1], s2);
- #ifdef VOID_SPRINTF
-               s += strlen(s);
- #endif
-+              /* does s point out-of-bounds? */
-+              if(sizeof(buf) < (s-buf))
-+                      return XpmNoMemory;
-           }
-       }
-+      /* what about using strdup()? */
-       l = s - buf + 1;
-       s = (char *) XpmMalloc(l);
-       if (!s)
-@@ -253,8 +292,9 @@
- }
- static void
--CreatePixels(dataptr, width, height, cpp, pixels, colors)
-+CreatePixels(dataptr, data_size, width, height, cpp, pixels, colors)
-     char **dataptr;
-+    unsigned int data_size;
-     unsigned int width;
-     unsigned int height;
-     unsigned int cpp;
-@@ -264,21 +304,38 @@
-     char *s;
-     unsigned int x, y, h, offset;
-+    if(height <= 1)
-+      return;
-+
-     h = height - 1;
-+
-     offset = width * cpp + 1;
-+
-+    if(offset <= width || offset <= cpp)
-+      return;
-+
-+    /* why trust h? */
-     for (y = 0; y < h; y++, dataptr++) {
-       s = *dataptr;
-+      /* why trust width? */
-       for (x = 0; x < width; x++, pixels++) {
--          strncpy(s, colors[*pixels].string, cpp);
-+          if(cpp > (data_size - (s - *dataptr)))
-+              return;
-+          strncpy(s, colors[*pixels].string, cpp); /* why trust pixel? */
-           s += cpp;
-       }
-       *s = '\0';
-+      if(offset > data_size)
-+              return;
-       *(dataptr + 1) = *dataptr + offset;
-     }
-     /* duplicate some code to avoid a test in the loop */
-     s = *dataptr;
-+    /* why trust width? */
-     for (x = 0; x < width; x++, pixels++) {
--      strncpy(s, colors[*pixels].string, cpp);
-+      if(cpp > data_size - (s - *dataptr))
-+              return;
-+      strncpy(s, colors[*pixels].string, cpp); /* why should we trust *pixel? */
-       s += cpp;
-     }
-     *s = '\0';
-@@ -311,8 +368,9 @@
- }
- static void
--CreateExtensions(dataptr, offset, ext, num, ext_nlines)
-+CreateExtensions(dataptr, data_size, offset, ext, num, ext_nlines)
-     char **dataptr;
-+    unsigned int data_size;
-     unsigned int offset;
-     XpmExtension *ext;
-     unsigned int num;
-@@ -325,12 +383,12 @@
-     dataptr++;
-     a = 0;
-     for (x = 0; x < num; x++, ext++) {
--      sprintf(*dataptr, "XPMEXT %s", ext->name);
-+      snprintf(*dataptr, data_size, "XPMEXT %s", ext->name);
-       a++;
-       if (a < ext_nlines)
-           *(dataptr + 1) = *dataptr + strlen(ext->name) + 8;
-       dataptr++;
--      b = ext->nlines;
-+      b = ext->nlines; /* can we trust these values? */
-       for (y = 0, line = ext->lines; y < b; y++, line++) {
-           strcpy(*dataptr, *line);
-           a++;
-Index: extras/Xpm/lib/RdFToBuf.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/RdFToBuf.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- extras/Xpm/lib/RdFToBuf.c  14 Nov 2003 16:48:24 -0000      1.1.1.1
-+++ extras/Xpm/lib/RdFToBuf.c  17 Dec 2004 01:09:36 -0000      1.1.1.1.6.1
-@@ -37,6 +37,8 @@
-  * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94
-  */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- #include <sys/stat.h>
- #if !defined(FOR_MSW) && !defined(WIN32)
-@@ -58,7 +60,8 @@
-     char *filename;
-     char **buffer_return;
- {
--    int fd, fcheck, len;
-+    int fd, fcheck;
-+    off_t len;
-     char *ptr;
-     struct stat stats;
-     FILE *fp;
-@@ -82,7 +85,7 @@
-       close(fd);
-       return XpmOpenFailed;
-     }
--    len = (int) stats.st_size;
-+    len = stats.st_size;
-     ptr = (char *) XpmMalloc(len + 1);
-     if (!ptr) {
-       fclose(fp);
-Index: extras/Xpm/lib/RdFToI.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/RdFToI.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- extras/Xpm/lib/RdFToI.c    23 Apr 2004 18:42:32 -0000      1.2
-+++ extras/Xpm/lib/RdFToI.c    17 Dec 2004 01:09:36 -0000      1.2.4.1
-@@ -33,16 +33,14 @@
- \*****************************************************************************/
- /* $XFree86$ */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
--#include <sys/stat.h>
--#if !defined(NO_ZPIPE) && defined(WIN32)
--# define popen _popen
--# define pclose _pclose
--# if defined(STAT_ZFILE)
--#  include <io.h>
--#  define stat _stat
--#  define fstat _fstat
--# endif
-+#ifndef NO_ZPIPE
-+#include <fcntl.h>
-+#include <errno.h>
-+#include <sys/types.h>
-+#include <sys/wait.h>
- #endif
- LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata));
-@@ -120,6 +118,67 @@
- }
- #endif /* CXPMPROG */
-+#ifndef NO_ZPIPE
-+/* Do not depend on errno after read_through */
-+FILE*
-+xpmPipeThrough(fd, cmd, arg1, mode)
-+    int fd;
-+    const char* cmd;
-+    const char* arg1;
-+    const char* mode;
-+{
-+    FILE* fp;
-+    int status, fds[2], in = 0, out = 1;
-+    pid_t pid;
-+    if ( 'w' == *mode )
-+      out = 0, in = 1;
-+    if ( pipe(fds) < 0 )
-+      return NULL;
-+    pid = fork();
-+    if ( pid < 0 )
-+      goto fail1;
-+    if ( 0 == pid )
-+    {
-+      close(fds[in]);
-+      if ( dup2(fds[out], out) < 0 )
-+          goto err;
-+      close(fds[out]);
-+      if ( dup2(fd, in) < 0 )
-+          goto err;
-+      close(fd);
-+      pid = fork();
-+      if ( pid < 0 )
-+          goto err;
-+      if ( 0 == pid )
-+      {
-+          execlp(cmd, cmd, arg1, NULL);
-+          perror(cmd);
-+          goto err;
-+      }
-+      _exit(0);
-+    err:
-+      _exit(1);
-+    }
-+    close(fds[out]);
-+    /* calling process: wait for first child */
-+    while ( waitpid(pid, &status, 0) < 0 && EINTR == errno )
-+      ;
-+    if ( WIFSIGNALED(status) ||
-+       (WIFEXITED(status) && WEXITSTATUS(status) != 0) )
-+      goto fail2;
-+    fp = fdopen(fds[in], mode);
-+    if ( !fp )
-+      goto fail2;
-+    close(fd); /* still open in 2nd child */
-+    return fp;
-+fail1:
-+    close(fds[out]);
-+fail2:
-+    close(fds[in]);
-+    return NULL;
-+}
-+#endif
-+
- /*
-  * open the given file to be read as an xpmData which is returned.
-  */
-@@ -128,72 +187,62 @@
-     char *filename;
-     xpmData *mdata;
- {
--#ifndef NO_ZPIPE
--    char buf[BUFSIZ];
--# ifdef STAT_ZFILE
--    char *compressfile;
--    struct stat status;
--# endif
--#endif
--
-     if (!filename) {
-       mdata->stream.file = (stdin);
-       mdata->type = XPMFILE;
-     } else {
--#ifndef NO_ZPIPE
--      int len = strlen(filename);
--      if ((len > 2) && !strcmp(".Z", filename + (len - 2))) {
--          mdata->type = XPMPIPE;
--          sprintf(buf, "uncompress -c \"%s\"", filename);
--          if (!(mdata->stream.file = popen(buf, "r")))
--              return (XpmOpenFailed);
--
--      } else if ((len > 3) && !strcmp(".gz", filename + (len - 3))) {
--          mdata->type = XPMPIPE;
--          sprintf(buf, "gunzip -qc \"%s\"", filename);
--          if (!(mdata->stream.file = popen(buf, "r")))
--              return (XpmOpenFailed);
--
--      } else {
--# ifdef STAT_ZFILE
--          if (!(compressfile = (char *) XpmMalloc(len + 4)))
-+      int fd = open(filename, O_RDONLY);
-+#if defined(NO_ZPIPE)
-+      if ( fd < 0 )
-+          return XpmOpenFailed;
-+#else
-+      const char* ext = NULL;
-+      if ( fd >= 0 )
-+          ext = strrchr(filename, '.');
-+#ifdef STAT_ZFILE /* searching for z-files if the given name not found */
-+      else
-+      {
-+          size_t len = strlen(filename);
-+          char *compressfile = (char *) XpmMalloc(len + 4);
-+          if ( !compressfile )
-               return (XpmNoMemory);
--
--          sprintf(compressfile, "%s.Z", filename);
--          if (!stat(compressfile, &status)) {
--              sprintf(buf, "uncompress -c \"%s\"", compressfile);
--              if (!(mdata->stream.file = popen(buf, "r"))) {
-+          strcpy(compressfile, filename);
-+          strcpy(compressfile + len, ext = ".Z");
-+          fd = open(compressfile, O_RDONLY);
-+          if ( fd < 0 )
-+          {
-+              strcpy(compressfile + len, ext = ".gz");
-+              fd = open(compressfile, O_RDONLY);
-+              if ( fd < 0 )
-+              {
-                   XpmFree(compressfile);
--                  return (XpmOpenFailed);
--              }
--              mdata->type = XPMPIPE;
--          } else {
--              sprintf(compressfile, "%s.gz", filename);
--              if (!stat(compressfile, &status)) {
--                  sprintf(buf, "gunzip -c \"%s\"", compressfile);
--                  if (!(mdata->stream.file = popen(buf, "r"))) {
--                      XpmFree(compressfile);
--                      return (XpmOpenFailed);
--                  }
--                  mdata->type = XPMPIPE;
--              } else {
--# endif
--#endif
--                  if (!(mdata->stream.file = fopen(filename, "r"))) {
--#if !defined(NO_ZPIPE) && defined(STAT_ZFILE)
--                      XpmFree(compressfile);
--#endif
--                      return (XpmOpenFailed);
--                  }
--                  mdata->type = XPMFILE;
--#ifndef NO_ZPIPE
--# ifdef STAT_ZFILE
-+                  return XpmOpenFailed;
-               }
-           }
-           XpmFree(compressfile);
--# endif
-       }
- #endif
-+      if ( ext && !strcmp(ext, ".Z") )
-+      {
-+          mdata->type = XPMPIPE;
-+          mdata->stream.file = xpmPipeThrough(fd, "uncompress", "-c", "r");
-+      }
-+      else if ( ext && !strcmp(ext, ".gz") )
-+      {
-+          mdata->type = XPMPIPE;
-+          mdata->stream.file = xpmPipeThrough(fd, "gunzip", "-qc", "r");
-+      }
-+      else
-+#endif /* z-files */
-+      {
-+          mdata->type = XPMFILE;
-+          mdata->stream.file = fdopen(fd, "r");
-+      }
-+      if (!mdata->stream.file)
-+      {
-+          close(fd);
-+          return (XpmOpenFailed);
-+      }
-     }
-     mdata->CommentLength = 0;
- #ifdef CXPMPROG
-@@ -210,15 +259,6 @@
- xpmDataClose(mdata)
-     xpmData *mdata;
- {
--    switch (mdata->type) {
--    case XPMFILE:
--      if (mdata->stream.file != (stdin))
--          fclose(mdata->stream.file);
--      break;
--#ifndef NO_ZPIPE
--    case XPMPIPE:
--      pclose(mdata->stream.file);
--      break;
--#endif
--    }
-+    if (mdata->stream.file != (stdin))
-+      fclose(mdata->stream.file);
- }
-Index: extras/Xpm/lib/WrFFrBuf.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/WrFFrBuf.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- extras/Xpm/lib/WrFFrBuf.c  14 Nov 2003 16:48:24 -0000      1.1.1.1
-+++ extras/Xpm/lib/WrFFrBuf.c  17 Dec 2004 01:09:36 -0000      1.1.1.1.6.1
-@@ -32,6 +32,8 @@
- *  Developed by Arnaud Le Hors                                                *
- \*****************************************************************************/
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- int
-@@ -49,7 +51,7 @@
-     fcheck = fwrite(buffer, len, 1, fp);
-     fclose(fp);
-     if (fcheck != 1)
--      return XpmOpenFailed;
-+      return XpmOpenFailed; /* maybe use a better return value */
-     return XpmSuccess;
- }
-Index: extras/Xpm/lib/WrFFrI.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/WrFFrI.c,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/WrFFrI.c    15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/WrFFrI.c    17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -39,9 +39,13 @@
-  */
- #include "XpmI.h"
--#if !defined(NO_ZPIPE) && defined(WIN32)
--# define popen _popen
--# define pclose _pclose
-+
-+#ifndef NO_ZPIPE
-+#include "sys/wait.h"
-+#include "sys/types.h"
-+#include "fcntl.h"
-+#include "unistd.h"
-+#include "errno.h"
- #endif
- /* MS Windows define a function called WriteFile @#%#&!!! */
-@@ -98,7 +102,7 @@
-     XpmInfo *info;
- {
-     xpmData mdata;
--    char *name, *dot, *s, new_name[BUFSIZ];
-+    char *name, *dot, *s, new_name[BUFSIZ] = {0};
-     int ErrorStatus;
-     /* open file to write */
-@@ -121,7 +125,8 @@
- #endif
-       /* let's try to make a valid C syntax name */
-       if (index(name, '.')) {
--          strcpy(new_name, name);
-+          strncpy(new_name, name, sizeof(new_name));
-+          new_name[sizeof(new_name)-1] = '\0';
-           /* change '.' to '_' */
-           name = s = new_name;
-           while ((dot = index(s, '.'))) {
-@@ -248,7 +253,7 @@
-     unsigned int x, y, h;
-     h = height - 1;
--    if (cpp != 0 && width >= (SIZE_MAX - 3)/cpp) 
-+    if (cpp != 0 && width >= (UINT_MAX - 3)/cpp) 
-       return XpmNoMemory;    
-     p = buf = (char *) XpmMalloc(width * cpp + 3);
-     if (!buf)
-@@ -297,6 +302,14 @@
-     fprintf(file, ",\n\"XPMENDEXT\"");
- }
-+
-+#ifndef NO_ZPIPE
-+FUNC(xpmPipeThrough, FILE*, (int fd,
-+                           const char* cmd,
-+                           const char* arg1,
-+                           const char* mode));
-+#endif
-+
- /*
-  * open the given file to be written as an xpmData which is returned
-  */
-@@ -305,38 +318,32 @@
-     char *filename;
-     xpmData *mdata;
- {
--#ifndef NO_ZPIPE
--    char buf[BUFSIZ];
--
--#endif
--
-     if (!filename) {
-       mdata->stream.file = (stdout);
-       mdata->type = XPMFILE;
-     } else {
- #ifndef NO_ZPIPE
--      int len = strlen(filename);
-+      size_t len;
-+#endif
-+      int fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
-+      if ( fd < 0 )
-+          return(XpmOpenFailed);
-+#ifndef NO_ZPIPE
-+      len = strlen(filename);
-       if (len > 2 && !strcmp(".Z", filename + (len - 2))) {
--          sprintf(buf, "compress > \"%s\"", filename);
--          if (!(mdata->stream.file = popen(buf, "w")))
--              return (XpmOpenFailed);
--
-+          mdata->stream.file = xpmPipeThrough(fd, "compress", NULL, "w");
-           mdata->type = XPMPIPE;
-       } else if (len > 3 && !strcmp(".gz", filename + (len - 3))) {
--          sprintf(buf, "gzip -q > \"%s\"", filename);
--          if (!(mdata->stream.file = popen(buf, "w")))
--              return (XpmOpenFailed);
--
-+          mdata->stream.file = xpmPipeThrough(fd, "gzip", "-q", "w");
-           mdata->type = XPMPIPE;
--      } else {
-+      } else
- #endif
--          if (!(mdata->stream.file = fopen(filename, "w")))
--              return (XpmOpenFailed);
--
-+      {
-+          mdata->stream.file = fdopen(fd, "w");
-           mdata->type = XPMFILE;
--#ifndef NO_ZPIPE
-       }
--#endif
-+      if (!mdata->stream.file)
-+          return (XpmOpenFailed);
-     }
-     return (XpmSuccess);
- }
-@@ -348,15 +355,7 @@
- xpmDataClose(mdata)
-     xpmData *mdata;
- {
--    switch (mdata->type) {
--    case XPMFILE:
--      if (mdata->stream.file != (stdout))
--          fclose(mdata->stream.file);
--      break;
--#ifndef NO_ZPIPE
--    case XPMPIPE:
--      pclose(mdata->stream.file);
--      break;
--#endif
--    }
-+    if (mdata->stream.file != (stdout))
-+      fclose(mdata->stream.file);
- }
-+
-Index: extras/Xpm/lib/XpmI.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/XpmI.h,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/XpmI.h      15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/XpmI.h      17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -49,8 +49,10 @@
-  * lets try to solve include files
-  */
-+#include <sys/types.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#include <limits.h>
- /* stdio.h doesn't declare popen on a Sequent DYNIX OS */
- #ifdef sequent
- extern FILE *popen();
-Index: extras/Xpm/lib/create.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/create.c,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/create.c    15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/create.c    17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/extras/Xpm/lib/create.c,v 1.2.4.1 2004/09/15 15:47:39 daniel Exp $ */
-+/* $XdotOrg: xc/extras/Xpm/lib/create.c,v 1.2.4.2 2004/12/17 01:09:36 gisburn Exp $ */
- /*
-  * Copyright (C) 1989-95 GROUPE BULL
-  *
-@@ -45,6 +45,8 @@
-  * Lorens Younes (d93-hyo@nada.kth.se) 4/96
-  */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- #include <ctype.h>
-@@ -586,7 +588,7 @@
-            */
-       } else {
- #endif
--          int i;
-+          unsigned int i;
- #ifndef AMIGA
-           ncols = visual->map_entries;
-@@ -746,12 +748,14 @@
- /* function call in case of error */
-+
- #undef RETURN
- #define RETURN(status) \
-+do \
- { \
-       ErrorStatus = status; \
-       goto error; \
--}
-+} while(0)
- int
- XpmCreateImageFromXpmImage(display, image,
-@@ -817,7 +821,7 @@
-     ErrorStatus = XpmSuccess;
--    if (image->ncolors >= SIZE_MAX / sizeof(Pixel)) 
-+    if (image->ncolors >= UINT_MAX / sizeof(Pixel)) 
-       return (XpmNoMemory);
-     /* malloc pixels index tables */
-@@ -992,9 +996,13 @@
-       return (XpmNoMemory);
- #if !defined(FOR_MSW) && !defined(AMIGA)
--    if (height != 0 && (*image_return)->bytes_per_line >= SIZE_MAX / height)
-+    if (height != 0 && (*image_return)->bytes_per_line >= INT_MAX / height) {
-+      XDestroyImage(*image_return);
-       return XpmNoMemory;
-+    }
-     /* now that bytes_per_line must have been set properly alloc data */
-+    if((*image_return)->bytes_per_line == 0 ||  height == 0)
-+      return XpmNoMemory;
-     (*image_return)->data =
-       (char *) XpmMalloc((*image_return)->bytes_per_line * height);
-@@ -1023,7 +1031,7 @@
- LFUNC(_putbits, void, (register char *src, int dstoffset,
-                      register int numbits, register char *dst));
--LFUNC(_XReverse_Bytes, int, (register unsigned char *bpt, register int nb));
-+LFUNC(_XReverse_Bytes, int, (register unsigned char *bpt, register unsigned int nb));
- static unsigned char Const _reverse_byte[0x100] = {
-     0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-@@ -1063,12 +1071,12 @@
- static int
- _XReverse_Bytes(bpt, nb)
-     register unsigned char *bpt;
--    register int nb;
-+    register unsigned int nb;
- {
-     do {
-       *bpt = _reverse_byte[*bpt];
-       bpt++;
--    } while (--nb > 0);
-+    } while (--nb > 0); /* is nb user-controled? */
-     return 0;
- }
-@@ -1207,7 +1215,7 @@
-     register char *src;
-     register char *dst;
-     register unsigned int *iptr;
--    register int x, y, i;
-+    register unsigned int x, y, i;
-     register char *data;
-     Pixel pixel, px;
-     int nbytes, depth, ibu, ibpp;
-@@ -1217,8 +1225,8 @@
-     depth = image->depth;
-     if (depth == 1) {
-       ibu = image->bitmap_unit;
--      for (y = 0; y < height; y++)
--          for (x = 0; x < width; x++, iptr++) {
-+      for (y = 0; y < height; y++) /* how can we trust height */
-+          for (x = 0; x < width; x++, iptr++) { /* how can we trust width */
-               pixel = pixels[*iptr];
-               for (i = 0, px = pixel; i < sizeof(unsigned long);
-                    i++, px >>= 8)
-@@ -1293,12 +1301,12 @@
- {
-     unsigned char *data;
-     unsigned int *iptr;
--    int y;
-+    unsigned int y;
-     Pixel pixel;
- #ifdef WITHOUT_SPEEDUPS
--    int x;
-+    unsigned int x;
-     unsigned char *addr;
-     data = (unsigned char *) image->data;
-@@ -1335,7 +1343,7 @@
- #else  /* WITHOUT_SPEEDUPS */
--    int bpl = image->bytes_per_line;
-+    unsigned int bpl = image->bytes_per_line;
-     unsigned char *data_ptr, *max_data;
-     data = (unsigned char *) image->data;
-@@ -1403,11 +1411,11 @@
- {
-     unsigned char *data;
-     unsigned int *iptr;
--    int y;
-+    unsigned int y;
- #ifdef WITHOUT_SPEEDUPS
--    int x;
-+    unsigned int x;
-     unsigned char *addr;
-     data = (unsigned char *) image->data;
-@@ -1431,7 +1439,7 @@
-     Pixel pixel;
--    int bpl = image->bytes_per_line;
-+    unsigned int bpl = image->bytes_per_line;
-     unsigned char *data_ptr, *max_data;
-     data = (unsigned char *) image->data;
-@@ -1484,11 +1492,11 @@
- {
-     char *data;
-     unsigned int *iptr;
--    int y;
-+    unsigned int y;
- #ifdef WITHOUT_SPEEDUPS
--    int x;
-+    unsigned int x;
-     data = image->data;
-     iptr = pixelindex;
-@@ -1498,7 +1506,7 @@
- #else  /* WITHOUT_SPEEDUPS */
--    int bpl = image->bytes_per_line;
-+    unsigned int bpl = image->bytes_per_line;
-     char *data_ptr, *max_data;
-     data = image->data;
-@@ -1533,12 +1541,12 @@
-       PutImagePixels(image, width, height, pixelindex, pixels);
-     else {
-       unsigned int *iptr;
--      int y;
-+      unsigned int y;
-       char *data;
- #ifdef WITHOUT_SPEEDUPS
--      int x;
-+      unsigned int x;
-       data = image->data;
-       iptr = pixelindex;
-@@ -1761,6 +1769,9 @@
-     Pixel px;
-     int nbytes;
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     for (i=0, px=pixel; i<sizeof(unsigned long); i++, px>>=8)
-       ((unsigned char *)&pixel)[i] = px;
-     src = &ximage->data[XYINDEX(x, y, ximage)];
-@@ -1791,7 +1802,10 @@
-     register char *dst;
-     register int i;
-     Pixel px;
--    int nbytes, ibpp;
-+    unsigned int nbytes, ibpp;
-+
-+    if(x < 0 || y < 0)
-+      return 0;
-     ibpp = ximage->bits_per_pixel;
-     if (ximage->depth == 4)
-@@ -1825,6 +1839,9 @@
- {
-     unsigned char *addr;
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
-     *((unsigned long *)addr) = pixel;
-     return 1;
-@@ -1840,6 +1857,9 @@
- {
-     unsigned char *addr;
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
-     addr[0] = pixel >> 24;
-     addr[1] = pixel >> 16;
-@@ -1857,6 +1877,9 @@
- {
-     unsigned char *addr;
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
-     addr[3] = pixel >> 24;
-     addr[2] = pixel >> 16;
-@@ -1874,6 +1897,9 @@
- {
-     unsigned char *addr;
-     
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     addr = &((unsigned char *)ximage->data) [ZINDEX16(x, y, ximage)];
-     addr[0] = pixel >> 8;
-     addr[1] = pixel;
-@@ -1889,6 +1915,9 @@
- {
-     unsigned char *addr;
-     
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     addr = &((unsigned char *)ximage->data) [ZINDEX16(x, y, ximage)];
-     addr[1] = pixel >> 8;
-     addr[0] = pixel;
-@@ -1902,6 +1931,9 @@
-     int y;
-     unsigned long pixel;
- {
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     ximage->data[ZINDEX8(x, y, ximage)] = pixel;
-     return 1;
- }
-@@ -1913,6 +1945,9 @@
-     int y;
-     unsigned long pixel;
- {
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     if (pixel & 1)
-       ximage->data[ZINDEX1(x, y, ximage)] |= 0x80 >> (x & 7);
-     else
-@@ -1927,6 +1962,9 @@
-     int y;
-     unsigned long pixel;
- {
-+    if(x < 0 || y < 0)
-+      return 0;
-+
-     if (pixel & 1)
-       ximage->data[ZINDEX1(x, y, ximage)] |= 1 << (x & 7);
-     else
-@@ -2061,8 +2099,8 @@
-       xpmGetCmt(data, &colors_cmt);
-     /* malloc pixels index tables */
--    if (ncolors >= SIZE_MAX / sizeof(Pixel)) 
--      return XpmNoMemory;
-+    if (ncolors >= UINT_MAX / sizeof(Pixel)) 
-+      RETURN(XpmNoMemory);
-     image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors);
-     if (!image_pixels)
-@@ -2174,7 +2212,7 @@
-      * free the hastable
-      */
-     if (ErrorStatus != XpmSuccess)
--      RETURN(ErrorStatus)
-+      RETURN(ErrorStatus);
-     else if (USE_HASHTABLE)
-       xpmHashTableFree(&hashtable);
-@@ -2366,11 +2404,11 @@
-           /* array of pointers malloced by need */
-           unsigned short *cidx[256];
--          int char1;
-+          unsigned int char1;
-           bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */
-           for (a = 0; a < ncolors; a++) {
--              char1 = colorTable[a].string[0];
-+              char1 = (unsigned char) colorTable[a].string[0];
-               if (cidx[char1] == NULL) { /* get new memory */
-                   cidx[char1] = (unsigned short *)
-                       XpmCalloc(256, sizeof(unsigned short));
-Index: extras/Xpm/lib/data.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/data.c,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/data.c      15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/data.c      17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -33,6 +33,8 @@
- \*****************************************************************************/
- /* $XFree86: xc/extras/Xpm/lib/data.c,v 1.3 2001/10/28 03:32:10 tsi Exp $ */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #ifndef CXPMPROG
- #if 0
- /* Official version number */
-@@ -262,7 +264,7 @@
-       }
-       Ungetc(data, c, file);
-     }
--    return (n);
-+    return (n); /* this returns bytes read + 1 */
- }
- /*
-@@ -375,8 +377,9 @@
- {
-     if (!data->type)
-       *cmt = NULL;
--    else if (data->CommentLength != 0 && data->CommentLength < SIZE_MAX - 1) {
--      *cmt = (char *) XpmMalloc(data->CommentLength + 1);
-+    else if (data->CommentLength != 0 && data->CommentLength < UINT_MAX - 1) {
-+      if( (*cmt = (char *) XpmMalloc(data->CommentLength + 1)) == NULL)
-+              return XpmNoMemory;
-       strncpy(*cmt, data->Comment, data->CommentLength);
-       (*cmt)[data->CommentLength] = '\0';
-       data->CommentLength = 0;
-@@ -400,7 +403,7 @@
- xpmParseHeader(data)
-     xpmData *data;
- {
--    char buf[BUFSIZ];
-+    char buf[BUFSIZ+1] = {0};
-     int l, n = 0;
-     if (data->type) {
-Index: extras/Xpm/lib/hashtab.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/hashtab.c,v
-retrieving revision 1.1.1.1.6.1
-retrieving revision 1.1.1.1.6.2
-diff -u -u -r1.1.1.1.6.1 -r1.1.1.1.6.2
---- extras/Xpm/lib/hashtab.c   15 Sep 2004 15:47:39 -0000      1.1.1.1.6.1
-+++ extras/Xpm/lib/hashtab.c   17 Dec 2004 01:09:36 -0000      1.1.1.1.6.2
-@@ -138,13 +138,13 @@
-     unsigned int size = table->size;
-     xpmHashAtom *t, *p;
-     int i;
--    int oldSize = size;
-+    unsigned int oldSize = size;
-     t = atomTable;
-     HASH_TABLE_GROWS
-       table->size = size;
-     table->limit = size / 3;
--    if (size >= SIZE_MAX / sizeof(*atomTable)) 
-+    if (size >= UINT_MAX / sizeof(*atomTable)) 
-       return (XpmNoMemory);
-     atomTable = (xpmHashAtom *) XpmMalloc(size * sizeof(*atomTable));
-     if (!atomTable)
-@@ -206,7 +206,7 @@
-     table->size = INITIAL_HASH_SIZE;
-     table->limit = table->size / 3;
-     table->used = 0;
--    if (table->size >= SIZE_MAX / sizeof(*atomTable))
-+    if (table->size >= UINT_MAX / sizeof(*atomTable))
-       return (XpmNoMemory);
-     atomTable = (xpmHashAtom *) XpmMalloc(table->size * sizeof(*atomTable));
-     if (!atomTable)
-Index: extras/Xpm/lib/misc.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/misc.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- extras/Xpm/lib/misc.c      14 Nov 2003 16:48:24 -0000      1.1.1.1
-+++ extras/Xpm/lib/misc.c      17 Dec 2004 01:09:36 -0000      1.1.1.1.6.1
-@@ -44,7 +44,7 @@
-     char *s1;
- {
-     char *s2;
--    int l = strlen(s1) + 1;
-+    size_t l = strlen(s1) + 1;
-     if (s2 = (char *) XpmMalloc(l))
-       strcpy(s2, s1);
-Index: extras/Xpm/lib/parse.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/parse.c,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/parse.c     15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/parse.c     17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/extras/Xpm/lib/parse.c,v 1.2.4.1 2004/09/15 15:47:39 daniel Exp $ */
-+/* $XdotOrg: xc/extras/Xpm/lib/parse.c,v 1.2.4.2 2004/12/17 01:09:36 gisburn Exp $ */
- /*
-  * Copyright (C) 1989-95 GROUPE BULL
-  *
-@@ -41,26 +41,28 @@
-  * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94
-  */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- #include <ctype.h>
- #include <string.h>
- #ifdef HAS_STRLCAT
--# define STRLCAT(dst, src, dstsize) { \
-+# define STRLCAT(dst, src, dstsize) do { \
-       if (strlcat(dst, src, dstsize) >= (dstsize)) \
--          return (XpmFileInvalid); }
--# define STRLCPY(dst, src, dstsize) { \
-+          return (XpmFileInvalid); } while(0)
-+# define STRLCPY(dst, src, dstsize) do { \
-       if (strlcpy(dst, src, dstsize) >= (dstsize)) \
--          return (XpmFileInvalid); }
-+          return (XpmFileInvalid); } while(0)
- #else
--# define STRLCAT(dst, src, dstsize) { \
-+# define STRLCAT(dst, src, dstsize) do { \
-       if ((strlen(dst) + strlen(src)) < (dstsize)) \
-           strcat(dst, src); \
--      else return (XpmFileInvalid); }
--# define STRLCPY(dst, src, dstsize) { \
-+      else return (XpmFileInvalid); } while(0)
-+# define STRLCPY(dst, src, dstsize) do { \
-       if (strlen(src) < (dstsize)) \
-           strcpy(dst, src); \
--      else return (XpmFileInvalid); }
-+      else return (XpmFileInvalid); } while(0)
- #endif
- LFUNC(ParsePixels, int, (xpmData *data, unsigned int width,
-@@ -205,7 +207,7 @@
-     char **defaults;
-     int ErrorStatus;
--    if (ncolors >= SIZE_MAX / sizeof(XpmColor))
-+    if (ncolors >= UINT_MAX / sizeof(XpmColor))
-       return (XpmNoMemory);
-     colorTable = (XpmColor *) XpmCalloc(ncolors, sizeof(XpmColor));
-     if (!colorTable)
-@@ -218,7 +220,7 @@
-           /*
-            * read pixel value
-            */
--          if (cpp >= SIZE_MAX - 1) {
-+          if (cpp >= UINT_MAX - 1) {
-               xpmFreeColorTable(colorTable, ncolors);
-               return (XpmNoMemory);
-           }
-@@ -277,9 +279,9 @@
-                       return (XpmFileInvalid);
-                   }
-                   if (!lastwaskey)
--                      STRLCAT(curbuf, " ", sizeof(curbuf)); /* append space */
-+                      STRLCAT(curbuf, " ", sizeof(curbuf));/* append space */
-                   buf[l] = '\0';
--                  STRLCAT(curbuf, buf, sizeof(curbuf));/* append buf */
-+                  STRLCAT(curbuf, buf, sizeof(curbuf)); /* append buf */
-                   lastwaskey = 0;
-               }
-           }
-@@ -287,7 +289,7 @@
-               xpmFreeColorTable(colorTable, ncolors);
-               return (XpmFileInvalid);
-           }
--          len = strlen(curbuf) + 1;
-+          len = strlen(curbuf) + 1; /* integer overflow just theoretically possible */
-           s = defaults[curkey] = (char *) XpmMalloc(len);
-           if (!s) {
-               xpmFreeColorTable(colorTable, ncolors);
-@@ -306,7 +308,7 @@
-           /*
-            * read pixel value
-            */
--          if (cpp >= SIZE_MAX - 1) {
-+          if (cpp >= UINT_MAX - 1) {
-               xpmFreeColorTable(colorTable, ncolors);
-               return (XpmNoMemory);
-           }
-@@ -351,7 +353,7 @@
-           memcpy(s, curbuf, len);
-           color->c_color = s;
-           *curbuf = '\0';             /* reset curbuf */
--          if (a < ncolors - 1)
-+          if (a < ncolors - 1)        /* can we trust ncolors -> leave data's bounds */
-               xpmNextString(data);    /* get to the next string */
-       }
-     }
-@@ -370,11 +372,11 @@
-     xpmHashTable *hashtable;
-     unsigned int **pixels;
- {
--    unsigned int *iptr, *iptr2;
-+    unsigned int *iptr, *iptr2 = NULL; /* found by Egbert Eich */
-     unsigned int a, x, y;
--    if ((height > 0 && width >= SIZE_MAX / height) ||
--      width * height >= SIZE_MAX / sizeof(unsigned int)) 
-+    if ((height > 0 && width >= UINT_MAX / height) ||
-+      width * height >= UINT_MAX / sizeof(unsigned int)) 
-       return XpmNoMemory;
- #ifndef FOR_MSW
-     iptr2 = (unsigned int *) XpmMalloc(sizeof(unsigned int) * width * height);
-@@ -399,8 +401,10 @@
-       {
-           unsigned short colidx[256];
--          if (ncolors > 256)
-+          if (ncolors > 256) {
-+              XpmFree(iptr2); /* found by Egbert Eich */
-               return (XpmFileInvalid);
-+          }
-           bzero((char *)colidx, 256 * sizeof(short));
-           for (a = 0; a < ncolors; a++)
-@@ -427,16 +431,20 @@
-       {
- /* free all allocated pointers at all exits */
--#define FREE_CIDX {int f; for (f = 0; f < 256; f++) \
--if (cidx[f]) XpmFree(cidx[f]);}
-+#define FREE_CIDX \
-+do \
-+{ \
-+      int f; for (f = 0; f < 256; f++) \
-+      if (cidx[f]) XpmFree(cidx[f]); \
-+} while(0)
-           /* array of pointers malloced by need */
-           unsigned short *cidx[256];
--          int char1;
-+          unsigned int char1;
-           bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */
-           for (a = 0; a < ncolors; a++) {
--              char1 = colorTable[a].string[0];
-+              char1 = (unsigned char) colorTable[a].string[0];
-               if (cidx[char1] == NULL) { /* get new memory */
-                   cidx[char1] = (unsigned short *)
-                       XpmCalloc(256, sizeof(unsigned short));
-@@ -480,8 +488,10 @@
-           char *s;
-           char buf[BUFSIZ];
--          if (cpp >= sizeof(buf))
-+          if (cpp >= sizeof(buf)) {
-+              XpmFree(iptr2); /* found by Egbert Eich */
-               return (XpmFileInvalid);
-+          }
-           buf[cpp] = '\0';
-           if (USE_HASHTABLE) {
-@@ -491,7 +501,7 @@
-                   xpmNextString(data);
-                   for (x = 0; x < width; x++, iptr++) {
-                       for (a = 0, s = buf; a < cpp; a++, s++)
--                          *s = xpmGetC(data);
-+                          *s = xpmGetC(data); /* int assigned to char, not a problem here */
-                       slot = xpmHashSlot(hashtable, buf);
-                       if (!*slot) {   /* no color matches */
-                           XpmFree(iptr2);
-@@ -505,7 +515,7 @@
-                   xpmNextString(data);
-                   for (x = 0; x < width; x++, iptr++) {
-                       for (a = 0, s = buf; a < cpp; a++, s++)
--                          *s = xpmGetC(data);
-+                          *s = xpmGetC(data); /* int assigned to char, not a problem here */
-                       for (a = 0; a < ncolors; a++)
-                           if (!strcmp(colorTable[a].string, buf))
-                               break;
-@@ -560,7 +570,7 @@
-     while (!notstart && notend) {
-       /* there starts an extension */
-       ext = (XpmExtension *)
--          XpmRealloc(exts, (num + 1) * sizeof(XpmExtension));
-+          XpmRealloc(exts, (num + 1) * sizeof(XpmExtension)); /* can the loop be forced to iterate often enough to make "(num + 1) * sizeof(XpmExtension)" wrapping? */
-       if (!ext) {
-           XpmFree(string);
-           XpmFreeExtensions(exts, num);
-@@ -597,7 +607,7 @@
-       while ((notstart = strncmp("XPMEXT", string, 6))
-              && (notend = strncmp("XPMENDEXT", string, 9))) {
-           sp = (char **)
--              XpmRealloc(ext->lines, (nlines + 1) * sizeof(char *));
-+              XpmRealloc(ext->lines, (nlines + 1) * sizeof(char *)); /* can we iterate enough for a wrapping? */
-           if (!sp) {
-               XpmFree(string);
-               ext->nlines = nlines;
-@@ -637,9 +647,9 @@
- /* function call in case of error */
- #undef RETURN
- #define RETURN(status) \
--{ \
-+do { \
-       goto error; \
--}
-+} while(0)
- /*
-  * This function parses an Xpm file or data and store the found informations
-Index: extras/Xpm/lib/scan.c
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/scan.c,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- extras/Xpm/lib/scan.c      15 Sep 2004 15:47:39 -0000      1.2.4.1
-+++ extras/Xpm/lib/scan.c      17 Dec 2004 01:09:36 -0000      1.2.4.2
-@@ -43,6 +43,8 @@
-  * Lorens Younes (d93-hyo@nada.kth.se) 4/96
-  */
-+/* October 2004, source code review by Thomas Biege <thomas@suse.de> */
-+
- #include "XpmI.h"
- #define MAXPRINTABLE 92                       /* number of printable ascii chars
-@@ -172,10 +174,10 @@
- /* function call in case of error */
- #undef RETURN
- #define RETURN(status) \
--{ \
-+do { \
-       ErrorStatus = status; \
-       goto error; \
--}
-+} while(0)
- /*
-  * This function scans the given image and stores the found informations in
-@@ -233,15 +235,15 @@
-     else
-       cpp = 0;
--    if ((height > 0 && width >= SIZE_MAX / height) ||
--      width * height >= SIZE_MAX / sizeof(unsigned int))
-+    if ((height > 0 && width >= UINT_MAX / height) ||
-+      width * height >= UINT_MAX / sizeof(unsigned int))
-       RETURN(XpmNoMemory);
-     pmap.pixelindex =
-       (unsigned int *) XpmCalloc(width * height, sizeof(unsigned int));
-     if (!pmap.pixelindex)
-       RETURN(XpmNoMemory);
--    if (pmap.size >= SIZE_MAX / sizeof(Pixel)) 
-+    if (pmap.size >= UINT_MAX / sizeof(Pixel)) 
-       RETURN(XpmNoMemory);
-     pmap.pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * pmap.size);
-@@ -308,7 +310,7 @@
-      * get rgb values and a string of char, and possibly a name for each
-      * color
-      */
--    if (pmap.ncolors >= SIZE_MAX / sizeof(XpmColor))
-+    if (pmap.ncolors >= UINT_MAX / sizeof(XpmColor))
-       RETURN(XpmNoMemory);
-     colorTable = (XpmColor *) XpmCalloc(pmap.ncolors, sizeof(XpmColor));
-     if (!colorTable)
-@@ -368,7 +370,7 @@
-     /* first get a character string */
-     a = 0;
--    if (cpp >= SIZE_MAX - 1)
-+    if (cpp >= UINT_MAX - 1)
-       return (XpmNoMemory);
-     if (!(s = color->string = (char *) XpmMalloc(cpp + 1)))
-       return (XpmNoMemory);
-@@ -461,7 +463,7 @@
-     }
-     /* first get character strings and rgb values */
--    if (ncolors >= SIZE_MAX / sizeof(XColor) || cpp >= SIZE_MAX - 1)
-+    if (ncolors >= UINT_MAX / sizeof(XColor) || cpp >= UINT_MAX - 1)
-       return (XpmNoMemory);
-     xcolors = (XColor *) XpmMalloc(sizeof(XColor) * ncolors);
-     if (!xcolors)
-@@ -619,7 +621,7 @@
-     char *dst;
-     unsigned int *iptr;
-     char *data;
--    int x, y, i;
-+    unsigned int x, y, i;
-     int bits, depth, ibu, ibpp, offset;
-     unsigned long lbt;
-     Pixel pixel, px;
-@@ -721,7 +723,7 @@
-     unsigned char *addr;
-     unsigned char *data;
-     unsigned int *iptr;
--    int x, y;
-+    unsigned int x, y;
-     unsigned long lbt;
-     Pixel pixel;
-     int depth;
-@@ -786,7 +788,7 @@
-     unsigned char *addr;
-     unsigned char *data;
-     unsigned int *iptr;
--    int x, y;
-+    unsigned int x, y;
-     unsigned long lbt;
-     Pixel pixel;
-     int depth;
-@@ -831,7 +833,7 @@
- {
-     unsigned int *iptr;
-     unsigned char *data;
--    int x, y;
-+    unsigned int x, y;
-     unsigned long lbt;
-     Pixel pixel;
-     int depth;
-@@ -864,7 +866,7 @@
-     storeFuncPtr storeFunc;
- {
-     unsigned int *iptr;
--    int x, y;
-+    unsigned int x, y;
-     char *data;
-     Pixel pixel;
-     int xoff, yoff, offset, bpl;
-@@ -900,11 +902,11 @@
- # else /* AMIGA */
- #define CLEAN_UP(status) \
--{\
-+do {\
-     if (pixels) XpmFree (pixels);\
-     if (tmp_img) FreeXImage (tmp_img);\
-     return (status);\
--}
-+} while(0)
- static int
- AGetImagePixels (
-@@ -925,7 +927,7 @@
-     
-     tmp_img = AllocXImage ((((width+15)>>4)<<4), 1, image->rp->BitMap->Depth);
-     if (tmp_img == NULL)
--      CLEAN_UP (XpmNoMemory)
-+      CLEAN_UP (XpmNoMemory);
-     
-     iptr = pmap->pixelindex;
-     for (y = 0; y < height; ++y)
-@@ -934,11 +936,11 @@
-       for (x = 0; x < width; ++x, ++iptr)
-       {
-           if ((*storeFunc) (pixels[x], pmap, iptr))
--              CLEAN_UP (XpmNoMemory)
-+              CLEAN_UP (XpmNoMemory);
-       }
-     }
-     
--    CLEAN_UP (XpmSuccess)
-+    CLEAN_UP (XpmSuccess);
- }
- #undef CLEAN_UP
-Index: extras/Xpm/lib/xpm.h
-===================================================================
-RCS file: /cvs/xorg/xc/extras/Xpm/lib/xpm.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- extras/Xpm/lib/xpm.h       23 Apr 2004 18:42:32 -0000      1.2
-+++ extras/Xpm/lib/xpm.h       13 Dec 2004 03:51:37 -0000      1.2.4.1
-@@ -284,9 +284,7 @@
-  * functions declarations
-  */
--#ifdef __cplusplus
--extern "C" {
--#endif
-+_XFUNCPROTOBEGIN
- /* FOR_MSW, all ..Pixmap.. are excluded, only the ..XImage.. are used */
- /* Same for Amiga! */
-@@ -440,10 +438,7 @@
-     FUNC(XpmFree, void, (void *ptr));
--#ifdef __cplusplus
--} /* for C++ V2.0 */
--#endif
--
-+_XFUNCPROTOEND
- /* backward compatibility */
-Index: fonts/bdf/100dpi/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/fonts/bdf/100dpi/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- fonts/bdf/100dpi/Imakefile 26 Aug 2004 11:58:05 -0000      1.3
-+++ fonts/bdf/100dpi/Imakefile 13 Dec 2004 14:19:03 -0000      1.3.2.1
-@@ -11,8 +11,10 @@
- OBJS1 = $(UCSOBJS1) $(DERIVEDOBJS1) $(PREDERIVEDOBJS1)
- OBJS2 = $(UCSOBJS2) $(DERIVEDOBJS2) $(PREDERIVEDOBJS2) $(MISCOBJS)
-+OBJS3 = $(DERIVEDOBJS3)
-+OBJS4 = $(DERIVEDOBJS4)
--OBJS = $(OBJS1) $(OBJS2)
-+OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
- FONTINSTDIR = $(FONTDIR)/100dpi
-@@ -21,6 +23,8 @@
- #ifndef LynxOSArchitecture
- InstallFontObjs($(OBJS1),$(FONTINSTDIR))
- InstallFontObjs($(OBJS2),$(FONTINSTDIR))
-+InstallFontObjs($(OBJS3),$(FONTINSTDIR))
-+InstallFontObjs($(OBJS4),$(FONTINSTDIR))
- InstallFontAliases($(FONTINSTDIR))
- InstallEncodingsDir($(ENCODINGSSRC),$(FONTINSTDIR))
- #else
-Index: fonts/bdf/75dpi/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/fonts/bdf/75dpi/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- fonts/bdf/75dpi/Imakefile  26 Aug 2004 11:58:05 -0000      1.3
-+++ fonts/bdf/75dpi/Imakefile  13 Dec 2004 14:19:03 -0000      1.3.2.1
-@@ -11,8 +11,10 @@
- OBJS1 = $(UCSOBJS1) $(DERIVEDOBJS1) $(PREDERIVEDOBJS1)
- OBJS2 = $(UCSOBJS2) $(DERIVEDOBJS2) $(PREDERIVEDOBJS2) $(MISCOBJS)
-+OBJS3 = $(DERIVEDOBJS3)
-+OBJS4 = $(DERIVEDOBJS4)
--OBJS = $(OBJS1) $(OBJS2)
-+OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
- FONTINSTDIR = $(FONTDIR)/75dpi
-@@ -21,6 +23,8 @@
- #ifndef LynxOSArchitecture
- InstallFontObjs($(OBJS1),$(FONTINSTDIR))
- InstallFontObjs($(OBJS2),$(FONTINSTDIR))
-+InstallFontObjs($(OBJS3),$(FONTINSTDIR))
-+InstallFontObjs($(OBJS4),$(FONTINSTDIR))
- InstallFontAliases($(FONTINSTDIR))
- InstallEncodingsDir($(ENCODINGSSRC),$(FONTINSTDIR))
- #else
-Index: fonts/encodings/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/fonts/encodings/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- fonts/encodings/Imakefile  23 Apr 2004 18:43:02 -0000      1.2
-+++ fonts/encodings/Imakefile  13 Dec 2004 13:50:44 -0000      1.2.4.1
-@@ -1,4 +1,4 @@
--XCOMM $XdotOrg: xc/fonts/encodings/Imakefile,v 1.2 2004/04/23 18:43:02 eich Exp $
-+XCOMM $XdotOrg: xc/fonts/encodings/Imakefile,v 1.2.4.1 2004/12/13 13:50:44 gisburn Exp $
- XCOMM $XFree86: xc/fonts/encodings/Imakefile,v 1.10 2003/06/26 10:19:41 eich Exp $
- #define IHaveSubdirs
-@@ -10,6 +10,7 @@
-       EncObjComp(adobe-symbol) \
-       EncObj(ansi-1251) \
-       EncObj(armscii-8) \
-+      EncObj(ascii-0) \
-       EncObj(dec-special) \
-       EncObj(ibm-cp437) EncObj(ibm-cp850) \
-       EncObj(ibm-cp852) EncObj(ibm-cp866) \
-Index: fonts/encodings/ascii-0.enc
-===================================================================
-RCS file: fonts/encodings/ascii-0.enc
-diff -N fonts/encodings/ascii-0.enc
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ fonts/encodings/ascii-0.enc        13 Dec 2004 13:50:44 -0000      1.1.4.1
-@@ -0,0 +1,101 @@
-+STARTENCODING ascii-0
-+SIZE 0x100
-+STARTMAPPING unicode
-+ 
-+0x21 0x0021
-+0x22 0x0022
-+0x23 0x0023
-+0x24 0x0024
-+0x25 0x0025
-+0x26 0x0026
-+0x27 0x0027
-+0x28 0x0028
-+0x29 0x0029
-+0x2A 0x002A
-+0x2B 0x002B
-+0x2C 0x002C
-+0x2D 0x002D
-+0x2E 0x002E
-+0x2F 0x002F
-+0x30 0x0030
-+0x31 0x0031
-+0x32 0x0032
-+0x33 0x0033
-+0x34 0x0034
-+0x35 0x0035
-+0x36 0x0036
-+0x37 0x0037
-+0x38 0x0038
-+0x39 0x0039
-+0x3A 0x003A
-+0x3B 0x003B
-+0x3C 0x003C
-+0x3D 0x003D
-+0x3E 0x003E
-+0x3F 0x003F
-+0x40 0x0040
-+0x41 0x0041
-+0x42 0x0042
-+0x43 0x0043
-+0x44 0x0044
-+0x45 0x0045
-+0x46 0x0046
-+0x47 0x0047
-+0x48 0x0048
-+0x49 0x0049
-+0x4A 0x004A
-+0x4B 0x004B
-+0x4C 0x004C
-+0x4D 0x004D
-+0x4E 0x004E
-+0x4F 0x004F
-+0x50 0x0050
-+0x51 0x0051
-+0x52 0x0052
-+0x53 0x0053
-+0x54 0x0054
-+0x55 0x0055
-+0x56 0x0056
-+0x57 0x0057
-+0x58 0x0058
-+0x59 0x0059
-+0x5A 0x005A
-+0x5B 0x005B
-+0x5C 0x005C
-+0x5D 0x005D
-+0x5E 0x005E
-+0x5F 0x005F
-+0x60 0x0060
-+0x61 0x0061
-+0x62 0x0062
-+0x63 0x0063
-+0x64 0x0064
-+0x65 0x0065
-+0x66 0x0066
-+0x67 0x0067
-+0x68 0x0068
-+0x69 0x0069
-+0x6A 0x006A
-+0x6B 0x006B
-+0x6C 0x006C
-+0x6D 0x006D
-+0x6E 0x006E
-+0x6F 0x006F
-+0x70 0x0070
-+0x71 0x0071
-+0x72 0x0072
-+0x73 0x0073
-+0x74 0x0074
-+0x75 0x0075
-+0x76 0x0076
-+0x77 0x0077
-+0x78 0x0078
-+0x79 0x0079
-+0x7A 0x007A
-+0x7B 0x007B
-+0x7C 0x007C
-+0x7D 0x007D
-+0x7E 0x007E
-+0x7F 0x0020
-+ENDMAPPING
-+ENDENCODING
-Index: include/extensions/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/include/extensions/Imakefile,v
-retrieving revision 1.10
-retrieving revision 1.10.2.1
-diff -u -u -r1.10 -r1.10.2.1
---- include/extensions/Imakefile       9 Aug 2004 22:37:21 -0000       1.10
-+++ include/extensions/Imakefile       13 Dec 2004 03:12:16 -0000      1.10.2.1
-@@ -1,4 +1,4 @@
--XCOMM $XdotOrg: xc/include/extensions/Imakefile,v 1.10 2004/08/09 22:37:21 kem Exp $
-+XCOMM $XdotOrg: xc/include/extensions/Imakefile,v 1.10.2.1 2004/12/13 03:12:16 gisburn Exp $
- XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:44 coskrey Exp $
-@@ -46,7 +46,7 @@
- XFIXESHEADERS = xfixeswire.h xfixesproto.h
- #endif
- #if BuildDamage || BuildDamageLibrary
--DAMAGEHEADERS = damage.h damagewire.h damageproto.h
-+DAMAGEHEADERS = damagewire.h damageproto.h
- #endif
- #if BuildComposite || BuildCompositeLibrary
- COMPOSITEHEADERS = composite.h compositeproto.h
-Index: include/extensions/Xinerama.h
-===================================================================
-RCS file: /cvs/xorg/xc/include/extensions/Xinerama.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- include/extensions/Xinerama.h      23 Apr 2004 18:43:06 -0000      1.2
-+++ include/extensions/Xinerama.h      13 Dec 2004 02:56:12 -0000      1.2.4.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/include/extensions/Xinerama.h,v 1.2 2004/04/23 18:43:06 eich Exp $ */
-+/* $XdotOrg: xc/include/extensions/Xinerama.h,v 1.2.4.1 2004/12/13 02:56:12 gisburn Exp $ */
- /*
- Copyright 2003  The Open Group
-@@ -29,6 +29,8 @@
- #ifndef _Xinerama_h
- #define _Xinerama_h
-+#include <X11/Xlib.h>
-+
- typedef struct {
-    int   screen_number;
-    short x_org;
-Index: include/extensions/damage.h
-===================================================================
-RCS file: include/extensions/damage.h
-diff -N include/extensions/damage.h
---- include/extensions/damage.h        29 Jul 2004 19:29:55 -0000      1.2
-+++ /dev/null  1 Jan 1970 00:00:00 -0000
-@@ -1,108 +0,0 @@
--/*
-- * $XFree86$
-- */
--
--/* 
-- * Copyright (C) 2002 Red Hat, Inc.
-- * Developer:  Havoc Pennington, Red Hat, Inc.
-- * 
-- * Permission is hereby granted, free of charge, to any person
-- * obtaining a copy of this software and associated documentation
-- * files (the "Software"), to deal in the Software without
-- * restriction, including without limitation the rights to use, copy,
-- * modify, merge, publish, distribute, sublicense, and/or sell copies
-- * of the Software, and to permit persons to whom the Software is
-- * furnished to do so, subject to the following conditions:
-- * 
-- * The above copyright notice and this permission notice shall be
-- * included in all copies or substantial portions of the Software.
-- * 
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-- * NONINFRINGEMENT.  IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR
-- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- * 
-- * Except as contained in this notice, the name of the X Consortium
-- * 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 X Consortium.
-- *
-- */
--
--/* The DAMAGE extension lets you track modified portions of the
-- * framebuffer. i.e. anytime a pixel changes onscreen you get
-- * notification, and you can ask the server for a region describing
-- * changes since you last asked.
-- *
-- * The function prototypes etc. look like they work for any window,
-- * but right now it really only works for root windows.
-- */
--
--#ifndef _X_DAMAGE_H_
--#define _X_DAMAGE_H_
--
--#include <X11/Xfuncproto.h>
--#include <X11/extensions/damageshared.h>
--
--/* A server-side resource that tracks a damage region for a given
-- * window.
-- */
--typedef unsigned long XDamageRecorder;
--
--typedef struct {
--    int       type;                 /* of event */
--    unsigned long serial;     /* # of last request processed by server */
--    Bool send_event;        /* true if this came frome a SendEvent request */
--    Display *display;       /* Display the event was read from */
--    Window window;          /* window on which damage recorder is recording */
--    XDamageRecorder recorder; /* the damage recorder this event is for */
--} XDamageNotifyEvent;
--
--_XFUNCPROTOBEGIN
--
--Bool XDamageQueryExtension (
--    Display *dpy,
--    int *event_base,
--    int *error_base
--);
--
--Status XDamageQueryVersion (
--    Display *dpy,
--    int *major,
--    int *minor
--);
--
--Bool XDamageScreenSupportsRootRecorder (
--    Display *dpy,
--    int      screen_num
--);
--
--XDamageRecorder XDamageCreateRecorder (
--    Display *dpy,
--    Window   window
--);
--
--void XDamageDestroyRecorder (
--    Display *dpy,
--    XDamageRecorder recorder
--);
--
--/* Gets damage recorded for given rectangle since last time we got damage
-- * for that rectangle. i.e. returns the intersection of the current
-- * damage region and the rectangle, and subtracts the rectangle
-- * from the current damage region.
-- */
--int XDamageGetDamage (
--    Display *dpy,
--    XDamageRecorder recorder,
--    _Xconst XRectangle *rect,
--    XRectangle **rects,
--    int *n
--);
--
--_XFUNCPROTOEND
--
--#endif /* _X_DAMAGE_H_ */
-Index: include/extensions/dpms.h
-===================================================================
-RCS file: /cvs/xorg/xc/include/extensions/dpms.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- include/extensions/dpms.h  23 Apr 2004 18:43:06 -0000      1.2
-+++ include/extensions/dpms.h  13 Dec 2004 03:48:01 -0000      1.2.4.1
-@@ -28,6 +28,9 @@
- ******************************************************************/
- /* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */
-+#ifndef _X11_EXTENSIONS_DPMS_H
-+#define _X11_EXTENSIONS_DPMS_H 1
-+
- /*
-  * HISTORY
-  */
-@@ -46,6 +49,8 @@
- #include <X11/X.h>
- #include <X11/Xmd.h>
-+_XFUNCPROTOBEGIN
-+
- extern Bool DPMSQueryExtension(Display *, int *, int *);
- extern Status DPMSGetVersion(Display *, int *, int *);
- extern Bool DPMSCapable(Display *);
-@@ -55,6 +60,8 @@
- extern Status DPMSDisable(Display *);
- extern Status DPMSForceLevel(Display *, CARD16);
- extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
--#endif
-+_XFUNCPROTOEND
-+#endif /* !DPMS_SERVER */
-+#endif /* !_X11_EXTENSIONS_DPMS_H */
-Index: lib/GL/glx/glxcmds.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/glx/glxcmds.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- lib/GL/glx/glxcmds.c       16 Jun 2004 09:35:43 -0000      1.3
-+++ lib/GL/glx/glxcmds.c       13 Dec 2004 04:18:21 -0000      1.3.4.1
-@@ -1505,6 +1505,8 @@
-     if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) {
-       xGLXQueryContextReq * req;
-+      GetReq(GLXQueryContext, req);
-+
-       req->reqType = opcode;
-       req->glxCode = X_GLXQueryContext;
-       req->context = (unsigned int)(ctx->xid);
-Index: lib/GL/glx/glxext.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/glx/glxext.c,v
-retrieving revision 1.5
-retrieving revision 1.5.4.1
-diff -u -u -r1.5 -r1.5.4.1
---- lib/GL/glx/glxext.c        27 Jul 2004 20:23:58 -0000      1.5
-+++ lib/GL/glx/glxext.c        13 Dec 2004 13:55:57 -0000      1.5.4.1
-@@ -730,7 +730,7 @@
-     __DRIscreenPrivate *psp = NULL;
- #ifndef GLX_USE_APPLEGL
-     drm_handle_t hSAREA;
--    drmAddress pSAREA;
-+    drmAddress pSAREA = MAP_FAILED;
-     char *BusID;
-     __DRIversion   ddx_version;
-     __DRIversion   dri_version;
-@@ -742,7 +742,6 @@
-     const char * err_extra;
-     int api_ver = __glXGetInternalVersion();
--
-     dri_version.major = driDpy->private->driMajor;
-     dri_version.minor = driDpy->private->driMinor;
-     dri_version.patch = driDpy->private->driPatch;
-@@ -751,6 +750,9 @@
-     err_msg = "XF86DRIOpenConnection";
-     err_extra = NULL;
-+    memset (&framebuffer, 0, sizeof (framebuffer));
-+    framebuffer.base = MAP_FAILED;
-+    
-     if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) {
-       fd = drmOpen(NULL,BusID);
-       Xfree(BusID); /* No longer needed */
-Index: lib/GL/mesa/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/Imakefile,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/Imakefile      16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/Imakefile      13 Dec 2004 04:12:55 -0000      1.1.3.1.4.1
-@@ -26,6 +26,11 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
-+
- #if Malloc0ReturnsNull
- ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
- #endif
-Index: lib/GL/mesa/drivers/dri/r128/Imakefile.inc
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/drivers/dri/r128/Imakefile.inc,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/drivers/dri/r128/Imakefile.inc 16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/drivers/dri/r128/Imakefile.inc 15 Dec 2004 01:50:55 -0000      1.1.3.1.4.1
-@@ -48,8 +48,7 @@
-               $(MESADRVR128BUILDDIR)r128_tex.c \
-               $(MESADRVR128BUILDDIR)r128_texmem.c \
-               $(MESADRVR128BUILDDIR)r128_texstate.c \
--              $(MESADRVR128BUILDDIR)r128_tris.c \
--              $(MESADRVR128BUILDDIR)r128_vb.c
-+              $(MESADRVR128BUILDDIR)r128_tris.c
-      R128OBJS = $(MESADRVR128BUILDDIR)r128_context.o \
-               $(MESADRVR128BUILDDIR)r128_dd.o \
-@@ -61,8 +60,7 @@
-               $(MESADRVR128BUILDDIR)r128_tex.o \
-               $(MESADRVR128BUILDDIR)r128_texmem.o \
-               $(MESADRVR128BUILDDIR)r128_texstate.o \
--              $(MESADRVR128BUILDDIR)r128_tris.o \
--              $(MESADRVR128BUILDDIR)r128_vb.o
-+              $(MESADRVR128BUILDDIR)r128_tris.o
-      R128UOBJS = $(MESADRVR128BUILDDIR)unshared/r128_context.o \
-               $(MESADRVR128BUILDDIR)unshared/r128_dd.o \
-@@ -74,8 +72,7 @@
-               $(MESADRVR128BUILDDIR)unshared/r128_tex.o \
-               $(MESADRVR128BUILDDIR)unshared/r128_texmem.o \
-               $(MESADRVR128BUILDDIR)unshared/r128_texstate.o \
--              $(MESADRVR128BUILDDIR)unshared/r128_tris.o \
--              $(MESADRVR128BUILDDIR)unshared/r128_vb.o
-+              $(MESADRVR128BUILDDIR)unshared/r128_tris.o
-      R128DOBJS = $(MESADRVR128BUILDDIR)debugger/r128_context.o \
-               $(MESADRVR128BUILDDIR)debugger/r128_dd.o \
-@@ -87,8 +84,7 @@
-               $(MESADRVR128BUILDDIR)debugger/r128_tex.o \
-               $(MESADRVR128BUILDDIR)debugger/r128_texmem.o \
-               $(MESADRVR128BUILDDIR)debugger/r128_texstate.o \
--              $(MESADRVR128BUILDDIR)debugger/r128_tris.o \
--              $(MESADRVR128BUILDDIR)debugger/r128_vb.o
-+              $(MESADRVR128BUILDDIR)debugger/r128_tris.o
-      R128POBJS = $(MESADRVR128BUILDDIR)profiled/r128_context.o \
-               $(MESADRVR128BUILDDIR)profiled/r128_dd.o \
-@@ -100,8 +96,7 @@
-               $(MESADRVR128BUILDDIR)profiled/r128_tex.o \
-               $(MESADRVR128BUILDDIR)profiled/r128_texmem.o \
-               $(MESADRVR128BUILDDIR)profiled/r128_texstate.o \
--              $(MESADRVR128BUILDDIR)profiled/r128_tris.o \
--              $(MESADRVR128BUILDDIR)profiled/r128_vb.o
-+              $(MESADRVR128BUILDDIR)profiled/r128_tris.o
- #ifdef NeedToLinkMesaSrc
- LinkSourceFile(r128_context.c, $(MESADRVSRCDIR)/r128)
-@@ -125,6 +120,4 @@
- LinkSourceFile(r128_texstate.c, $(MESADRVSRCDIR)/r128)
- LinkSourceFile(r128_tris.c, $(MESADRVSRCDIR)/r128)
- LinkSourceFile(r128_tris.h, $(MESADRVSRCDIR)/r128)
--LinkSourceFile(r128_vb.c, $(MESADRVSRCDIR)/r128)
--LinkSourceFile(r128_vb.h, $(MESADRVSRCDIR)/r128)
- #endif
-Index: lib/GL/mesa/drivers/osmesa/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/drivers/osmesa/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.2.1
-diff -u -u -r1.2 -r1.2.2.1
---- lib/GL/mesa/drivers/osmesa/Imakefile       18 Aug 2004 23:12:49 -0000      1.2
-+++ lib/GL/mesa/drivers/osmesa/Imakefile       15 Dec 2004 03:16:24 -0000      1.2.2.1
-@@ -8,6 +8,11 @@
- #define DoDebugLib DebugLibGlx
- #define DoProfileLib ProfileLibGlx
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
-+
- #include "../../array_cache/Imakefile.inc"
- #include "../../math/Imakefile.inc"
- #include "../../main/Imakefile.inc"
-Index: lib/GL/mesa/math/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/math/Imakefile,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/math/Imakefile 16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/math/Imakefile 13 Dec 2004 04:12:55 -0000      1.1.3.1.4.1
-@@ -26,6 +26,11 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
-+
- #define MesaMathBuildDir /**/
- #define NeedToLinkMesaSrc
-Index: lib/GL/mesa/shader/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/shader/Imakefile,v
-retrieving revision 1.1.3.2
-retrieving revision 1.1.3.2.4.1
-diff -u -u -r1.1.3.2 -r1.1.3.2.4.1
---- lib/GL/mesa/shader/Imakefile       16 Jun 2004 09:27:56 -0000      1.1.3.2
-+++ lib/GL/mesa/shader/Imakefile       13 Dec 2004 04:12:55 -0000      1.1.3.2.4.1
-@@ -26,6 +26,10 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
- #define MesaShaderBuildDir /**/
- #define NeedToLinkMesaSrc
-Index: lib/GL/mesa/sparc/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/sparc/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.2.1
-diff -u -u -r1.2 -r1.2.2.1
---- lib/GL/mesa/sparc/Imakefile        19 Aug 2004 07:34:43 -0000      1.2
-+++ lib/GL/mesa/sparc/Imakefile        13 Dec 2004 04:12:55 -0000      1.2.2.1
-@@ -1,5 +1,5 @@
- XCOMM $XFree86: xc/lib/GL/mesa/src/SPARC/Imakefile,v 1.3 2002/11/22 22:55:58 tsi Exp $
--XCOMM $XdotOrg: xc/lib/GL/mesa/sparc/Imakefile,v 1.2 2004/08/19 07:34:43 kem Exp $
-+XCOMM $XdotOrg: xc/lib/GL/mesa/sparc/Imakefile,v 1.2.2.1 2004/12/13 04:12:55 gisburn Exp $
- /*
-  * Need both shared and unshared Mesa objects in the following cases:
-@@ -25,6 +25,10 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
- #if Malloc0ReturnsNull
- ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
-Index: lib/GL/mesa/swrast/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/swrast/Imakefile,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/swrast/Imakefile       16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/swrast/Imakefile       13 Dec 2004 04:12:55 -0000      1.1.3.1.4.1
-@@ -26,6 +26,10 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
- #define MesaSwrastBuildDir /**/
- #define NeedToLinkMesaSrc
-Index: lib/GL/mesa/swrast_setup/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/swrast_setup/Imakefile,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/swrast_setup/Imakefile 16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/swrast_setup/Imakefile 13 Dec 2004 04:12:55 -0000      1.1.3.1.4.1
-@@ -26,6 +26,11 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
-+
- #define MesaSwrastSetupBuildDir /**/
- #define NeedToLinkMesaSrc
-Index: lib/GL/mesa/tnl/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/tnl/Imakefile,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/tnl/Imakefile  16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/tnl/Imakefile  13 Dec 2004 04:12:55 -0000      1.1.3.1.4.1
-@@ -26,6 +26,10 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
- #define MesaTnlBuildDir /**/
- #define NeedToLinkMesaSrc
-Index: lib/GL/mesa/tnl_dd/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/GL/mesa/tnl_dd/Imakefile,v
-retrieving revision 1.1.3.1
-retrieving revision 1.1.3.1.4.1
-diff -u -u -r1.1.3.1 -r1.1.3.1.4.1
---- lib/GL/mesa/tnl_dd/Imakefile       16 Jun 2004 09:25:10 -0000      1.1.3.1
-+++ lib/GL/mesa/tnl_dd/Imakefile       13 Dec 2004 04:12:56 -0000      1.1.3.1.4.1
-@@ -26,6 +26,10 @@
- #define DoProfileLib NO
- #endif
-+/* Large PIC tables needed for Solaris SPARC builds */
-+#if (defined(SunArchitecture) && defined(SparcArchitecture))
-+# define LargePICTable YES
-+#endif
- #define MesaTnlDdBuildDir /**/
- #define NeedToLinkMesaSrc
-Index: lib/X11/XKBBind.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/X11/XKBBind.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/X11/XKBBind.c  23 Apr 2004 18:43:24 -0000      1.2
-+++ lib/X11/XKBBind.c  13 Dec 2004 02:42:33 -0000      1.2.4.1
-@@ -363,7 +363,7 @@
-       if (xkbi->flags&XkbMapPending)
-            changes= xkbi->changes;
--      else bzero(&changes,sizeof(XkbChangesRec));
-+      else bzero(&changes,sizeof(changes));
-       XkbNoteMapChanges(&changes,event,XKB_XLIB_MAP_MASK);
-       LockDisplay(dpy);
-       if ((rtrn=XkbGetMapChanges(dpy,xkbi->desc,&changes))!=Success) {
-Index: lib/X11/XlibInt.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/X11/XlibInt.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- lib/X11/XlibInt.c  23 Apr 2004 18:43:24 -0000      1.2
-+++ lib/X11/XlibInt.c  13 Dec 2004 02:35:26 -0000      1.2.4.2
-@@ -3346,7 +3346,7 @@
-     int flags;
- {
-     char buf[MAX_PATH];
--    char* bufp;
-+    char* bufp = NULL;
-     int ret = -1;
-     UINT olderror = SetErrorMode (SEM_FAILCRITICALERRORS);
-@@ -3365,7 +3365,7 @@
-     _Xconst char* mode;
- {
-     char buf[MAX_PATH];
--    char* bufp;
-+    char* bufp = NULL;
-     void* ret = NULL;
-     UINT olderror = SetErrorMode (SEM_FAILCRITICALERRORS);
-Index: lib/X11/imInsClbk.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/X11/imInsClbk.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/X11/imInsClbk.c        23 Apr 2004 18:43:24 -0000      1.2
-+++ lib/X11/imInsClbk.c        13 Dec 2004 02:24:22 -0000      1.2.4.1
-@@ -254,8 +254,6 @@
-                   _XUnregisterFilter( display, RootWindow(display, 0),
-                                       _XimFilterPropertyNotify,
-                                       (XPointer)NULL );
--                  XSelectInput( display, RootWindow(display, 0),
--                                NoEventMask );
-               }
-               else
-                   picb->next = icb->next;
-Index: lib/Xaw/AsciiSink.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/AsciiSink.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/AsciiSink.c        23 Apr 2004 18:43:37 -0000      1.2
-+++ lib/Xaw/AsciiSink.c        13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -1706,6 +1706,8 @@
-     GetGC(sink);
-+    if (!sink->ascii_sink.font) XtError("Aborting: no font found\n");
-+    
-     sink->ascii_sink.cursor_position = 0;
-     sink->ascii_sink.laststate = XawisOff;
-     sink->ascii_sink.cursor_x = sink->ascii_sink.cursor_y = 0;
-Index: lib/Xaw/Label.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/Label.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/Label.c    23 Apr 2004 18:43:37 -0000      1.2
-+++ lib/Xaw/Label.c    13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -527,6 +527,8 @@
-     LabelWidget lw = (LabelWidget)cnew;
-     if (!lw->label.font) XtError("Aborting: no font found\n");
-+    if (lw->simple.international && !lw->label.fontset) 
-+      XtError("Aborting: no fontset found\n");
-     
-     if (lw->label.label == NULL) 
-       lw->label.label = XtNewString(lw->core.name);
-@@ -722,8 +724,8 @@
-     if (curlw->label.encoding != newlw->label.encoding)
-       was_resized = True;
--    if (curlw->label.fontset != newlw->label.fontset &&
--        curlw->simple.international)
-+    if (curlw->simple.international 
-+      && curlw->label.fontset != newlw->label.fontset)
-       was_resized = True;
-     if (curlw->label.label != newlw->label.label) {
-Index: lib/Xaw/List.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/List.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/List.c     23 Apr 2004 18:43:37 -0000      1.2
-+++ lib/Xaw/List.c     13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -471,6 +471,10 @@
- {
-     ListWidget lw = (ListWidget)cnew;
-+    if (!lw->list.font) XtError("Aborting: no font found\n");
-+    if (lw->simple.international && !lw->list.fontset) 
-+      XtError("Aborting: no fontset found\n");
-+    
-     /*
-      * Initialize all private resources
-      */
-Index: lib/Xaw/MultiSink.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/MultiSink.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/MultiSink.c        23 Apr 2004 18:43:37 -0000      1.2
-+++ lib/Xaw/MultiSink.c        13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -718,6 +718,8 @@
-     GetGC(sink);
-+    if (!sink->multi_sink.fontset) XtError("Aborting: no fontset found\n");
-+
-     sink->multi_sink.cursor_position = 0;
-     sink->multi_sink.laststate = XawisOff;
-     sink->multi_sink.cursor_x = sink->multi_sink.cursor_y = 0;
-Index: lib/Xaw/SmeBSB.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/SmeBSB.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/SmeBSB.c   23 Apr 2004 18:43:37 -0000      1.2
-+++ lib/Xaw/SmeBSB.c   13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -266,6 +266,8 @@
- {
-     SmeBSBObject entry = (SmeBSBObject)cnew;
-+    if (!entry->sme_bsb.font) XtError("Aborting: no font found\n");
-+
-     if (entry->sme_bsb.label == NULL) 
-       entry->sme_bsb.label = XtName(cnew);
-     else
-Index: lib/Xaw/Tip.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/Tip.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/Tip.c      23 Apr 2004 18:43:38 -0000      1.2
-+++ lib/Xaw/Tip.c      13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -243,6 +243,10 @@
-     TipWidget tip = (TipWidget)w;
-     XGCValues values;
-+    if (!tip->tip.font) XtError("Aborting: no font found\n");
-+    if (tip->tip.international && !tip->tip.fontset)
-+      XtError("Aborting: no fontset found\n");
-+    
-     tip->tip.timer = 0;
-     values.foreground = tip->tip.foreground;
-Index: lib/Xaw/XawIm.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xaw/XawIm.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- lib/Xaw/XawIm.c    23 Apr 2004 18:43:38 -0000      1.2
-+++ lib/Xaw/XawIm.c    13 Dec 2004 02:49:55 -0000      1.2.4.1
-@@ -808,8 +808,10 @@
-           pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
-           st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
-           st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
--          height = maxAscentOfFontSet(p->font_set)
--                 + maxDescentOfFontSet(p->font_set);
-+          if (p->font_set) {
-+              height = maxAscentOfFontSet(p->font_set)
-+                  + maxDescentOfFontSet(p->font_set);
-+          }
-           height = SetVendorShellHeight(ve, height);
-       }
-       if (p->flg & CIFg) {
-@@ -938,7 +940,7 @@
-     XPointer          ic_a[20], pe_a[20], st_a[20];
-     int                       ic_cnt = 0, pe_cnt = 0, st_cnt = 0;
-     XawTextMargin     *margin;
--    int                       height;
-+    int                       height = 0;
-     if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) ||
-       (p->xic == NULL)) return;
-@@ -965,8 +967,10 @@
-           pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
-           st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
-           st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
--          height = maxAscentOfFontSet(p->font_set)
--                 + maxDescentOfFontSet(p->font_set);
-+          if (p->font_set) {
-+              height = maxAscentOfFontSet(p->font_set)
-+                  + maxDescentOfFontSet(p->font_set);
-+          }
-           height = SetVendorShellHeight(ve, height);
-       }
-       if (p->flg & CIFg) {
-Index: lib/Xpm/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/lib/Xpm/Imakefile,v
-retrieving revision 1.2.4.1
-retrieving revision 1.2.4.2
-diff -u -u -r1.2.4.1 -r1.2.4.2
---- lib/Xpm/Imakefile  15 Sep 2004 15:47:41 -0000      1.2.4.1
-+++ lib/Xpm/Imakefile  17 Dec 2004 01:09:37 -0000      1.2.4.2
-@@ -46,12 +46,20 @@
- STRLCATDEF = -DHAS_STRLCAT
- #endif
-+#if HasSnprintf
-+SNPRINTFDEF = -DHAS_SNPRINTF
-+#else
-+SNPRINTFDEF = -Dsnprintf=_XpmSnprintf
-+SNPRINTFSRCS = snprintf.c
-+SNPRINTFOBJS = snprintf.o
-+#endif
-+
- #if defined(Win32Architecture)
- ZPIPEDEF = -DNO_ZPIPE
- #endif
- DEFINES = $(STRDUPDEF) $(STRCASECMPDEF) $(SPRINTFDEF) $(STRLCATDEF) \
--              $(ZPIPEDEF) $(ZFILEDEF)
-+              $(SNPRINTFDEF) $(ZPIPEDEF) $(ZFILEDEF)
- HEADERS = xpm.h
-@@ -59,13 +67,15 @@
-        CrBufFrI.c CrDatFrP.c CrPFrBuf.c RdFToI.c WrFFrI.c \
-        CrBufFrP.c CrIFrBuf.c CrPFrDat.c RdFToP.c WrFFrP.c \
-        CrDatFrI.c CrIFrDat.c RdFToDat.c WrFFrDat.c \
--       Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c
-+       Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c \
-+       $(SNPRINTFSRCS)
-   OBJS = data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \
-        CrBufFrI.o CrDatFrP.o CrPFrBuf.o RdFToI.o WrFFrI.o \
-        CrBufFrP.o CrIFrBuf.o CrPFrDat.o RdFToP.o WrFFrP.o \
-        CrDatFrI.o CrIFrDat.o RdFToDat.o WrFFrDat.o \
--       Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o
-+       Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o \
-+       $(SNPRINTFOBJS)
-          XPMDIR = $(TOP)/extras/Xpm
-       XPMLIBDIR = $(TOP)/extras/Xpm/lib
-@@ -105,4 +115,8 @@
- LinkSourceFile(WrFFrBuf.c,$(XPMLIBDIR))
- LinkSourceFile(xpm.h,$(XPMLIBDIR))
-+#if !HasSnprintf
-+LinkSourceFile(snprintf.c,$(LIBSRC)/misc)
-+#endif
-+
- DependTarget()
-Index: lib/dmx/dmx.c
-===================================================================
-RCS file: /cvs/xorg/xc/lib/dmx/dmx.c,v
-retrieving revision 1.1
-retrieving revision 1.1.4.2
-diff -u -u -r1.1 -r1.1.4.2
---- lib/dmx/dmx.c      30 Jun 2004 20:06:53 -0000      1.1
-+++ lib/dmx/dmx.c      13 Dec 2004 01:08:30 -0000      1.1.4.2
-@@ -424,7 +424,7 @@
-     if (length) {
-         char *buffer       = Xmalloc(paddedLength);
-         memset(buffer, 0, paddedLength);
--        strcpy(buffer, displayName);
-+        memcpy(buffer, displayName, length);
-         Data32(dpy, buffer, paddedLength);
-         Xfree(buffer);
-     }
-@@ -730,7 +730,7 @@
-     if (length) {
-         char *buffer       = Xmalloc(paddedLength);
-         memset(buffer, 0, paddedLength);
--        strcpy(buffer, attr->name);
-+        memcpy(buffer, attr->name, paddedLength);
-         Data32(dpy, buffer, paddedLength);
-         Xfree(buffer);
-     }
-Index: nls/XLC_LOCALE/en_US.UTF-8
-===================================================================
-RCS file: /cvs/xorg/xc/nls/XLC_LOCALE/en_US.UTF-8,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- nls/XLC_LOCALE/en_US.UTF-8 23 Apr 2004 18:44:34 -0000      1.2
-+++ nls/XLC_LOCALE/en_US.UTF-8 13 Dec 2004 14:14:37 -0000      1.2.4.1
-@@ -11,20 +11,9 @@
- object_name           generic
--XCOMM fs0 class
-+XCOMM         fs0 class (7 bit ASCII)
- fs0   {
-       charset {
--              name    ISO10646-1
--      }
--      font    {
--              primary ISO10646-1
--      }
--}
--XCOMM We leave the legacy encodings in for the moment, because we don't
--XCOMM have that many ISO10646 fonts yet.
--XCOMM         fs1 class (7 bit ASCII)
--fs1   {
--      charset {
-               name    ISO8859-1:GL
-       }
-       font    {
-@@ -32,8 +21,8 @@
-               vertical_rotate all
-       }
- }
--XCOMM fs2 class (ISO8859 families)
--fs2   {
-+XCOMM fs1 class (ISO8859 families)
-+fs1   {
-       charset {
-               name    ISO8859-1:GR
-       }
-@@ -41,8 +30,8 @@
-               primary ISO8859-1:GR
-       }
- }
--XCOMM         fs3 class (Kanji)
--fs3   {
-+XCOMM         fs2 class (Kanji)
-+fs2   {
-       charset {
-               name    JISX0208.1983-0:GL
-       }
-@@ -50,8 +39,8 @@
-               primary JISX0208.1983-0:GL
-       }
- }
--XCOMM   fs4 class (Korean Character)
--fs4   {
-+XCOMM   fs3 class (Korean Character)
-+fs3   {
-       charset {
-               name    KSC5601.1987-0:GL
-       }
-@@ -59,8 +48,8 @@
-               primary KSC5601.1987-0:GL
-       }
- }
--XCOMM   fs5 class (Chinese Han Character)
--fs5   {
-+XCOMM   fs4 class (Chinese Han Character)
-+fs4   {
-       charset {
-               name    GB2312.1980-0:GL
-       }
-@@ -68,8 +57,8 @@
-               primary GB2312.1980-0:GL
-       }
- }
--XCOMM fs6 class (Half Kana)
--fs6   {
-+XCOMM fs5 class (Half Kana)
-+fs5   {
-       charset {
-               name    JISX0201.1976-0:GR
-       }
-@@ -78,6 +67,16 @@
-               vertical_rotate all
-       }
- }
-+XCOMM ISO10646 should come last so the fonts above will actually be used
-+XCOMM fs6 class
-+fs6   {
-+      charset {
-+              name    ISO10646-1
-+      }
-+      font    {
-+              primary ISO10646-1
-+      }
-+}
- END XLC_FONTSET
- XCOMM 
-Index: programs/Xserver/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Imakefile,v
-retrieving revision 1.19
-retrieving revision 1.19.2.1
-diff -u -u -r1.19 -r1.19.2.1
---- programs/Xserver/Imakefile 1 Sep 2004 00:59:17 -0000       1.19
-+++ programs/Xserver/Imakefile 15 Dec 2004 19:22:53 -0000      1.19.2.1
-@@ -1,4 +1,4 @@
--XCOMM $XdotOrg: xc/programs/Xserver/Imakefile,v 1.19 2004/09/01 00:59:17 kem Exp $
-+XCOMM $XdotOrg: xc/programs/Xserver/Imakefile,v 1.19.2.1 2004/12/15 19:22:53 ago Exp $
- XCOMM $Xorg: Imakefile,v 1.4 2001/03/14 18:42:02 pookie Exp $
- /*
-  * Server Master Makefile
-@@ -1019,7 +1019,8 @@
- XWINOBJS = $(XWINDDXDIR)/stubs.o $(XWINDDXDIR)/XWin.res
- XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(XWINLIB) $(XWINLAYERLIB) \
-            $(SHADOW) $(XWINPARSERLIB) $(ROOTLESSLIB)
--XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XONLYLIB) $(SYSLIBS) -lgdi32
-+XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XONLYLIB) $(SYSLIBS) -lgdi32 \
-+           -lbinmode
- EXTRA_LDOPTIONS = -e _mainCRTStartup
-Index: programs/Xserver/GL/dri/dri.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/GL/dri/dri.c,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/GL/dri/dri.c      30 Jul 2004 20:38:27 -0000      1.6
-+++ programs/Xserver/GL/dri/dri.c      8 Dec 2004 05:44:42 -0000       1.6.2.1
-@@ -71,6 +71,8 @@
- extern Bool noPanoramiXExtension;
- #endif
-+extern Bool noXFree86DRIExtension;
-+
- static int DRIScreenPrivIndex = -1;
- static int DRIWindowPrivIndex = -1;
- static unsigned long DRIGeneration = 0;
-@@ -129,6 +131,13 @@
-       DRIGeneration = serverGeneration;
-     }
-+    /* If the DRI extension is disabled, do not initialize the DRI */
-+    if (noXFree86DRIExtension) {
-+      DRIDrvMsg(pScreen->myNum, X_WARNING,
-+                "Direct rendering has been disabled.\n");
-+      return FALSE;
-+    }
-+
-     /*
-      * If Xinerama is on, don't allow DRI to initialise.  It won't be usable
-      * anyway.
-Index: programs/Xserver/Xext/saver.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xext/saver.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/Xserver/Xext/saver.c      23 Apr 2004 18:44:41 -0000      1.2
-+++ programs/Xserver/Xext/saver.c      13 Dec 2004 03:34:33 -0000      1.2.4.2
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/Xext/saver.c,v 1.2 2004/04/23 18:44:41 eich Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/Xext/saver.c,v 1.2.4.2 2004/12/13 03:34:33 gisburn Exp $ */
- /*
-  * $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
-  *
-@@ -210,7 +210,7 @@
- #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr)
- #define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (pointer) v);
--#define SetupScreen(s)        ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s)
-+#define SetupScreen(s)        ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL)
- #define New(t)        ((t *) xalloc (sizeof (t)))
-@@ -1185,6 +1185,7 @@
-     pPriv = GetScreenPrivate (pDraw->pScreen);
-     if (pPriv && pPriv->attr && pPriv->attr->client == client)
-     {
-+      FreeResource (pPriv->attr->resource, AttrType);
-       FreeScreenAttr (pPriv->attr);
-       pPriv->attr = NULL;
-       CheckScreenPrivate (pDraw->pScreen);
-Index: programs/Xserver/Xext/xf86bigfont.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xext/xf86bigfont.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/Xext/xf86bigfont.c        23 Apr 2004 18:44:41 -0000      1.2
-+++ programs/Xserver/Xext/xf86bigfont.c        8 Dec 2004 06:41:00 -0000       1.2.4.1
-@@ -99,12 +99,12 @@
- static unsigned int pagesize;
-+static Bool badSysCall = FALSE;
-+
- #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__)
- #include <sys/signal.h>
--static Bool badSysCall = FALSE;
--
- static void
- SigSysHandler(
-      int signo)
-@@ -471,13 +471,16 @@
-     if (nCharInfos > 0) {
- #ifdef HAS_SHM
--      pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
-+      if (!badSysCall)
-+          pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
-+      else
-+          pDesc = NULL;
-       if (pDesc) {
-           pCI = (xCharInfo *) pDesc->attach_addr;
-           if (stuff_flags & XF86Bigfont_FLAGS_Shm)
-               shmid = pDesc->shmid;
-       } else {
--          if (stuff_flags & XF86Bigfont_FLAGS_Shm)
-+          if (stuff_flags & XF86Bigfont_FLAGS_Shm && !badSysCall)
-               pDesc = shmalloc(nCharInfos * sizeof(xCharInfo)
-                                + sizeof(CARD32));
-           if (pDesc) {
-@@ -522,7 +525,7 @@
-               }
-           }
- #ifdef HAS_SHM
--          if (pDesc) {
-+          if (pDesc && !badSysCall) {
-               *(CARD32 *)(pCI + nCharInfos) = signature;
-               if (!FontSetPrivate(pFont, FontShmdescIndex, pDesc)) {
-                   shmdealloc(pDesc);
-Index: programs/Xserver/Xext/xf86vmode.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xext/xf86vmode.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/Xext/xf86vmode.c  23 Apr 2004 18:44:41 -0000      1.2
-+++ programs/Xserver/Xext/xf86vmode.c  15 Dec 2004 05:01:25 -0000      1.2.4.1
-@@ -29,7 +29,7 @@
- from Kaleb S. KEITHLEY
- */
--/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.2 2004/04/23 18:44:41 eich Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.2.4.1 2004/12/15 05:01:25 gisburn Exp $ */
- /* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */
- /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
-@@ -52,6 +52,8 @@
- #include "xf86_ansic.h"
- #endif
-+#define DEFAULT_XF86VIDMODE_VERBOSITY 3
-+
- static int VidModeErrorBase;
- static int VidModeGeneration = 0;
- static int VidModeClientPrivateIndex;
-@@ -468,7 +470,7 @@
-     rep.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL);
-     rep.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS);
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("GetModeLine - scrn: %d clock: %ld\n",
-              stuff->screen, (unsigned long)rep.dotclock);
-       ErrorF("GetModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -676,7 +678,7 @@
-       stuff->after_vtotal = oldstuff->after_vtotal;
-       stuff->after_flags = oldstuff->after_flags;
-     }
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("AddModeLine - scrn: %d clock: %ld\n",
-               (int)stuff->screen, (unsigned long)stuff->dotclock);
-       ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -787,7 +789,7 @@
-     
-     VidModeAddModeline(stuff->screen, mode);
-     
--    if (xf86GetVerbosity() > 1)
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
-       ErrorF("AddModeLine - Succeeded\n");
-     return client->noClientException;
- }
-@@ -824,7 +826,7 @@
-       stuff->flags = oldstuff->flags;
-       stuff->privsize = oldstuff->privsize;
-     }
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("DeleteModeLine - scrn: %d clock: %ld\n",
-               (int)stuff->screen, (unsigned long)stuff->dotclock);
-       ErrorF("                 hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -843,7 +845,7 @@
-       len = client->req_len - (sizeof(xXF86VidModeDeleteModeLineReq) >> 2);
-     }
-     if (len != stuff->privsize) {
--      if (xf86GetVerbosity() > 1) {
-+      if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-           ErrorF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, "
-                  "len = %d, length = %d\n",
-                   (unsigned long)client->req_len,
-@@ -859,7 +861,7 @@
-     if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock))
-       return BadValue;
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("Checking against clock: %d (%d)\n",
-               VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock);
-       ErrorF("                 hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -882,7 +884,7 @@
-       return BadValue;
-      do {
--      if (xf86GetVerbosity() > 1) {
-+      if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-           ErrorF("Checking against clock: %d (%d)\n",
-                VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock);
-           ErrorF("                 hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -900,7 +902,7 @@
-       if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) &&
-               MODEMATCH(mode, stuff)) {
-           VidModeDeleteModeline(stuff->screen, mode);
--          if (xf86GetVerbosity())
-+          if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
-               ErrorF("DeleteModeLine - Succeeded\n");
-           return(client->noClientException);
-       }
-@@ -940,7 +942,7 @@
-       stuff->flags = oldstuff->flags;
-       stuff->privsize = oldstuff->privsize;
-     }
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n",
-               (int)stuff->screen, stuff->hdisplay, stuff->hsyncstart,
-               stuff->hsyncend, stuff->htotal);
-@@ -1028,7 +1030,7 @@
-     VidModeSetCrtcForMode(stuff->screen, mode);
-     VidModeSwitchMode(stuff->screen, mode);
--    if (xf86GetVerbosity() > 1)
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
-       ErrorF("ModModeLine - Succeeded\n");
-     return(client->noClientException);
- }
-@@ -1066,7 +1068,7 @@
-       stuff->flags = oldstuff->flags;
-       stuff->privsize = oldstuff->privsize;
-     }
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("ValidateModeLine - scrn: %d clock: %ld\n",
-               (int)stuff->screen, (unsigned long)stuff->dotclock);
-       ErrorF("                   hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -1146,7 +1148,7 @@
-       swapl(&rep.status, n);
-     }
-     WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep);
--    if (xf86GetVerbosity() > 1)
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
-       ErrorF("ValidateModeLine - Succeeded (status = %d)\n", status);
-     return(client->noClientException);
- }
-@@ -1200,7 +1202,7 @@
-       stuff->flags = oldstuff->flags;
-       stuff->privsize = oldstuff->privsize;
-     }
--    if (xf86GetVerbosity() > 1) {
-+    if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-       ErrorF("SwitchToMode - scrn: %d clock: %ld\n",
-               (int)stuff->screen, (unsigned long)stuff->dotclock);
-       ErrorF("               hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -1235,7 +1237,7 @@
-       return BadValue;
-     do {
--      if (xf86GetVerbosity() > 1) {
-+      if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
-           ErrorF("Checking against clock: %d (%d)\n",
-                VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock);
-           ErrorF("                 hdsp: %d hbeg: %d hend: %d httl: %d\n",
-@@ -1256,7 +1258,7 @@
-           if (!VidModeSwitchMode(stuff->screen, mode))
-               return BadValue;
--          if (xf86GetVerbosity() > 1)
-+          if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
-               ErrorF("SwitchToMode - Succeeded\n");
-           return(client->noClientException);
-       }
-Index: programs/Xserver/Xprint/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/Xprint/Imakefile  26 Apr 2004 11:07:03 -0000      1.3
-+++ programs/Xserver/Xprint/Imakefile  15 Dec 2004 07:38:28 -0000      1.3.4.1
-@@ -126,13 +126,11 @@
- DependTarget()
--MANDIR = $(MISCMANDIR)
--MANSUFFIX = $(MISCMANSUFFIX)
--InstallManPage(Xprint,$(MANDIR))
-+InstallManPage(Xprt,$(MANDIR))
- #ifdef HasDocBookTools
--all:: Xprint.man Xprint.html
-+all:: Xprt.man Xprt.html
--ConvertDocBookToManPage(Xprint.sgml, Xprint.man)
--ConvertDocBookToHTML(Xprint.sgml, Xprint.html)
-+ConvertDocBookToManPage(Xprt.sgml, Xprt.man)
-+ConvertDocBookToHTML(Xprt.sgml, Xprt.html)
- #endif /* HasDocBookTools */
-Index: programs/Xserver/Xprint/Init.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v
-retrieving revision 1.6
-retrieving revision 1.6.4.2
-diff -u -u -r1.6 -r1.6.4.2
---- programs/Xserver/Xprint/Init.c     24 Jun 2004 06:26:27 -0000      1.6
-+++ programs/Xserver/Xprint/Init.c     13 Dec 2004 05:12:12 -0000      1.6.4.2
-@@ -163,6 +163,7 @@
- PixmapFormatRec       PSPixmapFormats[] = {
-     {  1,  1, BITMAP_SCANLINE_PAD },
-     {  8,  8, BITMAP_SCANLINE_PAD },
-+    { 12, 16, BITMAP_SCANLINE_PAD },
-     { 24, 32, BITMAP_SCANLINE_PAD }
- };
-@@ -1217,9 +1218,9 @@
-  * calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine
-  * the context associated with the client, and then queries the context's
-  * attributes to determine whether the bitmap fonts should be visible.
-- * It looks at the value of the xp-listfonts-mode document/page attribute to 
-+ * It looks at the value of the xp-listfonts-modes document/page attribute to 
-  * see if xp-list-glyph-fonts has been left out of the mode list. Only
-- * if the xp-listfonts-mode attribute exists, and it does not contain
-+ * if the xp-listfonts-modes attribute exists, and it does not contain
-  * xp-list-glyph-fonts does this function return FALSE. In any other
-  * case the funtion returns TRUE, indicating that the bitmap fonts 
-  * should be visible to the client.
-@@ -1238,10 +1239,10 @@
-      * Check the page attributes, and if it's not defined there, then
-      * check the document attributes.
-      */
--    mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-mode");
-+    mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes");
-     if(!mode || !strlen(mode))
-     {
--        mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-mode");
-+        mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes");
-         if(!mode || !strlen(mode))
-           return TRUE;
-     }
-@@ -1251,14 +1252,21 @@
-     return TRUE;
- }
-+
- /*
-  * XpClientIsPrintClient is called by the font code to find out if
-  * a particular client has set a context which references a printer
-- * which utilizes a particular font path.  This function works by
-- * calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine
-- * the context associated with the client, and then looks up the
-- * font directory for the context.  The font directory is then compared
-- * with the directory specified in the FontPathElement which is passed in.
-+ * which utilizes a particular font path.
-+ * This function works by calling XpContextOfClient
-+ * (in Xserver/Xext/xprint.c) to determine the context associated with
-+ * the client and then looks at the value of the xp-listfonts-modes
-+ * document/page attribute to see if xp-list-internal-printer-fonts has
-+ * been left out of the mode list.
-+ * If the xp-listfonts-modes attribute exists, and it does not contain
-+ * xp-list-internal-printer-fonts this function returns FALSE. 
-+ * Otherwise it looks up the font directory for the context.  The font
-+ * directory is then compared with the directory specified in the
-+ * FontPathElement which is passed in.
-  */
- Bool
- XpClientIsPrintClient(
-@@ -1266,11 +1274,28 @@
-     FontPathElementPtr fpe)
- {
-     XpContextPtr pContext;
-+    char *mode;
-     char *modelID, *fontDir;
-     if(!(pContext = XpContextOfClient(client)))
-       return FALSE;
-+    /*
-+     * Check the page attributes, and if it's not defined there, then
-+     * check the document attributes.
-+     */
-+    mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes");
-+    if(!mode || !strlen(mode))
-+    {
-+        mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes");
-+    }
-+    
-+    if(mode && strlen(mode))
-+    {
-+        if(!strstr(mode, "xp-list-internal-printer-fonts"))
-+            return FALSE;    
-+    }
-+
-     if (!fpe)
-       return TRUE;
-Index: programs/Xserver/Xprint/Oid.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Oid.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/Xprint/Oid.c      23 Apr 2004 18:57:32 -0000      1.2
-+++ programs/Xserver/Xprint/Oid.c      13 Dec 2004 05:30:48 -0000      1.2.4.1
-@@ -2104,16 +2104,16 @@
- {
-     switch(notify)
-     {
--    case XPOID_NOTIFY_UNSUPPORTED:
--      return (const char*)NULL;
--      break;
--    case XPOID_NOTIFY_NONE:
--      return NOTIFY_NONE_STR;
--      break;
--    case XPOID_NOTIFY_EMAIL:
--      return NOTIFY_EMAIL_STR;
--      break;
-+       case XPOID_NOTIFY_NONE:
-+           return NOTIFY_NONE_STR;
-+       case XPOID_NOTIFY_EMAIL:
-+           return NOTIFY_EMAIL_STR;
-+       case XPOID_NOTIFY_UNSUPPORTED:
-+           return (const char *)NULL;
-     }
-+
-+    ErrorF("XpOidNotifyString: Unsupported notify=%ld\n", (long)notify);
-+    return (const char *)NULL;
- }
- /*
-Index: programs/Xserver/Xprint/Xprint.html
-===================================================================
-RCS file: programs/Xserver/Xprint/Xprint.html
-diff -N programs/Xserver/Xprint/Xprint.html
---- programs/Xserver/Xprint/Xprint.html        29 Jun 2004 17:10:13 -0000      1.3
-+++ /dev/null  1 Jan 1970 00:00:00 -0000
-@@ -1,296 +0,0 @@
--<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Xprint</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="Xprint"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>Xprint &#8212; The &quot;X print service&quot; - a portable, network-transparent printing system based on the X11 protocol</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p>Xprint is a very flexible, extensible, scaleable, client/server
--     print system based on ISO 10175 (and some other specs) and the X11        
--     rendering protocol.                                                       
--     Using Xprint an application can search, query and use devices like        
--     printers, FAX machines or create documents in formats like PDF.           
--     In particular, an application can seek a printer, query supported         
--     attributes (like paper size, trays, fonts etc.), configure the printer    
--     device to match it&#8217;s needs and print on it like on any other X device     
--     reusing parts of the code which is used for the video card Xserver.    
--    </p></div><div xmlns:ns1="" class="refsect1" lang="en"><a name="id2802146"></a><h2>OVERVIEW</h2><p>
--      The &quot;X Print Service&quot; technology allows X rendering to devices such as
--      printers and fax.  Most of the service is available in the X11
--      technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
--      Modifications have also been made to the LessTif/Motif/Qt technology
--      stacks to support Xprint.
--    </p><p>
--      The Xp portion consists of:
--      </p><div class="itemizedlist"><ul type="disc"><li><p>Xp Extension for the X-Server (included in the X-Server Xprt)</p></li><li><p>Xp Extension API for the client side (libXp/libXprintUtils)</p></li><li><p>PCL ddx driver that converts core X to native PCL</p></li><li><p>PDF ddx driver that converts core X to native PDF</p></li><li><p>PostScript ddx driver that converts core X to native PostScript</p></li><li><p>Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters</p></li></ul></div><p>
--      From an X clients perspective, it can attach to one of two nearly
--      identical X-Servers, a &quot;Video&quot; X-Server, and a &quot;Print&quot; X-Server
--      which has the additional Xp capability but otherwise looks and
--      behaves the same.   
--    </p></div><div xmlns:ns2="" class="refsect1" lang="en"><a name="id2804972"></a><h2>HOW THE X PRINT SERVICE WORKS</h2><p>    
--      The X Print Service expands on the traditional X-Server and Xlib world
--      in four ways.
--
--      </p><div class="orderedlist"><ol type="1"><li><p>
--            Most obvious is the use of &quot;print ddx drivers&quot; instead of
--            &quot;video ddx drivers&quot;.  While a video ddx driver modifies pixels
--            in a video frame buffer, a print ddx driver generates &quot;page
--            description language (PDL)&quot; output (such as PCL, PDF or PostScript)
--            or sends the print rendering instructions to a platform-specific
--            print API (like Win32/GDI).
--          </p><p>
--            Once a print ddx driver generates PDL output, it can be sent to
--            a spooler such as <span class="citerefentry"><span class="refentrytitle">lp</span>(1)</span>
--            or retrieved by the client (to implement functionality like &quot;print-to-file&quot;).
--          </p><p>
--            Though not currently done, a single X-Server can support both
--            print and video ddx drivers.
--            </p></li><li><p>
--            Since printers support &quot;paged&quot; output, unlike video, a portion
--            of the Xp Extension supports APIs to delineate printed output.
--            For example, <tt class="function">XpStartPage</tt> and <tt class="function">XpEndPage</tt> tell the X-Server where
--            a physical page starts and ends in an otherwise continuous
--            stream of X rendering primitives.  Likewise, <tt class="function">XpStartJob</tt> and
--            <tt class="function">XpEndJob</tt> determine when a collection of pages starts and ends.
--            <tt class="function">XpEndJob</tt> typically causes the generated PDL to be submitted to
--            a spooler, such as <span class="citerefentry"><span class="refentrytitle">lp</span>(1)</span>.
--          </p></li><li><p>
--            Since printers have extensive capabilities, another portion of
--            the Xp Extension supports APIs to manipulate &quot;print contexts&quot;.
--          </p><p>
--            Once a printer is selected using the Xp Extension API, a print
--            context to represent it can be created.  A print context
--            embodies the printer selected - it contains the printer's
--            default capabilities, selectable range of capabilities,
--            printer state, and generated output.  Some &quot;attributes&quot; within
--            the print context can be modified by the user, and the
--            X-Server and print ddx driver will react accordingly.  For
--            example, the attribute &quot;content-orientation&quot; can be set to
--            &quot;landscape&quot; or &quot;portrait&quot; (if the printer supports these 
--            values - which can be queried using the Xprint API as well).
--          </p></li><li><p>
--            Since printers can have &quot;built in&quot; fonts, the Xp Extension in
--            the X-Server works with the print ddx drivers to make
--            available (for printing only) additional fonts on a per print
--            context basis.
--          </p><p>
--            When a print context is created and set for a given printer,
--            the X font calls may be able to access additional printer
--            fonts.  To do this (typically), the X-Server must have access
--            to &quot;printer metric files&quot; (.pmf) that describe at minimum the
--            metrics of the built in fonts.
--          </p></li></ol></div></div><div xmlns:ns3="" class="refsect1" lang="en"><a name="id2804885"></a><h2>USAGE</h2><p>    
--      There are three tasks to start the X Print Service:
--      </p><div class="orderedlist"><ol type="1"><li><p>configuring the X Print Server,</p></li><li><p>starting the X Print Service</p></li><li><p>configuring the user session so that clients can find the running X Print Service</p></li></ol></div><p>
--      The tasks are described in detail below.
--    </p></div><div xmlns:ns4="" class="refsect1" lang="en"><a name="id2804911"></a><h2>SERVER CONFIGURATION</h2><p>
--      The X Print Server (Xprt) can read a number of configuration files which
--      control its behavior and support for printers.  Each vendor platform has
--      a default location for this information.  Xprt can also read the
--      environment variable <tt class="envar">XPCONFIGDIR</tt> to locate alternate configuration
--      directories.  Common settings include:
--
--      </p><table class="simplelist" border="0" summary="Simple list"><tr><td>export XPCONFIGDIR=/X11/lib/X11/XpConfig/</td></tr><tr><td>export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/</td></tr></table><p>
--      Xprt has many built-in defaults, and lacking any configuration files,
--      will immediately try to support all printers visible via <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span>.
--    </p><p>
--      In order of importance for configuration by a system administrator, the
--      configuration files for a &quot;C&quot; locale are as follows (see <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span> for more
--      details (including support for non-&quot;C&quot; locales)):
--      </p><div class="variablelist"><dl><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/Xprinters</tt></span></dt><dd><p>
--              'Xprinters' is the top most configuration file.  It tells
--              Xprt which specific printer names (e.g.  mylaser) should
--              be supported, and whether <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> or other commands
--              should be used to automatically supplement the list of
--              printers.
--            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/printer</tt></span></dt><dd><p>
--              The 'printer' file maps printer names to model
--              configurations (see 'model-config' below).  For example,
--              &quot;mylaser&quot; could be mapped to a &quot;HPDJ1600C&quot;, and all other
--              arbitrary printers could be mapped to a default, such as
--              &quot;HPLJ4SI&quot;.  When depending on <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> in the Xprinters
--              file, setting up defaults in 'printer' becomes all the
--              more important.
--            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/document</tt></span></dt><dd><p>
--              The 'document' file specifies the initial document values
--              for any print jobs.  For example, which paper tray to
--              use, what default resolution, etc.
--            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/job</tt></span></dt><dd><p>
--              The 'job' file specifies the initial job values for any
--              print jobs.  For example, &quot;notification-profile&quot; can be
--              set so that when a print job is successfully sent to a
--              printer, e-mail is sent to the user.
--            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/model-config</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</tt></span></dt><dd><p>
--              The 'model-config' file has attributes that describe the
--              printer model&#8217;s capabilities and default settings.
--              Printer model fonts may also be present.  The model-config
--              file also identifies the print ddx driver to be used.
--
--              For each printer model supported, a complete hierarchy of
--              files should exist.  In most cases, these files do not
--              need to be modified.
--            </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</tt></span></dt><dd><p>
--              The print ddx drivers can have highly specific
--              configuration files to control their behavior.  In most
--              cases, these files do not need to be modified.
--            </p></dd></dl></div><p>
--      
--      More information in how to configure and customize the X print server can be found in the
--      <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>
--      manual page.
--    </p></div><div xmlns:ns5="" class="refsect1" lang="en"><a name="id2805644"></a><h2>STARTING UP</h2><p>
--      The summary checklist for starting the X Print Service is as follows:
--      
--      </p><div class="orderedlist"><ol type="1"><li><p>
--            Choose an execution model for the X Print Service.  The X
--            Print Service can be run on a per-user session basis, per
--            machine basis, or can be run on a few machines globally
--            available to a number of users.
--          </p></li><li><p>
--            If print jobs are to be submitted to a spooler (almost always
--            the case), make sure all needed printers are available to the
--            spooler subsystem (most often <span class="citerefentry"><span class="refentrytitle">lp</span>(1)</span>)
--            on the same machine running the X Print Service.
--          </p></li><li><p>
--            Configure the X Print Server.  See ``X Print Server
--            Configuration''.
--          </p></li><li><p>
--            Depending on #1, start the X Print Server process &quot;Xprt&quot;, and
--            then the toolkit-specific Print Dialog Manager Daemon process
--            (such as CDEnext's &quot;dtpdmd&quot;) at the appropriate times.
--            Note that libXprintUtils-based applications/toolkits do not need
--            a Print Dialog Manager Daemon process to use Xprint.
--          </p></li></ol></div><p>     
--      The details are described below.
--    </p><p>
--      Because the X Print Service is based on X, it can be easily distributed.
--      The most significant factors in which execution model to choose will be
--      driven by:
--      </p><div class="itemizedlist"><ul type="disc"><li><p>
--            how many printers will be accessable through the printer
--            subsystem on any given machine.  A system administrator may
--            choose to cluster printers on a few given machines, or
--            scatter them across an organization and possibly make
--            extensive use of remote spoolers to make them globally
--            available.
--          </p></li><li><p>
--            how many machines will need a copy of the X Print Server
--            configuration files.  The files have been architected so
--            that one super-set version of them can be maintained and
--            distributed (e.g.  via NFS), and a per-machine or per-user
--            version of the `Xprinters' is all that is needed to have the
--            appropriate information in them utilized or ignored.
--          </p></li><li><p>
--            how many users can demand services from a given X Print
--            Service.
--          </p></li></ul></div><p>
--
--      With the above in mind, some obvious execution models include:
--      </p><div class="itemizedlist"><ul type="disc"><li><p>
--            Global - in this model, the system administrator is choosing
--            to run the X Print Service on a *few* select machines with
--            appropriate printers configured, and allow clients access to
--            the global resource.  This can centralize the administration
--            of printers and configuration files, but may have to be
--            monitored for performance loading.
--          </p><p>
--            Startup would likely be done by boot-up scripts (such as <tt class="filename">/etc/init.d/xprint</tt>).
--          </p></li><li><p>
--            Per-machine - every machine with potential X Print Service
--            users would run the service.  Printer and configuration file
--            administration is decentralized, and usage would be limited
--            to the users on the machine.
--          </p><p>
--            Startup would likely be done by boot-up scripts (such as <tt class="filename">/etc/init.d/xprint</tt>).
--          </p></li><li><p>
--            Per-user session - every user would run an entire X Print
--            Service for themselves.  In the future, the Video X Server
--            normally started may contain Print X Server capability, so
--            this model becomes very natural.
--          </p><p>
--            Startup would likely be done at session login or by
--            launching actions or processes manually once the user
--            logs in.  Note: Deamons like &quot;dtpdmd&quot; must be started after Xprt.
--          </p></li></ul></div><p>
--       Starting of the processes is straight forward.  In strict order (example is for manually starting the X print server for CDEnext usage):
--       </p><div class="orderedlist"><ol type="1"><li><pre class="programlisting">[machineA] % Xprt [-XpFile Xprinters file] [:dispNum] </pre><p>
--             Note that Xprt will look for configuration files in either
--             a default location or where <tt class="envar">XPCONFIGDIR</tt> points.
--           </p><p><tt class="option">-XpFile</tt> specifies an alternate `Xprinters' file, rather
--             than the default one or `<tt class="filename">${XPCONFIGDIR}/C/print/Xprinters</tt>'.
--           </p></li><li><pre class="programlisting">[machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] </pre><p>
--            The dtpdmd will maintain an X-Selection on the X-Server,
--            and will start dtpdm's as required to service requests.
--           </p></li></ol></div><p>
--       In all but the per-user session model, the machine running the dtpdmd
--       (thus dtpdm's) will need display authorization to the users video
--       display.
--    </p></div><div xmlns:ns6="" class="refsect1" lang="en"><a name="id2805858"></a><h2>CLIENT CONFIGURATION</h2><p>
--      Once a X Print Server and dtpdmd have been started -- many of them
--      in some cases -- clients will need to find and use them.  There are
--      two mechanisms that allow clients to discover X Print Servers and
--      printers.
--
--      </p><div class="itemizedlist"><ul type="disc"><li><p>
--            &quot;X Print Specifier&quot; - assuming usage of the DtPrint/XprintUtils-based print
--            applications, the following notation is understood:
--          </p><pre class="programlisting">printer_name@machine[:dispNum]</pre><p>
--            For example:
--          </p><pre class="programlisting">colorlj7@printhub:2</pre><p>
--           In the above example, the X Print Server running at `printhub:2'
--           is assumed to support the printer named `colorlj7'.
--          </p></li><li><p><tt class="envar">${XPSERVERLIST}</tt> - assuming usage of the DtPrint print dialogs,
--            the environment variable <tt class="envar">${XPSERVERLIST}</tt> can contain a list
--            of X Print Servers.  For example:
--          </p><pre class="programlisting">XPSERVERLIST=&quot;printhub:2 printhub:3 otherdept:0&quot;</pre><p>
--            Then in the dialogs, only a printer name needs to be entered.
--            The dialog will then search the X Print Servers in <tt class="envar">${XPSERVERLIST}</tt>
--            for a server than supports the printer, and then establish
--            contact.
--          </p></li></ul></div></div><div class="refsect1" lang="en"><a name="id2805927"></a><h2>END-USER SEQUENCE</h2><p>
--      From most CDEnext applications, printing is accomplished by bringing
--      down the File menu and selecting Print....  This will result in
--      the DtPrintSetupBox dialog, which will request the name of a printer,
--      and offer limited capability to configure print options (e.g. number
--      of copies).  If the user wishes, they can select Setup..., which
--      will start a dtpdm capable of modifying additional print options.
--      Finally, the user should select Print.
--    </p></div><div class="refsect1" lang="en"><a name="id2805949"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">${XPCONFIGDIR}</tt></span></dt><dd><p> This environment variable points to the  root
--          of  the Xprint server configuration directory hierarchy.
--          If the variable is not defined,  the  default
--          path  is be assumed.  The default path may be
--            <tt class="filename">/usr/X11R6/lib/X11/xserver/</tt>, 
--            <tt class="filename">/usr/lib/X11/xserver/</tt>,
--            <tt class="filename">/usr/share/Xprint/xserver/</tt> or
--            <tt class="filename">/usr/openwin/server/etc/XpConfig</tt>, depending on the
--          system, and may be configured in <tt class="filename">/etc/init.d/xprint</tt>.</p></dd><dt><span class="term"><tt class="envar">${LANG}</tt></span></dt><dd><p>
--            This environment variable selects the locale settings used by the Xprint server.
--            Xprt allows language-specific settings (stored in <tt class="filename">${XPCONFIGDIR}/${LANG}/print/</tt>)
--            which will override the default settings (stored in <tt class="filename">${XPCONFIGDIR}/C/print/</tt>).
--            If <tt class="envar">${LANG}</tt> is not set &quot;C&quot; is assumed.
--          </p></dd><dt><span class="term"><tt class="envar">${XPSERVERLIST}</tt></span></dt><dd xmlns:ns7=""><p>The environment variable <tt class="envar">${XPSERVERLIST}</tt> contains a list
--          of display identifiers (separated by whitespace) which tell an
--          application where it can find the Xprint servers.  Usually
--          <tt class="envar">${XPSERVERLIST}</tt> is set by the profile startup scripts (e.g.
--          <tt class="filename">/etc/profile</tt> or <tt class="filename">/etc/profile.d/xprint.sh</tt>) using the output of
--          <b class="userinput"><tt>/etc/init.d/xprint get_xpserverlist</tt></b>.</p><p>Example: 
--          </p><div class="informalexample"><pre class="programlisting">
--              export XPSERVERLIST=&quot;`/etc/init.d/xprint get_xpserverlist`&quot;</pre></div><p>Alternatively <tt class="envar">${XPSERVERLIST}</tt> can be set
--          manually. Example:</p><div class="informalexample"><pre class="programlisting">
--              export XPSERVERLIST=&quot;littlecat:80 bitdog:72&quot;</pre></div><p>
--          instructs an application to find an Xprint server at display
--          80 on the machine &quot;littlecat&quot; and at display 72 on the
--          machine bigdog.
--        </p></dd><dt><span class="term"><tt class="envar">${XPRINTER}</tt></span></dt><dd xmlns:ns8=""><p>The environment variable <tt class="envar">${XPRINTER}</tt>
--          defines the default printer used by print
--          applications. The syntax is either
--          <i class="replaceable"><tt>printername</tt></i> or
--          <i class="replaceable"><tt>printername</tt></i>@<i class="replaceable"><tt>display</tt></i>.</p><p>Examples:
--          </p><div class="variablelist"><dl><dt><span class="term"><b class="userinput"><tt>XPRINTER=ps003</tt></b></span></dt><dd><p>
--                tells an application to look for the
--                first printer named &quot;ps003&quot; on all Xprint
--                servers.</p></dd><dt><span class="term"><b class="userinput"><tt>XPRINTER=hplaser19@littlecat:80</tt></b></span></dt><dd><p>
--                tells an application to use the printer &quot;hplaser19&quot;
--              on the Xprint server at display 
--                &quot;littlecat:80&quot;.</p></dd></dl></div><p>If <tt class="envar">${XPRINTER}</tt> is not set the applications
--          will examine the values of the <tt class="envar">${PDPRINTER}</tt>,
--          <tt class="envar">${LPDEST}</tt>, and 
--          <tt class="envar">${PRINTER}</tt> environment variables (in that order).  
--        </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2806168"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xprehashprinterlist</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div><div class="refsect1" lang="en"><a name="id2806340"></a><h2>AUTHORS</h2><p>
--      This manual page was written by 
--      Roland Mainz <tt class="email">&lt;<a href="mailto:roland.mainz@nrubsig.org">roland.mainz@nrubsig.org</a>&gt;</tt> based on the original X11R6.6
--      <tt class="filename">xc/programs/Xserver/XpConfig/README</tt>.
--    </p></div></div></body></html>
-Index: programs/Xserver/Xprint/Xprint.man
-===================================================================
-RCS file: programs/Xserver/Xprint/Xprint.man
-diff -N programs/Xserver/Xprint/Xprint.man
---- programs/Xserver/Xprint/Xprint.man 29 Jun 2004 17:10:13 -0000      1.3
-+++ /dev/null  1 Jan 1970 00:00:00 -0000
-@@ -1,415 +0,0 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "Xprint" "__miscmansuffix__" "29 June 2004" "" ""
--.SH NAME
--Xprint \- The \&"X print service\&" - a portable, network-transparent printing system based on the X11 protocol
--.SH SYNOPSIS
--.PP
--Xprint is a very flexible, extensible, scaleable, client/server
--print system based on ISO 10175 (and some other specs) and the X11        
--rendering protocol.                                                       
--Using Xprint an application can search, query and use devices like        
--printers, FAX machines or create documents in formats like PDF.           
--In particular, an application can seek a printer, query supported         
--attributes (like paper size, trays, fonts etc.), configure the printer    
--device to match its needs and print on it like on any other X device     
--reusing parts of the code which is used for the video card Xserver.    
--.SH "OVERVIEW"
--.PP
--The "X Print Service" technology allows X rendering to devices such as
--printers and fax.  Most of the service is available in the X11
--technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
--Modifications have also been made to the LessTif/Motif/Qt technology
--stacks to support Xprint.
--.PP
--The Xp portion consists of:
--.TP 0.2i
--\(bu
--Xp Extension for the X-Server (included in the X-Server Xprt)
--.TP 0.2i
--\(bu
--Xp Extension API for the client side (libXp/libXprintUtils)
--.TP 0.2i
--\(bu
--PCL ddx driver that converts core X to native PCL
--.TP 0.2i
--\(bu
--PDF ddx driver that converts core X to native PDF
--.TP 0.2i
--\(bu
--PostScript ddx driver that converts core X to native PostScript
--.TP 0.2i
--\(bu
--Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters
--.PP
--From an X clients perspective, it can attach to one of two nearly
--identical X-Servers, a "Video" X-Server, and a "Print" X-Server
--which has the additional Xp capability but otherwise looks and
--behaves the same.   
--.SH "HOW THE X PRINT SERVICE WORKS"
--.PP
--The X Print Service expands on the traditional X-Server and Xlib world
--in four ways.
--.TP 1. 
--Most obvious is the use of "print ddx drivers" instead of
--"video ddx drivers".  While a video ddx driver modifies pixels
--in a video frame buffer, a print ddx driver generates "page
--description language (PDL)" output (such as PCL, PDF or PostScript)
--or sends the print rendering instructions to a platform-specific
--print API (like Win32/GDI).
--
--Once a print ddx driver generates PDL output, it can be sent to
--a spooler such as \fBlp\fR(1)
--or retrieved by the client (to implement functionality like "print-to-file").
--
--Though not currently done, a single X-Server can support both
--print and video ddx drivers.
--.TP 2. 
--Since printers support "paged" output, unlike video, a portion
--of the Xp Extension supports APIs to delineate printed output.
--For example, \fBXpStartPage\fR and \fBXpEndPage\fR tell the X-Server where
--a physical page starts and ends in an otherwise continuous
--stream of X rendering primitives.  Likewise, \fBXpStartJob\fR and
--\fBXpEndJob\fR determine when a collection of pages starts and ends.
--\fBXpEndJob\fR typically causes the generated PDL to be submitted to
--a spooler, such as \fBlp\fR(1).
--.TP 3. 
--Since printers have extensive capabilities, another portion of
--the Xp Extension supports APIs to manipulate "print contexts".
--
--Once a printer is selected using the Xp Extension API, a print
--context to represent it can be created.  A print context
--embodies the printer selected - it contains the printer's
--default capabilities, selectable range of capabilities,
--printer state, and generated output.  Some "attributes" within
--the print context can be modified by the user, and the
--X-Server and print ddx driver will react accordingly.  For
--example, the attribute "content-orientation" can be set to
--"landscape" or "portrait" (if the printer supports these 
--values - which can be queried using the Xprint API as well).
--.TP 4. 
--Since printers can have "built in" fonts, the Xp Extension in
--the X-Server works with the print ddx drivers to make
--available (for printing only) additional fonts on a per print
--context basis.
--
--When a print context is created and set for a given printer,
--the X font calls may be able to access additional printer
--fonts.  To do this (typically), the X-Server must have access
--to "printer metric files" (.pmf) that describe at minimum the
--metrics of the built in fonts.
--.SH "USAGE"
--.PP
--There are three tasks to start the X Print Service:
--.TP 1. 
--configuring the X Print Server,
--.TP 2. 
--starting the X Print Service
--.TP 3. 
--configuring the user session so that clients can find the running X Print Service
--.PP
--The tasks are described in detail below.
--.SH "SERVER CONFIGURATION"
--.PP
--The X Print Server (Xprt) can read a number of configuration files which
--control its behavior and support for printers.  Each vendor platform has
--a default location for this information.  Xprt can also read the
--environment variable \fBXPCONFIGDIR\fR to locate alternate configuration
--directories.  Common settings include:
--
--export XPCONFIGDIR=/X11/lib/X11/XpConfig/
--
--export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/
--.PP
--Xprt has many built-in defaults, and lacking any configuration files,
--will immediately try to support all printers visible via \fBlpstat\fR(1).
--.PP
--In order of importance for configuration by a system administrator, the
--configuration files for a "C" locale are as follows (see \fBXprt\fR(__mansuffix__) for more
--details (including support for non-"C" locales)):
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/Xprinters\fB\fR
--\&'Xprinters' is the top most configuration file.  It tells
--Xprt which specific printer names (e.g.  mylaser) should
--be supported, and whether \fBlpstat\fR(1) or other commands
--should be used to automatically supplement the list of
--printers.
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/attributes/printer\fB\fR
--The 'printer' file maps printer names to model
--configurations (see 'model-config' below).  For example,
--"mylaser" could be mapped to a "HPDJ1600C", and all other
--arbitrary printers could be mapped to a default, such as
--"HPLJ4SI".  When depending on \fBlpstat\fR(1) in the Xprinters
--file, setting up defaults in 'printer' becomes all the
--more important.
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/attributes/document\fB\fR
--The 'document' file specifies the initial document values
--for any print jobs.  For example, which paper tray to
--use, what default resolution, etc.
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/attributes/job\fB\fR
--The 'job' file specifies the initial job values for any
--print jobs.  For example, "notification-profile" can be
--set so that when a print job is successfully sent to a
--printer, e-mail is sent to the user.
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/models/PSdefault/model-config\fB\fR
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir\fB\fR
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf\fB\fR
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf\fB\fR
--The 'model-config' file has attributes that describe the
--printer models capabilities and default settings.
--Printer model fonts may also be present.  The model-config
--file also identifies the print ddx driver to be used.
--For each printer model supported, a complete hierarchy of
--files should exist.  In most cases, these files do not
--need to be modified.
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/ddx-config/raster/pcl\fB\fR
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/ddx-config/raster/pdf\fB\fR
--.TP
--\fB\fI${XPCONFIGDIR}/C/print/ddx-config/raster/postscript\fB\fR
--The print ddx drivers can have highly specific
--configuration files to control their behavior.  In most
--cases, these files do not need to be modified.
--More information in how to configure and customize the X print server can be found in the
--\fBXprt\fR(__mansuffix__)
--manual page.
--.SH "STARTING UP"
--.PP
--The summary checklist for starting the X Print Service is as follows:
--.TP 1. 
--Choose an execution model for the X Print Service.  The X
--Print Service can be run on a per-user session basis, per
--machine basis, or can be run on a few machines globally
--available to a number of users.
--.TP 2. 
--If print jobs are to be submitted to a spooler (almost always
--the case), make sure all needed printers are available to the
--spooler subsystem (most often \fBlp\fR(1))
--on the same machine running the X Print Service.
--.TP 3. 
--Configure the X Print Server.  See ``X Print Server
--Configuration''.
--.TP 4. 
--Depending on #1, start the X Print Server process "Xprt", and
--then the toolkit-specific Print Dialog Manager Daemon process
--(such as CDEnext's "dtpdmd") at the appropriate times.
--Note that libXprintUtils-based applications/toolkits do not need
--a Print Dialog Manager Daemon process to use Xprint.
--The details are described below.
--.PP
--Because the X Print Service is based on X, it can be easily distributed.
--The most significant factors in which execution model to choose will be
--driven by:
--.TP 0.2i
--\(bu
--how many printers will be accessable through the printer
--subsystem on any given machine.  A system administrator may
--choose to cluster printers on a few given machines, or
--scatter them across an organization and possibly make
--extensive use of remote spoolers to make them globally
--available.
--.TP 0.2i
--\(bu
--how many machines will need a copy of the X Print Server
--configuration files.  The files have been architected so
--that one super-set version of them can be maintained and
--distributed (e.g.  via NFS), and a per-machine or per-user
--version of the `Xprinters' is all that is needed to have the
--appropriate information in them utilized or ignored.
--.TP 0.2i
--\(bu
--how many users can demand services from a given X Print
--Service.
--With the above in mind, some obvious execution models include:
--.TP 0.2i
--\(bu
--Global - in this model, the system administrator is choosing
--to run the X Print Service on a *few* select machines with
--appropriate printers configured, and allow clients access to
--the global resource.  This can centralize the administration
--of printers and configuration files, but may have to be
--monitored for performance loading.
--
--Startup would likely be done by boot-up scripts (such as \fI/etc/init.d/xprint\fR).
--.TP 0.2i
--\(bu
--Per-machine - every machine with potential X Print Service
--users would run the service.  Printer and configuration file
--administration is decentralized, and usage would be limited
--to the users on the machine.
--
--Startup would likely be done by boot-up scripts (such as \fI/etc/init.d/xprint\fR).
--.TP 0.2i
--\(bu
--Per-user session - every user would run an entire X Print
--Service for themselves.  In the future, the Video X Server
--normally started may contain Print X Server capability, so
--this model becomes very natural.
--
--Startup would likely be done at session login or by
--launching actions or processes manually once the user
--logs in.  Note: Deamons like "dtpdmd" must be started after Xprt.
--.PP
--Starting of the processes is straight forward.  In strict order (example is for manually starting the X print server for CDEnext usage):
--.TP 1. 
--
--.nf
--[machineA] % Xprt [-XpFile Xprinters file] [:dispNum] 
--.fi
--
--Note that Xprt will look for configuration files in either
--a default location or where \fBXPCONFIGDIR\fR points.
--
--\fB-XpFile\fR specifies an alternate `Xprinters' file, rather
--than the default one or `\fI${XPCONFIGDIR}/C/print/Xprinters\fR'.
--.TP 2. 
--
--.nf
--[machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] 
--.fi
--
--The dtpdmd will maintain an X-Selection on the X-Server,
--and will start dtpdm's as required to service requests.
--.PP
--In all but the per-user session model, the machine running the dtpdmd
--(thus dtpdm's) will need display authorization to the users video
--display.
--.SH "CLIENT CONFIGURATION"
--.PP
--Once a X Print Server and dtpdmd have been started -- many of them
--in some cases -- clients will need to find and use them.  There are
--two mechanisms that allow clients to discover X Print Servers and
--printers.
--.TP 0.2i
--\(bu
--"X Print Specifier" - assuming usage of the DtPrint/XprintUtils-based print
--applications, the following notation is understood:
--
--
--.nf
--printer_name@machine[:dispNum]
--.fi
--
--For example:
--
--
--.nf
--colorlj7@printhub:2
--.fi
--
--In the above example, the X Print Server running at `printhub:2'
--is assumed to support the printer named `colorlj7'.
--.TP 0.2i
--\(bu
--\fB${XPSERVERLIST}\fR - assuming usage of the DtPrint print dialogs,
--the environment variable \fB${XPSERVERLIST}\fR can contain a list
--of X Print Servers.  For example:
--
--
--.nf
--XPSERVERLIST="printhub:2 printhub:3 otherdept:0"
--.fi
--
--Then in the dialogs, only a printer name needs to be entered.
--The dialog will then search the X Print Servers in \fB${XPSERVERLIST}\fR
--for a server than supports the printer, and then establish
--contact.
--.SH "END-USER SEQUENCE"
--.PP
--From most CDEnext applications, printing is accomplished by bringing
--down the File menu and selecting Print....  This will result in
--the DtPrintSetupBox dialog, which will request the name of a printer,
--and offer limited capability to configure print options (e.g. number
--of copies).  If the user wishes, they can select Setup..., which
--will start a dtpdm capable of modifying additional print options.
--Finally, the user should select Print.
--.SH "ENVIRONMENT"
--.TP
--\fB${XPCONFIGDIR}\fR
--This environment variable points to the  root
--of  the Xprint server configuration directory hierarchy.
--If the variable is not defined,  the  default
--path  is be assumed.  The default path may be
--\fI/usr/X11R6/lib/X11/xserver/\fR, 
--\fI/usr/lib/X11/xserver/\fR,
--\fI/usr/share/Xprint/xserver/\fR or
--\fI/usr/openwin/server/etc/XpConfig\fR, depending on the
--system, and may be configured in \fI/etc/init.d/xprint\fR.
--.TP
--\fB${LANG}\fR
--This environment variable selects the locale settings used by the Xprint server.
--Xprt allows language-specific settings (stored in \fI${XPCONFIGDIR}/${LANG}/print/\fR)
--which will override the default settings (stored in \fI${XPCONFIGDIR}/C/print/\fR).
--If \fB${LANG}\fR is not set "C" is assumed.
--.TP
--\fB${XPSERVERLIST}\fR
--The environment variable \fB${XPSERVERLIST}\fR contains a list
--of display identifiers (separated by whitespace) which tell an
--application where it can find the Xprint servers.  Usually
--\fB${XPSERVERLIST}\fR is set by the profile startup scripts (e.g.
--\fI/etc/profile\fR or \fI/etc/profile.d/xprint.sh\fR) using the output of
--\fB/etc/init.d/xprint get_xpserverlist\fR.
--
--Example: 
--.PP
--
--.nf
--              export XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
--.fi
--
--Alternatively \fB${XPSERVERLIST}\fR can be set
--manually. Example:
--
--
--.nf
--              export XPSERVERLIST="littlecat:80 bitdog:72"
--.fi
--
--instructs an application to find an Xprint server at display
--80 on the machine "littlecat" and at display 72 on the
--machine bigdog.
--.TP
--\fB${XPRINTER} \fR
--The environment variable \fB${XPRINTER}\fR
--defines the default printer used by print
--applications. The syntax is either
--\fIprintername\fR or
--\fIprintername\fR@\fIdisplay\fR.
--
--Examples:
--.RS
--.TP
--\fBXPRINTER=ps003\fR
--tells an application to look for the
--first printer named "ps003" on all Xprint
--servers.
--.TP
--\fBXPRINTER=hplaser19@littlecat:80\fR
--tells an application to use the printer "hplaser19"
--on the Xprint server at display 
--"littlecat:80".
--.RE
--
--If \fB${XPRINTER}\fR is not set the applications
--will examine the values of the \fB${PDPRINTER}\fR,
--\fB${LPDEST}\fR, and 
--\fB${PRINTER}\fR environment variables (in that order).  
--.SH "SEE ALSO"
--.PP
--\fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__mansuffix__), \fBxprehashprinterlist\fR(__mansuffix__), \fBxphelloworld\fR(__mansuffix__), \fBxpxmhelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpxthelloworld\fR(__mansuffix__), \fBxpsimplehelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
--.SH "AUTHORS"
--.PP
--This manual page was written by 
--Roland Mainz <roland.mainz@nrubsig.org> based on the original X11R6.6
--\fIxc/programs/Xserver/XpConfig/README\fR.
-Index: programs/Xserver/Xprint/Xprint.sgml
-===================================================================
-RCS file: programs/Xserver/Xprint/Xprint.sgml
-diff -N programs/Xserver/Xprint/Xprint.sgml
---- programs/Xserver/Xprint/Xprint.sgml        29 Jun 2004 17:10:13 -0000      1.3
-+++ /dev/null  1 Jan 1970 00:00:00 -0000
-@@ -1,627 +0,0 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
--
--<!-- Process this file with docbook-to-man to generate an nroff manual
--     page: 'docbook-to-man manpage.sgml > manpage.1'.  You may view
--     the manual page with: 'docbook-to-man manpage.sgml | nroff -man | less'. 
--     A typical entry in a Makefile or Makefile.am is:
--
--manpage.1: manpage.sgml
--      docbook-to-man $< > $@
--
--HTML generation can be done like this:
--% xsltproc ==docbook /usr/share/sgml/docbook/docbook-xsl-stylesheets-1.60.1/html/docbook.xsl Xprint.sgml >Xprint.html
--  -->
--
--<refentry id="Xprint">
--  <refmeta>
--    <refentrytitle>Xprint</refentrytitle>
--    <manvolnum>__miscmansuffix__</manvolnum>
--  </refmeta>
--  <refnamediv>
--    <refname>Xprint</refname>
--
--    <refpurpose>The "X print service" - a portable, network-transparent printing system based on the X11 protocol</refpurpose>
--  </refnamediv>
--  <refsynopsisdiv>
--    <para>Xprint is a very flexible, extensible, scaleable, client/server
--     print system based on ISO 10175 (and some other specs) and the X11        
--     rendering protocol.                                                       
--     Using Xprint an application can search, query and use devices like        
--     printers, FAX machines or create documents in formats like PDF.           
--     In particular, an application can seek a printer, query supported         
--     attributes (like paper size, trays, fonts etc.), configure the printer    
--     device to match it&rsquo;s needs and print on it like on any other X device     
--     reusing parts of the code which is used for the video card Xserver.    
--    </para>
--  </refsynopsisdiv>
--  
--  <refsect1>
--    <title>OVERVIEW</title>
--    <para>
--      The "X Print Service" technology allows X rendering to devices such as
--      printers and fax.  Most of the service is available in the X11
--      technology stack as Xp, with the remainder in single toolkit stacks (e.g. DtPrint for CDE).
--      Modifications have also been made to the LessTif/Motif/Qt technology
--      stacks to support Xprint.
--    </para>
--    <para>
--      The Xp portion consists of:
--      <itemizedlist>
--        <listitem><para>Xp Extension for the X-Server (included in the X-Server Xprt)</para></listitem>
--        <listitem><para>Xp Extension API for the client side (libXp/libXprintUtils)</para></listitem>
--        <listitem><para>PCL ddx driver that converts core X to native PCL</para></listitem>
--        <listitem><para>PDF ddx driver that converts core X to native PDF</para></listitem>
--        <listitem><para>PostScript ddx driver that converts core X to native PostScript</para></listitem>
--        <listitem><para>Raster ddx driver that generates xwd rasters which can be converted to PCL, PDF or PostScript rasters</para></listitem>
--      </itemizedlist>
--    </para>
--    <para>
--      From an X clients perspective, it can attach to one of two nearly
--      identical X-Servers, a "Video" X-Server, and a "Print" X-Server
--      which has the additional Xp capability but otherwise looks and
--      behaves the same.   
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>HOW THE X PRINT SERVICE WORKS</title>
--    <para>    
--      The X Print Service expands on the traditional X-Server and Xlib world
--      in four ways.
--
--      <orderedlist>
--        <listitem>
--          <para>
--            Most obvious is the use of "print ddx drivers" instead of
--            "video ddx drivers".  While a video ddx driver modifies pixels
--            in a video frame buffer, a print ddx driver generates "page
--            description language (PDL)" output (such as PCL, PDF or PostScript)
--            or sends the print rendering instructions to a platform-specific
--            print API (like Win32/GDI).
--          </para>
--          <para>
--            Once a print ddx driver generates PDL output, it can be sent to
--            a spooler such as <citerefentry><refentrytitle>lp</refentrytitle><manvolnum>1</manvolnum></citerefentry>
--            or retrieved by the client (to implement functionality like "print-to-file").
--          </para>
--          <para>
--            Though not currently done, a single X-Server can support both
--            print and video ddx drivers.
--            <!-- FIXME: IBM/AIX people have integrated Xprt into their main Xserver (currently experimental) ... -->
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            Since printers support "paged" output, unlike video, a portion
--            of the Xp Extension supports APIs to delineate printed output.
--            For example, <function>XpStartPage</function> and <function>XpEndPage</function> tell the X-Server where
--            a physical page starts and ends in an otherwise continuous
--            stream of X rendering primitives.  Likewise, <function>XpStartJob</function> and
--            <function>XpEndJob</function> determine when a collection of pages starts and ends.
--            <function>XpEndJob</function> typically causes the generated PDL to be submitted to
--            a spooler, such as <citerefentry><refentrytitle>lp</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            Since printers have extensive capabilities, another portion of
--            the Xp Extension supports APIs to manipulate "print contexts".
--          </para>
--          <para>
--            Once a printer is selected using the Xp Extension API, a print
--            context to represent it can be created.  A print context
--            embodies the printer selected - it contains the printer's
--            default capabilities, selectable range of capabilities,
--            printer state, and generated output.  Some "attributes" within
--            the print context can be modified by the user, and the
--            X-Server and print ddx driver will react accordingly.  For
--            example, the attribute "content-orientation" can be set to
--            "landscape" or "portrait" (if the printer supports these 
--            values - which can be queried using the Xprint API as well).
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            Since printers can have "built in" fonts, the Xp Extension in
--            the X-Server works with the print ddx drivers to make
--            available (for printing only) additional fonts on a per print
--            context basis.
--          </para>
--          <para>
--            When a print context is created and set for a given printer,
--            the X font calls may be able to access additional printer
--            fonts.  To do this (typically), the X-Server must have access
--            to "printer metric files" (.pmf) that describe at minimum the
--            metrics of the built in fonts.
--          </para>
--        </listitem>
--      </orderedlist>
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>USAGE</title>
--    <para>    
--      There are three tasks to start the X Print Service:
--      <orderedlist>
--        <listitem><para>configuring the X Print Server,</para></listitem>
--        <listitem><para>starting the X Print Service</para></listitem>
--        <listitem><para>configuring the user session so that clients can find the running X Print Service</para></listitem>
--      </orderedlist>
--    </para>
--    <para>
--      The tasks are described in detail below.
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>SERVER CONFIGURATION</title>
--    <para>
--      The X Print Server (Xprt) can read a number of configuration files which
--      control its behavior and support for printers.  Each vendor platform has
--      a default location for this information.  Xprt can also read the
--      environment variable <envar>XPCONFIGDIR</envar> to locate alternate configuration
--      directories.  Common settings include:
--
--      <simplelist type="vert">
--        <member>export XPCONFIGDIR=/X11/lib/X11/XpConfig/</member>
--        <member>export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/</member>
--      </simplelist>
--    </para>
--    <para>
--      Xprt has many built-in defaults, and lacking any configuration files,
--      will immediately try to support all printers visible via <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
--    </para>
--    <para>
--      In order of importance for configuration by a system administrator, the
--      configuration files for a "C" locale are as follows (see <citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry> for more
--      details (including support for non-"C" locales)):
--      <variablelist>
--        <varlistentry>
--          <term><filename>${XPCONFIGDIR}/C/print/Xprinters</filename></term>
--          <listitem>
--            <para>
--              'Xprinters' is the top most configuration file.  It tells
--              Xprt which specific printer names (e.g.  mylaser) should
--              be supported, and whether <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> or other commands
--              should be used to automatically supplement the list of
--              printers.
--            </para>
--          </listitem>
--        </varlistentry>
--
--        <varlistentry>
--          <term><filename>${XPCONFIGDIR}/C/print/attributes/printer</filename></term>
--          <listitem>
--            <para>
--              The 'printer' file maps printer names to model
--              configurations (see 'model-config' below).  For example,
--              "mylaser" could be mapped to a "HPDJ1600C", and all other
--              arbitrary printers could be mapped to a default, such as
--              "HPLJ4SI".  When depending on <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> in the Xprinters
--              file, setting up defaults in 'printer' becomes all the
--              more important.
--            </para>
--          </listitem>
--        </varlistentry>
--
--        <varlistentry>
--          <term><filename>${XPCONFIGDIR}/C/print/attributes/document</filename></term>
--          <listitem>
--            <para>
--              The 'document' file specifies the initial document values
--              for any print jobs.  For example, which paper tray to
--              use, what default resolution, etc.
--            </para>
--          </listitem>
--        </varlistentry>
--
--        <varlistentry>
--          <term><filename>${XPCONFIGDIR}/C/print/attributes/job</filename></term>
--          <listitem>
--            <para>
--              The 'job' file specifies the initial job values for any
--              print jobs.  For example, "notification-profile" can be
--              set so that when a print job is successfully sent to a
--              printer, e-mail is sent to the user.
--            </para>
--          </listitem>
--        </varlistentry>
--
--        <varlistentry>
--          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/model-config</filename></term>
--          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</filename></term>
--          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</filename></term>
--          <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</filename></term>
--
--          <listitem>
--            <para>
--              The 'model-config' file has attributes that describe the
--              printer model&rsquo;s capabilities and default settings.
--              Printer model fonts may also be present.  The model-config
--              file also identifies the print ddx driver to be used.
--
--              For each printer model supported, a complete hierarchy of
--              files should exist.  In most cases, these files do not
--              need to be modified.
--            </para>
--          </listitem>
--        </varlistentry>
--
--        <varlistentry>
--          <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</filename></term>
--          <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</filename></term>
--          <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</filename></term>
--
--          <listitem>
--            <para>
--              The print ddx drivers can have highly specific
--              configuration files to control their behavior.  In most
--              cases, these files do not need to be modified.
--            </para>
--          </listitem>
--        </varlistentry>
--      </variablelist>
--      
--      More information in how to configure and customize the X print server can be found in the
--      <citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry>
--      manual page.
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>STARTING UP</title>
--    <para>
--      The summary checklist for starting the X Print Service is as follows:
--      
--      <orderedlist>
--        <listitem>
--          <para>
--            Choose an execution model for the X Print Service.  The X
--            Print Service can be run on a per-user session basis, per
--            machine basis, or can be run on a few machines globally
--            available to a number of users.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            If print jobs are to be submitted to a spooler (almost always
--            the case), make sure all needed printers are available to the
--            spooler subsystem (most often <citerefentry><refentrytitle>lp</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
--            on the same machine running the X Print Service.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            Configure the X Print Server.  See ``X Print Server
--            Configuration''.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            Depending on #1, start the X Print Server process "Xprt", and
--            then the toolkit-specific Print Dialog Manager Daemon process
--            (such as CDEnext's "dtpdmd") at the appropriate times.
--            Note that libXprintUtils-based applications/toolkits do not need
--            a Print Dialog Manager Daemon process to use Xprint.
--          </para>
--        </listitem>
--      </orderedlist>     
--      The details are described below.
--    </para>
--    <para>
--      Because the X Print Service is based on X, it can be easily distributed.
--      The most significant factors in which execution model to choose will be
--      driven by:
--      <itemizedlist>
--        <listitem>
--          <para>
--            how many printers will be accessable through the printer
--            subsystem on any given machine.  A system administrator may
--            choose to cluster printers on a few given machines, or
--            scatter them across an organization and possibly make
--            extensive use of remote spoolers to make them globally
--            available.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            how many machines will need a copy of the X Print Server
--            configuration files.  The files have been architected so
--            that one super-set version of them can be maintained and
--            distributed (e.g.  via NFS), and a per-machine or per-user
--            version of the `Xprinters' is all that is needed to have the
--            appropriate information in them utilized or ignored.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            how many users can demand services from a given X Print
--            Service.
--          </para>
--        </listitem>
--      </itemizedlist>
--
--      With the above in mind, some obvious execution models include:
--      <itemizedlist>
--        <listitem>
--          <para>
--            Global - in this model, the system administrator is choosing
--            to run the X Print Service on a *few* select machines with
--            appropriate printers configured, and allow clients access to
--            the global resource.  This can centralize the administration
--            of printers and configuration files, but may have to be
--            monitored for performance loading.
--          </para>
--          <para>
--            Startup would likely be done by boot-up scripts (such as <filename>/etc/init.d/xprint</filename>).
--          </para>
--        </listitem>
--
--        <listitem>
--          <para>
--            Per-machine - every machine with potential X Print Service
--            users would run the service.  Printer and configuration file
--            administration is decentralized, and usage would be limited
--            to the users on the machine.
--          </para>
--          <para>
--            Startup would likely be done by boot-up scripts (such as <filename>/etc/init.d/xprint</filename>).
--          </para>
--        </listitem>
--
--        <listitem>
--          <para>
--            Per-user session - every user would run an entire X Print
--            Service for themselves.  In the future, the Video X Server
--            normally started may contain Print X Server capability, so
--            this model becomes very natural.
--          </para>
--          <para>
--            Startup would likely be done at session login or by
--            launching actions or processes manually once the user
--            logs in.  Note: Deamons like "dtpdmd" must be started after Xprt.
--          </para>
--        </listitem>
--      </itemizedlist>
--     </para>
--     <para>
--       Starting of the processes is straight forward.  In strict order (example is for manually starting the X print server for CDEnext usage):
--       <orderedlist>
--         <listitem>
--           <para>
--             <programlisting>[machineA] % Xprt [-XpFile &lt;Xprinters file&gt;] [:dispNum] &amp;</programlisting>
--           </para>
--           <para>
--             Note that Xprt will look for configuration files in either
--             a default location or where <envar>XPCONFIGDIR</envar> points.
--           </para>
--           <para>
--             <option>-XpFile</option> specifies an alternate `Xprinters' file, rather
--             than the default one or `<filename>${XPCONFIGDIR}/C/print/Xprinters</filename>'.
--           </para>
--         </listitem>
--         <listitem>
--           <para>
--             <programlisting>[machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] &amp;</programlisting>
--           </para>
--           <para>
--            The dtpdmd will maintain an X-Selection on the X-Server,
--            and will start dtpdm's as required to service requests.
--           </para>
--         </listitem>
--       </orderedlist>
--     </para>
--     <para>
--       In all but the per-user session model, the machine running the dtpdmd
--       (thus dtpdm's) will need display authorization to the users video
--       display.
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>CLIENT CONFIGURATION</title>
--    <para>
--      Once a X Print Server and dtpdmd have been started -- many of them
--      in some cases -- clients will need to find and use them.  There are
--      two mechanisms that allow clients to discover X Print Servers and
--      printers.
--
--      <itemizedlist>
--        <listitem>
--          <para>
--            "X Print Specifier" - assuming usage of the DtPrint/XprintUtils-based print
--            applications, the following notation is understood:
--          </para>
--          <para>
--            <programlisting>printer_name@machine[:dispNum]</programlisting>
--          </para>
--          <para>
--            For example:
--          </para>
--          <para>
--            <programlisting>colorlj7@printhub:2</programlisting>
--          </para>
--          <para>
--           In the above example, the X Print Server running at `printhub:2'
--           is assumed to support the printer named `colorlj7'.
--          </para>
--        </listitem>
--        <listitem>
--          <para>
--            <envar>${XPSERVERLIST}</envar> - assuming usage of the DtPrint print dialogs,
--            the environment variable <envar>${XPSERVERLIST}</envar> can contain a list
--            of X Print Servers.  For example:
--          </para>
--          <para>
--            <programlisting>XPSERVERLIST="printhub:2 printhub:3 otherdept:0"</programlisting>
--          </para>
--          <para>
--            Then in the dialogs, only a printer name needs to be entered.
--            The dialog will then search the X Print Servers in <envar>${XPSERVERLIST}</envar>
--            for a server than supports the printer, and then establish
--            contact.
--          </para>
--        </listitem>
--      </itemizedlist>
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>END-USER SEQUENCE</title>
--    <para>
--      From most CDEnext applications, printing is accomplished by bringing
--      down the &lt;File&gt; menu and selecting &lt;Print...&gt;.  This will result in
--      the DtPrintSetupBox dialog, which will request the name of a printer,
--      and offer limited capability to configure print options (e.g. number
--      of copies).  If the user wishes, they can select &lt;Setup...&gt;, which
--      will start a dtpdm capable of modifying additional print options.
--      Finally, the user should select &lt;Print&gt;.
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>ENVIRONMENT</title>
--    <variablelist>
--      <varlistentry>
--        <term><envar>${XPCONFIGDIR}</envar></term>
--        <listitem>
--          <para> This environment variable points to the  root
--          of  the Xprint server configuration directory hierarchy.
--          If the variable is not defined,  the  default
--          path  is be assumed.  The default path may be
--            <filename>/usr/X11R6/lib/X11/xserver/</filename>, 
--            <filename>/usr/lib/X11/xserver/</filename>,
--            <filename>/usr/share/Xprint/xserver/</filename> or
--            <filename>/usr/openwin/server/etc/XpConfig</filename>, depending on the
--          system, and may be configured in <filename>/etc/init.d/xprint</filename>.</para>
--        </listitem>
--      </varlistentry>
--
--      <varlistentry>
--        <term><envar>${LANG}</envar></term>
--        <listitem>
--          <para>
--            This environment variable selects the locale settings used by the Xprint server.
--            Xprt allows language-specific settings (stored in <filename>${XPCONFIGDIR}/${LANG}/print/</filename>)
--            which will override the default settings (stored in <filename>${XPCONFIGDIR}/C/print/</filename>).
--            If <envar>${LANG}</envar> is not set "C" is assumed.
--          </para>
--        </listitem>
--      </varlistentry>
--      
--      <varlistentry>
--        <term><envar>${XPSERVERLIST}</envar></term>
--        <listitem>
--          <para>The environment variable <envar>${XPSERVERLIST}</envar> contains a list
--          of display identifiers (separated by whitespace) which tell an
--          application where it can find the Xprint servers.  Usually
--          <envar>${XPSERVERLIST}</envar> is set by the profile startup scripts (e.g.
--          <filename>/etc/profile</filename> or <filename>/etc/profile.d/xprint.sh</filename>) using the output of
--          <userinput>/etc/init.d/xprint get_xpserverlist</userinput>.</para>
--        <para>Example: 
--          <informalexample>
--            <programlisting>
--              export XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"</programlisting>
--          </informalexample>
--        </para>
--        <para>Alternatively <envar>${XPSERVERLIST}</envar> can be set
--          manually. Example:</para>
--          <informalexample>
--            <programlisting>
--              export XPSERVERLIST="littlecat:80 bitdog:72"</programlisting>
--          </informalexample>
--        <para>
--          instructs an application to find an Xprint server at display
--          80 on the machine "littlecat" and at display 72 on the
--          machine bigdog.
--        </para>
--      </listitem>
--      </varlistentry>
--
--      <varlistentry>
--        <term><envar>${XPRINTER}</envar>
--        </term>
--        <listitem>
--          <para>The environment variable <envar>${XPRINTER}</envar>
--          defines the default printer used by print
--          applications. The syntax is either
--          <replaceable>printername</replaceable> or
--          <replaceable>printername</replaceable>@<replaceable>display</replaceable>.</para>
--          <para>Examples:
--          <variablelist>
--            <varlistentry>
--              <term><userinput>XPRINTER=ps003</userinput></term>
--              <listitem><para>
--                tells an application to look for the
--                first printer named "ps003" on all Xprint
--                servers.</para>
--              </listitem>
--            </varlistentry>
--      
--            <varlistentry>
--              <!-- brain dead <term> does not permit quote marks
--              (in XPRINTER="hplaser19@littlecat:80"), so omit them -->
--              <term><userinput>XPRINTER=hplaser19@littlecat:80</userinput></term>
--              <listitem><para>
--                tells an application to use the printer "hplaser19"
--              on the Xprint server at display 
--                "littlecat:80".</para>
--            </listitem>
--            </varlistentry>
--
--          </variablelist>
--        </para>
--        <para>If <envar>${XPRINTER}</envar> is not set the applications
--          will examine the values of the <envar>${PDPRINTER}</envar>,
--          <envar>${LPDEST}</envar>, and 
--          <envar>${PRINTER}</envar> environment variables (in that order).  
--        </para>
--        </listitem>
--      </varlistentry>
--    </variablelist>
--  </refsect1>
--
--  <refsect1>
--    <title>SEE ALSO</title>
--    <para>
--      <simplelist type="inline">
--        <!-- specific references -->
--        <!-- none -->
--        
--        <!-- Xprint general references -->
--<!--
--        <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
---->
--        <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
--        <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>libXprintAppUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>XmPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>XawPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
--        <member>Xprint FAQ (<ulink url="http://xprint.mozdev.org/docs/Xprint_FAQ.html">http://xprint.mozdev.org/docs/Xprint_FAQ.html</ulink>)</member>
--        <member>Xprint main site (<ulink url="http://xprint.mozdev.org/">http://xprint.mozdev.org/</ulink>)</member>
--      </simplelist>
--    </para>
--  </refsect1>
--
--  <refsect1>
--    <title>AUTHORS</title>
--    <para>
--      This manual page was written by 
--      Roland Mainz <email>roland.mainz@nrubsig.org</email> based on the original X11R6.6
--      <filename>xc/programs/Xserver/XpConfig/README</filename>.
--    </para>
--  </refsect1>
--</refentry>
--
-Index: programs/Xserver/Xprint/Xprt.html
-===================================================================
-RCS file: programs/Xserver/Xprint/Xprt.html
-diff -N programs/Xserver/Xprint/Xprt.html
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/Xserver/Xprint/Xprt.html  15 Dec 2004 07:38:29 -0000      1.2.2.1
-@@ -0,0 +1,115 @@
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Xprt</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="Xprt"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>Xprt &#8212; Print server for X Version 11</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">Xprt</tt>  [<tt class="option">-ac</tt>] [<tt class="option">-audit <i class="replaceable"><tt>level</tt></i></tt>] [<tt class="option">-pn</tt>] [<tt class="option">-fp <i class="replaceable"><tt>fontpath</tt></i></tt>] [<tt class="option">-XpFile <i class="replaceable"><tt>file</tt></i></tt>] [<tt class="option">-XpSpoolerType <i class="replaceable"><tt>spoolername</tt></i></tt>] [<tt class="option">:<i class="replaceable"><tt>display</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2804962"></a><h2>DESCRIPTION</h2><p><span><b class="command">Xprt</b></span> is the Xprint print server
-+      for version 11 of the X Window system for non display devices
-+      such as printers and fax machines.</p><p>Xprint is an advanced printing system which enables X11
-+      applications to use devices like printers, FAX or create
-+      documents in formats like PostScript, PCL or PDF.  It may be used by
-+      clients such as <span class="application">mozilla</span>.
-+    </p><p>Xprint is a very flexible, extensible, scaleable, client/server
-+     print system based on ISO 10175 (and some other specs) and the X11        
-+     rendering protocol.                                                       
-+     Using Xprint an application can search, query and use devices like        
-+     printers, FAX machines or create documents in formats like PDF.           
-+     In particular, an application can seek a printer, query supported         
-+     attributes (like paper size, trays, fonts etc.), configure the printer    
-+     device to match it's needs and print on it like on any other X device     
-+     reusing parts of the code which is used for the video card Xserver.
-+    </p></div><div xmlns:ns1="" class="refsect1" lang="en"><a name="id2805117"></a><h2>USAGE</h2><p>
-+      Although Xprt may be invoked from the command line, it is
-+      preferable to run it as a daemon via the init script
-+      <tt class="filename">/etc/init.d/xprint</tt> (where this script exists).
-+    </p><p>Client programs such as mozilla will require environment
-+      variable <tt class="envar">${XPSERVERLIST}</tt> to be set, identifying the
-+      &quot;display&quot; on which Xprt is running.  This variable may be set
-+      for all users via <tt class="filename">/etc/profile</tt> (or similar), using
-+      <b class="userinput"><tt>/etc/init.d/xprint get_xpserverlist</tt></b>:
-+      </p><div class="informalexample"><pre class="programlisting">export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`</pre></div></div><div class="refsect1" lang="en"><a name="id2805150"></a><h2>OPTIONS</h2><p>Many of Xprt's command line options are shared in common
-+    with the usual X servers (see <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>).
-+    Commonly used options include:</p><div class="variablelist"><dl><dt><span class="term"><tt class="option">:<i class="replaceable"><tt>display</tt></i></tt></span></dt><dd><p> The X server runs on the given display. If multiple X
-+               servers are to run simultaneously on a host, each must
-+               have a unique display number.  Note that the standard X
-+               server (for video displays) typically runs on display
-+               :0.  If <tt class="filename">/etc/init.d/xprint</tt> is used
-+               to invoke Xprt, it may be configured to automatically assign an available
-+               display number.</p></dd><dt><span class="term"><tt class="option">-ac</tt></span></dt><dd><p>disables host-based access control mechanisms.  Enables  access
-+               by  any host, and permits any host to modify the access control
-+               list.  Use with extreme caution.  This option exists  primarily
-+               for running test suites remotely.</p></dd><dt><span class="term"><tt class="option">-audit <i class="replaceable"><tt>level</tt></i></tt></span></dt><dd><p>sets  the  audit  trail level.  The default level is 1, meaning
-+               only connection rejections are reported.  Level 2  additionally
-+               reports  all  successful  connections and disconnects.  Level 4
-+               enables messages  from  the  SECURITY  extension,  if  present,
-+               including  generation  and  revocation  of  authorizations  and
-+               violations of the security policy.  Level 0 turns off the audit
-+               trail.  Audit lines are sent as standard error output.</p></dd><dt><span class="term"><tt class="option">-fp <i class="replaceable"><tt>fontpath</tt></i></tt></span></dt><dd><p>sets the search path for fonts.  This path is a comma
-+               separated list of directories which Xprt searches for
-+               font databases.</p></dd><dt><span class="term"><tt class="option">-pn</tt></span></dt><dd><p>permits the server to continue running if it fails to
-+               establish all of its well-known sockets (connection
-+               points for clients), but establishes at least
-+               one.</p></dd><dt><span class="term"><tt class="option">-XpFile <i class="replaceable"><tt>file</tt></i></tt></span></dt><dd><p>Sets an altername Xprinters file (see section FILES).</p></dd><dt><span class="term"><tt class="option">-XpSpoolerType <i class="replaceable"><tt>spoolername</tt></i></tt></span></dt><dd xmlns:ns2=""><p>
-+            Defines the spooler system to be used for print job spooling.
-+            Supported values in xprint.mozdev.org release 009 are:
-+            </p><table class="simplelist" border="0" summary="Simple list"><tr><td>aix</td></tr><tr><td>aix4</td></tr><tr><td>bsd</td></tr><tr><td>osf</td></tr><tr><td>solaris</td></tr><tr><td>sysv</td></tr><tr><td>uxp</td></tr><tr><td>cups</td></tr><tr><td>lprng</td></tr><tr><td>other</td></tr><tr><td>none</td></tr></table><p>
-+            (multiple values can be specified, seperated by ':', the first active spooler will be chosen).
-+            The default value is platform-specific and can be obtained via
-+            </p><pre class="programlisting">Xprt -h</pre><p>.
-+          </p></dd></dl></div></div><div xmlns:ns3="" class="refsect1" lang="en"><a name="id2805336"></a><h2>ENVIRONMENT</h2><p>
-+      The following environment variables are recognized by the X print server
-+      (environment variables recognized by Xprint clients are described in 
-+      <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>):
-+
-+      </p><div class="variablelist"><dl><dt><span class="term"><tt class="envar">${XPCONFIGDIR}</tt></span></dt><dd><p> This environment variable points to the  root
-+            of  the Xprint server configuration directory hierarchy.
-+            If the variable is not defined,  the  default
-+            path  is be assumed.  The default path may be
-+              <tt class="filename">/usr/X11R6/lib/X11/xserver/</tt>, 
-+              <tt class="filename">/usr/lib/X11/xserver/</tt>,
-+              <tt class="filename">/usr/share/Xprint/xserver/</tt> or
-+              <tt class="filename">/usr/openwin/server/etc/XpConfig</tt>, depending on the
-+            system, and may be configured in <tt class="filename">/etc/init.d/xprint</tt>.</p></dd><dt><span class="term"><tt class="envar">${LANG}</tt></span></dt><dd><p>
-+              This environment variable selects the locale settings used by the Xprint server.
-+              Xprt allows language-specific settings (stored in <tt class="filename">${XPCONFIGDIR}/${LANG}/print/</tt>)
-+              which will override the default settings (stored in <tt class="filename">${XPCONFIGDIR}/C/print/</tt>).
-+              If <tt class="envar">${LANG}</tt> is not set &quot;C&quot; is assumed.
-+            </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805421"></a><h2>FILES</h2><div class="variablelist"><dl><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/Xprinters</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/Xprinters</tt></span></dt><dd><p>
-+            `Xprinters' is the top most configuration file.  It tells
-+            Xprt which specific printer names (e.g.  mylaser) should
-+            be supported, and whether <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> or other commands
-+            should be used to automatically supplement the list of
-+            printers.
-+          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/attributes/printer</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/printer</tt></span></dt><dd><p>
-+            The `printer' file maps printer names to model
-+            configurations (see `model-config' below).  For example,
-+            &quot;mylaser&quot; could be mapped to a &quot;HPDJ1600C&quot;, and all other
-+            arbitrary printers could be mapped to a default, such as
-+            &quot;HPLJ4SI&quot;.  When depending on <span class="citerefentry"><span class="refentrytitle">lpstat</span>(1)</span> in the Xprinters
-+            file, setting up defaults in `printer' becomes all the
-+            more important.
-+          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/attributes/document</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/document</tt></span></dt><dd><p>
-+            The `document' file specifies the initial document values
-+            for any print jobs.  For example, which paper tray to
-+            use, what default resolution, etc.
-+          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/${LANG}/print/attributes/job</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/attributes/job</tt></span></dt><dd><p>
-+            The `job' file specifies the initial job values for any
-+            print jobs.  For example, &quot;notification-profile&quot; can be
-+            set so that when a print job is successfully sent to a
-+            printer, e-mail is sent to the user.
-+          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/model-config</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</tt></span></dt><dd><p>
-+            The `model-config' file has attributes that describe the
-+            printer model's capabilities and default settings.
-+            Printer model fonts may also be present.  The model-config
-+            file also identifies the print ddx driver to be used.
-+
-+            For each printer model supported, a complete hierarchy of
-+            files should exist.  In most cases, these files do not
-+            need to be modified.
-+          </p></dd><dt><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</tt>, </span><span class="term"><tt class="filename">${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</tt></span></dt><dd><p>
-+            The print ddx drivers can have highly specific
-+            configuration files to control their behavior.  In most
-+            cases, these files do not need to be modified.
-+          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805584"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xprehashprinterlist</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div><div class="refsect1" lang="en"><a name="id2805757"></a><h2>AUTHORS</h2><p>
-+      This manual page was written by 
-+      Drew Parsons <tt class="email">&lt;<a href="mailto:dparsons@debian.org">dparsons@debian.org</a>&gt;</tt> and
-+      Roland Mainz <tt class="email">&lt;<a href="mailto:roland.mainz@nrubsig.org">roland.mainz@nrubsig.org</a>&gt;</tt>,
-+      with some help from the man page at
-+      <a href="http://www.sins.com.au/unix/manpages/Xprt.html" target="_top">http://www.sins.com.au/unix/manpages/Xprt.html</a> and the XFree86
-+      man page for <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1)</span>.
-+    </p></div></div></body></html>
-Index: programs/Xserver/Xprint/Xprt.man
-===================================================================
-RCS file: programs/Xserver/Xprint/Xprt.man
-diff -N programs/Xserver/Xprint/Xprt.man
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/Xserver/Xprint/Xprt.man   15 Dec 2004 07:38:29 -0000      1.1.4.1
-@@ -0,0 +1,196 @@
-+.\" -*- coding: us-ascii -*-
-+.TH Xprt __appmansuffix__ "25 November 2004"  
-+.SH NAME
-+Xprt \- Print server for X Version 11
-+.SH SYNOPSIS
-+.ad l
-+\fBXprt\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-ac\fR] [\fB\-audit \fBlevel\fR\fR] [\fB\-pn\fR] [\fB\-fp \fBfontpath\fR\fR] [\fB\-XpFile \fBfile\fR\fR] [\fB\-XpSpoolerType \fBspoolername\fR\fR] [\fB:\fBdisplay\fR\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+Xprt is the Xprint print server
-+for version 11 of the X Window system for non display devices
-+such as printers and fax machines.
-+.PP
-+Xprint is an advanced printing system which enables X11
-+applications to use devices like printers, FAX or create
-+documents in formats like PostScript, PCL or PDF. It may be used by
-+clients such as mozilla.
-+.PP
-+Xprint is a very flexible, extensible, scaleable, client/server
-+print system based on ISO 10175 (and some other specs) and the X11 
-+rendering protocol. 
-+Using Xprint an application can search, query and use devices like 
-+printers, FAX machines or create documents in formats like PDF. 
-+In particular, an application can seek a printer, query supported 
-+attributes (like paper size, trays, fonts etc.), configure the printer 
-+device to match it's needs and print on it like on any other X device 
-+reusing parts of the code which is used for the video card Xserver.
-+.SH USAGE
-+Although Xprt may be invoked from the command line, it is
-+preferable to run it as a daemon via the init script
-+\fB/etc/init.d/xprint\fR (where this script exists).
-+.PP
-+Client programs such as mozilla will require environment
-+variable \fB${XPSERVERLIST}\fR to be set, identifying the
-+"display" on which Xprt is running. This variable may be set
-+for all users via \fB/etc/profile\fR (or similar), using
-+\fB/etc/init.d/xprint get_xpserverlist\fR:
-+
-+.nf
-+export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`
-+.fi
-+
-+.SH OPTIONS
-+Many of Xprt's command line options are shared in common
-+with the usual X servers (see \fBXserver\fR(__appmansuffix__)).
-+Commonly used options include:
-+.TP 
-+\fB:\fIdisplay\fB\fR 
-+The X server runs on the given display. If multiple X
-+servers are to run simultaneously on a host, each must
-+have a unique display number. Note that the standard X
-+server (for video displays) typically runs on display
-+:0. If \fB/etc/init.d/xprint\fR is used
-+to invoke Xprt, it may be configured to automatically assign an available
-+display number.
-+.TP 
-+\fB\-ac\fR 
-+disables host-based access control mechanisms. Enables access
-+by any host, and permits any host to modify the access control
-+list. Use with extreme caution. This option exists primarily
-+for running test suites remotely.
-+.TP 
-+\fB\-audit \fIlevel\fB\fR 
-+sets the audit trail level. The default level is 1, meaning
-+only connection rejections are reported. Level 2 additionally
-+reports all successful connections and disconnects. Level 4
-+enables messages from the SECURITY extension, if present,
-+including generation and revocation of authorizations and
-+violations of the security policy. Level 0 turns off the audit
-+trail. Audit lines are sent as standard error output.
-+.TP 
-+\fB\-fp \fIfontpath\fB\fR 
-+sets the search path for fonts. This path is a comma
-+separated list of directories which Xprt searches for
-+font databases.
-+.TP 
-+\fB\-pn\fR 
-+permits the server to continue running if it fails to
-+establish all of its well-known sockets (connection
-+points for clients), but establishes at least
-+one.
-+.TP 
-+\fB\-XpFile \fIfile\fB\fR 
-+Sets an altername Xprinters file (see section FILES).
-+.TP 
-+\fB\-XpSpoolerType \fIspoolername\fB\fR 
-+Defines the spooler system to be used for print job spooling.
-+Supported values in xprint.mozdev.org release 009 are:
-+
-+aix
-+
-+aix4
-+
-+bsd
-+
-+osf
-+
-+solaris
-+
-+sysv
-+
-+uxp
-+
-+cups
-+
-+lprng
-+
-+other
-+
-+none
-+
-+(multiple values can be specified, seperated by ':', the first active spooler will be chosen).
-+The default value is platform-specific and can be obtained via
-+
-+.nf
-+Xprt \-h
-+.fi
-+
-+\&.
-+.SH ENVIRONMENT
-+The following environment variables are recognized by the X print server
-+(environment variables recognized by Xprint clients are described in 
-+\fBXprint\fR(__miscmansuffix__)):
-+.TP 
-+\fB${XPCONFIGDIR}\fR
-+This environment variable points to the root
-+of the Xprint server configuration directory hierarchy.
-+If the variable is not defined, the default
-+path is be assumed. The default path may be
-+\fB/usr/X11R6/lib/X11/xserver/\fR, 
-+\fB/usr/lib/X11/xserver/\fR,
-+\fB/usr/share/Xprint/xserver/\fR or
-+\fB/usr/openwin/server/etc/XpConfig\fR, depending on the
-+system, and may be configured in \fB/etc/init.d/xprint\fR.
-+.TP 
-+\fB${LANG}\fR
-+This environment variable selects the locale settings used by the Xprint server.
-+Xprt allows language-specific settings (stored in \fB${XPCONFIGDIR}/${LANG}/print/\fR)
-+which will override the default settings (stored in \fB${XPCONFIGDIR}/C/print/\fR).
-+If \fB${LANG}\fR is not set "C" is assumed.
-+.PP
-+.SH FILES
-+.TP 
-+\fB${XPCONFIGDIR}/${LANG}/print/Xprinters\fR, \fB${XPCONFIGDIR}/C/print/Xprinters\fR
-+`Xprinters' is the top most configuration file. It tells
-+Xprt which specific printer names (e.g. mylaser) should
-+be supported, and whether \fBlpstat\fR(1) or other commands
-+should be used to automatically supplement the list of
-+printers.
-+.TP 
-+\fB${XPCONFIGDIR}/${LANG}/print/attributes/printer\fR, \fB${XPCONFIGDIR}/C/print/attributes/printer\fR
-+The `printer' file maps printer names to model
-+configurations (see `model-config' below). For example,
-+"mylaser" could be mapped to a "HPDJ1600C", and all other
-+arbitrary printers could be mapped to a default, such as
-+"HPLJ4SI". When depending on \fBlpstat\fR(1) in the Xprinters
-+file, setting up defaults in `printer' becomes all the
-+more important.
-+.TP 
-+\fB${XPCONFIGDIR}/${LANG}/print/attributes/document\fR, \fB${XPCONFIGDIR}/C/print/attributes/document\fR
-+The `document' file specifies the initial document values
-+for any print jobs. For example, which paper tray to
-+use, what default resolution, etc.
-+.TP 
-+\fB${XPCONFIGDIR}/${LANG}/print/attributes/job\fR, \fB${XPCONFIGDIR}/C/print/attributes/job\fR
-+The `job' file specifies the initial job values for any
-+print jobs. For example, "notification-profile" can be
-+set so that when a print job is successfully sent to a
-+printer, e-mail is sent to the user.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/models/PSdefault/model\-config\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf\fR
-+The `model-config' file has attributes that describe the
-+printer model's capabilities and default settings.
-+Printer model fonts may also be present. The model-config
-+file also identifies the print ddx driver to be used.
-+For each printer model supported, a complete hierarchy of
-+files should exist. In most cases, these files do not
-+need to be modified.
-+.TP 
-+\fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pdf\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pcl\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/postscript\fR
-+The print ddx drivers can have highly specific
-+configuration files to control their behavior. In most
-+cases, these files do not need to be modified.
-+.SH "SEE ALSO"
-+\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxprehashprinterlist\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-+.SH AUTHORS
-+This manual page was written by 
-+Drew Parsons <dparsons@debian.org> and
-+Roland Mainz <roland.mainz@nrubsig.org>,
-+with some help from the man page at
-+http://www.sins.com.au/unix/manpages/Xprt.html and the XFree86
-+man page for \fBXserver\fR(1).
-Index: programs/Xserver/Xprint/Xprt.sgml
-===================================================================
-RCS file: programs/Xserver/Xprint/Xprt.sgml
-diff -N programs/Xserver/Xprint/Xprt.sgml
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/Xserver/Xprint/Xprt.sgml  15 Dec 2004 07:38:29 -0000      1.1.4.1
-@@ -0,0 +1,371 @@
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
-+
-+<!-- Process this file with docbook-to-man to generate an nroff manual
-+     page: 'docbook-to-man manpage.sgml > manpage.1'.  You may view
-+     the manual page with: 'docbook-to-man manpage.sgml | nroff -man | less'. 
-+     A typical entry in a Makefile or Makefile.am is:
-+
-+manpage.1: manpage.sgml
-+        docbook-to-man $< > $@
-+
-+HTML generation can be done like this:
-+% xsltproc ==docbook /usr/share/sgml/docbook/docbook-xsl-stylesheets-1.60.1/html/docbook.xsl Xprint.sgml >Xprint.html
-+  -->
-+
-+<refentry id="Xprt">
-+  <refmeta>
-+    <refentrytitle>Xprt</refentrytitle>
-+    <manvolnum>__appmansuffix__</manvolnum>
-+  </refmeta>
-+  <refnamediv>
-+    <refname>Xprt</refname>
-+
-+    <refpurpose>Print server for X Version 11</refpurpose>
-+  </refnamediv>
-+  <refsynopsisdiv>
-+    <cmdsynopsis>
-+      <command>Xprt</command>
-+
-+      <arg><option>-ac</option></arg>
-+
-+      <arg><option>-audit <replaceable>level</replaceable></option></arg>
-+
-+      <arg><option>-pn</option></arg>
-+
-+      <arg><option>-fp <replaceable>fontpath</replaceable></option></arg>
-+
-+      <arg><option>-XpFile <replaceable>file</replaceable></option></arg>
-+
-+      <arg><option>-XpSpoolerType <replaceable>spoolername</replaceable></option></arg>
-+
-+      <arg><option>:<replaceable>display</replaceable></option></arg>
-+
-+    </cmdsynopsis>
-+  </refsynopsisdiv>
-+  <refsect1>
-+    <title>DESCRIPTION</title>
-+
-+    <para><command>Xprt</command> is the Xprint print server
-+      for version 11 of the X Window system for non display devices
-+      such as printers and fax machines.</para>
-+
-+    <para>Xprint is an advanced printing system which enables X11
-+      applications to use devices like printers, FAX or create
-+      documents in formats like PostScript, PCL or PDF.  It may be used by
-+      clients such as <application>mozilla</application>.
-+    </para>
-+
-+    <para>Xprint is a very flexible, extensible, scaleable, client/server
-+     print system based on ISO 10175 (and some other specs) and the X11        
-+     rendering protocol.                                                       
-+     Using Xprint an application can search, query and use devices like        
-+     printers, FAX machines or create documents in formats like PDF.           
-+     In particular, an application can seek a printer, query supported         
-+     attributes (like paper size, trays, fonts etc.), configure the printer    
-+     device to match it's needs and print on it like on any other X device     
-+     reusing parts of the code which is used for the video card Xserver.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>USAGE</title>
-+
-+    <para>
-+      Although Xprt may be invoked from the command line, it is
-+      preferable to run it as a daemon via the init script
-+      <filename>/etc/init.d/xprint</filename> (where this script exists).
-+    </para>
-+
-+    <para>Client programs such as mozilla will require environment
-+      variable <envar>${XPSERVERLIST}</envar> to be set, identifying the
-+      "display" on which Xprt is running.  This variable may be set
-+      for all users via <filename>/etc/profile</filename> (or similar), using
-+      <userinput>/etc/init.d/xprint get_xpserverlist</userinput>:
-+      <informalexample>
-+      <programlisting>export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`</programlisting>
-+      </informalexample>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>OPTIONS</title>
-+
-+    <para>Many of Xprt's command line options are shared in common
-+    with the usual X servers (see <citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry>).
-+    Commonly used options include:</para>
-+
-+    <variablelist>
-+      <varlistentry>
-+        <term><option>:<replaceable>display</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para> The X server runs on the given display. If multiple X
-+               servers are to run simultaneously on a host, each must
-+               have a unique display number.  Note that the standard X
-+               server (for video displays) typically runs on display
-+               :0.  If <filename>/etc/init.d/xprint</filename> is used
-+               to invoke Xprt, it may be configured to automatically assign an available
-+               display number.</para>
-+        </listitem>
-+      </varlistentry>
-+      <varlistentry>
-+        <term><option>-ac</option>
-+        </term>
-+        <listitem>
-+          <para>disables host-based access control mechanisms.  Enables  access
-+               by  any host, and permits any host to modify the access control
-+               list.  Use with extreme caution.  This option exists  primarily
-+               for running test suites remotely.</para>
-+        </listitem>
-+      </varlistentry>
-+      <varlistentry>
-+        <term><option>-audit <replaceable>level</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>sets  the  audit  trail level.  The default level is 1, meaning
-+               only connection rejections are reported.  Level 2  additionally
-+               reports  all  successful  connections and disconnects.  Level 4
-+               enables messages  from  the  SECURITY  extension,  if  present,
-+               including  generation  and  revocation  of  authorizations  and
-+               violations of the security policy.  Level 0 turns off the audit
-+               trail.  Audit lines are sent as standard error output.</para>
-+        </listitem>
-+      </varlistentry>
-+      <varlistentry>
-+        <term><option>-fp <replaceable>fontpath</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>sets the search path for fonts.  This path is a comma
-+               separated list of directories which Xprt searches for
-+               font databases.</para>
-+        </listitem>
-+      </varlistentry>
-+      <varlistentry>
-+        <term><option>-pn</option>
-+        </term>
-+        <listitem>
-+          <para>permits the server to continue running if it fails to
-+               establish all of its well-known sockets (connection
-+               points for clients), but establishes at least
-+               one.</para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-XpFile <replaceable>file</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>Sets an altername Xprinters file (see section FILES).</para>
-+        </listitem>
-+      </varlistentry>
-+      <varlistentry>
-+        <term><option>-XpSpoolerType <replaceable>spoolername</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Defines the spooler system to be used for print job spooling.
-+            Supported values in xprint.mozdev.org release 009 are:
-+            <simplelist type="vert">
-+              <member>aix</member>
-+              <member>aix4</member>
-+              <member>bsd</member>
-+              <member>osf</member>
-+              <member>solaris</member>
-+              <member>sysv</member>
-+              <member>uxp</member>
-+              <member>cups</member>
-+              <member>lprng</member>
-+              <member>other</member>
-+              <member>none</member>
-+            </simplelist>
-+            (multiple values can be specified, seperated by ':', the first active spooler will be chosen).
-+            The default value is platform-specific and can be obtained via
-+            <programlisting>Xprt -h</programlisting>.
-+          </para>
-+        </listitem>
-+      </varlistentry>      
-+    </variablelist>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>ENVIRONMENT</title>
-+    <para>
-+      The following environment variables are recognized by the X print server
-+      (environment variables recognized by Xprint clients are described in 
-+      <citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>):
-+
-+      <variablelist>
-+        <varlistentry>
-+          <term><envar>${XPCONFIGDIR}</envar></term>
-+          <listitem>
-+            <para> This environment variable points to the  root
-+            of  the Xprint server configuration directory hierarchy.
-+            If the variable is not defined,  the  default
-+            path  is be assumed.  The default path may be
-+              <filename>/usr/X11R6/lib/X11/xserver/</filename>, 
-+              <filename>/usr/lib/X11/xserver/</filename>,
-+              <filename>/usr/share/Xprint/xserver/</filename> or
-+              <filename>/usr/openwin/server/etc/XpConfig</filename>, depending on the
-+            system, and may be configured in <filename>/etc/init.d/xprint</filename>.</para>
-+          </listitem>
-+        </varlistentry>
-+
-+        <varlistentry>
-+          <term><envar>${LANG}</envar></term>
-+          <listitem>
-+            <para>
-+              This environment variable selects the locale settings used by the Xprint server.
-+              Xprt allows language-specific settings (stored in <filename>${XPCONFIGDIR}/${LANG}/print/</filename>)
-+              which will override the default settings (stored in <filename>${XPCONFIGDIR}/C/print/</filename>).
-+              If <envar>${LANG}</envar> is not set "C" is assumed.
-+            </para>
-+          </listitem>
-+        </varlistentry>
-+      </variablelist>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>FILES</title>
-+
-+    <variablelist>
-+      <varlistentry>
-+        <term><filename>${XPCONFIGDIR}/${LANG}/print/Xprinters</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/Xprinters</filename></term>
-+        <listitem>
-+          <para>
-+            `Xprinters' is the top most configuration file.  It tells
-+            Xprt which specific printer names (e.g.  mylaser) should
-+            be supported, and whether <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> or other commands
-+            should be used to automatically supplement the list of
-+            printers.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><filename>${XPCONFIGDIR}/${LANG}/print/attributes/printer</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/attributes/printer</filename></term>
-+        <listitem>
-+          <para>
-+            The `printer' file maps printer names to model
-+            configurations (see `model-config' below).  For example,
-+            "mylaser" could be mapped to a "HPDJ1600C", and all other
-+            arbitrary printers could be mapped to a default, such as
-+            "HPLJ4SI".  When depending on <citerefentry><refentrytitle>lpstat</refentrytitle><manvolnum>1</manvolnum></citerefentry> in the Xprinters
-+            file, setting up defaults in `printer' becomes all the
-+            more important.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><filename>${XPCONFIGDIR}/${LANG}/print/attributes/document</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/attributes/document</filename></term>
-+        <listitem>
-+          <para>
-+            The `document' file specifies the initial document values
-+            for any print jobs.  For example, which paper tray to
-+            use, what default resolution, etc.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><filename>${XPCONFIGDIR}/${LANG}/print/attributes/job</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/attributes/job</filename></term>
-+        <listitem>
-+          <para>
-+            The `job' file specifies the initial job values for any
-+            print jobs.  For example, "notification-profile" can be
-+            set so that when a print job is successfully sent to a
-+            printer, e-mail is sent to the user.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/model-config</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf</filename></term>
-+
-+        <listitem>
-+          <para>
-+            The `model-config' file has attributes that describe the
-+            printer model's capabilities and default settings.
-+            Printer model fonts may also be present.  The model-config
-+            file also identifies the print ddx driver to be used.
-+
-+            For each printer model supported, a complete hierarchy of
-+            files should exist.  In most cases, these files do not
-+            need to be modified.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pdf</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/pcl</filename></term>
-+        <term><filename>${XPCONFIGDIR}/C/print/ddx-config/raster/postscript</filename></term>
-+
-+        <listitem>
-+          <para>
-+            The print ddx drivers can have highly specific
-+            configuration files to control their behavior.  In most
-+            cases, these files do not need to be modified.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+    </variablelist>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>SEE ALSO</title>
-+    <para>
-+      <simplelist type="inline">
-+        <!-- specific references -->
-+        <!-- none -->
-+        
-+        <!-- Xprint general references -->
-+        <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+<!--
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+-->
-+        <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-+        <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>libXprintAppUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>XmPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>XawPrintShell</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-+        <member>Xprint FAQ (<ulink url="http://xprint.mozdev.org/docs/Xprint_FAQ.html">http://xprint.mozdev.org/docs/Xprint_FAQ.html</ulink>)</member>
-+        <member>Xprint main site (<ulink url="http://xprint.mozdev.org/">http://xprint.mozdev.org/</ulink>)</member>
-+      </simplelist>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>AUTHORS</title>
-+    <para>
-+      This manual page was written by 
-+      Drew Parsons <email>dparsons@debian.org</email> and
-+      Roland Mainz <email>roland.mainz@nrubsig.org</email>,
-+      with some help from the man page at
-+      <ulink url="http://www.sins.com.au/unix/manpages/Xprt.html">http://www.sins.com.au/unix/manpages/Xprt.html</ulink> and the XFree86
-+      man page for <citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
-+    </para>
-+  </refsect1>
-+</refentry>
-+
-+
-+
-Index: programs/Xserver/Xprint/attributes.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/attributes.c,v
-retrieving revision 1.5
-retrieving revision 1.5.4.1
-diff -u -u -r1.5 -r1.5.4.1
---- programs/Xserver/Xprint/attributes.c       19 Jul 2004 22:01:52 -0000      1.5
-+++ programs/Xserver/Xprint/attributes.c       13 Dec 2004 05:40:17 -0000      1.5.4.1
-@@ -1515,6 +1515,8 @@
-     FreeVector(vector);
-     xfree(cmdNam);
-+    
-+    return Success;
- }
- /*
-Index: programs/Xserver/Xprint/pcl/PclInit.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/pcl/PclInit.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/Xserver/Xprint/pcl/PclInit.c      23 Apr 2004 18:57:50 -0000      1.2
-+++ programs/Xserver/Xprint/pcl/PclInit.c      13 Dec 2004 05:16:11 -0000      1.2.4.2
-@@ -329,12 +329,12 @@
-  */
- static char DOC_ATT_SUPP[]="document-attributes-supported";
--static char DOC_ATT_VAL[]="document-format";
-+static char DOC_ATT_VAL[]="document-format xp-listfonts-modes";
- static char JOB_ATT_SUPP[]="job-attributes-supported";
- static char JOB_ATT_VAL[]="";
- static char PAGE_ATT_SUPP[]="xp-page-attributes-supported";
- static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \
--default-input-tray default-medium plex";
-+default-input-tray default-medium plex xp-listfonts-modes";
- static int
- PclInitContext(XpContextPtr pCon)
-@@ -427,7 +427,7 @@
-     server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP );
-     if( ( attrStr = (char *)xalloc(strlen(server) + strlen(DOC_ATT_SUPP)
-                                  + strlen(DOC_ATT_VAL) +
--                                 strlen(PAGE_ATT_VAL) + 6 ) ) 
-+                                 strlen(PAGE_ATT_VAL) + 8 ) ) 
-        == (char *)NULL )
-       return BadAlloc;
-     sprintf( attrStr, "*%s:\t%s %s %s", DOC_ATT_SUPP, server,
-@@ -440,7 +440,7 @@
-      */
-     server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP );
-     if( ( attrStr = (char *)xalloc(strlen(server) + strlen(JOB_ATT_SUPP)
--                                 + strlen(JOB_ATT_VAL) + 4 ) ) 
-+                                 + strlen(JOB_ATT_VAL) + 8 ) ) 
-        == (char *)NULL )
-       return BadAlloc;
-     sprintf( attrStr, "*%s:\t%s %s", JOB_ATT_SUPP, server, JOB_ATT_VAL );
-@@ -452,7 +452,7 @@
-      */
-     server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP );
-     if( ( attrStr = (char *)xalloc(strlen(server) + strlen(PAGE_ATT_SUPP)
--                                 + strlen(PAGE_ATT_VAL) + 4 ) ) 
-+                                 + strlen(PAGE_ATT_VAL) + 8 ) ) 
-        == (char *)NULL )
-       return BadAlloc;
-     sprintf( attrStr, "*%s:\t%s %s", PAGE_ATT_SUPP, server, PAGE_ATT_VAL );
-Index: programs/Xserver/Xprint/ps/Ps.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/Ps.h,v
-retrieving revision 1.3
-retrieving revision 1.3.4.2
-diff -u -u -r1.3 -r1.3.4.2
---- programs/Xserver/Xprint/ps/Ps.h    18 Jul 2004 05:21:20 -0000      1.3
-+++ programs/Xserver/Xprint/ps/Ps.h    13 Dec 2004 05:48:41 -0000      1.3.4.2
-@@ -556,7 +556,7 @@
- extern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs);
- extern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen,
-                            unsigned short *pBlue, VisualPtr pVisual);
--extern int  PsGetPixelColor(ColormapPtr cMap, int pixval);
-+extern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval);
- extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
-                            ColormapPtr cMap);
-@@ -566,6 +566,7 @@
- extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height,
-                                 int depth);
-+extern void PsScrubPixmap(PixmapPtr pPixmap);
- extern Bool PsDestroyPixmap(PixmapPtr pPixmap);
- extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv);
- extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable);
-Index: programs/Xserver/Xprint/ps/PsArea.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsArea.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/Xprint/ps/PsArea.c        23 Apr 2004 18:57:56 -0000      1.2
-+++ programs/Xserver/Xprint/ps/PsArea.c        13 Dec 2004 05:01:14 -0000      1.2.4.1
-@@ -131,6 +131,13 @@
-     PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
-     pt = (char *)(&i); i = 1; if( pt[0]=='\001' ) swap = 1; else swap = 0;
-+#ifdef PSOUT_USE_DEEPCOLOR
-+    if( depth==30 )
-+    {
-+      ErrorF("PsPutScaledImage: Not implemented yet for 30bit\m");
-+    }
-+    else
-+#endif /* PSOUT_USE_DEEPCOLOR */
-     if( depth==24 )
-     {
-       PsOut_BeginImage(psOut, 0, 0, x, y, w, h, sw, sh, 3);
-@@ -174,6 +181,34 @@
-       else goto error;
-       PsOut_EndImage(psOut);
-     }
-+#ifdef PSOUT_USE_DEEPCOLOR
-+    else if( (depth > 8) && (depth < 16) )
-+    {
-+      int  rowsiz = PixmapBytePad(w, depth);
-+      PsOut_BeginImage(psOut, 0, 0, x, y, w, h, sw, sh, 3);
-+      for( r=0 ; r<h ; r++ )
-+      {
-+        short *pt = (short *)&pImage[rowsiz*r];
-+        for( c=0 ; c<w ; c++,pt++ )
-+        {
-+          PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFFFF);
-+          /* XXX: This needs to be fixed for endian swapping and to support
-+           * depths deeper than 8bit per R-,G-,B-gun... */
-+          int        val = PSOUTCOLOR_TO_RGB24BIT(clr);
-+          char      *ipt = (char *)&val;
-+          if( swap )
-+          {
-+            char tmp[4];
-+            tmp[0] = ipt[3]; tmp[1] = ipt[2]; tmp[2] = ipt[1]; tmp[3] = ipt[0];
-+            PsOut_OutImageBytes(psOut, 3, &tmp[1]);
-+          }
-+          else
-+            PsOut_OutImageBytes(psOut, 3, &ipt[1]);
-+        }
-+      }
-+      PsOut_EndImage(psOut);
-+    }
-+#endif /* PSOUT_USE_DEEPCOLOR */
-     else if( depth==8 )
-     {
-       int  rowsiz = PixmapBytePad(w, depth);
-@@ -183,8 +218,9 @@
-         char *pt = &pImage[rowsiz*r];
-         for( c=0 ; c<w ; c++,pt++ )
-         {
--          int   val = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
--          char *ipt = (char *)&val;
-+          PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
-+          int        val = PSOUTCOLOR_TO_RGB24BIT(clr);
-+          char      *ipt = (char *)&val;
-           if( swap )
-           {
-             char tmp[4];
-@@ -296,6 +332,14 @@
-       PsOut_BeginImageCache(psOut, cache_id);
- #endif
-+
-+#ifdef PSOUT_USE_DEEPCOLOR
-+      if( depth==30 )
-+      {
-+        ErrorF("PsPutScaledImageIM: Not implemented yet for 30bit\m");
-+      }
-+      else
-+#endif /* PSOUT_USE_DEEPCOLOR */
-       if( depth==24 )
-       {
-         PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3);
-@@ -339,6 +383,32 @@
-         else goto error;
-         PsOut_EndImage(psOut);
-       }
-+#ifdef PSOUT_USE_DEEPCOLOR
-+      else if( (depth > 8) && (depth < 16) )
-+      {
-+        int  rowsiz = PixmapBytePad(w, depth);
-+        PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3);
-+        for( r=0 ; r<h ; r++ )
-+        {
-+          short *pt = (short *)&pImage[rowsiz*r];
-+          for( c=0 ; c<w ; c++,pt++ )
-+          {
-+            PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFFFF);
-+            int        val = PSOUTCOLOR_TO_RGB24BIT(clr);
-+            char      *ipt = (char *)&val;
-+            if( swap )
-+            {
-+              char tmp[4];
-+              tmp[0] = ipt[3]; tmp[1] = ipt[2]; tmp[2] = ipt[1]; tmp[3] = ipt[0];
-+              PsOut_OutImageBytes(psOut, 3, &tmp[1]);
-+            }
-+            else
-+              PsOut_OutImageBytes(psOut, 3, &ipt[1]);
-+          }
-+        }
-+        PsOut_EndImage(psOut);
-+      }
-+#endif /* PSOUT_USE_DEEPCOLOR */
-       else if( depth==8 )
-       {
-         int  rowsiz = PixmapBytePad(w, depth);
-@@ -348,8 +418,11 @@
-           char *pt = &pImage[rowsiz*r];
-           for( c=0 ; c<w ; c++,pt++ )
-           {
--            int   val = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
--            char *ipt = (char *)&val;
-+            PsOutColor clr = PsGetPixelColor(cMap, (int)(*pt)&0xFF);
-+            /* XXX: This needs to be fixed for endian swapping and to support
-+             * depths deeper than 8bit per R-,G-,B-gun... */
-+            int        val = PSOUTCOLOR_TO_RGB24BIT(clr);
-+            char      *ipt = (char *)&val;
-             if( swap )
-             {
-               char tmp[4];
-Index: programs/Xserver/Xprint/ps/PsColor.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsColor.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.2
-diff -u -u -r1.3 -r1.3.4.2
---- programs/Xserver/Xprint/ps/PsColor.c       18 Jul 2004 05:21:20 -0000      1.3
-+++ programs/Xserver/Xprint/ps/PsColor.c       13 Dec 2004 05:34:20 -0000      1.3.4.2
-@@ -75,6 +75,8 @@
- ********************************************************************/
- #include "Ps.h"
-+#include "mi.h"
-+#include "micmap.h"
- #include "gcstruct.h"
- #include "windowstr.h"
- #include "colormapst.h"
-@@ -82,49 +84,25 @@
- Bool
- PsCreateColormap(ColormapPtr pColor)
- {
--  int            i;
--  unsigned short rgb;
--  VisualPtr      pVisual = pColor->pVisual;
--  Pixel          pix;
--
--  if( pVisual->class==TrueColor )
--  {
--    for( i=0 ; i<pVisual->ColormapEntries ; i++ )
--    {
--      rgb = (i<<8)|i;
--
--      pColor->red[i].fShared = FALSE;
--      pColor->red[i].co.local.red     = rgb;
--      pColor->red[i].co.local.green   = 0;
--      pColor->red[i].co.local.blue    = 0;
--
--      pColor->green[i].fShared = FALSE;
--      pColor->green[i].co.local.red   = 0;
--      pColor->green[i].co.local.green = rgb;
--      pColor->green[i].co.local.blue  = 0;
--
--      pColor->blue[i].fShared = FALSE;
--      pColor->blue[i].co.local.red    = 0;
--      pColor->blue[i].co.local.green  = 0;
--      pColor->blue[i].co.local.blue   = rgb;
--    }
--  }
--  return TRUE;
-+  return miInitializeColormap(pColor);
- }
- void
- PsDestroyColormap(ColormapPtr pColor)
- {
-+  /* NO-OP */
- }
- void
- PsInstallColormap(ColormapPtr pColor)
- {
-+  miInstallColormap(pColor);
- }
- void
- PsUninstallColormap(ColormapPtr pColor)
- {
-+  miUninstallColormap(pColor);
- }
- int
-@@ -132,7 +110,7 @@
-   ScreenPtr pScreen,
-   XID      *pCmapList)
- {
--  return 0;
-+  return miListInstalledColormaps(pScreen, pCmapList);
- }
- void
-@@ -160,18 +138,71 @@
-   unsigned short *pBlue,
-   VisualPtr       pVisual)
- {
-+  miResolveColor(pRed, pGreen, pBlue, pVisual);
- }
--int
-+PsOutColor
- PsGetPixelColor(ColormapPtr cMap, int pixval)
- {
--  int r, g, b;
--  if( cMap->pVisual->class==TrueColor ) return(pixval);
--  if( pixval<0 || pixval>255 ) return(0);
--  r = cMap->red[pixval].co.local.red>>8;
--  g = cMap->red[pixval].co.local.green>>8;
--  b = cMap->red[pixval].co.local.blue>>8;
--  return((r<<16)|(g<<8)|b);
-+  VisualPtr v = cMap->pVisual;
-+  switch( v->class )
-+  {
-+    case TrueColor:
-+    {
-+        PsOutColor p = pixval;       
-+        PsOutColor r, g, b;
-+#ifdef PSOUT_USE_DEEPCOLOR
-+        int shift = 16 - v->bitsPerRGBValue;
-+#else
-+        int shift =  8 - v->bitsPerRGBValue;
-+#endif /* PSOUT_USE_DEEPCOLOR */
-+
-+        r = ((p & v->redMask)   >> v->offsetRed)   << shift;
-+        g = ((p & v->greenMask) >> v->offsetGreen) << shift;
-+        b = ((p & v->blueMask)  >> v->offsetBlue)  << shift;
-+
-+#ifdef PSOUT_USE_DEEPCOLOR
-+        return((r<<32)|(g<<16)|b);
-+#else
-+        return((r<<16)|(g<<8)|b);
-+#endif /* PSOUT_USE_DEEPCOLOR */
-+    }
-+    case PseudoColor:
-+    case GrayScale:
-+    case StaticGray:
-+    {
-+        PsOutColor r, g, b;
-+                  
-+        if( pixval < 0 || pixval > v->ColormapEntries)
-+          return(0);
-+
-+        r = cMap->red[pixval].co.local.red;
-+        g = cMap->red[pixval].co.local.green;
-+        b = cMap->red[pixval].co.local.blue;
-+
-+        if ((v->class | DynamicClass) == GrayScale)
-+        {
-+          /* rescale to gray (see |miResolveColor()|) */
-+          r = g = b = (30L*r + 59L*g + 11L*b) / 100L;
-+        }
-+        
-+#ifdef PSOUT_USE_DEEPCOLOR
-+        return((r<<32)|(g<<16)|b);
-+#else
-+        r >>= 8;
-+        g >>= 8;
-+        b >>= 8;
-+
-+        return((r<<16)|(g<<8)|b);
-+#endif /* PSOUT_USE_DEEPCOLOR */
-+    }
-+    default:
-+        FatalError("PsGetPixelColor: Unsupported visual %x\n",
-+                   (int)cMap->pVisual->class);
-+        break;
-+  }
-+  
-+  return 0; /* NO-OP*/
- }
- void
-Index: programs/Xserver/Xprint/ps/PsGC.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsGC.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/Xprint/ps/PsGC.c  18 Jul 2004 05:21:20 -0000      1.3
-+++ programs/Xserver/Xprint/ps/PsGC.c  13 Dec 2004 05:06:13 -0000      1.3.4.1
-@@ -380,6 +380,16 @@
- {
-     GCPtr pDst;
-     
-+    if (pSrc == NULL) {
-+        /* https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 ("'x11perf
-+         * -copypixpix500' crashes Xprt's PostScript DDX [PsCreateAndCopyGC"):
-+         * I have no clue whether this is the real fix or just wallpapering
-+         * over the crash (that's why we warn here loudly when this
-+         * happens) ... */
-+        fprintf(stderr, "PsCreateAndCopyGC: pSrc == NULL\n");
-+        return NULL;
-+    }
-+    
-     if ((pDst =
-        CreateScratchGC(pDrawable->pScreen, pDrawable->depth)) == NULL) 
-     {
-Index: programs/Xserver/Xprint/ps/PsInit.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsInit.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.4
-diff -u -u -r1.3 -r1.3.4.4
---- programs/Xserver/Xprint/ps/PsInit.c        26 Apr 2004 11:07:03 -0000      1.3
-+++ programs/Xserver/Xprint/ps/PsInit.c        13 Dec 2004 06:29:43 -0000      1.3.4.4
-@@ -119,8 +119,18 @@
- #endif
-   char            **printerNames;
-   int               numPrinters;
--  int               nVisuals;
--  int               nDepths;
-+  int               nv,       /* total number of visuals */
-+                    nv_1bit,  /* number of 8bit visuals */
-+                    nv_8bit,  /* number of 8bit visuals */
-+                    nv_12bit, /* number of 12bit visuals */
-+                    nv_24bit, /* number of 24bit visuals*/
-+                    nv_30bit; /* number of 30bit visuals*/
-+  int               nd;       /* number of depths */
-+  VisualID         *vids_1bit,
-+                   *vids_8bit,
-+                   *vids_12bit,
-+                   *vids_24bit,
-+                   *vids_30bit;
-   VisualPtr         visuals;
-   DepthPtr          depths;
-   VisualID          defaultVisual;
-@@ -179,44 +189,180 @@
-     /* Will BitmapToRegion make any difference at all? */
-   pScreen->BitmapToRegion         = mfbPixmapToRegion;
--  nVisuals = 2;
--  nDepths  = 2;
--  visuals  = (VisualPtr)xalloc(nVisuals*sizeof(VisualRec));
--  depths   = (DepthPtr) xalloc(nDepths*sizeof(DepthRec));
--
--  visuals[0].vid             = FakeClientID(0);
--  visuals[0].class           = TrueColor;
--  visuals[0].bitsPerRGBValue = 8;
--  visuals[0].ColormapEntries = 256;
--  visuals[0].nplanes         = 24;
--  visuals[0].redMask         = 0x00FF0000;
--  visuals[0].greenMask       = 0x0000FF00;
--  visuals[0].blueMask        = 0x000000FF;
--  visuals[0].offsetRed       = 16;
--  visuals[0].offsetGreen     = 8;
--  visuals[0].offsetBlue      = 0;
--
--  visuals[1].vid             = FakeClientID(0);
--  visuals[1].class           = PseudoColor;
--  visuals[1].bitsPerRGBValue = 8;
--  visuals[1].ColormapEntries = 256;
--  visuals[1].nplanes         = 8;
--  visuals[1].redMask         = 0x0;
--  visuals[1].greenMask       = 0x0;
--  visuals[1].blueMask        = 0x0;
--  visuals[1].offsetRed       = 0x0;
--  visuals[1].offsetGreen     = 0x0;
--  visuals[1].offsetBlue      = 0x0;
--
--  depths[0].depth   = 24;
--  depths[0].numVids = 1;
--  depths[0].vids    = (VisualID *)xalloc(sizeof(VisualID));
--  depths[0].vids[0] = visuals[0].vid;
--
--  depths[1].depth   = 8;
--  depths[1].numVids = 1;
--  depths[1].vids    = (VisualID *)xalloc(sizeof(VisualID));
--  depths[1].vids[0] = visuals[1].vid;
-+  visuals    = (VisualPtr) xalloc(8*sizeof(VisualRec));
-+  depths     = (DepthPtr)  xalloc(8*sizeof(DepthRec));
-+  vids_1bit  = (VisualID *)xalloc(8*sizeof(VisualID));
-+  vids_8bit  = (VisualID *)xalloc(8*sizeof(VisualID));
-+  vids_12bit = (VisualID *)xalloc(8*sizeof(VisualID));
-+  vids_24bit = (VisualID *)xalloc(8*sizeof(VisualID));
-+  vids_30bit = (VisualID *)xalloc(8*sizeof(VisualID));
-+
-+  nv = nv_1bit = nv_8bit = nv_12bit = nv_24bit = nv_30bit = nd = 0;
-+
-+  /* TrueColor, 24bit */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = TrueColor;
-+  visuals[nv].bitsPerRGBValue = 8;
-+  visuals[nv].ColormapEntries = 256;
-+  visuals[nv].nplanes         = 24;
-+  visuals[nv].redMask         = 0X00FF0000;
-+  visuals[nv].greenMask       = 0X0000FF00;
-+  visuals[nv].blueMask        = 0X000000FF;
-+  visuals[nv].offsetRed       = 16;
-+  visuals[nv].offsetGreen     = 8;
-+  visuals[nv].offsetBlue      = 0;
-+  vids_24bit[nv_24bit] = visuals[nv].vid;
-+  nv++; nv_24bit++;
-+
-+  /* PseudoColor, 8bit */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = PseudoColor;
-+  visuals[nv].bitsPerRGBValue = 8;
-+  visuals[nv].ColormapEntries = 256;
-+  visuals[nv].nplanes         = 8;
-+  visuals[nv].redMask         = 0x0;
-+  visuals[nv].greenMask       = 0x0;
-+  visuals[nv].blueMask        = 0x0;
-+  visuals[nv].offsetRed       = 0x0;
-+  visuals[nv].offsetGreen     = 0x0;
-+  visuals[nv].offsetBlue      = 0x0;
-+  vids_8bit[nv_8bit] = visuals[nv].vid;
-+  nv++; nv_8bit++;
-+
-+  /* GrayScale, 8bit */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = GrayScale;
-+  visuals[nv].bitsPerRGBValue = 8;
-+  visuals[nv].ColormapEntries = 256;
-+  visuals[nv].nplanes         = 8;
-+  visuals[nv].redMask         = 0x0;
-+  visuals[nv].greenMask       = 0x0;
-+  visuals[nv].blueMask        = 0x0;
-+  visuals[nv].offsetRed       = 0x0;
-+  visuals[nv].offsetGreen     = 0x0;
-+  visuals[nv].offsetBlue      = 0x0;
-+  vids_8bit[nv_8bit] = visuals[nv].vid;
-+  nv++; nv_8bit++;
-+
-+  /* StaticGray, 8bit */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = StaticGray;
-+  visuals[nv].bitsPerRGBValue = 8;
-+  visuals[nv].ColormapEntries = 256;
-+  visuals[nv].nplanes         = 8;
-+  visuals[nv].redMask         = 0x0;
-+  visuals[nv].greenMask       = 0x0;
-+  visuals[nv].blueMask        = 0x0;
-+  visuals[nv].offsetRed       = 0x0;
-+  visuals[nv].offsetGreen     = 0x0;
-+  visuals[nv].offsetBlue      = 0x0;
-+  vids_8bit[nv_8bit] = visuals[nv].vid;
-+  nv++; nv_8bit++;
-+
-+  /* StaticGray, 1bit */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = StaticGray;
-+  visuals[nv].bitsPerRGBValue = 1;
-+  visuals[nv].ColormapEntries = 2;
-+  visuals[nv].nplanes         = 1;
-+  visuals[nv].redMask         = 0x0;
-+  visuals[nv].greenMask       = 0x0;
-+  visuals[nv].blueMask        = 0x0;
-+  visuals[nv].offsetRed       = 0x0;
-+  visuals[nv].offsetGreen     = 0x0;
-+  visuals[nv].offsetBlue      = 0x0;
-+  vids_1bit[nv_1bit] = visuals[nv].vid;
-+  nv++; nv_1bit++;
-+
-+#ifdef PSOUT_USE_DEEPCOLOR
-+  /* TrueColor, 30bit, 10bit per R-,G-,B-gun */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = TrueColor;
-+  visuals[nv].bitsPerRGBValue = 10;
-+  visuals[nv].ColormapEntries = 1024;
-+  visuals[nv].nplanes         = 30;
-+  visuals[nv].redMask         = 0X3FF00000;
-+  visuals[nv].greenMask       = 0X000FFC00;
-+  visuals[nv].blueMask        = 0X000003FF;
-+  visuals[nv].offsetRed       = 20;
-+  visuals[nv].offsetGreen     = 10;
-+  visuals[nv].offsetBlue      = 0;
-+  vids_30bit[nv_30bit] = visuals[nv].vid;
-+  nv++; nv_30bit++;
-+
-+  /* PostScript Level 2 and above, colors can have 12 bits per component
-+   * (36 bit for RGB) */
-+
-+  /* GrayScale, 12bit, 12bit per R-,G-,B-gun */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = GrayScale;
-+  visuals[nv].bitsPerRGBValue = 12;
-+  visuals[nv].ColormapEntries = 4096;
-+  visuals[nv].nplanes         = 12;
-+  visuals[nv].redMask         = 0x0;
-+  visuals[nv].greenMask       = 0x0;
-+  visuals[nv].blueMask        = 0x0;
-+  visuals[nv].offsetRed       = 0x0;
-+  visuals[nv].offsetGreen     = 0x0;
-+  visuals[nv].offsetBlue      = 0x0;
-+  vids_12bit[nv_12bit] = visuals[nv].vid;
-+  nv++; nv_12bit++;
-+
-+  /* StaticGray, 12bit, 12bit per R-,G-,B-gun */
-+  visuals[nv].vid             = FakeClientID(0);
-+  visuals[nv].class           = StaticGray;
-+  visuals[nv].bitsPerRGBValue = 12;
-+  visuals[nv].ColormapEntries = 4096;
-+  visuals[nv].nplanes         = 12;
-+  visuals[nv].redMask         = 0x0;
-+  visuals[nv].greenMask       = 0x0;
-+  visuals[nv].blueMask        = 0x0;
-+  visuals[nv].offsetRed       = 0x0;
-+  visuals[nv].offsetGreen     = 0x0;
-+  visuals[nv].offsetBlue      = 0x0;
-+  vids_12bit[nv_12bit] = visuals[nv].vid;
-+  nv++; nv_12bit++;
-+#endif /* PSOUT_USE_DEEPCOLOR */
-+
-+  if( nv_30bit > 0 )
-+  {
-+    depths[nd].depth   = 30;
-+    depths[nd].numVids = nv_30bit;
-+    depths[nd].vids    = vids_30bit;
-+    nd++;
-+  }
-+
-+  if( nv_24bit > 0 )
-+  {
-+    depths[nd].depth   = 24;
-+    depths[nd].numVids = nv_24bit;
-+    depths[nd].vids    = vids_24bit;
-+    nd++;
-+  }
-+
-+  if( nv_12bit > 0 )
-+  {
-+    depths[nd].depth   = 12;
-+    depths[nd].numVids = nv_12bit;
-+    depths[nd].vids    = vids_12bit;
-+    nd++;
-+  }
-+  
-+  if( nv_8bit > 0 )
-+  {
-+    depths[nd].depth   = 8;
-+    depths[nd].numVids = nv_8bit;
-+    depths[nd].vids    = vids_8bit;
-+    nd++;
-+  }
-+
-+  if( nv_1bit > 0 )
-+  {
-+    depths[nd].depth   = 1;
-+    depths[nd].numVids = nv_1bit;
-+    depths[nd].vids    = vids_1bit;
-+    nd++;
-+  }
-   /* Defaul visual is 8bit PseudoColor */
-   defaultVisual = visuals[1].vid;
-@@ -228,7 +374,7 @@
-     GlxWrapInitVisuals(&proc);
-     /* GlxInitVisuals ignores the last three arguments. */
--    proc(&visuals, &depths, &nVisuals, &nDepths,
-+    proc(&visuals, &depths, &nv, &nd,
-          &rootDepth, &defaultVisual, 0, 0, 0);
-   }
- #endif /* GLXEXT */
-@@ -237,8 +383,8 @@
-                pScreen->width, pScreen->height,
-                (int) (pScreen->width / (pScreen->mmWidth / 25.40)), 
-                (int) (pScreen->height / (pScreen->mmHeight / 25.40)),
--               0, rootDepth, nDepths,
--               depths, defaultVisual, nVisuals, visuals);
-+               0, rootDepth, nd,
-+               depths, defaultVisual, nv, visuals);
-   if( cfbCreateDefColormap(pScreen)==FALSE ) return FALSE;
-@@ -282,12 +428,12 @@
-  */
- static char DOC_ATT_SUPP[]="document-attributes-supported";
--static char DOC_ATT_VAL[]="document-format";
-+static char DOC_ATT_VAL[]="document-format xp-listfonts-modes";
- static char JOB_ATT_SUPP[]="job-attributes-supported";
- static char JOB_ATT_VAL[]="";
- static char PAGE_ATT_SUPP[]="xp-page-attributes-supported";
- static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \
--default-input-tray default-medium plex";
-+default-input-tray default-medium plex xp-listfonts-modes";
- static int
- PsInitContext(pCon)
-@@ -346,7 +492,7 @@
-   server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP );
-   if ((attrStr = (char *) xalloc(strlen(server) +
-                               strlen(DOC_ATT_SUPP) + strlen(DOC_ATT_VAL)
--                              + strlen(PAGE_ATT_VAL) + 6)) == NULL) 
-+                              + strlen(PAGE_ATT_VAL) + 8)) == NULL) 
-   {
-       return BadAlloc;
-   }
-@@ -360,7 +506,7 @@
-    */
-   server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP );
-   if ((attrStr = (char *) xalloc(strlen(server) + strlen(JOB_ATT_SUPP) +
--                               strlen(JOB_ATT_VAL) + 4)) == NULL)
-+                               strlen(JOB_ATT_VAL) + 8)) == NULL)
-   {
-       return BadAlloc;
-   }
-@@ -373,7 +519,7 @@
-    */
-   server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP );
-   if ((attrStr = (char *) xalloc(strlen(server) + strlen(PAGE_ATT_SUPP) +
--                               strlen(PAGE_ATT_VAL) + 4)) == NULL)
-+                               strlen(PAGE_ATT_VAL) + 8)) == NULL)
-   {
-       return BadAlloc;
-   }
-Index: programs/Xserver/Xprint/ps/PsPixmap.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPixmap.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.2
-diff -u -u -r1.3 -r1.3.2.2
---- programs/Xserver/Xprint/ps/PsPixmap.c      18 Aug 2004 18:41:40 -0000      1.3
-+++ programs/Xserver/Xprint/ps/PsPixmap.c      13 Dec 2004 05:48:41 -0000      1.3.2.2
-@@ -92,7 +92,7 @@
- {
-   PixmapPtr pPixmap;
--  pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec));
-+  pPixmap = (PixmapPtr)xcalloc(1, sizeof(PixmapRec));
-   if( !pPixmap)  return NullPixmap;
-   pPixmap->drawable.type         = DRAWABLE_PIXMAP;
-   pPixmap->drawable.class        = 0;
-@@ -108,20 +108,21 @@
-   pPixmap->devKind               = 0;
-   pPixmap->refcnt                = 1;
--  pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xalloc(sizeof(PsPixmapPrivRec));
-+  pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec));
-   if( !pPixmap->devPrivate.ptr )
-     { xfree(pPixmap); return NullPixmap; }
--  memset(pPixmap->devPrivate.ptr, 0, sizeof(PsPixmapPrivRec));
-   return pPixmap;
- }
--Bool
--PsDestroyPixmap(PixmapPtr pPixmap)
-+/* PsScrubPixmap: Remove all content from a pixmap (used by
-+ * |PsPolyFillRect()| when the "solid fill" operation covers
-+ * the whole pixmap) */
-+void
-+PsScrubPixmap(PixmapPtr pPixmap)
- {
-   PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr;
-   DisplayListPtr  disp = priv->dispList;
--  if( --pPixmap->refcnt ) return TRUE;
-   while( disp )
-   {
-     int            i;
-@@ -178,6 +179,20 @@
-     }
-     xfree(oldDisp);
-   }
-+
-+  priv->dispList = NULL;
-+}
-+
-+Bool
-+PsDestroyPixmap(PixmapPtr pPixmap)
-+{
-+  PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr;
-+  DisplayListPtr  disp = priv->dispList;
-+
-+  if( --pPixmap->refcnt ) return TRUE;
-+
-+  PsScrubPixmap(pPixmap);
-+
-   xfree(priv);
-   xfree(pPixmap);
-   return TRUE;
-@@ -192,11 +207,11 @@
-   {
-     if( disp->nelms>=DPY_BLOCKSIZE && disp->next ) continue;
-     if( disp->nelms<DPY_BLOCKSIZE ) return(disp);
--    disp->next = (DisplayListPtr)xalloc(sizeof(DisplayListRec));
-+    disp->next = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec));
-     disp->next->next  = (DisplayListPtr)0;
-     disp->next->nelms = 0;
-   }
--  disp = (DisplayListPtr)xalloc(sizeof(DisplayListRec));
-+  disp = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec));
-   disp->next     = (DisplayListPtr)0;
-   disp->nelms    = 0;
-   priv->dispList = disp;
-@@ -480,6 +495,7 @@
-     for( i=0 ; i<disp->nelms ; i++,elm++ )
-     {
-+      if( !elm->gc ) continue; /* workaround for https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 */
-       if( !elm->gc->fgPixel ) continue;
-       switch(elm->type)
-       {
-@@ -498,7 +514,7 @@
-   if( (*nElms) )
-   {
--    elms = (PsElmPtr)xalloc((*nElms)*sizeof(PsElmRec));
-+    elms = (PsElmPtr)xcalloc(1, (*nElms)*sizeof(PsElmRec));
-     if( elms )
-     {
-       disp = priv->dispList;
-@@ -568,7 +584,7 @@
-   int      i;
-   PsElmPtr newElms;
--  newElms = (PsElmPtr)xalloc(nElms*sizeof(PsElmRec));
-+  newElms = (PsElmPtr)xcalloc(1, nElms*sizeof(PsElmRec));
-   if( !newElms ) return(newElms);
-   for( i=0 ; i<nElms ; i++ )
-   {
-Index: programs/Xserver/Xprint/ps/PsPolygon.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPolygon.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/Xprint/ps/PsPolygon.c     23 Apr 2004 18:57:56 -0000      1.2
-+++ programs/Xserver/Xprint/ps/PsPolygon.c     13 Dec 2004 05:48:41 -0000      1.2.4.1
-@@ -203,6 +203,31 @@
-     DisplayListPtr  disp;
-     GCPtr           gc;
-+#ifdef DBE
-+    /* Remove previous pixmap content if we render one single rect which
-+     * covers the whole pixmap surface (this optimisation was added for
-+     * the double-buffer extension ("DBE") which uses |PolyFillRect()|
-+     * to clear the buffer - but it makes sense in other cases, too).
-+     */    
-+    if (nRects == 1)
-+    {
-+      extern Bool noDbeExtension;
-+
-+      if ( (pRects[0].x==0) && (pRects[0].y==0) &&
-+           (pRects[0].width==pDrawable->width) && (pRects[0].height==pDrawable->height) &&
-+           (pGC->fillStyle == FillSolid) &&
-+           (noDbeExtension == False))
-+      {
-+#ifdef DEBUG_gismobile
-+        ErrorF("PsPolyFillRect: scrubbing pixmap...\n");
-+#endif /* DEBUG_gismobile */
-+        /* Remove all content from the pixmap as it would be covered
-+         * by the whole rect anyway */
-+        PsScrubPixmap(pDrawable);
-+      }
-+    }
-+#endif /* DBE */
-+
-     if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return;
-     disp = PsGetFreeDisplayBlock(priv);
-Index: programs/Xserver/Xprint/ps/psout.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/psout.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.2
-diff -u -u -r1.3 -r1.3.4.2
---- programs/Xserver/Xprint/ps/psout.c 6 May 2004 00:24:32 -0000       1.3
-+++ programs/Xserver/Xprint/ps/psout.c 13 Dec 2004 06:35:36 -0000      1.3.4.2
-@@ -422,17 +422,19 @@
- }
- static void
--S_Color(PsOutPtr self, int clr)
-+S_Color(PsOutPtr self, PsOutColor clr)
- {
-   int   ir, ig, ib;
--  ir = clr>>16; ig = (clr>>8)&0xFF; ib = clr&0xFF;
-+  ir = PSOUTCOLOR_TO_REDBITS(clr);
-+  ig = PSOUTCOLOR_TO_GREENBITS(clr);
-+  ib = PSOUTCOLOR_TO_BLUEBITS(clr);
-   if( ir==ig && ig==ib )
--    { S_OutNum(self, (float)ir/255.); S_OutTok(self, "g", 1); }
-+    { S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); S_OutTok(self, "g", 1); }
-   else
-   {
--    S_OutNum(self, (float)ir/255.);
--    S_OutNum(self, (float)ig/255.);
--    S_OutNum(self, (float)ib/255.);
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
-     S_OutTok(self, "sc", 1);
-   }
- }
-@@ -636,7 +638,7 @@
- /*
-  *  Initialize the structure
-  */
--  psout->CurColor    = 0xFFFFFFFF;
-+  psout->CurColor    = PSOUTCOLOR_NOCOLOR;
-   psout->LineWidth   = 1;
-   psout->LineCap     = PsCButt;
-   psout->LineJoin    = PsJMiter;
-@@ -723,7 +725,7 @@
- PsOut_DirtyAttributes(PsOutPtr self)
- {
-   int  i;
--  self->CurColor    = 0xFFFFFFFF;
-+  self->CurColor    = PSOUTCOLOR_NOCOLOR;
-   self->LineWidth   = -1;
-   self->LineCap     = (PsCapEnum)-1;
-   self->LineJoin    = (PsJoinEnum)-1;
-@@ -911,7 +913,7 @@
- }
- void
--PsOut_Color(PsOutPtr self, int clr)
-+PsOut_Color(PsOutPtr self, PsOutColor clr)
- {
-   if( clr==self->CurColor || self->InTile>=PsStip ) return;
-   self->CurColor = clr;
-@@ -926,7 +928,7 @@
- void
- PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap, PsJoinEnum join,
--                int nDsh, int *dsh, int dshOff, int bclr)
-+                int nDsh, int *dsh, int dshOff, PsOutColor bclr)
- {
-   int         i;
-   int         same = 1;
-@@ -973,7 +975,10 @@
-     S_OutTok(self, "ds", 1);
-   }
--  if( nDsh ) self->LineBClr = bclr; else bclr = -1;
-+  if( nDsh )
-+    self->LineBClr = bclr;
-+  else
-+    bclr = PSOUTCOLOR_NOCOLOR;
- }
- void
-@@ -1094,7 +1099,7 @@
-     if( i==0 ) S_OutTok(self, "m", 0);
-     else       S_OutTok(self, "l", 0);
-   }
--  if( self->LineBClr>=0 )
-+  if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
-   {
-     S_OutTok(self, "gs", 0);
-     S_Color(self, self->LineBClr);
-@@ -1133,7 +1138,7 @@
-   S_OutNum(self, (float)w);
-   S_OutNum(self, (float)h);
-   S_OutTok(self, "R", 0);
--  if( self->LineBClr>=0 )
-+  if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
-   {
-     S_OutTok(self, "gs", 0);
-     S_Color(self, self->LineBClr);
-@@ -1159,7 +1164,7 @@
-   S_OutNum(self, ang1+ang2);
-   if( ang2<0 ) S_OutTok(self, "An", 0);
-   else         S_OutTok(self, "Ac", 0);
--  if( self->LineBClr>=0 )
-+  if( self->LineBClr != PSOUTCOLOR_NOCOLOR )
-   {
-     S_OutTok(self, "gs", 0);
-     S_Color(self, self->LineBClr);
-@@ -1169,7 +1174,7 @@
- }
- void
--PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, int bclr)
-+PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, PsOutColor bclr)
- {
-   int  xo = self->XOff;
-   int  yo = self->YOff;
-@@ -1179,21 +1184,23 @@
-   S_OutStr(self, text, textl);
-   S_OutNum(self, (float)x);
-   S_OutNum(self, (float)y);
--  if( bclr<0 ) S_OutTok(self, "T", 1);
-+  if( bclr == PSOUTCOLOR_NOCOLOR )
-+    S_OutTok(self, "T", 1);
-   else
-   {
--    int ir = bclr>>16;
--    int ig = (bclr>>8)&0xFF;
--    int ib = bclr&0xFF;
--    S_OutNum(self, (float)ir/255.);
--    S_OutNum(self, (float)ig/255.);
--    S_OutNum(self, (float)ib/255.);
-+    int ir = PSOUTCOLOR_TO_REDBITS(bclr);
-+    int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
-+    int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
-+
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
-     S_OutTok(self, "Tb", 1);
-   }
- }
- void
--PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, int bclr)
-+PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr)
- {
-   int  xo = self->XOff;
-   int  yo = self->YOff;
-@@ -1203,22 +1210,23 @@
-   S_OutStr16(self, text, textl);
-   S_OutNum(self, (float)x);
-   S_OutNum(self, (float)y);
--  if( bclr<0 ) S_OutTok(self, "T", 1);
-+  if( bclr == PSOUTCOLOR_NOCOLOR )
-+    S_OutTok(self, "T", 1);
-   else
-   {
--    int ir = bclr>>16;
--    int ig = (bclr>>8)&0xFF;
--    int ib = bclr&0xFF;
--    S_OutNum(self, (float)ir/255.);
--    S_OutNum(self, (float)ig/255.);
--    S_OutNum(self, (float)ib/255.);
-+    int ir = PSOUTCOLOR_TO_REDBITS(bclr);
-+    int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
-+    int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig));
-+    S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib));
-     S_OutTok(self, "Tb", 1);
-   }
- }
- #ifdef BM_CACHE
- void  /* new */
--PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, int bclr, int fclr)
-+PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, PsOutColor bclr, PsOutColor fclr)
- {
-   char cacheID[10];
-   int xo = self->XOff;
-@@ -1231,22 +1239,26 @@
-   S_OutNum(self, (float)x);
-   S_OutNum(self, (float)y);
--  if( fclr==0xFFFFFF )
-+  if( fclr==PSOUTCOLOR_WHITE )
-   {
--    int   ir, ig, ib;
--    ir = bclr>>16; ig = (bclr>>8)&0xFF; ib = bclr&0xFF;
-+    int ir = PSOUTCOLOR_TO_REDBITS(bclr);
-+    int ig = PSOUTCOLOR_TO_GREENBITS(bclr);
-+    int ib = PSOUTCOLOR_TO_BLUEBITS(bclr);
-+
-     if( ir==ig && ig==ib )
--      S_OutNum(self, (float)ir/255.);
-+      S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-     else
-       S_OutNum(self, (float)0);
-       self->RevImage = 1;
-     }
-   else
-   {
--    int   ir, ig, ib;
--    ir = fclr>>16; ig = (fclr>>8)&0xFF; ib = fclr&0xFF;
-+    int ir = PSOUTCOLOR_TO_REDBITS(fclr);
-+    int ig = PSOUTCOLOR_TO_GREENBITS(fclr);
-+    int ib = PSOUTCOLOR_TO_BLUEBITS(fclr);
-+
-     if( ir==ig && ig==ib )
--      S_OutNum(self, (float)ir/255.);
-+      S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir));
-     else
-       S_OutNum(self, (float)0);
-   }
-@@ -1272,10 +1284,10 @@
- #endif
- void
--PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y,
-+PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                  int w, int h, int sw, int sh, int format)
- {
--  int savClr = self->CurColor;
-+  PsOutColor savClr = self->CurColor;
-   int xo = self->XOff;
-   int yo = self->YOff;
-@@ -1291,7 +1303,7 @@
-     S_OutTok(self, "<", 0);
-     self->ImageFormat = format;
-     self->RevImage = 0;
--    if( self->InTile==PsTile && format==1 && fclr==0xFFFFFF )
-+    if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE )
-       self->RevImage = 1;
-     return;
-   }
-@@ -1300,7 +1312,7 @@
-   if( format==1 )
-   {
-     S_OutTok(self, "gs", 0);
--    if( fclr==0xFFFFFF )
-+    if( fclr==PSOUTCOLOR_WHITE )
-     {
-       PsOut_Color(self, fclr);
-       PsOut_FillRect(self, x, y, sw, sh);
-@@ -1332,10 +1344,10 @@
- }
- void
--PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y,
-+PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                  int w, int h, int sw, int sh, int format)
- {
--  int savClr = self->CurColor;
-+  PsOutColor savClr = self->CurColor;
-   int xo = self->XOff;
-   int yo = self->YOff;
-@@ -1351,7 +1363,7 @@
-     S_OutTok(self, "<", 0);
-     self->ImageFormat = format;
-     self->RevImage = 0;
--    if( self->InTile==PsTile && format==1 && fclr==0xFFFFFF )
-+    if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE )
-       self->RevImage = 1;
-     return;
-   }
-@@ -1363,7 +1375,7 @@
- #ifdef BM_CACHE
-     S_OutTok(self, "g", 1);
- #else
--    if( fclr==0xFFFFFF )
-+    if( fclr==PSOUTCOLOR_WHITE )
-     {
-       PsOut_Color(self, bclr);
-       self->RevImage = 1;
-@@ -1411,7 +1423,7 @@
-     S_OutTok(self, ">", 1);
-     if( self->ImageFormat==1 && self->InTile==PsTile )
-     {
--      if( self->ImgFClr==0xFFFFFF )
-+      if( self->ImgFClr==PSOUTCOLOR_WHITE )
-       {
-         PsOut_Color(self, self->ImgFClr);
-         PsOut_FillRect(self, self->ImgX, self->ImgY, self->SclW, self->SclH);
-@@ -1436,14 +1448,16 @@
-     self->RevImage    = 0;
-     return;
-   }
--
-+  /*
-+   * Bug 4639307: Move flush before "> im" to get all of bitmap into ps file.
-+   */
-+  S_Flush(self);
- #ifdef BM_CACHE
-   if(self->start_image)
-     S_OutTok(self, "> im", 1);       /* new */
- #endif
-   self->ImageFormat = 0;
-   self->RevImage    = 0;
--  S_Flush(self);
- #ifdef BM_CACHE
-   if(self->start_image)
-   {
-@@ -1509,7 +1523,7 @@
- int
- PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h, PsFillEnum type,
--                   int bclr, int fclr)
-+                   PsOutColor bclr, PsOutColor fclr)
- {
-   int   i;
-   char  key[64];
-@@ -1585,7 +1599,7 @@
-     case PsOpStip: key[0] = 'o'; break; }
-   S_OutTok(self, key, 0);
-   S_OutTok(self, "spt", 1);
--  self->CurColor = 0xFFFFFFFF;
-+  self->CurColor = PSOUTCOLOR_NOCOLOR;
- }
- void
-Index: programs/Xserver/Xprint/ps/psout.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/psout.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/Xprint/ps/psout.h 23 Apr 2004 18:57:56 -0000      1.2
-+++ programs/Xserver/Xprint/ps/psout.h 13 Dec 2004 05:01:15 -0000      1.2.4.1
-@@ -153,6 +153,30 @@
-   PsFontType3
- } PsFTDownloadFontType;
-+#ifdef PSOUT_USE_DEEPCOLOR
-+typedef long long PsOutColor;
-+#define PSOUTCOLOR_TO_REDBITS(clr)    ((clr) >> 32)
-+#define PSOUTCOLOR_TO_GREENBITS(clr)  (((clr) >> 16) & 0xFFFF)
-+#define PSOUTCOLOR_TO_BLUEBITS(clr)   ((clr) & 0xFFFF)
-+#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 65535.)
-+#define PSOUTCOLOR_WHITE              (0xFFFFFFFFFFFFLL)
-+#define PSOUTCOLOR_NOCOLOR            (-1LL)
-+#define PSOUTCOLOR_TO_RGB24BIT(clr)   (((PSOUTCOLOR_TO_REDBITS(clr)   >> 8) << 16) | \
-+                                       ((PSOUTCOLOR_TO_GREENBITS(clr) >> 8) << 8)  | \
-+                                       ((PSOUTCOLOR_TO_BLUEBITS(clr)  >> 8) << 0))
-+#else
-+typedef long PsOutColor;
-+#define PSOUTCOLOR_TO_REDBITS(clr)    ((clr) >> 16)
-+#define PSOUTCOLOR_TO_GREENBITS(clr)  (((clr) >> 8) & 0xFF)
-+#define PSOUTCOLOR_TO_BLUEBITS(clr)   ((clr) & 0xFF)
-+#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 255.)
-+#define PSOUTCOLOR_WHITE              (0xFFFFFF)
-+#define PSOUTCOLOR_NOCOLOR            (-1)
-+#define PSOUTCOLOR_TO_RGB24BIT(clr)   ((PSOUTCOLOR_TO_REDBITS(clr)   << 16) | \
-+                                       (PSOUTCOLOR_TO_GREENBITS(clr) << 8)  | \
-+                                       (PSOUTCOLOR_TO_BLUEBITS(clr)  << 0))
-+#endif /* PSOUT_USE_DEEPCOLOR */
-+
- #ifdef USE_PSOUT_PRIVATE
- typedef void *voidPtr;
-@@ -168,14 +192,14 @@
- {
-   FILE       *Fp;
-   char        Buf[16384];
--  int         CurColor;
-+  PsOutColor  CurColor;
-   int         LineWidth;
-   PsCapEnum   LineCap;
-   PsJoinEnum  LineJoin;
-   int         NDashes;
-   int        *Dashes;
-   int         DashOffset;
--  int         LineBClr;
-+  PsOutColor  LineBClr;
-   PsRuleEnum  FillRule;
-   char       *FontName;
-   int         FontSize;
-@@ -193,8 +217,8 @@
-   PsFillEnum  InTile;
-   int         ImgSkip;
--  int         ImgBClr;
--  int         ImgFClr;
-+  PsOutColor  ImgBClr;
-+  PsOutColor  ImgFClr;
-   int         ImgX;
-   int         ImgY;
-   int         ImgW;
-@@ -230,11 +254,11 @@
- extern void PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf);
--extern void PsOut_Color(PsOutPtr self, int clr);
-+extern void PsOut_Color(PsOutPtr self, PsOutColor clr);
- extern void PsOut_FillRule(PsOutPtr self, PsRuleEnum rule);
- extern void PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap,
-                             PsJoinEnum join, int nDsh, int *dsh, int dshOff,
--                            int bclr);
-+                            PsOutColor bclr);
- extern void PsOut_TextAttrs(PsOutPtr self, char *fnam, int siz, int iso);
- extern void PsOut_TextAttrsMtx(PsOutPtr self, char *fnam, float *mtx, int iso);
-@@ -250,12 +274,12 @@
-                           float ang1, float ang2);
- extern void PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl,
--                       int bclr);
--extern void PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, int bclr);
-+                       PsOutColor bclr);
-+extern void PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr);
--extern void PsOut_BeginImage(PsOutPtr self, int bclr, int  fclr, int x, int y,
-+extern void PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                              int w, int h, int sw, int sh, int format);
--extern void PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y,
-+extern void PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y,
-                                int w, int h, int sw, int sh, int format);
- extern void PsOut_EndImage(PsOutPtr self);
- extern void PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes);
-@@ -265,7 +289,7 @@
- extern void PsOut_EndFrame(PsOutPtr self);
- extern int  PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h,
--                               PsFillEnum type, int bclr, int fclr);
-+                               PsFillEnum type, PsOutColor bclr, PsOutColor fclr);
- extern void PsOut_EndPattern(PsOutPtr self);
- extern void PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type);
-Index: programs/Xserver/dix/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/dix/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/dix/Imakefile     23 Apr 2004 19:04:43 -0000      1.2
-+++ programs/Xserver/dix/Imakefile     15 Dec 2004 04:53:05 -0000      1.2.4.1
-@@ -73,7 +73,7 @@
- #ifdef DarwinArchitecture
- #if DarwinQuartzSupport
--    QUARTZ_DEFINES = -DDARWIN_WITH_QUARTZ -DROOTLESS
-+    QUARTZ_DEFINES = -DDARWIN_WITH_QUARTZ
- #endif
- #endif
-Index: programs/Xserver/dix/dispatch.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/dix/dispatch.c,v
-retrieving revision 1.5
-retrieving revision 1.5.2.1
-diff -u -u -r1.5 -r1.5.2.1
---- programs/Xserver/dix/dispatch.c    31 Jul 2004 01:48:27 -0000      1.5
-+++ programs/Xserver/dix/dispatch.c    13 Dec 2004 01:23:05 -0000      1.5.2.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.5 2004/07/31 01:48:27 anholt Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.5.2.1 2004/12/13 01:23:05 gisburn Exp $ */
- /* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
- /************************************************************
-@@ -362,7 +362,7 @@
-     register int      nready;
-     register HWEventQueuePtr* icheck = checkForInput;
- #ifdef SMART_SCHEDULE
--    int                       start_tick;
-+    long                      start_tick;
- #endif
-     nextFreeClientID = 1;
-Index: programs/Xserver/dix/main.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/dix/main.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/dix/main.c        30 Jun 2004 20:06:53 -0000      1.3
-+++ programs/Xserver/dix/main.c        8 Dec 2004 06:02:34 -0000       1.3.4.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.3 2004/06/30 20:06:53 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.3.4.1 2004/12/08 06:02:34 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */
- /***********************************************************
-@@ -689,7 +689,7 @@
-     if (i == MAXSCREENS)
-       return -1;
--    pScreen = (ScreenPtr) xalloc(sizeof(ScreenRec));
-+    pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec));
-     if (!pScreen)
-       return -1;
-Index: programs/Xserver/fb/fb.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/fb/fb.h,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/fb/fb.h   11 Aug 2004 21:14:17 -0000      1.6
-+++ programs/Xserver/fb/fb.h   15 Dec 2004 04:53:05 -0000      1.6.2.1
-@@ -22,7 +22,7 @@
-  * PERFORMANCE OF THIS SOFTWARE.
-  */
--/* $XdotOrg: xc/programs/Xserver/fb/fb.h,v 1.6 2004/08/11 21:14:17 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/fb/fb.h,v 1.6.2.1 2004/12/15 04:53:05 gisburn Exp $ */
- #ifndef _FB_H_
- #define _FB_H_
-@@ -647,7 +647,7 @@
-       ((WindowPtr) (pWin))->devPrivates[fbGetWinPrivateIndex()].ptr)
- #endif
--#if defined(__DARWIN__)||defined(__CYGWIN__)
-+#ifdef ROOTLESS
- #define __fbPixOriginX(pPix)  ((pPix)->drawable.x)
- #define __fbPixOriginY(pPix)  ((pPix)->drawable.y)
- #else
-Index: programs/Xserver/fb/fbwindow.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbwindow.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/fb/fbwindow.c     13 Aug 2004 08:16:14 -0000      1.4
-+++ programs/Xserver/fb/fbwindow.c     17 Dec 2004 00:38:21 -0000      1.4.2.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/fb/fbwindow.c,v 1.4 2004/08/13 08:16:14 keithp Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/fb/fbwindow.c,v 1.4.2.1 2004/12/17 00:38:21 gisburn Exp $ */
- /*
-  * Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
-  *
-@@ -122,12 +122,9 @@
- {
-     RegionRec rgnDst;
-     int               dx, dy;
--#ifdef COMPOSITE
-+
-     PixmapPtr pPixmap = fbGetWindowPixmap (pWin);
-     DrawablePtr       pDrawable = &pPixmap->drawable;
--#else
--    DrawablePtr       pDrawable = &WindowTable[pWin->drawable.pScreen->myNum]->drawable;
--#endif
-     dx = ptOldOrg.x - pWin->drawable.x;
-     dy = ptOldOrg.y - pWin->drawable.y;
-Index: programs/Xserver/hw/xfree86/common/xf86Configure.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/hw/xfree86/common/xf86Configure.c 15 Aug 2004 15:40:19 -0000      1.6
-+++ programs/Xserver/hw/xfree86/common/xf86Configure.c 15 Dec 2004 05:22:16 -0000      1.6.2.1
-@@ -731,19 +731,13 @@
-     for (i=0;i<4;i++) {
-       switch (ConfiguredMonitor->det_mon[i].type) {
--          case DT:
--          case DS_STD_TIMINGS:
--          case DS_WHITE_P:
--            break;
-           case DS_NAME:
-               ptr->mon_modelname  = xf86confrealloc(ptr->mon_modelname, 
-                 strlen((char*)(ConfiguredMonitor->det_mon[i].section.name))
-                   + 1);
-               strcpy(ptr->mon_modelname,
-                      (char*)(ConfiguredMonitor->det_mon[i].section.name));
--            break;
--          case DS_ASCII_STR:
--          case DS_SERIAL:
-+              break;
-           case DS_RANGES:
-               ptr->mon_hsync[ptr->mon_n_hsync].lo =
-                   ConfiguredMonitor->det_mon[i].section.ranges.min_h;
-Index: programs/Xserver/hw/xfree86/common/xf86Events.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- programs/Xserver/hw/xfree86/common/xf86Events.c    30 Jul 2004 20:56:53 -0000      1.3
-+++ programs/Xserver/hw/xfree86/common/xf86Events.c    15 Dec 2004 05:36:14 -0000      1.3.2.1
-@@ -49,7 +49,7 @@
-  */
- /* $XConsortium: xf86Events.c /main/46 1996/10/25 11:36:30 kaleb $ */
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.3 2004/07/30 20:56:53 eich Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.3.2.1 2004/12/15 05:36:14 gisburn Exp $ */
- /* [JCH-96/01/21] Extended std reverse map to four buttons. */
-@@ -1334,6 +1334,10 @@
-     ErrorF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
-          BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
- #endif
-+#ifdef DPMSExtension
-+    if (DPMSPowerLevel != DPMSModeOn)
-+      DPMSSet(DPMSModeOn);
-+#endif
-     for (i = 0; i < xf86NumScreens; i++) {
-       if (!(dispatchException & DE_TERMINATE))
-       if (xf86Screens[i]->EnableDisableFBAccess)
-@@ -1353,13 +1357,9 @@
-     }
- #endif /* !__UNIXOS2__ */
-     xf86EnterServerState(SETUP);
--    for (i = 0; i < xf86NumScreens; i++) {
--#ifdef DPMSExtension
--      if (xf86Screens[i]->DPMSSet)
--          xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
--#endif
-+    for (i = 0; i < xf86NumScreens; i++)
-       xf86Screens[i]->LeaveVT(i, 0);
--    }
-+
-     for (ih = InputHandlers; ih; ih = ih->next)
-       xf86DisableInputHandler(ih);
-     xf86AccessLeave();      /* We need this here, otherwise */
-Index: programs/Xserver/hw/xfree86/common/xf86Init.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v
-retrieving revision 1.12
-retrieving revision 1.12.2.2
-diff -u -u -r1.12 -r1.12.2.2
---- programs/Xserver/hw/xfree86/common/xf86Init.c      20 Aug 2004 05:22:39 -0000      1.12
-+++ programs/Xserver/hw/xfree86/common/xf86Init.c      17 Dec 2004 02:01:21 -0000      1.12.2.2
-@@ -96,6 +96,7 @@
- #ifdef DPMSExtension
- #define DPMS_SERVER
- #include "extensions/dpms.h"
-+#include "dpmsproc.h"
- #endif
-@@ -1244,7 +1245,7 @@
-   /*
-    * try to deinitialize all input devices
-    */
--  if (xf86Info.pKeyboard)
-+  if (xf86Info.kbdProc && xf86Info.pKeyboard)
-     (xf86Info.kbdProc)(xf86Info.pKeyboard, DEVICE_CLOSE);
-   /*
-@@ -1254,6 +1255,10 @@
-   /* Need the sleep when starting X from within another X session */
-   sleep(1);
- #endif
-+#ifdef DPMSExtension /* Turn screens back on */
-+  if (DPMSPowerLevel != DPMSModeOn)
-+      DPMSSet(DPMSModeOn);
-+#endif
-   if (xf86Screens) {
-       if (xf86Screens[0]->vtSema)
-         xf86EnterServerState(SETUP);
-@@ -1265,10 +1270,6 @@
-              * screen explicitely.
-              */
-             xf86EnableAccess(xf86Screens[i]);
--#ifdef DPMSExtension
--            if (xf86Screens[i]->DPMSSet)
--                xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
--#endif
-             (xf86Screens[i]->LeaveVT)(i, 0);
-         }
-   }
-@@ -1763,8 +1764,22 @@
- #endif
- #if XORG_VERSION_SNAP >= 900
--  ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
--                              XORG_VERSION_SNAP - 900);
-+  /* When the patch number is 99, that signifies that the we are making
-+   * a release candidate for a major version; however, if the patch
-+   * number is < 99, then we are making a release candidate for the next
-+   * point release.
-+   */
-+  if (XORG_VERSION_PATCH == 99)
-+      ErrorF(" (%d.%d.0 RC %d)",
-+           XORG_VERSION_MAJOR,
-+           XORG_VERSION_MINOR + 1,
-+           XORG_VERSION_SNAP - 900);
-+  else
-+      ErrorF(" (%d.%d.%d RC %d)",
-+           XORG_VERSION_MAJOR,
-+           XORG_VERSION_MINOR,
-+           XORG_VERSION_PATCH + 1,
-+           XORG_VERSION_SNAP - 900);
- #endif
- #ifdef XORG_CUSTOM_VERSION
-Index: programs/Xserver/hw/xfree86/common/xf86Xinput.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.6.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.6.1
---- programs/Xserver/hw/xfree86/common/xf86Xinput.c    25 Nov 2003 19:28:33 -0000      1.1.1.2
-+++ programs/Xserver/hw/xfree86/common/xf86Xinput.c    13 Dec 2004 02:15:29 -0000      1.1.1.2.6.1
-@@ -932,10 +932,15 @@
-                   /* modeled from xf86Events.c */
-                   if (device->ptrfeed->ctrl.threshold) {
-                       if ((abs(dx) + abs(dy)) >= device->ptrfeed->ctrl.threshold) {
--                          valuator[0] = (dx * device->ptrfeed->ctrl.num) /
--                                          device->ptrfeed->ctrl.den;
--                          valuator[1] = (dy * device->ptrfeed->ctrl.num) /
--                                          device->ptrfeed->ctrl.den;
-+                          local->dxremaind = ((float)dx * (float)(device->ptrfeed->ctrl.num)) /
-+                              (float)(device->ptrfeed->ctrl.den) + local->dxremaind;
-+                          valuator[0] = (int)local->dxremaind;
-+                          local->dxremaind = local->dxremaind - (float)valuator[0];
-+                          
-+                          local->dyremaind = ((float)dy * (float)(device->ptrfeed->ctrl.num)) /
-+                              (float)(device->ptrfeed->ctrl.den) + local->dyremaind;
-+                          valuator[1] = (int)local->dyremaind;
-+                          local->dyremaind = local->dyremaind - (float)valuator[1];
-                       }
-                   }
-                   else if (dx || dy) {
-Index: programs/Xserver/hw/xfree86/common/xf86pciBus.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xfree86/common/xf86pciBus.c    9 Aug 2004 22:37:22 -0000       1.4
-+++ programs/Xserver/hw/xfree86/common/xf86pciBus.c    8 Dec 2004 06:07:57 -0000       1.4.2.1
-@@ -104,9 +104,6 @@
- #define PCI_MEM32_LENGTH_MAX 0xFFFFFFFF
--#undef MIN
--#define MIN(x,y) ((x<y)?x:y)
--
- #define B2M(tag,base) pciBusAddrToHostAddr(tag,PCI_MEM,base)
- #define B2I(tag,base) (base)
- #define B2H(tag,base,type) (((type & ResPhysMask) == ResMem) ? \
-@@ -1649,7 +1646,7 @@
-           m = xf86JoinResLists(m,tmp);
-           tmp = m;
-           while (tmp) {
--              tmp->block_end = MIN(tmp->block_end,PCI_MEM32_LENGTH_MAX);
-+              tmp->block_end = min(tmp->block_end,PCI_MEM32_LENGTH_MAX);
-               tmp = tmp->next;
-           }
-       } else if ((pbp->primary == pvp->bus) &&
-Index: programs/Xserver/hw/xfree86/ddc/edid.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/ddc/edid.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/ddc/edid.h     23 Apr 2004 19:21:03 -0000      1.2
-+++ programs/Xserver/hw/xfree86/ddc/edid.h     17 Dec 2004 01:28:14 -0000      1.2.4.1
-@@ -11,7 +11,7 @@
-  */
- #ifndef _EDID_H_
--#define _EDID_H_ 1
-+#define _EDID_H_ 
- #include "vdif.h"
-@@ -126,7 +126,9 @@
- #define SETUP _SETUP(GET(D_INPUT))
- #define _SYNC(x) (x  & 0x0F)
- #define SYNC _SYNC(GET(D_INPUT))
--#define _GAMMA(x) ((x + 100.0)/100.0)
-+#define _DFP(x) (x & 0x01)
-+#define DFP _DFP(GET(D_INPUT))
-+#define _GAMMA(x) (x == 0xff ? 1.0 : ((x + 100.0)/100.0))
- #define GAMMA _GAMMA(GET(D_GAMMA))
- #define HSIZE_MAX GET(D_HSIZE)
- #define VSIZE_MAX GET(D_VSIZE)
-@@ -158,20 +160,27 @@
- #define T_MANU GET(E_TMANU)
- /* extract information from estabished timing section */
-+#define _VALID_TIMING(x) ((x[0] != 0x01 && x[1] != 0x01) \
-+                       && (x[0] != 0x00 && x[1] != 0x00) \
-+                       && (x[0] != 0x20 && x[1] != 0x20) )
-+#define VALID_TIMING _VALID_TIMING(c)
- #define _HSIZE1(x) ((x[0] + 31) * 8)
- #define HSIZE1 _HSIZE1(c)
- #define RATIO(x) ((x[1] & 0xC0) >> 6)
- #define RATIO1_1 0
-+/* EDID Ver. 1.3 redefined this */
-+#define RATIO16_10 RATIO1_1
- #define RATIO4_3 1
- #define RATIO5_4 2
- #define RATIO16_9 3
--#define _VSIZE1(x,y) switch(RATIO(x)){ \
--  case RATIO1_1: y = _HSIZE1(x); break; \
-+#define _VSIZE1(x,y,r) switch(RATIO(x)){ \
-+  case RATIO1_1: y = _HSIZE1(x) * ((v->version>1||v->revision>2) ? 10/16 : 1); \
-+                                         break; \
-   case RATIO4_3: y = _HSIZE1(x) * 3 / 4; break; \
-   case RATIO5_4: y = _HSIZE1(x) * 4 / 5; break; \
-   case RATIO16_9: y = _HSIZE1(x) * 9 / 16; break; \
-   }
--#define VSIZE1(x) _VSIZE1(c,x)
-+#define VSIZE1(x) _VSIZE1(c,x,v)
- #define _REFRESH_R(x) (x[1] & 0x3F) + 60
- #define REFRESH_R  _REFRESH_R(c)
- #define _ID_LOW(x) x[0]
-@@ -183,7 +192,7 @@
- #define NEXT_STD_TIMING _NEXT_STD_TIMING(c)
--/* EDID Ver. > 1.2 */
-+/* EDID Ver. >= 1.2 */
- #define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0 && x[2] == 0 && x[4] == 0)
- #define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
- #define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
-@@ -214,8 +223,10 @@
- #define V_BORDER _V_BORDER(c)
- #define _INTERLACED(x) ((x[17] & 0x80) >> 7)
- #define INTERLACED _INTERLACED(c)
--#define _STEREO(x) ((x[17] & 0x60) >> 6)
-+#define _STEREO(x) ((x[17] & 0x60) >> 5)
- #define STEREO _STEREO(c)
-+#define _STEREO1(x) (x[17] & 0x1)
-+#define STEREO1 _STEREO(c)
- #define _SYNC_T(x) ((x[17] & 0x18) >> 4)
- #define SYNC_T _SYNC_T(c)
- #define _MISC(x) ((x[17] & 0x06) >> 2)
-@@ -236,6 +247,18 @@
- #define MAX_H _MAX_H(c) 
- #define _MAX_CLOCK(x) x[9]
- #define MAX_CLOCK _MAX_CLOCK(c) 
-+#define _HAVE_2ND_GTF(x) (x[10] == 0x02)
-+#define HAVE_2ND_GTF _HAVE_2ND_GTF(c)
-+#define _F_2ND_GTF(x) (x[12] * 2)
-+#define F_2ND_GTF _F_2ND_GTF(c)
-+#define _C_2ND_GTF(x) (x[13] / 2)
-+#define C_2ND_GTF _C_2ND_GTF(c)
-+#define _M_2ND_GTF(x) (x[14] + (x[15] << 8))
-+#define M_2ND_GTF _M_2ND_GTF(c)
-+#define _K_2ND_GTF(x) (x[16])
-+#define K_2ND_GTF _K_2ND_GTF(c)
-+#define _J_2ND_GTF(x) (x[17] / 2)
-+#define J_2ND_GTF _J_2ND_GTF(c)
- #define MONITOR_NAME 0xFC
- #define ADD_COLOR_POINT 0xFB
- #define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
-@@ -255,6 +278,7 @@
- #define _WHITE_GAMMA2(x) _GAMMA(x[14])
- #define WHITE_GAMMA2 _WHITE_GAMMA2(c)
- #define ADD_STD_TIMINGS 0xFA
-+#define ADD_DUMMY 0x10
- #define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN))
- #define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION(c)
-@@ -264,6 +288,9 @@
- /* input type */
- #define DIGITAL(x) x
-+/* DFP */
-+#define DFP1(x) x
-+
- /* input voltage level */
- #define V070 0  /* 0.700V/0.300V */
- #define V071 1  /* 0.714V/0.286V */
-@@ -297,8 +324,12 @@
- /* detailed timing misc */
- #define IS_INTERLACED(x)  (x) 
- #define IS_STEREO(x)  (x) 
--#define IS_RIGHT_ON_SYNC(x) (x & 0x01)
--#define IS_LEFT_ON_SYNC(x) (x & 0x02)
-+#define IS_RIGHT_STEREO(x) (x & 0x01)
-+#define IS_LEFT_STEREO(x) (x & 0x02)
-+#define IS_4WAY_STEREO(x) (x & 0x03)
-+#define IS_RIGHT_ON_SYNC(x) IS_RIGHT_STEREO(x)
-+#define IS_LEFT_ON_SYNC(x) IS_LEFT_STEREO(x)
-+
- typedef unsigned int Uint;
- typedef unsigned char Uchar;
-@@ -321,6 +352,7 @@
-   unsigned int input_voltage:2;
-   unsigned int input_setup:1;
-   unsigned int input_sync:5;
-+  unsigned int input_dfp:1;
-   int hsize;
-   int vsize;
-   float gamma;
-@@ -368,6 +400,7 @@
-   unsigned int stereo:2;
-   unsigned int sync:2;
-   unsigned int misc:2;
-+  unsigned int stereo_1:1;
- };
- #define DT 0
-@@ -377,6 +410,7 @@
- #define DS_RANGES 0xFD
- #define DS_WHITE_P 0xFB
- #define DS_STD_TIMINGS 0xFA
-+#define DS_DUMMY 0x10
- struct monitor_ranges {
-   int min_v;
-@@ -384,6 +418,11 @@
-   int min_h;
-   int max_h;
-   int max_clock;
-+  int gtf_2nd_f;
-+  int gtf_2nd_c;
-+  int gtf_2nd_m;
-+  int gtf_2nd_k;
-+  int gtf_2nd_j;
- };
- struct whitePoints{
-Index: programs/Xserver/hw/xfree86/ddc/interpret_edid.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/ddc/interpret_edid.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- programs/Xserver/hw/xfree86/ddc/interpret_edid.c   27 Aug 2004 12:32:14 -0000      1.3
-+++ programs/Xserver/hw/xfree86/ddc/interpret_edid.c   17 Dec 2004 01:28:14 -0000      1.3.2.1
-@@ -13,16 +13,21 @@
- static void get_vendor_section(Uchar*, struct vendor *);
- static void get_version_section(Uchar*, struct edid_version *);
--static void get_display_section(Uchar*, struct disp_features *);
-+static void get_display_section(Uchar*, struct disp_features *,
-+                              struct edid_version *);
- static void get_established_timing_section(Uchar*, struct established_timings *);
--static void get_std_timing_section(Uchar*, struct std_timings *);
-+static void get_std_timing_section(Uchar*, struct std_timings *,
-+                                 struct edid_version *);
- static void get_dt_md_section(Uchar *, struct edid_version *,
-                             struct detailed_monitor_section *det_mon);
- static void copy_string(Uchar *, Uchar *);
--static void get_dst_timing_section(Uchar *, struct std_timings *);
-+static void get_dst_timing_section(Uchar *, struct std_timings *,
-+                                 struct edid_version *);
- static void get_monitor_ranges(Uchar *, struct monitor_ranges *);
- static void get_whitepoint_section(Uchar *, struct whitePoints *);
- static void get_detailed_timing_section(Uchar*, struct        detailed_timings *);
-+static Bool validate_version(int scrnIndex, struct edid_version *);
-+
- xf86MonPtr
- xf86InterpretEDID(int scrnIndex, Uchar *block)
-@@ -33,15 +38,24 @@
-     if (! (m = xnfcalloc(sizeof(xf86Monitor),1))) return NULL;
-     m->scrnIndex = scrnIndex;
-     m->rawData = block;
-+
-     get_vendor_section(SECTION(VENDOR_SECTION,block),&m->vendor);
-     get_version_section(SECTION(VERSION_SECTION,block),&m->ver);
--    get_display_section(SECTION(DISPLAY_SECTION,block),&m->features);
-+    if (!validate_version(scrnIndex, &m->ver)) goto error;
-+    get_display_section(SECTION(DISPLAY_SECTION,block),&m->features,
-+                      &m->ver);
-     get_established_timing_section(SECTION(ESTABLISHED_TIMING_SECTION,block),
-                                  &m->timings1);
--    get_std_timing_section(SECTION(STD_TIMING_SECTION,block),m->timings2);
-+    get_std_timing_section(SECTION(STD_TIMING_SECTION,block),m->timings2,
-+                         &m->ver);
-     get_dt_md_section(SECTION(DET_TIMING_SECTION,block),&m->ver, m->det_mon);
-     m->no_sections = (int)*(char *)SECTION(NO_EDID,block);
-+    
-     return (m);
-+
-+ error:
-+    xfree(m);
-+    return NULL;
- }
- static void
-@@ -66,12 +80,16 @@
- }
- static void 
--get_display_section(Uchar *c, struct disp_features *r)
-+get_display_section(Uchar *c, struct disp_features *r,
-+                  struct edid_version *v)
- {
-     r->input_type = INPUT_TYPE;
--    r->input_voltage = INPUT_VOLTAGE;
--    r->input_setup = SETUP;
--    r->input_sync = SYNC;
-+    if (!DIGITAL(r->input_type)) {
-+      r->input_voltage = INPUT_VOLTAGE;
-+      r->input_setup = SETUP;
-+      r->input_sync = SYNC;
-+    } else if (v->version > 1 || v->revision > 2)
-+      r->input_dfp = DFP;
-     r->hsize = HSIZE_MAX;
-     r->vsize = VSIZE_MAX;
-     r->gamma = GAMMA;
-@@ -97,15 +115,20 @@
- }
- static void
--get_std_timing_section(Uchar *c, struct std_timings *r)
-+get_std_timing_section(Uchar *c, struct std_timings *r,
-+                     struct edid_version *v)
- {
-     int i;
-     for (i=0;i<STD_TIMINGS;i++){
--      r[i].hsize = HSIZE1;
--      VSIZE1(r[i].vsize);
--      r[i].refresh = REFRESH_R;
--      r[i].id = STD_TIMING_ID;
-+      if (VALID_TIMING) {
-+          r[i].hsize = HSIZE1;
-+          VSIZE1(r[i].vsize);
-+          r[i].refresh = REFRESH_R;
-+          r[i].id = STD_TIMING_ID;
-+      } else {
-+          r[i].hsize = r[i].vsize = r[i].refresh = r[i].id = 0;
-+      }
-       NEXT_STD_TIMING;
-     }
- }
-@@ -142,8 +165,11 @@
-       break;
-       case ADD_STD_TIMINGS:
-       det_mon[i].type = DS_STD_TIMINGS;
--      get_dst_timing_section(c,det_mon[i].section.std_t);
-+      get_dst_timing_section(c,det_mon[i].section.std_t, ver);
-       break;
-+      case ADD_DUMMY:
-+      det_mon[i].type = DS_DUMMY;
-+        break;
-       }
-     } else { 
-       det_mon[i].type = DT;
-@@ -165,7 +191,8 @@
- }
- static void
--get_dst_timing_section(Uchar *c, struct std_timings *t)
-+get_dst_timing_section(Uchar *c, struct std_timings *t,
-+                     struct edid_version *v)
- {
-   int j;
-     c = c + 5;
-@@ -188,6 +215,14 @@
-     r->max_clock = 0;
-     if(MAX_CLOCK != 0xff) /* is specified? */
-       r->max_clock = MAX_CLOCK * 10;
-+    if (HAVE_2ND_GTF) {
-+      r->gtf_2nd_f = F_2ND_GTF;
-+      r->gtf_2nd_c = C_2ND_GTF;
-+      r->gtf_2nd_m = M_2ND_GTF;
-+      r->gtf_2nd_k = K_2ND_GTF;
-+      r->gtf_2nd_j = J_2ND_GTF;
-+    } else
-+      r->gtf_2nd_f = 0;
- }
- static void
-@@ -221,8 +256,21 @@
-   r->v_border = V_BORDER;
-   r->interlaced = INTERLACED;
-   r->stereo = STEREO;
-+  r->stereo_1 = STEREO1;
-   r->sync = SYNC_T;
-   r->misc = MISC;
- }
-+static Bool
-+validate_version(int scrnIndex, struct edid_version *r)
-+{
-+    if (r->version != 1)
-+      return FALSE;
-+    if (r->revision > 3) {
-+      xf86DrvMsg(scrnIndex, X_ERROR,"EDID Version 1.%i not yet supported\n",
-+                 r->revision);
-+      return FALSE;
-+    }
-+    return TRUE;
-+}
-Index: programs/Xserver/hw/xfree86/ddc/print_edid.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/ddc/print_edid.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/ddc/print_edid.c       23 Apr 2004 19:21:03 -0000      1.2
-+++ programs/Xserver/hw/xfree86/ddc/print_edid.c       17 Dec 2004 01:28:14 -0000      1.2.4.1
-@@ -12,7 +12,8 @@
-   
- static void print_vendor(int scrnIndex, struct vendor *);
- static void print_version(int scrnIndex, struct edid_version *);
--static void print_display(int scrnIndex, struct disp_features *);
-+static void print_display(int scrnIndex, struct disp_features *,
-+                        struct edid_version *);
- static void print_established_timings(int scrnIndex,
-                                     struct established_timings *);
- static void print_std_timings(int scrnIndex, struct std_timings *);
-@@ -21,19 +22,23 @@
- static void print_detailed_timings(int scrnIndex, struct detailed_timings *);
- static void print_input_features(int scrnIndex, struct disp_features *);
--static void print_dpms_features(int scrnIndex, struct disp_features *);
-+static void print_dpms_features(int scrnIndex, struct disp_features *,
-+                              struct edid_version *v);
- static void print_whitepoint(int scrnIndex, struct disp_features *);
--  
-+static void print_number_sections(int scrnIndex, int);
-+
- xf86MonPtr
- xf86PrintEDID(xf86MonPtr m)
- {
-     if (!(m)) return NULL;
-     print_vendor(m->scrnIndex,&m->vendor);
-     print_version(m->scrnIndex,&m->ver);
--    print_display(m->scrnIndex,&m->features);
-+    print_display(m->scrnIndex,&m->features, &m->ver);
-     print_established_timings(m->scrnIndex,&m->timings1);
-     print_std_timings(m->scrnIndex,m->timings2);
-     print_detailed_monitor_section(m->scrnIndex,m->det_mon);
-+    print_number_sections(m->scrnIndex,m->no_sections);
-+    
-     return m;
- }
-   
-@@ -53,7 +58,8 @@
- }
-   
- static void
--print_display(int scrnIndex, struct disp_features *disp)
-+print_display(int scrnIndex, struct disp_features *disp,
-+            struct edid_version *version)
- {
-     print_input_features(scrnIndex,disp);
-     xf86DrvMsg(scrnIndex,X_INFO,"Max H-Image Size [cm]: ");
-@@ -66,16 +72,18 @@
-       else
-       xf86ErrorF("V-Size may change\n");
-     xf86DrvMsg(scrnIndex,X_INFO,"Gamma: %.2f\n", disp->gamma);
--    print_dpms_features(scrnIndex,disp);
-+    print_dpms_features(scrnIndex,disp,version);
-     print_whitepoint(scrnIndex,disp);
- }
-   
- static void 
- print_input_features(int scrnIndex, struct disp_features *c)
- {
--    if (DIGITAL(c->input_type))
-+    if (DIGITAL(c->input_type)) {
-       xf86DrvMsg(scrnIndex,X_INFO,"Digital Display Input\n");
--    else {
-+      if (DFP1(c->input_dfp))
-+          xf86DrvMsg(scrnIndex,X_INFO,"DFP 1.x compatible TMDS\n");
-+    } else {
-       xf86DrvMsg(scrnIndex,X_INFO,"Analog Display Input,  ");
-       xf86ErrorF("Input Voltage Level: ");
-       switch (c->input_voltage){
-@@ -111,7 +119,8 @@
- }
-   
- static void 
--print_dpms_features(int scrnIndex, struct disp_features *c)
-+print_dpms_features(int scrnIndex, struct disp_features *c,
-+                  struct edid_version *v)
- {
-      if (c->dpms) {
-        xf86DrvMsg(scrnIndex,X_INFO,"DPMS capabilities:");
-@@ -140,6 +149,10 @@
-     if (PREFERRED_TIMING_MODE(c->msc))
-       xf86DrvMsg(scrnIndex,X_INFO,
-                  "First detailed timing is preferred mode\n"); 
-+    else if (v->version == 1 && v->revision >= 3)
-+      xf86DrvMsg(scrnIndex,X_INFO,
-+                 "First detailed timing not preferred "
-+                 "mode in violation of standard!");
-     if (GFT_SUPPORTED(c->msc))
-       xf86DrvMsg(scrnIndex,X_INFO,
-                  "GTF timings supported\n"); 
-@@ -234,7 +247,15 @@
-           if (m[i].section.ranges.max_clock != 0)
-               xf86ErrorF(" PixClock max %i MHz\n",m[i].section.ranges.max_clock);
-           else
--              xf86DrvMsg(scrnIndex,X_INFO,"\n");
-+              xf86ErrorF("\n");
-+          if (m[i].section.ranges.gtf_2nd_f > 0)
-+              xf86DrvMsg(scrnIndex,X_INFO," 2nd GTF parameters: f: %i kHz "
-+                         "c: %i m: %i k %i j %i\n",
-+                         m[i].section.ranges.gtf_2nd_f,
-+                         m[i].section.ranges.gtf_2nd_c,
-+                         m[i].section.ranges.gtf_2nd_m,
-+                         m[i].section.ranges.gtf_2nd_k,
-+                         m[i].section.ranges.gtf_2nd_j);
-           break;
-       case DS_STD_TIMINGS:
-           for (j = 0; j<5; j++) 
-@@ -252,6 +273,9 @@
-                              m[i].section.wp[j].white_y,
-                              m[i].section.wp[j].white_gamma);
-           break;
-+      case DS_DUMMY:
-+      default:
-+          break;
-       }
-     }
- }
-@@ -278,9 +302,32 @@
-       xf86ErrorF("v_border: %i\n",t->v_border);
-       if (IS_STEREO(t->stereo)) {
-           xf86DrvMsg(scrnIndex,X_INFO,"Stereo: ");
--          if (IS_RIGHT_ON_SYNC(t->stereo)) 
--              xf86ErrorF("right channel on sync\n");
--          else xf86ErrorF("right channel on sync\n");
-+          if (IS_RIGHT_STEREO(t->stereo)) {
-+              if (!t->stereo_1)
-+                  xf86ErrorF("right channel on sync\n");
-+              else
-+                  xf86ErrorF("left channel on sync\n");
-+          } else if (IS_LEFT_STEREO(t->stereo)) {
-+              if (!t->stereo_1)
-+                  xf86ErrorF("right channel on even line\n");
-+              else 
-+                  xf86ErrorF("left channel on evel line\n");
-+          }
-+          if (IS_4WAY_STEREO(t->stereo)) {
-+              if (!t->stereo_1)
-+                  xf86ErrorF("4-way interleaved\n");
-+              else
-+                  xf86ErrorF("side-by-side interleaved");
-+          }
-       }
-     }
- }
-+
-+static void
-+print_number_sections(int scrnIndex, int num)
-+{
-+    if (num)
-+      xf86DrvMsg(scrnIndex,X_INFO,"Number of EDID sections to follow: %i\n",
-+                 num);
-+}
-+
-Index: programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml    8 Sep 2004 01:54:29 -0000       1.4
-+++ programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml    15 Dec 2004 07:08:45 -0000      1.4.2.1
-@@ -280,6 +280,12 @@
- to succeed.  If you want to install on a filesystem other than
- <tt>/usr</tt>, make a symbolic link to <tt>/usr/X11R6</tt> before
- installing.
-+To install the tree into a different directory than <tt>/usr/X11R6</tt>
-+you can specify <tt>DESTDIR</tt>:
-+<quote><tt>
-+make install DESTDIR=&lt;install_target_dir&gt;
-+make install.man DESTDIR=&lt;install_target_dir&gt;
-+</tt></quote>
- <p>
- Cross compiling is supported if the appropriate config files for your
-Index: programs/Xserver/hw/xfree86/drivers/ati/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/hw/xfree86/drivers/ati/Imakefile  30 Jul 2004 22:20:21 -0000      1.6
-+++ programs/Xserver/hw/xfree86/drivers/ati/Imakefile  15 Dec 2004 08:47:20 -0000      1.6.2.1
-@@ -87,8 +87,16 @@
-  * Currently, ATIAvoidNonPCI needs to be set to YES for those platforms that do
-  * not tolerate PCI master aborts.
-  */
-+/* 
-+ * Some older IA64 platforms don't mind if we are poking around in PIO
-+ * space, however the newer once do an MC if we poke any registers outside
-+ * a small band in the VGA range. Therefore it is best not to touch PIO
-+ * space in IA64 at all. 
-+ * This will disenfranchise Mach8/32 users but these cards are ISA and
-+ * there is no IA64 with ISA slots. It is not recommended to use ISA
-+ * adaptor boards for those cards.
-+ */
- #if defined(i386Architecture) || \
--    defined(ia64Architecture) || \
-     defined(AMD64Architecture) || \
-     defined(AlphaArchitecture)
- # ifndef ATIAvoidCPIO
-@@ -149,7 +157,8 @@
- #endif
--DEFINES = $(CPIODEFINES) $(DGADEFINES) $(NONPCIDEFINES) $(DRIDEFINES)
-+DEFINES = $(CPIODEFINES) $(DGADEFINES) $(NONPCIDEFINES) $(NOLEGACYDEFINES) \
-+      $(DRIDEFINES)
- SRCS1 = ati.c atiadapter.c atibus.c atichip.c atiident.c atioption.c \
-       atiprobe.c atividmem.c $(CPIOSRCS1) $(MODSRCS1) \
-Index: programs/Xserver/hw/xfree86/drivers/ati/atipreinit.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/atipreinit.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xfree86/drivers/ati/atipreinit.c       26 Jul 2004 19:14:58 -0000      1.3
-+++ programs/Xserver/hw/xfree86/drivers/ati/atipreinit.c       15 Dec 2004 07:58:15 -0000      1.3.4.1
-@@ -1918,11 +1918,11 @@
-                    VBlankEnd += 0x0100U;
-                 pATI->LCDHBlankWidth = HBlankEnd - HBlankStart;
--                pATI->LCDHSyncStart = HSyncStart - HBlankStart - 1;
-+                pATI->LCDHSyncStart = HSyncStart - HBlankStart;
-                 pATI->LCDHSyncWidth = HSyncEnd - HSyncStart;
-                 pATI->LCDVBlankWidth = VBlankEnd - VBlankStart;
--                pATI->LCDVSyncStart = VSyncStart - VBlankStart - 1;
-+                pATI->LCDVSyncStart = VSyncStart - VBlankStart;
-                 pATI->LCDVSyncWidth = VSyncEnd - VSyncStart;
-                 HDisplay = HTotal + 5 - pATI->LCDHBlankWidth;
-Index: programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.2
-diff -u -u -r1.3 -r1.3.2.2
---- programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c 30 Jul 2004 20:30:51 -0000      1.3
-+++ programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c 15 Dec 2004 08:47:20 -0000      1.3.2.2
-@@ -1243,6 +1243,10 @@
-             xf86MsgVerb(X_INFO, 2, ATI_NAME ":  Unshared VGA not probed.\n");
-         }
-+      /* 
-+       *  Mach8/32 probing doesn't work well on some legacy free ia64 
-+       *  However if we use AVOID_CPIO we don't get here at all.
-+       */
-         if (ATICheckSparseIOBases(NULL, ProbeFlags, 0x02E8U, 8,
-                 fChipsets[ATI_CHIPSET_IBM8514] ||
-                 fChipsets[ATI_CHIPSET_MACH8] ||
-@@ -1275,6 +1279,10 @@
-                 ATI_NAME ":  Unshared 8514/A not probed.\n");
-         }
-+      /* 
-+       * Also NONPCI Mach64 probing is evil on legacy free platforms.
-+       * However if we use AVOID_CPIO we don't get here at all.
-+       */
-         for (i = 0;  i < NumberOf(Mach64SparseIOBases);  i++)
-         {
-             if (ATICheckSparseIOBases(NULL, ProbeFlags, Mach64SparseIOBases[i],
-@@ -1309,7 +1317,6 @@
-             ATIClaimSparseIOBases(ProbeFlags, Mach64SparseIOBases[i], 4,
-                 DetectedMach64);
-         }
--
- #endif /* AVOID_NON_PCI */
-     }
-@@ -1539,7 +1546,6 @@
-                                 ATIFindVGA(pVideo, &pVGA, &pATI, p8514,
-                                     ProbeFlags);
-                         }
--
-                         xf86SetPciVideo(NULL, NONE);
-                         break;
-                 }
-@@ -1554,6 +1560,9 @@
-                     continue;
-                 pPCI = pVideo->thisCard;
-+              if (pPCI == NULL)
-+                  continue;
-+              
-                 PciReg = pciReadLong(pPCI->tag, PCI_REG_USERCONFIG);
-                 j = PciReg & 0x03U;
-                 if (j == 0x03U)
-Index: programs/Xserver/hw/xfree86/drivers/ati/ativga.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/ativga.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/ati/ativga.c   23 Apr 2004 19:26:46 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/ati/ativga.c   15 Dec 2004 07:58:15 -0000      1.2.4.1
-@@ -185,7 +185,11 @@
-             (pATI->Chip >= ATI_CHIP_264CT))
-             pMode->CrtcHBlankStart--;
-         pMode->CrtcHSyncStart = pMode->HSyncStart >> 3;
-+        if (pATI->LCDPanelID >= 0)
-+            pMode->CrtcHSyncStart--;
-         pMode->CrtcHSyncEnd = pMode->HSyncEnd >> 3;
-+        if (pATI->LCDPanelID >= 0)
-+            pMode->CrtcHSyncEnd--;
-         pMode->CrtcHBlankEnd = (pMode->HTotal >> 3) - 1;
-         pMode->CrtcHTotal = (pMode->HTotal >> 3) - 5;
-         pMode->CrtcHSkew = pMode->HSkew;
-@@ -327,6 +331,11 @@
-         pMode->CrtcVBlankStart++;
-     else
-         pMode->CrtcVBlankStart--;
-+    if (pATI->LCDPanelID >= 0)
-+    {
-+        pMode->CrtcVSyncStart--;
-+        pMode->CrtcVSyncEnd--;
-+    }
-     pMode->CrtcVBlankEnd--;
-     if (pATI->Chip < ATI_CHIP_264CT)
-         pMode->CrtcVBlankEnd--;
-Index: programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c       16 Jun 2004 09:43:58 -0000      1.3
-+++ programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c       15 Dec 2004 09:22:02 -0000      1.3.4.1
-@@ -237,17 +237,23 @@
-         i = 0;
-         do {
-             ret = drmCommandNone(info->drmFD, DRM_R128_CCE_IDLE);
--        } while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY );
-+        } while ( ret && errno == EBUSY && i++ < (R128_IDLE_RETRY * R128_IDLE_RETRY) );
-       if (ret && ret != -EBUSY) {
-           xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                      "%s: CCE idle %d\n", __FUNCTION__, ret);
-       }
-+      if (i > R128_IDLE_RETRY) {
-+          xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-+                     "%s: (DEBUG) CCE idle took i = %d\n", __FUNCTION__, i);
-+      }
-+
-       if (ret == 0) return;
-       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                  "Idle timed out, resetting engine...\n");
-+      R128CCE_STOP(pScrn, info);
-       R128EngineReset(pScrn);
-       /* Always restart the engine when doing CCE 2D acceleration */
-Index: programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 10 Jul 2004 14:22:35 -0000      1.4
-+++ programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 15 Dec 2004 08:53:01 -0000      1.4.4.1
-@@ -1297,6 +1297,7 @@
-     if (info->irq) {
-       drmCtlUninstHandler(info->drmFD);
-       info->irq = 0;
-+      info->gen_int_cntl = 0;
-     }
-                               /* De-allocate vertex buffers */
-Index: programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c,v
-retrieving revision 1.10
-retrieving revision 1.10.2.1
-diff -u -u -r1.10 -r1.10.2.1
---- programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c      15 Aug 2004 00:44:57 -0000      1.10
-+++ programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c      15 Dec 2004 09:13:36 -0000      1.10.2.1
-@@ -1640,7 +1640,11 @@
-                                  NULL,        /* linePitches */
-                                  8 * 64,      /* minPitch */
-                                  8 * 1024,    /* maxPitch */
--                                 8 * 64,      /* pitchInc */
-+/*
-+ * ATI docs say pitchInc must be 8 * 64, but this doesn't permit a pitch of
-+ * 800 bytes, which is known to work on the Rage128 LF on clamshell iBooks
-+ */
-+                                 8 * 32,      /* pitchInc */
-                                  128,         /* minHeight */
-                                  2048,        /* maxHeight */
-                                  pScrn->display->virtualX,
-Index: programs/Xserver/hw/xfree86/drivers/ati/r128_video.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/ati/r128_video.c       23 Apr 2004 19:26:46 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/ati/r128_video.c       15 Dec 2004 09:13:36 -0000      1.2.4.1
-@@ -579,20 +579,20 @@
-    pScreen = screenInfo.screens[pScrn->scrnIndex];
--   new_linear = xf86AllocateOffscreenLinear(pScreen, size, 16,
-+   new_linear = xf86AllocateOffscreenLinear(pScreen, size, 8,
-                                               NULL, NULL, NULL);
-    if(!new_linear) {
-       int max_size;
--      xf86QueryLargestOffscreenLinear(pScreen, &max_size, 16,
-+      xf86QueryLargestOffscreenLinear(pScreen, &max_size, 8,
-                                               PRIORITY_EXTREME);
-       if(max_size < size)
-          return NULL;
-       xf86PurgeUnlockedOffscreenAreas(pScreen);
--      new_linear = xf86AllocateOffscreenLinear(pScreen, size, 16,
-+      new_linear = xf86AllocateOffscreenLinear(pScreen, size, 8,
-                                               NULL, NULL, NULL);
-    }
-Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_bios.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_bios.c,v
-retrieving revision 1.1
-retrieving revision 1.1.2.1
-diff -u -u -r1.1 -r1.1.2.1
---- programs/Xserver/hw/xfree86/drivers/ati/radeon_bios.c      30 Jul 2004 22:20:21 -0000      1.1
-+++ programs/Xserver/hw/xfree86/drivers/ati/radeon_bios.c      16 Dec 2004 02:08:34 -0000      1.1.2.1
-@@ -198,13 +198,28 @@
-           return FALSE;
-       }
-     } else {
-+      /* Some laptops only have one connector (VGA) listed in the connector table, 
-+       * we need to add LVDS in as a non-DDC display. 
-+       * Note, we can't assume the listed VGA will be filled in PortInfo[0],
-+       * when walking through connector table. connector_found has following meaning: 
-+       * 0 -- nothing found, 
-+       * 1 -- only PortInfo[0] filled, 
-+       * 2 -- only PortInfo[1] filled,
-+       * 3 -- both are filled.
-+       */
-+      int connector_found = 0;
-+
-       if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x50))) {
-           for (i = 1; i < 4; i++) {
-               if (!RADEON_BIOS8(tmp + i*2) && i > 1) break; /* end of table */
-               
-               tmp0 = RADEON_BIOS16(tmp + i*2);
--              if (((tmp0 >> 12) & 0x1f) == 0) continue; /* no connector */
-+              if (((tmp0 >> 12) & 0x0f) == 0) continue;     /* no connector */
-+              if (connector_found > 0) {
-+                  if (pRADEONEnt->PortInfo[tmp1].DDCType == ((tmp0 >> 8) & 0x0f))
-+                      continue;                             /* same connector */
-+              }
-               /* internal DDC_DVI port will get assigned to PortInfo[0], or if there is no DDC_DVI (like in some IGPs). */
-               tmp1 = ((((tmp0 >> 8) & 0xf) == DDC_DVI) || (tmp1 == 1)) ? 0 : 1; /* determine port info index */
-@@ -222,9 +237,7 @@
-                   pRADEONEnt->PortInfo[tmp1].TMDSType == TMDS_INT)
-                   pRADEONEnt->PortInfo[tmp1].TMDSType = TMDS_UNKNOWN;
-               
--              xf86DrvMsg(0, X_INFO, "Connector%d: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
--                         tmp1, pRADEONEnt->PortInfo[tmp1].DDCType, pRADEONEnt->PortInfo[tmp1].DACType,
--                         pRADEONEnt->PortInfo[tmp1].TMDSType, pRADEONEnt->PortInfo[tmp1].ConnectorType);
-+              connector_found += (tmp1 + 1);
-           }
-       } else {
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No Connector Info Table found!\n");
-@@ -232,14 +245,54 @@
-       }
-       if (info->IsMobility) {
--        if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x42))) {
--          if ((tmp0 = RADEON_BIOS16(tmp + 0x15))) {
--            if ((tmp1 = RADEON_BIOS8(tmp0+2) & 0x07)) {           
--              pRADEONEnt->PortInfo[0].DDCType = tmp1;      
--              xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "LCD DDC Info Table found!\n");
--            }
-+          /* For the cases where only one VGA connector is found, 
-+             we assume LVDS is not listed in the connector table, 
-+             add it in here as the first port.
-+          */
-+          if ((connector_found < 3) && (pRADEONEnt->PortInfo[tmp1].ConnectorType == CONNECTOR_CRT)) {
-+              if (connector_found == 1) {
-+                  memcpy (&pRADEONEnt->PortInfo[1], &pRADEONEnt->PortInfo[0], 
-+                          sizeof (pRADEONEnt->PortInfo[0]));
-+              }
-+              pRADEONEnt->PortInfo[0].DACType = DAC_TVDAC;
-+              pRADEONEnt->PortInfo[0].TMDSType = TMDS_UNKNOWN;
-+              pRADEONEnt->PortInfo[0].DDCType = DDC_NONE_DETECTED;
-+              pRADEONEnt->PortInfo[0].ConnectorType = CONNECTOR_PROPRIETARY;
-+
-+              xf86DrvMsg(pScrn->scrnIndex, X_INFO, "LVDS port is not in connector table, added in.\n");
-+              if (connector_found == 0) connector_found = 1;
-+              else connector_found = 3;
-           }
--        } 
-+
-+          if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x42))) {
-+              if ((tmp0 = RADEON_BIOS16(tmp + 0x15))) {
-+                  if ((tmp1 = RADEON_BIOS8(tmp0+2) & 0x07)) {     
-+                      pRADEONEnt->PortInfo[0].DDCType = tmp1;      
-+                      xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "LCD DDC Info Table found!\n");
-+                  }
-+              }
-+          } 
-+      } else if (connector_found == 2) {
-+          memcpy (&pRADEONEnt->PortInfo[0], &pRADEONEnt->PortInfo[1], 
-+                  sizeof (pRADEONEnt->PortInfo[0]));  
-+          pRADEONEnt->PortInfo[1].DACType = DAC_UNKNOWN;
-+          pRADEONEnt->PortInfo[1].TMDSType = TMDS_UNKNOWN;
-+          pRADEONEnt->PortInfo[1].DDCType = DDC_NONE_DETECTED;
-+          pRADEONEnt->PortInfo[1].ConnectorType = CONNECTOR_NONE;
-+          connector_found = 1;
-+      }
-+
-+      if (connector_found == 0) {
-+          xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No connector found in Connector Info Table.\n");
-+      } else {
-+          xf86DrvMsg(0, X_INFO, "Connector0: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
-+                     pRADEONEnt->PortInfo[0].DDCType, pRADEONEnt->PortInfo[0].DACType,
-+                     pRADEONEnt->PortInfo[0].TMDSType, pRADEONEnt->PortInfo[0].ConnectorType);
-+      }
-+      if (connector_found == 3) {
-+          xf86DrvMsg(0, X_INFO, "Connector1: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
-+                     pRADEONEnt->PortInfo[1].DDCType, pRADEONEnt->PortInfo[1].DACType,
-+                     pRADEONEnt->PortInfo[1].TMDSType, pRADEONEnt->PortInfo[1].ConnectorType);
-       }
- #if 0
-Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v
-retrieving revision 1.19
-retrieving revision 1.19.2.7
-diff -u -u -r1.19 -r1.19.2.7
---- programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c    25 Aug 2004 00:30:41 -0000      1.19
-+++ programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c    17 Dec 2004 00:13:18 -0000      1.19.2.7
-@@ -365,6 +365,7 @@
-     "xf86InitInt10",
-     "xf86FreeInt10",
-     "xf86int10Addr",
-+    "xf86ExecX86int10",
-     NULL
- };
-@@ -1311,7 +1312,7 @@
-       info->PanelYRes = (INREG(RADEON_CRTC_V_TOTAL_DISP)>>16) + 1;
-     }
-     if (fp_horz_stretch & RADEON_HORZ_STRETCH_ENABLE) {
--      info->PanelXRes = ((fp_vert_stretch>>16) + 1) * 8;
-+      info->PanelXRes = ((fp_horz_stretch>>16) + 1) * 8;
-     } else {
-       info->PanelXRes = ((INREG(RADEON_CRTC_H_TOTAL_DISP)>>16) + 1) * 8;
-     }
-@@ -1712,6 +1713,13 @@
-               break;
-           }
-       }
-+      for (i = 0; i < max_mt; i++) {
-+          if (strcmp(s2, MonTypeName[i]) == 0) {
-+              pRADEONEnt->PortInfo[1].MonType = MonTypeID[i];
-+              break;
-+          }
-+      }
-+
-       if (i ==  max_mt)
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                      "Invalid Monitor type specified for 2nd port \n");
-@@ -1744,32 +1752,45 @@
-     }
--    if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN || pRADEONEnt->PortInfo[1].MonType == MT_UNKNOWN) {
--
--      if(((!info->HasCRTC2) || info->IsDellServer) && 
--         (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN)) {
-+    if(((!info->HasCRTC2) || info->IsDellServer)) {
-+      if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN) {
-           if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_DVI, &pRADEONEnt->PortInfo[0])));
-           else if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_VGA, &pRADEONEnt->PortInfo[0])));
-           else if((pRADEONEnt->PortInfo[0].MonType = RADEONDisplayDDCConnected(pScrn, DDC_CRT2, &pRADEONEnt->PortInfo[0])));
-           else
-               pRADEONEnt->PortInfo[0].MonType = MT_CRT;
-+      }
--          if (!ignore_edid) {
--              if (pRADEONEnt->PortInfo[0].MonInfo) {
--                  xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Monitor1 EDID data ---------------------------\n");
--                  xf86PrintEDID(pRADEONEnt->PortInfo[0].MonInfo );
--                  xf86DrvMsg(pScrn->scrnIndex, X_INFO, "End of Monitor1 EDID data --------------------\n");
--              }
-+      if (!ignore_edid) {
-+          if (pRADEONEnt->PortInfo[0].MonInfo) {
-+              xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Monitor1 EDID data ---------------------------\n");
-+              xf86PrintEDID(pRADEONEnt->PortInfo[0].MonInfo );
-+              xf86DrvMsg(pScrn->scrnIndex, X_INFO, "End of Monitor1 EDID data --------------------\n");
-           }
--
--          pRADEONEnt->MonType1 = pRADEONEnt->PortInfo[0].MonType;
--          pRADEONEnt->MonInfo1 = pRADEONEnt->PortInfo[0].MonInfo;
--          pRADEONEnt->MonType2 = MT_NONE;
--          pRADEONEnt->MonInfo2 = NULL;
--          info->MergeType = MT_NONE;
--          return TRUE;
-       }
-+      pRADEONEnt->MonType1 = pRADEONEnt->PortInfo[0].MonType;
-+      pRADEONEnt->MonInfo1 = pRADEONEnt->PortInfo[0].MonInfo;
-+      pRADEONEnt->MonType2 = MT_NONE;
-+      pRADEONEnt->MonInfo2 = NULL;
-+      info->MergeType = MT_NONE;
-+      info->DisplayType = pRADEONEnt->MonType1;
-+
-+      xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+                 "Primary:\n Monitor   -- %s\n Connector -- %s\n DAC Type  -- %s\n TMDS Type -- %s\n DDC Type  -- %s\n",
-+                 MonTypeName[pRADEONEnt->PortInfo[0].MonType+1],
-+                 info->IsAtomBios ?
-+                 ConnectorTypeNameATOM[pRADEONEnt->PortInfo[0].ConnectorType]:
-+                 ConnectorTypeName[pRADEONEnt->PortInfo[0].ConnectorType],
-+                 DACTypeName[pRADEONEnt->PortInfo[0].DACType+1],
-+                 TMDSTypeName[pRADEONEnt->PortInfo[0].TMDSType+1],
-+                 DDCTypeName[pRADEONEnt->PortInfo[0].DDCType]);
-+
-+      return TRUE;
-+    }
-+
-+    if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN || pRADEONEnt->PortInfo[1].MonType == MT_UNKNOWN) {
-+
-       /* Primary Head (DVI or Laptop Int. panel)*/
-       /* A ddc capable display connected on DVI port */
-       if (pRADEONEnt->PortInfo[0].MonType == MT_UNKNOWN) {
-@@ -2583,8 +2604,10 @@
-       if (ddc->det_mon[j].type == 0) {
-           struct detailed_timings *d_timings =
-               &ddc->det_mon[j].section.d_timings;
--          if (info->PanelXRes < d_timings->h_active &&
--              info->PanelYRes < d_timings->v_active) {
-+          if (info->PanelXRes <= d_timings->h_active &&
-+              info->PanelYRes <= d_timings->v_active) {
-+
-+              if (info->DotClock) continue; /* Timings already inited */
-               info->PanelXRes  = d_timings->h_active;
-               info->PanelYRes  = d_timings->v_active;
-@@ -3157,8 +3180,9 @@
-               new->next       = NULL;
-               new->prev       = last;
--              last->next = new;
-+              if (last) last->next = new;
-               last = new;
-+              if (!first) first = new;
-           }
-       }
-     }
-@@ -4471,10 +4495,12 @@
-     RADEONSave(pScrn);
--    if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
--      RADEONSetDynamicClock(pScrn, 1);
--    } else {
--      RADEONSetDynamicClock(pScrn, 0);
-+    if ((!info->IsSecondary) && info->IsMobility) {
-+        if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) {
-+          RADEONSetDynamicClock(pScrn, 1);
-+        } else {
-+          RADEONSetDynamicClock(pScrn, 0);
-+        }
-     }
-     if (info->FBDev) {
-@@ -7133,6 +7159,7 @@
-       RADEONDoAdjustFrame(pScrn, x, y, FALSE);
-     }
-+    RADEONSetFBLocation (pScrn);
- #ifdef XF86DRI
-       if (info->CPStarted) DRIUnlock(pScrn->pScreen);
- #endif
-@@ -7145,9 +7172,22 @@
- {
-     ScrnInfoPtr    pScrn = xf86Screens[scrnIndex];
-     RADEONInfoPtr  info  = RADEONPTR(pScrn);
-+    unsigned char *RADEONMMIO = info->MMIO;
-     RADEONTRACE(("RADEONEnterVT\n"));
-+    if (INREG(RADEON_CONFIG_MEMSIZE) == 0) { /* Softboot V_BIOS */
-+       xf86Int10InfoPtr pInt;
-+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+                  "zero MEMSIZE, probably at D3cold. Re-POSTing via int10.\n");
-+       pInt = xf86InitInt10 (info->pEnt->index);
-+       if (pInt) {
-+           pInt->num = 0xe6;
-+           xf86ExecX86int10 (pInt);
-+           xf86FreeInt10 (pInt);
-+       }
-+    }
-+
-     if (info->FBDev) {
-       unsigned char *RADEONMMIO = info->MMIO;
-       if (!fbdevHWEnterVT(scrnIndex,flags)) return FALSE;
-@@ -7158,6 +7198,8 @@
-     } else
-       if (!RADEONModeInit(pScrn, pScrn->currentMode)) return FALSE;
-+    RADEONSetFBLocation (pScrn);
-+
- #ifdef XF86DRI
-     if (info->directRenderingEnabled) {
-       /* get the Radeon back into shape after resume */
-Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h,v
-retrieving revision 1.7
-retrieving revision 1.7.2.1
-diff -u -u -r1.7 -r1.7.2.1
---- programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h       9 Aug 2004 22:37:22 -0000       1.7
-+++ programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h       17 Dec 2004 00:13:18 -0000      1.7.2.1
-@@ -803,7 +803,7 @@
- #       define RADEON_MC_MCLK_MAX_DYN_STOP_LAT (1<<12)
- #       define RADEON_IO_MCLK_MAX_DYN_STOP_LAT (1<<13)
- #       define RADEON_MC_MCLK_DYN_ENABLE    (1 << 14)
--#       define RADEON_IO_MCLK_DYN_ENABLE    (1 << 14)
-+#       define RADEON_IO_MCLK_DYN_ENABLE    (1 << 15)
- #define RADEON_MDGPIO_A_REG                 0x01ac
- #define RADEON_MDGPIO_EN_REG                0x01b0
- #define RADEON_MDGPIO_MASK                  0x0198
-Index: programs/Xserver/hw/xfree86/drivers/i810/common.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/common.h,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xfree86/drivers/i810/common.h  22 Jun 2004 14:28:46 -0000      1.3
-+++ programs/Xserver/hw/xfree86/drivers/i810/common.h  15 Dec 2004 09:35:23 -0000      1.3.4.1
-@@ -173,7 +173,7 @@
- #define BEGIN_LP_RING(n)                                              \
-    unsigned int outring, ringmask;                                    \
-    volatile unsigned char *virt;                                      \
--   unsigned int needed;                                                       \
-+   int needed;                                                        \
-    if ((n) & 1)                                                               \
-       ErrorF("BEGIN_LP_RING called with odd argument: %d\n", n);      \
-    if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC))                     \
-@@ -206,7 +206,7 @@
- #define BEGIN_LP_RING(n)                                              \
-    unsigned int outring, ringmask;                                    \
-    volatile unsigned char *virt;                                      \
--   unsigned int needed;                                                       \
-+   int needed;                                                                \
-    if ((n) & 1)                                                               \
-       ErrorF("BEGIN_LP_RING called with odd argument: %d\n", n);      \
-    if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC))                     \
-Index: programs/Xserver/hw/xfree86/drivers/i810/i810.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/Xserver/hw/xfree86/drivers/i810/i810.h    22 Jun 2004 14:28:46 -0000      1.4
-+++ programs/Xserver/hw/xfree86/drivers/i810/i810.h    15 Dec 2004 09:35:23 -0000      1.4.4.1
-@@ -172,7 +172,7 @@
-    unsigned long OverlayPhysical;
-    unsigned long OverlayStart;
-    int colorKey;
--   int surfaceAllocation[I810_TOTAL_SURFACES];
-+   unsigned int surfaceAllocation[I810_TOTAL_SURFACES];
-    int numSurfaces;
-    DGAModePtr DGAModes;
-@@ -295,9 +295,10 @@
- extern void I810Sync(ScrnInfoPtr pScrn);
- extern unsigned long I810LocalToPhysical(ScrnInfoPtr pScrn,
-                                        unsigned long local);
--extern int I810AllocLow(I810MemRange * result, I810MemRange * pool, int size);
-+extern int I810AllocLow(I810MemRange * result, I810MemRange * pool, 
-+                      int size);
- extern int I810AllocHigh(I810MemRange * result, I810MemRange * pool,
--                       int size);
-+                      int size);
- extern Bool I810AllocateFront(ScrnInfoPtr pScrn);
- extern int I810AllocateGARTMemory(ScrnInfoPtr pScrn);
-Index: programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c      30 Jul 2004 20:30:52 -0000      1.4
-+++ programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c      15 Dec 2004 09:35:23 -0000      1.4.2.1
-@@ -259,7 +259,7 @@
- #ifdef XF86DRI
-    /* VT switching tries to do this.  
-     */
--   if (!pI810->LockHeld && pI810->directRenderingEnabled) {
-+   if ((!pI810->LockHeld && pI810->directRenderingEnabled) || !pScrn->vtSema) {
-       return;
-    }
- #endif
-Index: programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c        22 Jun 2004 14:28:46 -0000      1.4
-+++ programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c        15 Dec 2004 09:35:23 -0000      1.4.4.1
-@@ -290,7 +290,7 @@
-    unsigned long dcacheHandle;
-    int sysmem_size = 0;
-    int back_size = 0;
--   int pitch_idx = 0;
-+   unsigned int pitch_idx = 0;
-    int bufs;
-    int width = pScrn->displayWidth * pI810->cpp;
-    int i;
-Index: programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v
-retrieving revision 1.9
-retrieving revision 1.9.2.1
-diff -u -u -r1.9 -r1.9.2.1
---- programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c     25 Aug 2004 00:30:41 -0000      1.9
-+++ programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c     15 Dec 2004 09:35:23 -0000      1.9.2.1
-@@ -1124,14 +1124,6 @@
-    xf86SetOperatingState(resVgaIo, pI810->pEnt->index, ResUnusedOpr);
-    xf86SetOperatingState(resVgaMem, pI810->pEnt->index, ResDisableOpr);
--   pI810->LpRing = xalloc(sizeof(I810RingBuffer));
--   if (!pI810->LpRing) {
--     xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 
--              "Could not allocate lpring data structure.\n");
--     I810FreeRec(pScrn);
--     return FALSE;
--   }
--   
-    return TRUE;
- }
-@@ -1159,7 +1151,7 @@
- I810MapMem(ScrnInfoPtr pScrn)
- {
-    I810Ptr pI810 = I810PTR(pScrn);
--   unsigned i;
-+   long i;
-    for (i = 2; i < pI810->FbMapSize; i <<= 1) ;
-    pI810->FbMapSize = i;
-@@ -2074,6 +2066,13 @@
-    pI810 = I810PTR(pScrn);
-    hwp = VGAHWPTR(pScrn);
-+   pI810->LpRing = xcalloc(sizeof(I810RingBuffer),1);
-+   if (!pI810->LpRing) {
-+     xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 
-+              "Could not allocate lpring data structure.\n");
-+     return FALSE;
-+   }
-+   
-    miClearVisualTypes();
-    /* Re-implemented Direct Color support, -jens */
-Index: programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c     30 Aug 2004 03:19:08 -0000      1.4
-+++ programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c     15 Dec 2004 09:35:23 -0000      1.4.2.1
-@@ -55,7 +55,7 @@
- int
- I810AllocLow(I810MemRange * result, I810MemRange * pool, int size)
- {
--   if (size > pool->Size)
-+   if (size > (long)pool->Size)
-       return 0;
-    pool->Size -= size;
-@@ -69,7 +69,7 @@
- int
- I810AllocHigh(I810MemRange * result, I810MemRange * pool, int size)
- {
--   if (size > pool->Size)
-+   if (size > (long)pool->Size)
-       return 0;
-    pool->Size -= size;
-Index: programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h        22 Jun 2004 14:28:46 -0000      1.3
-+++ programs/Xserver/hw/xfree86/drivers/i810/i810_reg.h        15 Dec 2004 09:35:23 -0000      1.3.4.1
-@@ -459,11 +459,11 @@
- #define I830_HEAD_MASK      0x001FFFFC
- #define RING_START     0x08
--#define START_ADDR          0x00FFFFF8
-+#define START_ADDR          0x03FFFFF8
- #define I830_RING_START_MASK  0xFFFFF000
- #define RING_LEN       0x0C
--#define RING_NR_PAGES       0x000FF000 
-+#define RING_NR_PAGES       0x001FF000 
- #define I830_RING_NR_PAGES    0x001FF000
- #define RING_REPORT_MASK    0x00000006
- #define RING_REPORT_64K     0x00000002
-Index: programs/Xserver/hw/xfree86/drivers/i810/i830.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h,v
-retrieving revision 1.5
-retrieving revision 1.5.4.1
-diff -u -u -r1.5 -r1.5.4.1
---- programs/Xserver/hw/xfree86/drivers/i810/i830.h    6 Jul 2004 14:37:47 -0000       1.5
-+++ programs/Xserver/hw/xfree86/drivers/i810/i830.h    15 Dec 2004 09:35:23 -0000      1.5.4.1
-@@ -180,17 +180,17 @@
-    int CacheLines;
-    /* These are set in PreInit and never changed. */
--   unsigned long FbMapSize;
--   unsigned long TotalVideoRam;
-+   long FbMapSize;
-+   long TotalVideoRam;
-    I830MemRange StolenMemory;         /* pre-allocated memory */
--   unsigned long BIOSMemorySize;      /* min stolen pool size */
-+   long BIOSMemorySize;                       /* min stolen pool size */
-    int BIOSMemSizeLoc;
-    /* These change according to what has been allocated. */
-    long FreeMemory;
-    I830MemRange MemoryAperture;
-    I830MemPool StolenPool;
--   unsigned long allocatedMemory;
-+   long allocatedMemory;
-    /* Regions allocated either from the above pools, or from agpgart. */
-    /* for single and dual head configurations */
-@@ -348,7 +348,7 @@
-    int xoffset;
-    int yoffset;
--   int SaveGeneration;
-+   unsigned int SaveGeneration;
-    Bool vbeRestoreWorkaround;
-    Bool displayInfo;
-    Bool devicePresence;
-@@ -415,7 +415,7 @@
- extern Bool I830BindGARTMemory(ScrnInfoPtr pScrn);
- extern Bool I830UnbindGARTMemory(ScrnInfoPtr pScrn);
- extern unsigned long I830AllocVidMem(ScrnInfoPtr pScrn, I830MemRange *result,
--                                   I830MemPool *pool, unsigned long size,
-+                                   I830MemPool *pool, long size,
-                                    unsigned long alignment, int flags);
- extern void I830PrintAllRegisters(I830RegPtr i830Reg);
-Index: programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c     30 Jul 2004 20:38:27 -0000      1.6
-+++ programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c     15 Dec 2004 09:35:23 -0000      1.6.2.1
-@@ -594,6 +594,7 @@
-    I830Ptr pI830 = I830PTR(pScrn);
-    vbeInfoPtr pVbe = pI830->pVbe;
-    CARD32 temp;
-+
- #ifdef I915G_WORKAROUND
-    int getmode;
-    int mode;
-@@ -1018,7 +1019,7 @@
- I830MapMem(ScrnInfoPtr pScrn)
- {
-    I830Ptr pI830 = I830PTR(pScrn);
--   unsigned i;
-+   long i;
-    for (i = 2; i < pI830->FbMapSize; i <<= 1) ;
-    pI830->FbMapSize = i;
-@@ -2898,7 +2899,7 @@
-    OUTREG(LP_RING + RING_TAIL, 0);
-    OUTREG(LP_RING + RING_HEAD, 0);
--   if ((pI830->LpRing->mem.Start & I830_RING_START_MASK) !=
-+   if ((long)(pI830->LpRing->mem.Start & I830_RING_START_MASK) !=
-        pI830->LpRing->mem.Start) {
-       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                "I830SetRingRegs: Ring buffer start (%lx) violates its "
-@@ -3441,7 +3442,7 @@
-          I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
-          temp = INREG(stridereg);
--         if (temp / pI8301->cpp != pI830->entityPrivate->pScrn_1->displayWidth) {
-+         if (temp / pI8301->cpp != (CARD32)(pI830->entityPrivate->pScrn_1->displayWidth)) {
-             xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                   "Correcting plane %c stride (%d -> %d)\n", PIPE_NAME(pI830->pipe),
-                   (int)(temp / pI8301->cpp), pI830->entityPrivate->pScrn_1->displayWidth);
-@@ -3459,7 +3460,7 @@
-             sizereg = pI830->pipe ? DSPASIZE : DSPBSIZE;
-             temp = INREG(stridereg);
--            if (temp / pI8302->cpp != pI830->entityPrivate->pScrn_2->displayWidth) {
-+            if (temp / pI8302->cpp != (CARD32)(pI830->entityPrivate->pScrn_2->displayWidth)) {
-              xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                   "Correcting plane %c stride (%d -> %d)\n", PIPE_NAME(!pI830->pipe),
-                   (int)(temp / pI8302->cpp), pI830->entityPrivate->pScrn_2->displayWidth);
-@@ -3478,7 +3479,7 @@
-          I830Ptr pI8302 = I830PTR(pI830->entityPrivate->pScrn_2);
-          temp = INREG(stridereg);
--         if (temp / pI8301->cpp != pI830->entityPrivate->pScrn_1->displayWidth) {
-+         if (temp / pI8301->cpp != (CARD32)(pI830->entityPrivate->pScrn_1->displayWidth)) {
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                   "Correcting plane %c stride (%d -> %d)\n", PIPE_NAME(pI830->pipe),
-                   (int)(temp / pI8301->cpp), pI830->entityPrivate->pScrn_1->displayWidth);
-@@ -3494,7 +3495,7 @@
-          sizereg = !pI830->pipe ? DSPASIZE : DSPBSIZE;
-          temp = INREG(stridereg);
--         if (temp / pI8302->cpp != pI830->entityPrivate->pScrn_2->displayWidth) {
-+         if (temp / pI8302->cpp != ((CARD32)pI830->entityPrivate->pScrn_2->displayWidth)) {
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                   "Correcting plane %c stride (%d -> %d)\n", PIPE_NAME(!pI830->pipe),
-                   (int)(temp / pI8302->cpp), pI830->entityPrivate->pScrn_2->displayWidth);
-@@ -3515,7 +3516,7 @@
-           continue;
-          temp = INREG(stridereg);
--         if (temp / pI830->cpp != pScrn->displayWidth) {
-+         if (temp / pI830->cpp != (CARD32)pScrn->displayWidth) {
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-                   "Correcting plane %c stride (%d -> %d)\n", PIPE_NAME(i),
-                   (int)(temp / pI830->cpp), pScrn->displayWidth);
-@@ -4354,6 +4355,9 @@
-       SaveHWOperatingState(pScrn);
- #endif
-+   ResetState(pScrn, TRUE);
-+   RestoreHWState(pScrn);
-+
-    if (IsPrimary(pScrn)) {
-       if (!SetDisplayDevices(pScrn, pI830->savedDevices)) {
-          xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-@@ -4365,8 +4369,6 @@
-       }
-    }
--   ResetState(pScrn, TRUE);
--   RestoreHWState(pScrn);
-    RestoreBIOSMemSize(pScrn);
-    if (IsPrimary(pScrn))
-       I830UnbindGARTMemory(pScrn);
-@@ -4506,7 +4508,8 @@
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-    I830Ptr pI830 = I830PTR(pScrn);
-    Bool on = xf86IsUnblank(mode);
--   CARD32 temp, ctrl, base, i;
-+   CARD32 temp, ctrl, base;
-+   int i;
-    DPRINTF(PFX, "I830BIOSSaveScreen: %d, on is %s\n", mode, BOOLTOSTRING(on));
-Index: programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c     6 Jul 2004 14:37:47 -0000       1.4
-+++ programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c     15 Dec 2004 09:35:23 -0000      1.4.4.1
-@@ -63,10 +63,10 @@
-  */
- static unsigned long
- AllocFromPool(ScrnInfoPtr pScrn, I830MemRange *result, I830MemPool *pool,
--            unsigned long size, unsigned long alignment, int flags)
-+            long size, unsigned long alignment, int flags)
- {
-    I830Ptr pI830 = I830PTR(pScrn);
--   unsigned long needed, start, end;
-+   long needed, start, end;
-    Bool dryrun = ((flags & ALLOCATE_DRY_RUN) != 0);
-    if (!result || !pool || !size)
-@@ -94,7 +94,7 @@
-       }
-    }
-    if (needed > pool->Free.Size) {
--      unsigned long extra;
-+      long extra;
-       /* See if the pool can be grown. */
-       if (pI830->StolenOnly && !dryrun)
-        return 0;
-@@ -107,7 +107,7 @@
-           return 0;
-       }
--      if (!dryrun && (extra > pI830->MemoryAperture.Size))
-+      if (!dryrun && ((long)extra > pI830->MemoryAperture.Size))
-        return 0;
-       pool->Free.Size += extra;
-@@ -136,7 +136,7 @@
- }
- static unsigned long
--AllocFromAGP(ScrnInfoPtr pScrn, I830MemRange *result, unsigned long size,
-+AllocFromAGP(ScrnInfoPtr pScrn, I830MemRange *result, long size,
-            unsigned long alignment, int flags)
- {
-    I830Ptr pI830 = I830PTR(pScrn);
-@@ -212,7 +212,7 @@
- unsigned long
- I830AllocVidMem(ScrnInfoPtr pScrn, I830MemRange *result, I830MemPool *pool,
--              unsigned long size, unsigned long alignment, int flags)
-+              long size, unsigned long alignment, int flags)
- {
-    I830Ptr pI830 = I830PTR(pScrn);
-    Bool dryrun = ((flags & ALLOCATE_DRY_RUN) != 0);
-@@ -392,7 +392,7 @@
- I830Allocate2DMemory(ScrnInfoPtr pScrn, const int flags)
- {
-    I830Ptr pI830 = I830PTR(pScrn);
--   unsigned long size, alloced;
-+   long size, alloced;
-    Bool dryrun = ((flags & ALLOCATE_DRY_RUN) != 0);
-    int verbosity = dryrun ? 4 : 1;
-    const char *s = dryrun ? "[dryrun] " : "";
-@@ -610,9 +610,9 @@
-        return FALSE;
-       }
-    } else {
--      unsigned long lineSize;
--      unsigned long extra = 0;
--      unsigned long maxFb = 0;
-+      long lineSize;
-+      long extra = 0;
-+      long maxFb = 0;
-       /*
-        * XXX Need to "free" up any 3D allocations if the DRI ended up
-@@ -857,7 +857,7 @@
- I830GetExcessMemoryAllocations(ScrnInfoPtr pScrn)
- {
-    I830Ptr pI830 = I830PTR(pScrn);
--   unsigned long allocated;
-+   long allocated;
-    allocated = pI830->StolenPool.Total.Size + pI830->allocatedMemory;
-    if (allocated > pI830->TotalVideoRam)
-@@ -1367,7 +1367,7 @@
-    I830Ptr pI830 = I830PTR(pScrn);
-    int pitch, ntiles, i;
-    static int nextTile = 0;
--   static int tileGeneration = -1;
-+   static unsigned int tileGeneration = -1;
- #if 0
-    /* Hack to "improve" the alignment of the front buffer.
-Index: programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c    23 Apr 2004 19:40:15 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c    16 Dec 2004 01:30:36 -0000      1.2.4.1
-@@ -240,45 +240,42 @@
-    GeodePtr pGeode;
-    ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
-+    XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
-+   XF86VideoAdaptorPtr newAdaptor = NULL;
-+   
-+   int num_adaptors;
-    pGeode = GEODEPTR(pScreenInfo);
--   if (!pGeode->NoAccel) {
--      ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
--      XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
--      XF86VideoAdaptorPtr newAdaptor = NULL;
--
--      int num_adaptors;
--
--      DEBUGMSG(0, (0, X_NONE, "InitVideo\n"));
--      newAdaptor = GX1SetupImageVideo(pScreen);
--      GX1InitOffscreenImages(pScreen);
--
--      num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
--
--      if (newAdaptor) {
--       if (!num_adaptors) {
--          num_adaptors = 1;
--          adaptors = &newAdaptor;
--       } else {
--          newAdaptors =               /* need to free this someplace */
--                xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
--          if (newAdaptors) {
-+   
-+   DEBUGMSG(0, (0, X_NONE, "InitVideo\n"));
-+   newAdaptor = GX1SetupImageVideo(pScreen);
-+   GX1InitOffscreenImages(pScreen);
-+   
-+   num_adaptors = xf86XVListGenericAdaptors(pScreenInfo, &adaptors);
-+   
-+   if (newAdaptor) {
-+       if (!num_adaptors) {
-+         num_adaptors = 1;
-+         adaptors = &newAdaptor;
-+       } else {
-+         newAdaptors =                /* need to free this someplace */
-+             xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
-+         if (newAdaptors) {
-              memcpy(newAdaptors, adaptors, num_adaptors *
-                     sizeof(XF86VideoAdaptorPtr));
-              newAdaptors[num_adaptors] = newAdaptor;
-              adaptors = newAdaptors;
-              num_adaptors++;
--          }
--       }
--      }
--
--      if (num_adaptors)
--       xf86XVScreenInit(pScreen, adaptors, num_adaptors);
--
--      if (newAdaptors)
--       xfree(newAdaptors);
-+         }
-+       }
-    }
-+   
-+   if (num_adaptors)
-+       xf86XVScreenInit(pScreen, adaptors, num_adaptors);
-+   
-+   if (newAdaptors)
-+       xfree(newAdaptors);
- }
- /* client libraries expect an encoding */
-@@ -413,17 +410,15 @@
- void
- GX1ResetVideo(ScrnInfoPtr pScrn)
- {
--   GeodePtr pGeode = GEODEPTR(pScrn);
-+    GeodePtr pGeode = GEODEPTR(pScrn);
--   if (!pGeode->NoAccel) {
--      GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
-+    GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
--      DEBUGMSG(0, (0, X_NONE, "ResetVideo\n"));
--      GX1AccelSync(pScrn);
--      GFX(set_video_palette(NULL));
--      GX1SetColorkey(pScrn, pPriv);
--      GFX(set_video_filter(pPriv->filter, pPriv->filter));
--   }
-+    DEBUGMSG(0, (0, X_NONE, "ResetVideo\n"));
-+    if (!pGeode->NoAccel) GX1AccelSync(pScrn);
-+    GFX(set_video_palette(NULL));
-+    GX1SetColorkey(pScrn, pPriv);
-+    GFX(set_video_filter(pPriv->filter, pPriv->filter));
- }
- /*----------------------------------------------------------------------------
-@@ -537,7 +532,7 @@
-    DEBUGMSG(0, (0, X_NONE, "StopVideo\n"));
-    REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
--   GX1AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
-    if (exit) {
-       if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
-        GFX(set_video_enable(0));
-@@ -580,8 +575,9 @@
-                   Atom attribute, INT32 value, pointer data)
- {
-    GeodePortPrivPtr pPriv = (GeodePortPrivPtr) data;
-+   GeodePtr pGeode = GEODEPTR(pScrn);
--   GX1AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
-    if (attribute == xvColorKey) {
-       pPriv->colorKey = value;
-       GX1SetColorkey(pScrn, pPriv);
-@@ -1002,7 +998,7 @@
-    GeodePtr pGeode = GEODEPTR(pScrn);
-    /*    DisplayModePtr mode = pScrn->currentMode; */
--   GX1AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
-    GFX(set_video_enable(1));
-@@ -1353,7 +1349,7 @@
-    (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
-    pScreen->BlockHandler = GX1BlockHandler;
--   GX1AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX1AccelSync(pScrn);
-    if (pPriv->videoStatus & TIMER_MASK) {
-       UpdateCurrentTime();
-       if (pPriv->videoStatus & OFF_TIMER) {
-Index: programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c    23 Apr 2004 19:40:15 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c    16 Dec 2004 01:30:36 -0000      1.2.4.1
-@@ -233,46 +233,42 @@
- void
- GX2InitVideo(ScreenPtr pScreen)
- {
--   GeodePtr pGeode;
--   ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
-+    GeodePtr pGeode;
-+    ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
-+    XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
-+    XF86VideoAdaptorPtr newAdaptor = NULL;
--   pGeode = GEODEPTR(pScreenInfo);
-+    int num_adaptors;
--   if (!pGeode->NoAccel) {
--      ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
--      XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
--      XF86VideoAdaptorPtr newAdaptor = NULL;
-+    pGeode = GEODEPTR(pScreenInfo);
--      int num_adaptors;
-+    newAdaptor = GX2SetupImageVideo(pScreen);
-+    GX2InitOffscreenImages(pScreen);
--      newAdaptor = GX2SetupImageVideo(pScreen);
--      GX2InitOffscreenImages(pScreen);
-+    num_adaptors = xf86XVListGenericAdaptors(pScreenInfo, &adaptors);
--      num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
--
--      if (newAdaptor) {
--       if (!num_adaptors) {
-+    if (newAdaptor) {
-+      if (!num_adaptors) {
-           num_adaptors = 1;
-           adaptors = &newAdaptor;
--       } else {
-+      } else {
-           newAdaptors =               /* need to free this someplace */
--                xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
-+              xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *));
-           if (newAdaptors) {
--             memcpy(newAdaptors, adaptors, num_adaptors *
--                    sizeof(XF86VideoAdaptorPtr));
--             newAdaptors[num_adaptors] = newAdaptor;
--             adaptors = newAdaptors;
--             num_adaptors++;
-+              memcpy(newAdaptors, adaptors, num_adaptors *
-+                     sizeof(XF86VideoAdaptorPtr));
-+              newAdaptors[num_adaptors] = newAdaptor;
-+              adaptors = newAdaptors;
-+              num_adaptors++;
-           }
--       }
--      }
-+      }
-+    }
--      if (num_adaptors)
--       xf86XVScreenInit(pScreen, adaptors, num_adaptors);
-+    if (num_adaptors)
-+      xf86XVScreenInit(pScreen, adaptors, num_adaptors);
--      if (newAdaptors)
--       xfree(newAdaptors);
--   }
-+    if (newAdaptors)
-+      xfree(newAdaptors);
- }
- /* client libraries expect an encoding */
-@@ -416,16 +412,14 @@
- void
- GX2ResetVideo(ScrnInfoPtr pScrn)
- {
--   GeodePtr pGeode = GEODEPTR(pScrn);
-+    GeodePtr pGeode = GEODEPTR(pScrn);
--   if (!pGeode->NoAccel) {
--      GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
-+    GeodePortPrivPtr pPriv = pGeode->adaptor->pPortPrivates[0].ptr;
--      GX2AccelSync(pScrn);
--      GFX(set_video_palette(NULL));
--      GX2SetColorkey(pScrn, pPriv);
--      GFX(set_video_filter(pPriv->filter, pPriv->filter));
--   }
-+    if (!pGeode->NoAccel) GX2AccelSync(pScrn);
-+    GFX(set_video_palette(NULL));
-+    GX2SetColorkey(pScrn, pPriv);
-+    GFX(set_video_filter(pPriv->filter, pPriv->filter));
- }
- /*----------------------------------------------------------------------------
-@@ -537,7 +531,7 @@
-    REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
--   GX2AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
-    if (exit) {
-       if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
-        GFX(set_video_enable(0));
-@@ -580,8 +574,9 @@
-                   Atom attribute, INT32 value, pointer data)
- {
-    GeodePortPrivPtr pPriv = (GeodePortPrivPtr) data;
-+   GeodePtr pGeode = GEODEPTR(pScrn);
--   GX2AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
-    if (attribute == xvColorKey) {
-       pPriv->colorKey = value;
-       GX2SetColorkey(pScrn, pPriv);
-@@ -941,7 +936,7 @@
- {
-    GeodePtr pGeode = GEODEPTR(pScrn);
--   GX2AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
-    GFX(set_video_enable(1));
-@@ -1298,7 +1293,7 @@
-    (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
-    pScreen->BlockHandler = GX2BlockHandler;
--   GX2AccelSync(pScrn);
-+   if (!pGeode->NoAccel) GX2AccelSync(pScrn);
-    if (pPriv->videoStatus & TIMER_MASK) {
-       UpdateCurrentTime();
-       if (pPriv->videoStatus & OFF_TIMER) {
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nv/nv.man      23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv.man      14 Nov 2004 18:13:27 -0000      1.2.4.1
-@@ -1,4 +1,4 @@
--.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man,v 1.22 2003/10/18 01:14:26 mvojkovi Exp $ 
-+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man,v 1.26 2004/10/15 20:32:21 mvojkovi Exp $
- .\" shorthand for double quote that works everywhere.
- .ds q \N'34'
- .TH NV __drivermansuffix__ __vendorversion__
-@@ -51,7 +51,7 @@
- NV17, NV18, NV25, NV28
- .TP 22
- .B GeForce FX, QUADRO FX
--NV30, NV31, NV34, NV35, NV36, NV38
-+NV30, NV31, NV34, NV35, NV36, NV37, NV38, NV40, NV41, NV43, NV44, NV45
- .SH CONFIGURATION DETAILS
- Please refer to __xconfigfile__(__filemansuffix__) for general configuration
- details.  This section only covers configuration details specific to this
-@@ -102,6 +102,11 @@
- nForce2, GeForce4, Quadro4, Geforce FX and Quadro FX.
- Default: off.
- .TP
-+.BI "Option \*qFPScale\*q \*q" boolean \*q 
-+Supported only on GeForce4, Quadro4, Geforce FX and Quadro FX.  This option 
-+tells to the driver to scale lower resolutions up to the flat panel's native
-+resolution.  Default: on.
-+.TP 
- .BI "Option \*qRotate\*q \*qCW\*q"
- .TP
- .BI "Option \*qRotate\*q \*qCCW\*q"
-@@ -118,3 +123,37 @@
- .SH AUTHORS
- Authors include: David McKay, Jarno Paananen, Chas Inman, Dave Schmenk, 
- Mark Vojkovich
-+.SH COPYRIGHT
-+.LP
-+NOTICE TO USER:   The source code  is copyrighted under  U.S. and
-+international laws.  Users and possessors of this source code are
-+hereby granted a nonexclusive,  royalty-free copyright license to
-+use this code in individual and commercial software.
-+.LP
-+Any use of this source code must include,  in the user documentation and
-+internal comments to the code,  notices to the end user as follows:
-+.LP
-+Copyright 1993-2003 NVIDIA, Corporation.  All rights reserved.
-+.LP
-+NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY
-+OF  THIS SOURCE  CODE  FOR ANY PURPOSE.  IT IS  PROVIDED  "AS IS"
-+WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  NVIDIA, CORPORATION 
-+DISCLAIMS ALL WARRANTIES  WITH REGARD  TO THIS SOURCE CODE,
-+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT,  
-+AND FITNESS  FOR A PARTICULAR PURPOSE.   IN NO EVENT SHALL
-+NVIDIA, CORPORATION  BE LIABLE FOR ANY SPECIAL,  INDIRECT,  INCIDENTAL, 
-+OR CONSEQUENTIAL DAMAGES,  OR ANY DAMAGES  WHATSOEVER RESULTING FROM 
-+LOSS OF USE,  DATA OR PROFITS,  WHETHER IN AN ACTION
-+OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,  ARISING OUT OF
-+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
-+.LP
-+U.S. Government  End  Users.   This source code  is a "commercial
-+item,"  as that  term is  defined at  48 C.F.R. 2.101 (OCT 1995),
-+consisting  of "commercial  computer  software"  and  "commercial
-+computer  software  documentation,"  as such  terms  are  used in
-+48 C.F.R. 12.212 (SEPT 1995)  and is provided to the U.S. Government 
-+only as  a commercial end item.   Consistent with  48 C.F.R.
-+12.212 and  48 C.F.R. 227.7202-1 through  227.7202-4 (JUNE 1995),
-+all U.S. Government End Users  acquire the source code  with only
-+those rights set forth herein.                                   
-+
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c 23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c 14 Nov 2004 18:13:27 -0000      1.2.4.1
-@@ -37,7 +37,7 @@
- |*                                                                           *|
-  \***************************************************************************/
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.11 2002/11/26 23:41:58 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.13 2004/03/13 22:07:05 mvojkovi Exp $ */
- #include "nv_include.h"
-@@ -239,28 +239,37 @@
-     NVPtr pNv = NVPTR(pScrn);
-     CARD32 *image = pCurs->bits->argb;
-     CARD32 *dst = (CARD32*)pNv->CURSOR;
-+    CARD32 alpha, tmp;
-     int x, y, w, h;
-     w = pCurs->bits->width;
-     h = pCurs->bits->height;
--#if X_BYTE_ORDER == X_BIG_ENDIAN
--    if((pNv->Chipset & 0x0ff0) == 0x0110) {
--       CARD32 tmp;
--
-+    if((pNv->Chipset & 0x0ff0) == 0x0110) {  /* premultiply */
-        for(y = 0; y < h; y++) {
-           for(x = 0; x < w; x++) {
--              tmp = *image++;
--              *dst++ = BYTE_SWAP_32(tmp);
--          }
--          for(; x < 64; x++)
--              *dst++ = 0;
--       }
--    } else 
-+             alpha = *image >> 24;
-+             if(alpha == 0xff)
-+                tmp = *image;
-+             else {
-+                tmp = (alpha << 24) |
-+                         (((*image & 0xff) * alpha) / 255) |
-+                        ((((*image & 0xff00) * alpha) / 255) & 0xff00) |
-+                       ((((*image & 0xff0000) * alpha) / 255) & 0xff0000); 
-+             }
-+             image++;
-+#if X_BYTE_ORDER == X_BIG_ENDIAN
-+             *dst++ = BYTE_SWAP_32(tmp);
-+#else
-+             *dst++ = tmp;
- #endif
--    {
-+         }
-+         for(; x < 64; x++)
-+             *dst++ = 0;
-+      }
-+    } else {
-        for(y = 0; y < h; y++) {
--          for(x = 0; x < w; x++) 
-+          for(x = 0; x < w; x++)
-               *dst++ = *image++;
-           for(; x < 64; x++)
-               *dst++ = 0;
-@@ -299,9 +308,7 @@
-     infoPtr->UseHWCursor = NVUseHWCursor;
- #ifdef ARGB_CURSOR
--    if(pNv->alphaCursor &&
--       (((pNv->Chipset & 0x0ff0) != 0x0110) || !pNv->FPDither))
--    {
-+    if(pNv->alphaCursor) {
-        infoPtr->UseHWCursorARGB = NVUseHWCursorARGB;
-        infoPtr->LoadCursorARGB = NVLoadCursorARGB;
-     }
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c    23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c    16 Dec 2004 01:42:35 -0000      1.2.4.2
-@@ -37,10 +37,38 @@
- |*                                                                           *|
-  \***************************************************************************/
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v 1.37 2003/09/08 20:00:27 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v 1.44 2004/12/09 00:21:04 mvojkovi Exp $ */
- #include "nv_include.h"
-+static int
-+NVDACPanelTweaks(NVPtr pNv, NVRegPtr state)
-+{
-+   int tweak = 0;
-+
-+   if(pNv->usePanelTweak) {
-+       tweak = pNv->PanelTweak;
-+   } else {
-+       /* begin flat panel hacks */
-+       /* This is unfortunate, but some chips need this register
-+          tweaked or else you get artifacts where adjacent pixels are
-+          swapped.  There are no hard rules for what to set here so all
-+          we can do is experiment and apply hacks. */
-+
-+       if(((pNv->Chipset & 0xffff) == 0x0328) && (state->bpp == 32)) {
-+          /* At least one NV34 laptop needs this workaround. */
-+          tweak = -1;
-+       }
-+
-+       if((pNv->Chipset & 0xfff0) == 0x0310) {
-+          tweak = 1;
-+       }
-+       /* end flat panel hacks */
-+   }
-+
-+   return tweak;
-+}
-+
- Bool
- NVDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
- {
-@@ -58,7 +86,6 @@
-     int vertBlankStart  =  mode->CrtcVDisplay      - 1;
-     int vertBlankEnd    =  mode->CrtcVTotal        - 1;
-    
--
-     NVPtr pNv = NVPTR(pScrn);
-     NVRegPtr nvReg = &pNv->ModeReg;
-     NVFBLayout *pLayout = &pNv->CurrentLayout;
-@@ -186,6 +213,8 @@
-        {
-            nvReg->scale |= (1 << 8) ;
-        }
-+       nvReg->crtcSync = pNv->PRAMDAC[0x0828/4];
-+       nvReg->crtcSync += NVDACPanelTweaks(pNv, nvReg);
-     }
-     nvReg->vpll = nvReg->pll;
-@@ -193,6 +222,9 @@
-     nvReg->vpllB = nvReg->pllB;
-     nvReg->vpll2B = nvReg->pllB;
-+    VGA_WR08(pNv->PCIO, 0x03D4, 0x1C);
-+    nvReg->fifo = VGA_RD08(pNv->PCIO, 0x03D5) & ~(1<<5);
-+
-     if(pNv->CRTCnumber) {
-        nvReg->head  = pNv->PCRTC0[0x00000860/4] & ~0x00001000;
-        nvReg->head2 = pNv->PCRTC0[0x00002860/4] | 0x00001000;
-@@ -215,29 +247,29 @@
-     if(mode->Flags & V_DBLSCAN)
-        nvReg->cursorConfig |= (1 << 4);
-     if(pNv->alphaCursor) {
--        nvReg->cursorConfig |= 0x04011000;
-+        if((pNv->Chipset & 0x0ff0) != 0x0110) 
-+           nvReg->cursorConfig |= 0x04011000;
-+        else
-+           nvReg->cursorConfig |= 0x14011000;
-         nvReg->general |= (1 << 29);
-+    } else
-+       nvReg->cursorConfig |= 0x02000000;
-+    if(pNv->twoHeads) {
-         if((pNv->Chipset & 0x0ff0) == 0x0110) {
--            nvReg->dither = pNv->PRAMDAC[0x0528/4] & ~0x00010000;
--            if(pNv->FPDither)
--               nvReg->dither |= 0x00010000;
--            else
--               nvReg->cursorConfig |= (1 << 28);
--        } else 
--        if((pNv->Chipset & 0x0ff0) >= 0x0170) {
-+           nvReg->dither = pNv->PRAMDAC[0x0528/4] & ~0x00010000;
-+           if(pNv->FPDither)
-+              nvReg->dither |= 0x00010000;
-+        } else {
-            nvReg->dither = pNv->PRAMDAC[0x083C/4] & ~1;
--           nvReg->cursorConfig |= (1 << 28);
-            if(pNv->FPDither)
-               nvReg->dither |= 1;
--        } else {
--           nvReg->cursorConfig |= (1 << 28);
--        }
--    } else
--       nvReg->cursorConfig |= 0x02000000;
-+        } 
-+    }
-     nvReg->timingH = 0;
-     nvReg->timingV = 0;
-+    nvReg->displayV = mode->CrtcVDisplay;
-     return (TRUE);
- }
-@@ -250,8 +282,6 @@
-     int restore = VGA_SR_MODE;
-     if(primary) restore |= VGA_SR_CMAP | VGA_SR_FONTS;
--    else if((pNv->Chipset & 0xffff) == 0x0018) 
--      restore |= VGA_SR_CMAP;
-     NVLoadStateExt(pNv, nvReg);
- #if defined(__powerpc__)
-     restore &= ~VGA_SR_FONTS;
-@@ -274,8 +304,6 @@
-     saveFonts = FALSE;
- #endif
--    NVLockUnlock(pNv, 0);
--
-     vgaHWSave(pScrn, vgaReg, VGA_SR_CMAP | VGA_SR_MODE | 
-                              (saveFonts? VGA_SR_FONTS : 0));
-     NVUnloadStateExt(pNv, nvReg);
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h    23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h    14 Nov 2004 18:13:27 -0000      1.2.4.1
-@@ -38,7 +38,7 @@
- |*                                                                           *|
-  \***************************************************************************/
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v 1.1 2003/07/31 20:24:29 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v 1.4 2004/03/20 01:52:16 mvojkovi Exp $ */
- #define SURFACE_FORMAT                                              0x00000300
- #define SURFACE_FORMAT_DEPTH8                                       0x00000001
-@@ -145,9 +145,15 @@
- #define STRETCH_BLIT_FORMAT_DEPTH8                                  0x00000004
- #define STRETCH_BLIT_FORMAT_DEPTH16                                 0x00000007
- #define STRETCH_BLIT_FORMAT_DEPTH24                                 0x00000004
-+#define STRETCH_BLIT_FORMAT_A8R8G8B8                                0x00000003
- #define STRETCH_BLIT_FORMAT_X8R8G8B8                                0x00000004
- #define STRETCH_BLIT_FORMAT_YUYV                                    0x00000005
- #define STRETCH_BLIT_FORMAT_UYVY                                    0x00000006
-+/* STRETCH_BLIT_OPERATION is only supported on TNT2 and newer */
-+#define STRETCH_BLIT_OPERATION                                      0x0000E304
-+#define STRETCH_BLIT_OPERATION_ROP                                  0x00000001
-+#define STRETCH_BLIT_OPERATION_COPY                                 0x00000003
-+#define STRETCH_BLIT_OPERATION_BLEND                                0x00000002
- #define STRETCH_BLIT_CLIP_POINT                                     0x0000E308
- #define STRETCH_BLIT_CLIP_POINT_X                                   15:0 
- #define STRETCH_BLIT_CLIP_POINT_Y                                   31:16
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v
-retrieving revision 1.5
-retrieving revision 1.5.2.2
-diff -u -u -r1.5 -r1.5.2.2
---- programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 16 Aug 2004 09:13:14 -0000      1.5
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 16 Dec 2004 01:42:35 -0000      1.5.2.2
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.5 2004/08/16 09:13:14 ajax Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.5.2.2 2004/12/16 01:42:35 gisburn Exp $ */
- /* $XConsortium: nv_driver.c /main/3 1996/10/28 05:13:37 kaleb $ */
- /*
-  * Copyright 1996-1997  David J. McKay
-@@ -25,7 +25,7 @@
- /* Hacked together from mga driver and 3.3.4 NVIDIA driver by Jarno Paananen
-    <jpaana@s2.org> */
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.122 2004/01/10 22:31:53 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.130 2004/12/09 00:21:04 mvojkovi Exp $ */
- #include "nv_include.h"
-@@ -113,18 +113,19 @@
-   { 0x10DE0175, "GeForce4 420 Go" },
-   { 0x10DE0176, "GeForce4 420 Go 32M" },
-   { 0x10DE0177, "GeForce4 460 Go" },
-+  { 0x10DE0178, "Quadro4 550 XGL" },
- #if defined(__powerpc__)
-   { 0x10DE0179, "GeForce4 MX (Mac)" },
- #else
-   { 0x10DE0179, "GeForce4 440 Go 64M" },
- #endif
--  { 0x10DE017D, "GeForce4 410 Go 16M" },
--  { 0x10DE017C, "Quadro4 500 GoGL" },
--  { 0x10DE0178, "Quadro4 550 XGL" },
-   { 0x10DE017A, "Quadro4 NVS" },
-+  { 0x10DE017C, "Quadro4 500 GoGL" },
-+  { 0x10DE017D, "GeForce4 410 Go 16M" },
-   { 0x10DE0181, "GeForce4 MX 440 with AGP8X" },
-   { 0x10DE0182, "GeForce4 MX 440SE with AGP8X" },
-   { 0x10DE0183, "GeForce4 MX 420 with AGP8X" },
-+  { 0x10DE0185, "GeForce4 MX 4000" },
-   { 0x10DE0186, "GeForce4 448 Go" },
-   { 0x10DE0187, "GeForce4 488 Go" },
-   { 0x10DE0188, "Quadro4 580 XGL" },
-@@ -133,6 +134,8 @@
- #endif
-   { 0x10DE018A, "Quadro4 280 NVS" },
-   { 0x10DE018B, "Quadro4 380 XGL" },
-+  { 0x10DE018C, "Quadro NVS 50 PCI" },
-+  { 0x10DE018D, "GeForce4 448 Go" },
-   { 0x10DE01F0, "GeForce4 MX Integrated GPU" },
-   { 0x10DE0200, "GeForce3" },
-   { 0x10DE0201, "GeForce3 Ti 200" },
-@@ -174,6 +177,8 @@
-   { 0x10DE0323, "GeForce FX 5200SE" },
-   { 0x10DE0324, "GeForce FX Go5200" },
-   { 0x10DE0325, "GeForce FX Go5250" },
-+  { 0x10DE0326, "GeForce FX 5500" },
-+  { 0x10DE0327, "GeForce FX 5100" },
-   { 0x10DE0328, "GeForce FX Go5200 32M/64M" },
- #if defined(__powerpc__)
-   { 0x10DE0329, "GeForce FX 5200 (Mac)" },
-@@ -181,15 +186,16 @@
-   { 0x10DE0329, "0x0329" },
- #endif
-   { 0x10DE032A, "Quadro NVS 280 PCI" },
--  { 0x10DE032B, "Quadro FX 500" },
--  { 0x10DE032C, "GeForce FX Go5300" },
-+  { 0x10DE032B, "Quadro FX 500/600 PCI" },
-+  { 0x10DE032C, "GeForce FX Go53xx Series" },
-   { 0x10DE032D, "GeForce FX Go5100" },
-   { 0x10DE032F, "0x032F" },
-   { 0x10DE0330, "GeForce FX 5900 Ultra" },
-   { 0x10DE0331, "GeForce FX 5900" },
-   { 0x10DE0332, "GeForce FX 5900XT" },
-   { 0x10DE0333, "GeForce FX 5950 Ultra" },
--  { 0x10DE0334, "0x0334" },
-+  { 0x10DE033F, "Quadro FX 700" },
-+  { 0x10DE0334, "GeForce FX 5900ZT" },
-   { 0x10DE0338, "Quadro FX 3000" },
-   { 0x10DE0341, "GeForce FX 5700 Ultra" },
-   { 0x10DE0342, "GeForce FX 5700" },
-@@ -203,6 +209,42 @@
-   { 0x10DE034C, "Quadro FX Go1000" },
-   { 0x10DE034E, "Quadro FX 1100" },
-   { 0x10DE034F, "0x034F" },
-+  { 0x10DE0040, "GeForce 6800 Ultra" },
-+  { 0x10DE0041, "GeForce 6800" },
-+  { 0x10DE0042, "GeForce 6800 LE" },
-+  { 0x10DE0043, "0x0043" },
-+  { 0x10DE0045, "GeForce 6800 GT" },
-+  { 0x10DE0049, "0x0049" },
-+  { 0x10DE004E, "Quadro FX 4000" },
-+  { 0x10DE004D, "Quadro FX 4400" },
-+  { 0x10DE00C0, "0x00C0" },
-+  { 0x10DE00C1, "0x00C1" },
-+  { 0x10DE00C2, "GeForce 6800 LE" },
-+  { 0x10DE00C8, "0x00C8" },
-+  { 0x10DE00C9, "0x00C9" },
-+  { 0x10DE00CC, "0x00CC" },
-+  { 0x10DE00CE, "0x00CE" },
-+  { 0x10DE0140, "GeForce 6600 GT" },
-+  { 0x10DE0141, "GeForce 6600" },
-+  { 0x10DE0142, "0x0142" },
-+  { 0x10DE0143, "0x0143" },
-+  { 0x10DE0144, "GeForce Go 6600" },
-+  { 0x10DE0145, "GeForce 6610 XL" },
-+  { 0x10DE0146, "GeForce Go 6600 TE/6200 TE" },
-+  { 0x10DE0147, "0x0147" },
-+  { 0x10DE0148, "GeForce Go 6600" },
-+  { 0x10DE0149, "0x0149" },
-+  { 0x10DE014B, "0x014B" },
-+  { 0x10DE014C, "0x014C" },
-+  { 0x10DE014D, "0x014D" },
-+  { 0x10DE014E, "Quadro FX 540" },
-+  { 0x10DE014F, "GeForce 6200" },
-+  { 0x10DE0160, "0x0160" },
-+  { 0x10DE0166, "0x0166" },
-+  { 0x10DE0210, "0x0210" },
-+  { 0x10DE0211, "0x0211" },
-+  { 0x10DE021D, "0x021D" },
-+  { 0x10DE021E, "0x021E" },
-   {-1, NULL}
- };
-@@ -350,7 +392,9 @@
-     OPTION_VIDEO_KEY,
-     OPTION_FLAT_PANEL,
-     OPTION_FP_DITHER,
--    OPTION_CRTC_NUMBER
-+    OPTION_CRTC_NUMBER,
-+    OPTION_FP_SCALE,
-+    OPTION_FP_TWEAK
- } NVOpts;
-@@ -365,6 +409,8 @@
-     { OPTION_FLAT_PANEL,      "FlatPanel",    OPTV_BOOLEAN,   {0}, FALSE },
-     { OPTION_FP_DITHER,       "FPDither",     OPTV_BOOLEAN,   {0}, FALSE },
-     { OPTION_CRTC_NUMBER,     "CrtcNumber",   OPTV_INTEGER,   {0}, FALSE },
-+    { OPTION_FP_SCALE,          "FPScale",      OPTV_BOOLEAN,   {0}, FALSE },
-+    { OPTION_FP_TWEAK,          "FPTweak",      OPTV_INTEGER,   {0}, FALSE },
-     { -1,                       NULL,           OPTV_NONE,      {0}, FALSE }
- };
-@@ -494,6 +540,36 @@
- #define MAX_CHIPS MAXSCREENS
-+
-+static CARD32 
-+NVGetPCIXpressChip (pciVideoPtr pVideo)
-+{
-+    volatile CARD32 *regs;
-+    CARD32 pciid, pcicmd;
-+    PCITAG Tag = ((pciConfigPtr)(pVideo->thisCard))->tag;
-+
-+    pcicmd = pciReadLong(Tag, PCI_CMD_STAT_REG);
-+    pciWriteLong(Tag, PCI_CMD_STAT_REG, pcicmd | PCI_CMD_MEM_ENABLE);
-+    
-+    regs = xf86MapPciMem(-1, VIDMEM_MMIO, Tag, pVideo->memBase[0], 0x2000);
-+
-+    pciid = regs[0x1800/4];
-+
-+    xf86UnMapVidMem(-1, (pointer)regs, 0x2000);
-+
-+    pciWriteLong(Tag, PCI_CMD_STAT_REG, pcicmd);
-+
-+    if((pciid & 0x0000ffff) == 0x000010DE) 
-+       pciid = 0x10DE0000 | (pciid >> 16);
-+    else 
-+    if((pciid & 0xffff0000) == 0xDE100000) /* wrong endian */
-+       pciid = 0x10DE0000 | ((pciid << 8) & 0x0000ff00) |
-+                            ((pciid >> 8) & 0x000000ff);
-+
-+    return pciid;
-+}
-+
-+
- /* Mandatory */
- static Bool
- NVProbe(DriverPtr drv, int flags)
-@@ -523,7 +599,11 @@
-            ((*ppPci)->vendor == PCI_VENDOR_NVIDIA)) 
-         {
-             SymTabRec *nvchips = NVKnownChipsets;
--            int token = ((*ppPci)->vendor << 16) | (*ppPci)->chipType;
-+            int pciid = ((*ppPci)->vendor << 16) | (*ppPci)->chipType;
-+            int token = pciid;
-+
-+            if((token & 0xfff0) == 0x00F0) 
-+                token = NVGetPCIXpressChip(*ppPci);
-             while(nvchips->name) {
-                if(token == nvchips->token)
-@@ -532,10 +612,10 @@
-             }
-             if(nvchips->name) { /* found one */
--               NVChipsets[numUsed].token = nvchips->token;
-+               NVChipsets[numUsed].token = pciid;
-                NVChipsets[numUsed].name = nvchips->name;
--               NVPciChipsets[numUsed].numChipset = nvchips->token;
--               NVPciChipsets[numUsed].PCIid = nvchips->token;
-+               NVPciChipsets[numUsed].numChipset = pciid; 
-+               NVPciChipsets[numUsed].PCIid = pciid;
-                NVPciChipsets[numUsed].resList = RES_SHARED_VGA;
-                numUsed++;
-             } else if ((*ppPci)->vendor == PCI_VENDOR_NVIDIA) {
-@@ -551,10 +631,19 @@
-                case 0x0320:
-                case 0x0330:
-                case 0x0340:
--                   NVChipsets[numUsed].token = token;
-+               case 0x0040:
-+               case 0x00C0:
-+               case 0x0120:
-+               case 0x0140:
-+               case 0x0160:
-+               case 0x0130:
-+               case 0x01D0:
-+               case 0x0090:
-+               case 0x0210:
-+                   NVChipsets[numUsed].token = pciid;
-                    NVChipsets[numUsed].name = "Unknown NVIDIA chip";
--                   NVPciChipsets[numUsed].numChipset = token;
--                   NVPciChipsets[numUsed].PCIid = token;
-+                   NVPciChipsets[numUsed].numChipset = pciid;
-+                   NVPciChipsets[numUsed].PCIid = pciid;
-                    NVPciChipsets[numUsed].resList = RES_SHARED_VGA;
-                    numUsed++;
-                    break;
-@@ -768,6 +857,17 @@
- static ModeStatus
- NVValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
- {
-+    NVPtr pNv = NVPTR(xf86Screens[scrnIndex]);
-+
-+    if(pNv->fpWidth && pNv->fpHeight) {
-+      if((pNv->fpWidth < mode->HDisplay) || (pNv->fpHeight < mode->VDisplay)) {
-+         xf86DrvMsg(scrnIndex, X_INFO, "Mode \"%s\" is larger than "
-+                    "BIOS programmed panel size of %d x %d.  Removing.\n",
-+                     mode->name, pNv->fpWidth, pNv->fpHeight);
-+         return (MODE_BAD);
-+      }
-+    }
-+
-     return (MODE_OK);
- }
-@@ -887,11 +987,16 @@
-     } else {
-       from = X_PROBED;
-       pNv->Chipset = (pNv->PciInfo->vendor << 16) | pNv->PciInfo->chipType;
-+
-+        if((pNv->Chipset & 0xfff0) == 0x00F0)
-+            pNv->Chipset = NVGetPCIXpressChip(pNv->PciInfo);
-+
-       pScrn->chipset = (char *)xf86TokenToString(NVKnownChipsets, 
-                                                    pNv->Chipset);
-         if(!pScrn->chipset)
-           pScrn->chipset = "Unknown NVIDIA chipset";
-     }
-+
-     if (pNv->pEnt->device->chipRev >= 0) {
-       pNv->ChipRev = pNv->pEnt->device->chipRev;
-       xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
-@@ -1026,6 +1131,12 @@
-     }
-     xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n",
-               pNv->HWCursor ? "HW" : "SW");
-+
-+    pNv->FpScale = TRUE;
-+    if (xf86GetOptValBool(pNv->Options, OPTION_FP_SCALE, &pNv->FpScale)) {
-+        xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Flat panel scaling %s\n",
-+                   pNv->FpScale ? "on" : "off");
-+    }
-     if (xf86ReturnOptValBool(pNv->Options, OPTION_NOACCEL, FALSE)) {
-       pNv->NoAccel = TRUE;
-       xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n");
-@@ -1115,6 +1226,14 @@
-         pNv->CRTCnumber = -1; /* autodetect later */
-     }
-+
-+    if (xf86GetOptValInteger(pNv->Options, OPTION_FP_TWEAK, 
-+                             &pNv->PanelTweak))
-+    {
-+        pNv->usePanelTweak = TRUE;
-+    } else {
-+        pNv->usePanelTweak = FALSE;
-+    }
-     
-     if (pNv->pEnt->device->MemBase != 0) {
-       /* Require that the config file value matches one of the PCI values. */
-@@ -1178,12 +1297,46 @@
-       return FALSE;
-     }
--    pNv->alphaCursor = ((pNv->Chipset & 0x0ff0) >= 0x0110);
--
--    pNv->Architecture = (pNv->Chipset & 0x0f00) >> 4;
-+    switch (pNv->Chipset & 0x0ff0) {
-+    case 0x0100:   /* GeForce 256 */
-+    case 0x0110:   /* GeForce2 MX */
-+    case 0x0150:   /* GeForce2 */
-+    case 0x0170:   /* GeForce4 MX */
-+    case 0x0180:   /* GeForce4 MX (8x AGP) */
-+    case 0x01A0:   /* nForce */
-+    case 0x01F0:   /* nForce2 */
-+         pNv->Architecture =  NV_ARCH_10;
-+         break;
-+    case 0x0200:   /* GeForce3 */
-+    case 0x0250:   /* GeForce4 Ti */
-+    case 0x0280:   /* GeForce4 Ti (8x AGP) */
-+         pNv->Architecture =  NV_ARCH_20;
-+         break;
-+    case 0x0300:   /* GeForceFX 5800 */
-+    case 0x0310:   /* GeForceFX 5600 */
-+    case 0x0320:   /* GeForceFX 5200 */
-+    case 0x0330:   /* GeForceFX 5900 */
-+    case 0x0340:   /* GeForceFX 5700 */
-+         pNv->Architecture =  NV_ARCH_30;
-+         break;
-+    case 0x0040:
-+    case 0x00C0:
-+    case 0x0120:
-+    case 0x0130:
-+    case 0x0140:
-+    case 0x0160:
-+    case 0x01D0:
-+    case 0x0090:
-+    case 0x0210:
-+         pNv->Architecture =  NV_ARCH_40;
-+         break;
-+    default:
-+         pNv->Architecture =  NV_ARCH_04;
-+         break;
-+    }
--    if(pNv->Architecture < NV_ARCH_10)
--        pNv->Architecture = NV_ARCH_04;
-+    pNv->alphaCursor = (pNv->Architecture >= NV_ARCH_10) &&
-+                       ((pNv->Chipset & 0x0ff0) != 0x0100);
-     NVCommonSetup(pScrn);
-@@ -1225,17 +1378,17 @@
-     clockRanges->minClock = pNv->MinVClockFreqKHz;
-     clockRanges->maxClock = pNv->MaxVClockFreqKHz;
-     clockRanges->clockIndex = -1;             /* programmable */
--    if(((pNv->Chipset & 0x0ff0) <= 0x0100) ||
--       ((pNv->Chipset & 0x0ff0) == 0x0150) ||
--       ((pNv->Chipset & 0x0ff0) >= 0x0300))
-+    clockRanges->doubleScanAllowed = TRUE;
-+    if((pNv->Architecture == NV_ARCH_20) ||
-+         ((pNv->Architecture == NV_ARCH_10) && 
-+           ((pNv->Chipset & 0x0ff0) != 0x0100) &&
-+           ((pNv->Chipset & 0x0ff0) != 0x0150)))
-     {
--       clockRanges->interlaceAllowed = TRUE;
--    } else {
--        /* No NV2x chips support interlaced modes and the only
--           NV1x chips that do are NV10 and NV15 */
-+       /* HW is broken */
-        clockRanges->interlaceAllowed = FALSE;
-+    } else {
-+       clockRanges->interlaceAllowed = TRUE;
-     }
--    clockRanges->doubleScanAllowed = TRUE;
-     if(pNv->FlatPanel == 1) {
-        clockRanges->interlaceAllowed = FALSE;
-@@ -1488,22 +1641,28 @@
-     NVPtr pNv = NVPTR(pScrn);
-     NVRegPtr nvReg = &pNv->SavedReg;
-+    NVLockUnlock(pNv, 0);
-+
-     if(pNv->twoHeads) {
-         VGA_WR08(pNv->PCIO, 0x03D4, 0x44);
--        VGA_WR08(pNv->PCIO, 0x03D5, nvReg->crtcOwner);
-+        VGA_WR08(pNv->PCIO, 0x03D5, pNv->CRTCnumber * 0x3);
-         NVLockUnlock(pNv, 0);
-     }
--    NVLockUnlock(pNv, 0);
--
-     /* Only restore text mode fonts/text for the primary card */
-     vgaHWProtect(pScrn, TRUE);
-     NVDACRestore(pScrn, vgaReg, nvReg, pNv->Primary);
-+    if(pNv->twoHeads) {
-+        VGA_WR08(pNv->PCIO, 0x03D4, 0x44);
-+        VGA_WR08(pNv->PCIO, 0x03D5, nvReg->crtcOwner);
-+    }
-     vgaHWProtect(pScrn, FALSE);
- }
- static void NVBacklightEnable(NVPtr pNv,  Bool on)
- {
-+    CARD32 fpcontrol = pNv->PRAMDAC[0x0848/4] & 0xCfffffCC;
-+
-     /* This is done differently on each laptop.  Here we
-        define the ones we know for sure. */
-@@ -1524,6 +1683,12 @@
-       pNv->PCRTC0[0x081C/4] = tmp_pcrt;
-     }
- #endif
-+    
-+    /* cut the TMDS output */
-+    if(on) fpcontrol |= pNv->fpSyncs;
-+    else fpcontrol |= 0x20000022;
-+
-+    pNv->PRAMDAC[0x0848/4] = fpcontrol;
- }
- static void
-@@ -1533,6 +1698,8 @@
-   if (!pScrn->vtSema) return;
-+  vgaHWDPMSSet(pScrn, PowerManagementMode, flags);
-+
-   switch (PowerManagementMode) {
-   case DPMSModeStandby:  /* HSync: Off, VSync: On */
-   case DPMSModeSuspend:  /* HSync: On, VSync: Off */
-@@ -1544,7 +1711,6 @@
-   default:
-     break;
-   }
--  vgaHWDPMSSet(pScrn, PowerManagementMode, flags);
- }
-@@ -1646,7 +1812,7 @@
-      * function.  If not, the visuals will need to be setup before calling
-      * a fb ScreenInit() function and fixed up after.
-      *
--     * For most PC hardware at depths >= 8, the defaults that cfb uses
-+     * For most PC hardware at depths >= 8, the defaults that fb uses
-      * are not appropriate.  In this driver, we fixup the visuals after.
-      */
-@@ -1830,6 +1996,13 @@
-     vgaHWPtr pVga = VGAHWPTR(pScrn);
-     vgaRegPtr vgaReg = &pVga->SavedReg;
-+    NVLockUnlock(pNv, 0);
-+    if(pNv->twoHeads) {
-+        VGA_WR08(pNv->PCIO, 0x03D4, 0x44);
-+        VGA_WR08(pNv->PCIO, 0x03D5, pNv->CRTCnumber * 0x3);
-+        NVLockUnlock(pNv, 0);
-+    }
-+
-     NVDACSave(pScrn, vgaReg, nvReg, pNv->Primary);
- }
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c     23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c     16 Dec 2004 01:42:35 -0000      1.2.4.2
-@@ -36,7 +36,7 @@
- |*     those rights set forth herein.                                        *|
- |*                                                                           *|
-  \***************************************************************************/
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v 1.4 2003/11/03 05:11:25 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v 1.13 2004/12/09 00:21:04 mvojkovi Exp $ */
- #include "nv_local.h"
- #include "compiler.h"
-@@ -71,6 +71,12 @@
-                                  (ShowHide & 0x01);
-     VGA_WR08(pNv->PCIO, 0x3D4, 0x31);
-     VGA_WR08(pNv->PCIO, 0x3D5, pNv->CurrentState->cursor1);
-+
-+    if(pNv->Architecture == NV_ARCH_40) {  /* HW bug */
-+       volatile CARD32 curpos = pNv->PRAMDAC[0x0300/4];
-+       pNv->PRAMDAC[0x0300/4] = curpos;
-+    }
-+
-     return (current & 0x01);
- }
-@@ -132,6 +138,26 @@
- {
-     unsigned int pll, N, M, MB, NB, P;
-+    if(pNv->Architecture >= NV_ARCH_40) {
-+       pll = pNv->PMC[0x4020/4];
-+       P = (pll >> 16) & 0x03;
-+       pll = pNv->PMC[0x4024/4];
-+       M = pll & 0xFF;
-+       N = (pll >> 8) & 0xFF;
-+       MB = (pll >> 16) & 0xFF;
-+       NB = (pll >> 24) & 0xFF;
-+       *MClk = ((N * NB * pNv->CrystalFreqKHz) / (M * MB)) >> P;
-+
-+       pll = pNv->PMC[0x4000/4];
-+       P = (pll >> 16) & 0x03;  
-+       pll = pNv->PMC[0x4004/4];
-+       M = pll & 0xFF;
-+       N = (pll >> 8) & 0xFF;
-+       MB = (pll >> 16) & 0xFF;
-+       NB = (pll >> 24) & 0xFF;
-+
-+       *NVClk = ((N * NB * pNv->CrystalFreqKHz) / (M * MB)) >> P;
-+    } else
-     if(pNv->twoStagePLL) {
-        pll = pNv->PRAMDAC0[0x0504/4];
-        M = pll & 0xFF; 
-@@ -202,6 +228,10 @@
-        P = (pll >> 16) & 0x0F;
-        *NVClk = (N * pNv->CrystalFreqKHz / M) >> P;
-     }
-+
-+#if 0
-+    ErrorF("NVClock = %i MHz, MEMClock = %i MHz\n", *NVClk/1000, *MClk/1000);
-+#endif
- }
-@@ -509,21 +539,6 @@
-         clwm = us_crt * crtc_drain_rate/(1000*1000);
-         clwm++; /* fixed point <= float_point - 1.  Fixes that */
--  /*
--          //
--          // Another concern, only for high pclks so don't do this
--          // with video:
--          // What happens if the latency to fetch the cbs is so large that
--          // fifo empties.  In that case we need to have an alternate clwm value
--          // based off the total burst fetch
--          //
--          us_crt = (cbs * 1000 * 1000)/ (8*width)/mclk_freq ;
--          us_crt = us_crt + us_m + us_n + us_p + (4 * 1000 * 1000)/mclk_freq;
--          clwm_mt = us_crt * crtc_drain_rate/(1000*1000);
--          clwm_mt ++;
--          if(clwm_mt > clwm)
--              clwm = clwm_mt;
--  */
-           /* Finally, a heuristic check when width == 64 bits */
-           if(width == 1){
-               nvclk_fill = nvclk_freq * 8;
-@@ -622,6 +637,28 @@
-     }
- }
-+
-+static void nv30UpdateArbitrationSettings (
-+    NVPtr        pNv,
-+    unsigned     *burst,
-+    unsigned     *lwm
-+)   
-+{
-+    unsigned int MClk, NVClk;
-+    unsigned int fifo_size, burst_size, graphics_lwm;
-+
-+    fifo_size = 2048;
-+    burst_size = 512;
-+    graphics_lwm = fifo_size - burst_size;
-+
-+    nvGetClocks(pNv, &MClk, &NVClk);
-+    
-+    *burst = 0;
-+    burst_size >>= 5;
-+    while(burst_size >>= 1) (*burst)++;
-+    *lwm = graphics_lwm >> 3;
-+}
-+
- static void nForceUpdateArbitrationSettings (
-     unsigned      VClk,
-     unsigned      pixelDepth,
-@@ -632,12 +669,17 @@
- {
-     nv10_fifo_info fifo_data;
-     nv10_sim_state sim_data;
--    unsigned int M, N, P, pll, MClk, NVClk;
--    unsigned int uMClkPostDiv, memctrl;
-+    unsigned int M, N, P, pll, MClk, NVClk, memctrl;
-+
-+    if((pNv->Chipset & 0x0FF0) == 0x01A0) {
-+       unsigned int uMClkPostDiv;
--    uMClkPostDiv = (pciReadLong(pciTag(0, 0, 3), 0x6C) >> 8) & 0xf;
--    if(!uMClkPostDiv) uMClkPostDiv = 4; 
--    MClk = 400000 / uMClkPostDiv;
-+       uMClkPostDiv = (pciReadLong(pciTag(0, 0, 3), 0x6C) >> 8) & 0xf;
-+       if(!uMClkPostDiv) uMClkPostDiv = 4; 
-+       MClk = 400000 / uMClkPostDiv;
-+    } else {
-+       MClk = pciReadLong(pciTag(0, 0, 5), 0x4C) / 1000;
-+    }
-     pll = pNv->PRAMDAC0[0x0500/4];
-     M = (pll >> 0)  & 0xFF; N = (pll >> 8)  & 0xFF; P = (pll >> 16) & 0x0F;
-@@ -837,12 +879,16 @@
-                                          &(state->arbitration0),
-                                          &(state->arbitration1),
-                                           pNv);
--            } else {
-+            } else if(pNv->Architecture < NV_ARCH_30) {
-                 nv10UpdateArbitrationSettings(VClk, 
-                                           pixelDepth * 8, 
-                                          &(state->arbitration0),
-                                          &(state->arbitration1),
-                                           pNv);
-+            } else {
-+                nv30UpdateArbitrationSettings(pNv,
-+                                         &(state->arbitration0),
-+                                         &(state->arbitration1));
-             }
-             state->cursor0  = 0x80 | (pNv->CursorStart >> 17);
-             state->cursor1  = (pNv->CursorStart >> 11) << 2;
-@@ -901,79 +947,167 @@
-         pNv->PFB[0x02B4/4] = pNv->FbMapSize - 1;
-     }
--    pNv->PRAMIN[0x0000] = 0x80000010;
--    pNv->PRAMIN[0x0001] = 0x80011201;  
--    pNv->PRAMIN[0x0002] = 0x80000011;
--    pNv->PRAMIN[0x0003] = 0x80011202; 
--    pNv->PRAMIN[0x0004] = 0x80000012;
--    pNv->PRAMIN[0x0005] = 0x80011203;
--    pNv->PRAMIN[0x0006] = 0x80000013;
--    pNv->PRAMIN[0x0007] = 0x80011204;
--    pNv->PRAMIN[0x0008] = 0x80000014;
--    pNv->PRAMIN[0x0009] = 0x80011205;
--    pNv->PRAMIN[0x000A] = 0x80000015;
--    pNv->PRAMIN[0x000B] = 0x80011206;
--    pNv->PRAMIN[0x000C] = 0x80000016;
--    pNv->PRAMIN[0x000D] = 0x80011207;
--    pNv->PRAMIN[0x000E] = 0x80000017;
--    pNv->PRAMIN[0x000F] = 0x80011208;
--    pNv->PRAMIN[0x0800] = 0x00003000;
--    pNv->PRAMIN[0x0801] = pNv->FbMapSize - 1;
--    pNv->PRAMIN[0x0802] = 0x00000002;
--    pNv->PRAMIN[0x0803] = 0x00000002;
--    if(pNv->Architecture >= NV_ARCH_10)
--       pNv->PRAMIN[0x0804] = 0x01008062;
--    else
--       pNv->PRAMIN[0x0804] = 0x01008042;
--    pNv->PRAMIN[0x0805] = 0x00000000;
--    pNv->PRAMIN[0x0806] = 0x12001200;
--    pNv->PRAMIN[0x0807] = 0x00000000;
--    pNv->PRAMIN[0x0808] = 0x01008043;
--    pNv->PRAMIN[0x0809] = 0x00000000;
--    pNv->PRAMIN[0x080A] = 0x00000000;
--    pNv->PRAMIN[0x080B] = 0x00000000;
--    pNv->PRAMIN[0x080C] = 0x01008044;
--    pNv->PRAMIN[0x080D] = 0x00000002;
--    pNv->PRAMIN[0x080E] = 0x00000000;
--    pNv->PRAMIN[0x080F] = 0x00000000;
--    pNv->PRAMIN[0x0810] = 0x01008019;
--    pNv->PRAMIN[0x0811] = 0x00000000;
--    pNv->PRAMIN[0x0812] = 0x00000000;
--    pNv->PRAMIN[0x0813] = 0x00000000;
--    pNv->PRAMIN[0x0814] = 0x0100A05C;
--    pNv->PRAMIN[0x0815] = 0x00000000;
--    pNv->PRAMIN[0x0816] = 0x00000000;
--    pNv->PRAMIN[0x0817] = 0x00000000;
--    pNv->PRAMIN[0x0818] = 0x0100805F;
--    pNv->PRAMIN[0x0819] = 0x00000000;
--    pNv->PRAMIN[0x081A] = 0x12001200;
--    pNv->PRAMIN[0x081B] = 0x00000000;
--    pNv->PRAMIN[0x081C] = 0x0100804A;
--    pNv->PRAMIN[0x081D] = 0x00000002;
--    pNv->PRAMIN[0x081E] = 0x00000000;
--    pNv->PRAMIN[0x081F] = 0x00000000;
--    pNv->PRAMIN[0x0820] = 0x01018077;
--    pNv->PRAMIN[0x0821] = 0x00000000;
--    pNv->PRAMIN[0x0822] = 0x01201200;
--    pNv->PRAMIN[0x0823] = 0x00000000;
--    pNv->PRAMIN[0x0824] = 0x00003002;
--    pNv->PRAMIN[0x0825] = 0x00007FFF;
--    pNv->PRAMIN[0x0826] = pNv->FbUsableSize | 0x00000002;
--    pNv->PRAMIN[0x0827] = 0x00000002;
-+    if(pNv->Architecture >= NV_ARCH_40) {
-+       pNv->PRAMIN[0x0000] = 0x80000010;
-+       pNv->PRAMIN[0x0001] = 0x00101202;
-+       pNv->PRAMIN[0x0002] = 0x80000011;
-+       pNv->PRAMIN[0x0003] = 0x00101204;
-+       pNv->PRAMIN[0x0004] = 0x80000012;
-+       pNv->PRAMIN[0x0005] = 0x00101206;
-+       pNv->PRAMIN[0x0006] = 0x80000013;
-+       pNv->PRAMIN[0x0007] = 0x00101208;
-+       pNv->PRAMIN[0x0008] = 0x80000014;
-+       pNv->PRAMIN[0x0009] = 0x0010120A;
-+       pNv->PRAMIN[0x000A] = 0x80000015;
-+       pNv->PRAMIN[0x000B] = 0x0010120C;
-+       pNv->PRAMIN[0x000C] = 0x80000016;
-+       pNv->PRAMIN[0x000D] = 0x0010120E;
-+       pNv->PRAMIN[0x000E] = 0x80000017;
-+       pNv->PRAMIN[0x000F] = 0x00101210;
-+       pNv->PRAMIN[0x0800] = 0x00003000;
-+       pNv->PRAMIN[0x0801] = pNv->FbMapSize - 1;
-+       pNv->PRAMIN[0x0802] = 0x00000002;
-+       pNv->PRAMIN[0x0808] = 0x02080062;
-+       pNv->PRAMIN[0x0809] = 0x00000000;
-+       pNv->PRAMIN[0x080A] = 0x00001200;
-+       pNv->PRAMIN[0x080B] = 0x00001200;
-+       pNv->PRAMIN[0x080C] = 0x00000000;
-+       pNv->PRAMIN[0x080D] = 0x00000000;
-+       pNv->PRAMIN[0x0810] = 0x02080043;
-+       pNv->PRAMIN[0x0811] = 0x00000000;
-+       pNv->PRAMIN[0x0812] = 0x00000000;
-+       pNv->PRAMIN[0x0813] = 0x00000000;
-+       pNv->PRAMIN[0x0814] = 0x00000000;
-+       pNv->PRAMIN[0x0815] = 0x00000000;
-+       pNv->PRAMIN[0x0818] = 0x02080044;
-+       pNv->PRAMIN[0x0819] = 0x02000000;
-+       pNv->PRAMIN[0x081A] = 0x00000000;
-+       pNv->PRAMIN[0x081B] = 0x00000000;
-+       pNv->PRAMIN[0x081C] = 0x00000000;
-+       pNv->PRAMIN[0x081D] = 0x00000000;
-+       pNv->PRAMIN[0x0820] = 0x02080019;
-+       pNv->PRAMIN[0x0821] = 0x00000000;
-+       pNv->PRAMIN[0x0822] = 0x00000000;
-+       pNv->PRAMIN[0x0823] = 0x00000000;
-+       pNv->PRAMIN[0x0824] = 0x00000000;
-+       pNv->PRAMIN[0x0825] = 0x00000000;
-+       pNv->PRAMIN[0x0828] = 0x020A005C;
-+       pNv->PRAMIN[0x0829] = 0x00000000;
-+       pNv->PRAMIN[0x082A] = 0x00000000;
-+       pNv->PRAMIN[0x082B] = 0x00000000;
-+       pNv->PRAMIN[0x082C] = 0x00000000;
-+       pNv->PRAMIN[0x082D] = 0x00000000;
-+       pNv->PRAMIN[0x0830] = 0x0208009F;
-+       pNv->PRAMIN[0x0831] = 0x00000000;
-+       pNv->PRAMIN[0x0832] = 0x00001200;
-+       pNv->PRAMIN[0x0833] = 0x00001200;
-+       pNv->PRAMIN[0x0834] = 0x00000000;
-+       pNv->PRAMIN[0x0835] = 0x00000000;
-+       pNv->PRAMIN[0x0838] = 0x0208004A;
-+       pNv->PRAMIN[0x0839] = 0x02000000;
-+       pNv->PRAMIN[0x083A] = 0x00000000;
-+       pNv->PRAMIN[0x083B] = 0x00000000;
-+       pNv->PRAMIN[0x083C] = 0x00000000;
-+       pNv->PRAMIN[0x083D] = 0x00000000;
-+       pNv->PRAMIN[0x0840] = 0x02080077;
-+       pNv->PRAMIN[0x0841] = 0x00000000;
-+       pNv->PRAMIN[0x0842] = 0x00001200;
-+       pNv->PRAMIN[0x0843] = 0x00001200;
-+       pNv->PRAMIN[0x0844] = 0x00000000;
-+       pNv->PRAMIN[0x0845] = 0x00000000;
-+       pNv->PRAMIN[0x084C] = 0x00003002;
-+       pNv->PRAMIN[0x084D] = 0x00007FFF;
-+       pNv->PRAMIN[0x084E] = pNv->FbUsableSize | 0x00000002;
- #if X_BYTE_ORDER == X_BIG_ENDIAN
--    pNv->PRAMIN[0x0804] |= 0x00080000;
--    pNv->PRAMIN[0x0808] |= 0x00080000;
--    pNv->PRAMIN[0x080C] |= 0x00080000;
--    pNv->PRAMIN[0x0810] |= 0x00080000;
--    pNv->PRAMIN[0x0814] |= 0x00080000;
--    pNv->PRAMIN[0x0818] |= 0x00080000;
--    pNv->PRAMIN[0x081C] |= 0x00080000;
--    pNv->PRAMIN[0x0820] |= 0x00080000;
-+       pNv->PRAMIN[0x080A] |= 0x01000000;
-+       pNv->PRAMIN[0x0812] |= 0x01000000;
-+       pNv->PRAMIN[0x081A] |= 0x01000000;
-+       pNv->PRAMIN[0x0822] |= 0x01000000;
-+       pNv->PRAMIN[0x082A] |= 0x01000000;
-+       pNv->PRAMIN[0x0832] |= 0x01000000;
-+       pNv->PRAMIN[0x083A] |= 0x01000000;
-+       pNv->PRAMIN[0x0842] |= 0x01000000;  
-+       pNv->PRAMIN[0x0819] = 0x01000000;
-+       pNv->PRAMIN[0x0839] = 0x01000000;
-+#endif
-+    } else {
-+       pNv->PRAMIN[0x0000] = 0x80000010;
-+       pNv->PRAMIN[0x0001] = 0x80011201;  
-+       pNv->PRAMIN[0x0002] = 0x80000011;
-+       pNv->PRAMIN[0x0003] = 0x80011202; 
-+       pNv->PRAMIN[0x0004] = 0x80000012;
-+       pNv->PRAMIN[0x0005] = 0x80011203;
-+       pNv->PRAMIN[0x0006] = 0x80000013;
-+       pNv->PRAMIN[0x0007] = 0x80011204;
-+       pNv->PRAMIN[0x0008] = 0x80000014;
-+       pNv->PRAMIN[0x0009] = 0x80011205;
-+       pNv->PRAMIN[0x000A] = 0x80000015;
-+       pNv->PRAMIN[0x000B] = 0x80011206;
-+       pNv->PRAMIN[0x000C] = 0x80000016;
-+       pNv->PRAMIN[0x000D] = 0x80011207;
-+       pNv->PRAMIN[0x000E] = 0x80000017;
-+       pNv->PRAMIN[0x000F] = 0x80011208;
-+       pNv->PRAMIN[0x0800] = 0x00003000;
-+       pNv->PRAMIN[0x0801] = pNv->FbMapSize - 1;
-+       pNv->PRAMIN[0x0802] = 0x00000002;
-+       pNv->PRAMIN[0x0803] = 0x00000002;
-+       if(pNv->Architecture >= NV_ARCH_10)
-+          pNv->PRAMIN[0x0804] = 0x01008062;
-+       else
-+          pNv->PRAMIN[0x0804] = 0x01008042;
-+       pNv->PRAMIN[0x0805] = 0x00000000;
-+       pNv->PRAMIN[0x0806] = 0x12001200;
-+       pNv->PRAMIN[0x0807] = 0x00000000;
-+       pNv->PRAMIN[0x0808] = 0x01008043;
-+       pNv->PRAMIN[0x0809] = 0x00000000;
-+       pNv->PRAMIN[0x080A] = 0x00000000;
-+       pNv->PRAMIN[0x080B] = 0x00000000;
-+       pNv->PRAMIN[0x080C] = 0x01008044;
-+       pNv->PRAMIN[0x080D] = 0x00000002;
-+       pNv->PRAMIN[0x080E] = 0x00000000;
-+       pNv->PRAMIN[0x080F] = 0x00000000;
-+       pNv->PRAMIN[0x0810] = 0x01008019;
-+       pNv->PRAMIN[0x0811] = 0x00000000;
-+       pNv->PRAMIN[0x0812] = 0x00000000;
-+       pNv->PRAMIN[0x0813] = 0x00000000;
-+       pNv->PRAMIN[0x0814] = 0x0100A05C;
-+       pNv->PRAMIN[0x0815] = 0x00000000;
-+       pNv->PRAMIN[0x0816] = 0x00000000;
-+       pNv->PRAMIN[0x0817] = 0x00000000;
-+       if(pNv->WaitVSyncPossible)
-+          pNv->PRAMIN[0x0818] = 0x0100809F;
-+       else
-+          pNv->PRAMIN[0x0818] = 0x0100805F;
-+       pNv->PRAMIN[0x0819] = 0x00000000;
-+       pNv->PRAMIN[0x081A] = 0x12001200;
-+       pNv->PRAMIN[0x081B] = 0x00000000;
-+       pNv->PRAMIN[0x081C] = 0x0100804A;
-+       pNv->PRAMIN[0x081D] = 0x00000002;
-+       pNv->PRAMIN[0x081E] = 0x00000000;
-+       pNv->PRAMIN[0x081F] = 0x00000000;
-+       pNv->PRAMIN[0x0820] = 0x01018077;
-+       pNv->PRAMIN[0x0821] = 0x00000000;
-+       pNv->PRAMIN[0x0822] = 0x12001200;
-+       pNv->PRAMIN[0x0823] = 0x00000000;
-+       pNv->PRAMIN[0x0824] = 0x00003002;
-+       pNv->PRAMIN[0x0825] = 0x00007FFF;
-+       pNv->PRAMIN[0x0826] = pNv->FbUsableSize | 0x00000002;
-+       pNv->PRAMIN[0x0827] = 0x00000002;
--    pNv->PRAMIN[0x080D] = 0x00000001;
--    pNv->PRAMIN[0x081D] = 0x00000001;
-+#if X_BYTE_ORDER == X_BIG_ENDIAN
-+       pNv->PRAMIN[0x0804] |= 0x00080000;
-+       pNv->PRAMIN[0x0808] |= 0x00080000;
-+       pNv->PRAMIN[0x080C] |= 0x00080000;
-+       pNv->PRAMIN[0x0810] |= 0x00080000;
-+       pNv->PRAMIN[0x0814] |= 0x00080000;
-+       pNv->PRAMIN[0x0818] |= 0x00080000;
-+       pNv->PRAMIN[0x081C] |= 0x00080000;
-+       pNv->PRAMIN[0x0820] |= 0x00080000;
-+       pNv->PRAMIN[0x080D] = 0x00000001;
-+       pNv->PRAMIN[0x081D] = 0x00000001;
- #endif
-+    }
-     if(pNv->Architecture < NV_ARCH_10) {
-        if((pNv->Chipset & 0x0fff) == 0x0020) {
-@@ -985,6 +1119,7 @@
-        pNv->PGRAPH[0x0084/4] = 0x72111101;
-        pNv->PGRAPH[0x0088/4] = 0x11D5F071;
-        pNv->PGRAPH[0x008C/4] = 0x0004FF31;
-+       pNv->PGRAPH[0x008C/4] = 0x4004FF31;
-        pNv->PGRAPH[0x0140/4] = 0x00000000;
-        pNv->PGRAPH[0x0100/4] = 0xFFFFFFFF;
-@@ -993,6 +1128,7 @@
-        pNv->PGRAPH[0x0720/4] = 0x00000001;
-        pNv->PGRAPH[0x0810/4] = 0x00000000;
-+       pNv->PGRAPH[0x0608/4] = 0xFFFFFFFF; 
-     } else {
-        pNv->PGRAPH[0x0080/4] = 0xFFFFFFFF;
-        pNv->PGRAPH[0x0080/4] = 0x00000000;
-@@ -1002,6 +1138,8 @@
-        pNv->PGRAPH[0x0144/4] = 0x10010100;
-        pNv->PGRAPH[0x0714/4] = 0xFFFFFFFF;
-        pNv->PGRAPH[0x0720/4] = 0x00000001;
-+       pNv->PGRAPH[0x0710/4] &= 0x0007ff00;
-+       pNv->PGRAPH[0x0710/4] |= 0x00020100;
-        if(pNv->Architecture == NV_ARCH_10) {
-            pNv->PGRAPH[0x0084/4] = 0x00118700;
-@@ -1017,8 +1155,55 @@
-            pNv->PGRAPH[0x688/4] = pNv->FbMapSize - 1;
-            pNv->PGRAPH[0x0810/4] = 0x00000000;
-+           pNv->PGRAPH[0x0608/4] = 0xFFFFFFFF;
-        } else {
--           if(pNv->Architecture >= NV_ARCH_30) {
-+           if(pNv->Architecture >= NV_ARCH_40) {
-+              pNv->PGRAPH[0x0084/4] = 0x401287c0;
-+              pNv->PGRAPH[0x008C/4] = 0x60de8051;
-+              pNv->PGRAPH[0x0090/4] = 0x00008000;
-+              pNv->PGRAPH[0x0610/4] = 0x00be3c5f;
-+
-+              if((pNv->Chipset & 0xfff0) == 0x0040) {
-+                 pNv->PGRAPH[0x09b0/4] = 0x83280fff;
-+                 pNv->PGRAPH[0x09b4/4] = 0x000000a0;
-+              } else {
-+                 pNv->PGRAPH[0x0820/4] = 0x83280eff;
-+                 pNv->PGRAPH[0x0824/4] = 0x000000a0;
-+              }
-+
-+              switch(pNv->Chipset & 0xfff0) {
-+              case 0x0040:
-+                 pNv->PGRAPH[0x09b8/4] = 0x0078e366;
-+                 pNv->PGRAPH[0x09bc/4] = 0x0000014c;
-+                 pNv->PFB[0x033C/4] &= 0xffff7fff;
-+                 break;
-+              case 0x00C0:
-+                 pNv->PGRAPH[0x0828/4] = 0x007596ff;
-+                 pNv->PGRAPH[0x082C/4] = 0x00000108;
-+                 break;
-+              case 0x0160:
-+                 pNv->PMC[0x1700/4] = pNv->PFB[0x020C/4];
-+                 pNv->PMC[0x1704/4] = 0;
-+                 pNv->PMC[0x1708/4] = 0;
-+                 pNv->PMC[0x170C/4] = pNv->PFB[0x020C/4];
-+                 pNv->PGRAPH[0x0860/4] = 0;
-+                 pNv->PGRAPH[0x0864/4] = 0;
-+                 pNv->PRAMDAC[0x0608/4] |= 0x00100000;
-+                 break;
-+              case 0x0140:
-+                 pNv->PGRAPH[0x0828/4] = 0x0072cb77;
-+                 pNv->PGRAPH[0x082C/4] = 0x00000108;
-+                 break;
-+              default:
-+                 break;
-+              };
-+
-+              pNv->PGRAPH[0x0b38/4] = 0x2ffff800;
-+              pNv->PGRAPH[0x0b3c/4] = 0x00006000;
-+              pNv->PGRAPH[0x032C/4] = 0x01000000; 
-+              pNv->PGRAPH[0x0220/4] = 0x00001200;
-+           } else
-+           if(pNv->Architecture == NV_ARCH_30) {
-               pNv->PGRAPH[0x0084/4] = 0x40108700;
-               pNv->PGRAPH[0x0890/4] = 0x00140000;
-               pNv->PGRAPH[0x008C/4] = 0xf00e0431;
-@@ -1055,19 +1240,44 @@
-            for(i = 0; i < 32; i++)
-              pNv->PGRAPH[(0x0900/4) + i] = pNv->PFB[(0x0240/4) + i];
--           pNv->PGRAPH[0x09A4/4] = pNv->PFB[0x0200/4];
--           pNv->PGRAPH[0x09A8/4] = pNv->PFB[0x0204/4];
--           pNv->PGRAPH[0x0750/4] = 0x00EA0000;
--           pNv->PGRAPH[0x0754/4] = pNv->PFB[0x0200/4];
--           pNv->PGRAPH[0x0750/4] = 0x00EA0004;
--           pNv->PGRAPH[0x0754/4] = pNv->PFB[0x0204/4];
--
--           pNv->PGRAPH[0x0820/4] = 0;
--           pNv->PGRAPH[0x0824/4] = 0;
--           pNv->PGRAPH[0x0864/4] = pNv->FbMapSize - 1;
--           pNv->PGRAPH[0x0868/4] = pNv->FbMapSize - 1;
-+           if(pNv->Architecture >= NV_ARCH_40) {
-+              if((pNv->Chipset & 0xfff0) == 0x0040) {
-+                 pNv->PGRAPH[0x09A4/4] = pNv->PFB[0x0200/4];
-+                 pNv->PGRAPH[0x09A8/4] = pNv->PFB[0x0204/4];
-+                 pNv->PGRAPH[0x69A4/4] = pNv->PFB[0x0200/4];
-+                 pNv->PGRAPH[0x69A8/4] = pNv->PFB[0x0204/4];
-+
-+                 pNv->PGRAPH[0x0820/4] = 0;
-+                 pNv->PGRAPH[0x0824/4] = 0;
-+                 pNv->PGRAPH[0x0864/4] = pNv->FbMapSize - 1;
-+                 pNv->PGRAPH[0x0868/4] = pNv->FbMapSize - 1;
-+              } else {
-+                 pNv->PGRAPH[0x09F0/4] = pNv->PFB[0x0200/4];
-+                 pNv->PGRAPH[0x09F4/4] = pNv->PFB[0x0204/4];
-+                 pNv->PGRAPH[0x69F0/4] = pNv->PFB[0x0200/4];
-+                 pNv->PGRAPH[0x69F4/4] = pNv->PFB[0x0204/4];
-+
-+                 pNv->PGRAPH[0x0840/4] = 0;
-+                 pNv->PGRAPH[0x0844/4] = 0;
-+                 pNv->PGRAPH[0x08a0/4] = pNv->FbMapSize - 1;
-+                 pNv->PGRAPH[0x08a4/4] = pNv->FbMapSize - 1;
-+              }
-+           } else {
-+              pNv->PGRAPH[0x09A4/4] = pNv->PFB[0x0200/4];
-+              pNv->PGRAPH[0x09A8/4] = pNv->PFB[0x0204/4];
-+              pNv->PGRAPH[0x0750/4] = 0x00EA0000;
-+              pNv->PGRAPH[0x0754/4] = pNv->PFB[0x0200/4];
-+              pNv->PGRAPH[0x0750/4] = 0x00EA0004;
-+              pNv->PGRAPH[0x0754/4] = pNv->PFB[0x0204/4];
-+
-+              pNv->PGRAPH[0x0820/4] = 0;
-+              pNv->PGRAPH[0x0824/4] = 0;
-+              pNv->PGRAPH[0x0864/4] = pNv->FbMapSize - 1;
-+              pNv->PGRAPH[0x0868/4] = pNv->FbMapSize - 1;
-+           }
-            pNv->PGRAPH[0x0B20/4] = 0x00000000;
-+           pNv->PGRAPH[0x0B04/4] = 0xFFFFFFFF;
-        }
-     }
-     pNv->PGRAPH[0x053C/4] = 0;
-@@ -1079,10 +1289,16 @@
-     pNv->PFIFO[0x0141] = 0x00000001;
-     pNv->PFIFO[0x0480] = 0x00000000;
-     pNv->PFIFO[0x0494] = 0x00000000;
--    pNv->PFIFO[0x0481] = 0x00000100;
-+    if(pNv->Architecture >= NV_ARCH_40)
-+       pNv->PFIFO[0x0481] = 0x00010000;
-+    else
-+       pNv->PFIFO[0x0481] = 0x00000100;
-     pNv->PFIFO[0x0490] = 0x00000000;
-     pNv->PFIFO[0x0491] = 0x00000000;
--    pNv->PFIFO[0x048B] = 0x00001209;
-+    if(pNv->Architecture >= NV_ARCH_40)
-+       pNv->PFIFO[0x048B] = 0x00001213;
-+    else
-+       pNv->PFIFO[0x048B] = 0x00001209;
-     pNv->PFIFO[0x0400] = 0x00000000;
-     pNv->PFIFO[0x0414] = 0x00000000;
-     pNv->PFIFO[0x0084] = 0x03000100;
-@@ -1122,12 +1338,14 @@
-         pNv->PMC[0x1588/4] = 0;
-         pNv->PCRTC[0x0810/4] = state->cursorConfig;
-+        pNv->PCRTC[0x0830/4] = state->displayV - 3;
-+        pNv->PCRTC[0x0834/4] = state->displayV - 1;
-     
-         if(pNv->FlatPanel) {
-            if((pNv->Chipset & 0x0ff0) == 0x0110) {
-                pNv->PRAMDAC[0x0528/4] = state->dither;
-            } else 
--           if((pNv->Chipset & 0x0ff0) >= 0x0170) {
-+           if(pNv->twoHeads) {
-                pNv->PRAMDAC[0x083C/4] = state->dither;
-            }
-     
-@@ -1153,10 +1371,16 @@
-     VGA_WR08(pNv->PCIO, 0x03D5, state->pixel);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x2D);
-     VGA_WR08(pNv->PCIO, 0x03D5, state->horiz);
-+    VGA_WR08(pNv->PCIO, 0x03D4, 0x1C);
-+    VGA_WR08(pNv->PCIO, 0x03D5, state->fifo);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x1B);
-     VGA_WR08(pNv->PCIO, 0x03D5, state->arbitration0);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x20);
-     VGA_WR08(pNv->PCIO, 0x03D5, state->arbitration1);
-+    if(pNv->Architecture >= NV_ARCH_30) {
-+      VGA_WR08(pNv->PCIO, 0x03D4, 0x47);
-+      VGA_WR08(pNv->PCIO, 0x03D5, state->arbitration1 >> 8);
-+    }
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x30);
-     VGA_WR08(pNv->PCIO, 0x03D5, state->cursor0);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x31);
-@@ -1177,6 +1401,7 @@
-        }
-     } else {
-        pNv->PRAMDAC[0x0848/4] = state->scale;
-+       pNv->PRAMDAC[0x0828/4] = state->crtcSync;
-     }
-     pNv->PRAMDAC[0x0600/4] = state->general;
-@@ -1202,10 +1427,16 @@
-     state->pixel        = VGA_RD08(pNv->PCIO, 0x03D5);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x2D);
-     state->horiz        = VGA_RD08(pNv->PCIO, 0x03D5);
-+    VGA_WR08(pNv->PCIO, 0x03D4, 0x1C);
-+    state->fifo         = VGA_RD08(pNv->PCIO, 0x03D5);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x1B);
-     state->arbitration0 = VGA_RD08(pNv->PCIO, 0x03D5);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x20);
-     state->arbitration1 = VGA_RD08(pNv->PCIO, 0x03D5);
-+    if(pNv->Architecture >= NV_ARCH_30) {
-+       VGA_WR08(pNv->PCIO, 0x03D4, 0x47);
-+       state->arbitration1 |= (VGA_RD08(pNv->PCIO, 0x03D5) & 1) << 8;
-+    }
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x30);
-     state->cursor0      = VGA_RD08(pNv->PCIO, 0x03D5);
-     VGA_WR08(pNv->PCIO, 0x03D4, 0x31);
-@@ -1240,7 +1471,7 @@
-         if((pNv->Chipset & 0x0ff0) == 0x0110) {
-            state->dither = pNv->PRAMDAC[0x0528/4];
-         } else 
--        if((pNv->Chipset & 0x0ff0) >= 0x0170) {
-+        if(pNv->twoHeads) {
-             state->dither = pNv->PRAMDAC[0x083C/4];
-         }
-@@ -1251,6 +1482,10 @@
-            state->timingV = VGA_RD08(pNv->PCIO, 0x03D5);
-         }
-     }
-+
-+    if(pNv->FlatPanel) {
-+       state->crtcSync = pNv->PRAMDAC[0x0828/4];
-+    }
- }
- void NVSetStartAddress (
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h  23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h  14 Nov 2004 18:13:27 -0000      1.2.4.1
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.9 2003/05/04 01:20:52 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.11 2004/03/20 01:52:16 mvojkovi Exp $ */
- #ifndef __NV_PROTO_H__
- #define __NV_PROTO_H__
-@@ -37,6 +37,7 @@
- void   NVResetGraphics(ScrnInfoPtr pScrn);
- void   NVDmaKickoff(NVPtr pNv);
- void   NVDmaWait(NVPtr pNv, int size);
-+void   NVWaitVSync(NVPtr pNv);
- /* in nv_dga.c */
- Bool   NVDGAInit(ScreenPtr pScreen);
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c  23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c  16 Dec 2004 01:42:35 -0000      1.2.4.2
-@@ -37,7 +37,7 @@
- |*                                                                           *|
-  \***************************************************************************/
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.39 2003/11/07 23:56:28 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.44 2004/12/09 00:21:05 mvojkovi Exp $ */
- #include "nv_include.h"
-@@ -292,10 +292,10 @@
-     }
- #endif
--    if((pNv->Chipset & 0xffff) == 0x01a0) {
-+    if(implementation == 0x01a0) {
-         int amt = pciReadLong(pciTag(0, 0, 1), 0x7C);
-         pNv->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024;
--    } else if((pNv->Chipset & 0xffff) == 0x01f0) {
-+    } else if(implementation == 0x01f0) {
-         int amt = pciReadLong(pciTag(0, 0, 1), 0x84);
-         pNv->RamAmountKBytes = (((amt >> 4) & 127) + 1) * 1024;
-     } else {
-@@ -304,10 +304,7 @@
-     pNv->CrystalFreqKHz = (pNv->PEXTDEV[0x0000/4] & (1 << 6)) ? 14318 : 13500;
-     
--    if((implementation == 0x0170) ||
--       (implementation == 0x0180) ||
--       (implementation == 0x01F0) ||
--       (implementation >= 0x0250))
-+    if(pNv->twoHeads && (implementation != 0x0110))
-     {
-        if(pNv->PEXTDEV[0x0000/4] & (1 << 22))
-            pNv->CrystalFreqKHz = 27000;
-@@ -381,15 +378,22 @@
-     pNv->PDIO0    = (U008*)pNv->REGS + 0x00681000;
-     pNv->PVIO     = (U008*)pNv->REGS + 0x000C0000;
--    pNv->twoHeads =  (implementation >= 0x0110) &&
-+    pNv->twoHeads =  (pNv->Architecture >= NV_ARCH_10) &&
-+                     (implementation != 0x0100) &&
-                      (implementation != 0x0150) &&
-                      (implementation != 0x01A0) &&
-                      (implementation != 0x0200);
--    pNv->fpScaler = (pNv->twoHeads && (implementation != 0x0110));
-+    pNv->fpScaler = (pNv->FpScale && pNv->twoHeads && (implementation!=0x0110));
-     pNv->twoStagePLL = (implementation == 0x0310) ||
--                       (implementation == 0x0340);
-+                       (implementation == 0x0340) ||
-+                       (pNv->Architecture >= NV_ARCH_40);
-+
-+    pNv->WaitVSyncPossible = (pNv->Architecture >= NV_ARCH_10) &&
-+                             (implementation != 0x0100);
-+
-+    pNv->BlendingPossible = ((pNv->Chipset & 0xffff) != 0x0020);
-     /* look for known laptop chips */
-     switch(pNv->Chipset & 0xffff) {
-@@ -403,7 +407,7 @@
-     case 0x017D:
-     case 0x0186:
-     case 0x0187:
--    case 0x0189:
-+    case 0x018D:
-     case 0x0286:
-     case 0x028C:
-     case 0x0316:
-@@ -425,6 +429,13 @@
-     case 0x0349:
-     case 0x034B:
-     case 0x034C:
-+    case 0x0160:
-+    case 0x0166:
-+    case 0x00C8:
-+    case 0x00CC:
-+    case 0x0144:
-+    case 0x0146:
-+    case 0x0148:
-         mobile = TRUE;
-         break;
-     default:
-@@ -659,6 +670,7 @@
-     if(pNv->FlatPanel && !pNv->Television) {
-        pNv->fpWidth = pNv->PRAMDAC[0x0820/4] + 1;
-        pNv->fpHeight = pNv->PRAMDAC[0x0800/4] + 1;
-+       pNv->fpSyncs = pNv->PRAMDAC[0x0848/4] & 0x30000033;
-        xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Panel size is %i x %i\n",
-                   pNv->fpWidth, pNv->fpHeight);
-     }
-@@ -666,7 +678,7 @@
-     if(monitorA)
-       xf86SetDDCproperties(pScrn, monitorA);
--    if(!pNv->FlatPanel || (pScrn->depth != 24))
-+    if(!pNv->FlatPanel || (pScrn->depth != 24) || !pNv->twoHeads)
-         pNv->FPDither = FALSE;
- }
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_type.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/Xserver/hw/xfree86/drivers/nv/nv_type.h   23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_type.h   16 Dec 2004 01:42:35 -0000      1.2.4.2
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.44 2003/09/08 20:00:27 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.50 2004/12/09 00:21:05 mvojkovi Exp $ */
- #ifndef __NV_STRUCT_H__
- #define __NV_STRUCT_H__
-@@ -13,6 +13,7 @@
- #define NV_ARCH_10  0x10
- #define NV_ARCH_20  0x20
- #define NV_ARCH_30  0x30
-+#define NV_ARCH_40  0x40
- #define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1)  << (b))
-@@ -43,6 +44,7 @@
-     U032 scale;
-     U032 dither;
-     U032 extra;
-+    U032 fifo;
-     U032 pixel;
-     U032 horiz;
-     U032 arbitration0;
-@@ -65,6 +67,8 @@
-     U032 cursor2;
-     U032 timingH;
-     U032 timingV;
-+    U032 displayV;
-+    U032 crtcSync;
- } RIVA_HW_STATE, *NVRegPtr;
-@@ -90,6 +94,7 @@
-     CARD32              ScratchBufferStart;
-     Bool                NoAccel;
-     Bool                HWCursor;
-+    Bool                FpScale;
-     Bool                ShadowFB;
-     unsigned char *     ShadowPtr;
-     int                 ShadowPitch;
-@@ -153,6 +158,9 @@
-     Bool                fpScaler;
-     int                 fpWidth;
-     int                 fpHeight;
-+    CARD32              fpSyncs;
-+    Bool                usePanelTweak;
-+    int                 PanelTweak;
-     CARD32              dmaPut;
-     CARD32              dmaCurrent;
-@@ -161,6 +169,8 @@
-     CARD32              *dmaBase;
-     CARD32              currentRop;
-+    Bool                WaitVSyncPossible;
-+    Bool                BlendingPossible;
- } NVRec, *NVPtr;
- #define NVPTR(p) ((NVPtr)((p)->driverPrivate))
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_video.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nv/nv_video.c  23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_video.c  14 Nov 2004 18:13:27 -0000      1.2.4.1
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.20tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.23 2004/03/20 22:07:06 mvojkovi Exp $ */
- #include "xf86.h"
- #include "xf86_OSproc.h"
-@@ -46,6 +46,7 @@
-    Bool               grabbedByV4L;
-    Bool         iturbt_709;
-    Bool         blitter;
-+   Bool         SyncToVBlank;
-    FBLinearPtr  linear;
-    int pitch;
-    int offset;
-@@ -95,7 +96,7 @@
- static Atom xvBrightness, xvContrast, xvColorKey, xvSaturation, 
-             xvHue, xvAutopaintColorKey, xvSetDefaults, xvDoubleBuffer,
--            xvITURBT709;
-+            xvITURBT709, xvSyncToVBlank;
- /* client libraries expect an encoding */
- static XF86VideoEncodingRec DummyEncoding =
-@@ -114,9 +115,8 @@
-    {15, DirectColor}, {16, DirectColor}, {24, DirectColor}
- };
--#define NUM_ATTRIBUTES 9
--
--XF86AttributeRec NVAttributes[NUM_ATTRIBUTES] =
-+#define NUM_OVERLAY_ATTRIBUTES 9
-+XF86AttributeRec NVOverlayAttributes[NUM_OVERLAY_ATTRIBUTES] =
- {
-    {XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"},
-    {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"},
-@@ -129,6 +129,14 @@
-    {XvSettable | XvGettable, 0, 1, "XV_ITURBT_709"}
- };
-+#define NUM_BLIT_ATTRIBUTES 2
-+XF86AttributeRec NVBlitAttributes[NUM_BLIT_ATTRIBUTES] =
-+{
-+   {XvSettable             , 0, 0, "XV_SET_DEFAULTS"},
-+   {XvSettable | XvGettable, 0, 1, "XV_SYNC_TO_VBLANK"}
-+};
-+
-+
- #define NUM_IMAGES_YUV 4
- #define NUM_IMAGES_ALL 5
-@@ -285,7 +293,10 @@
-     NVPtr             pNv   = NVPTR(pScrn);
-     int               num_adaptors;
--    if((pScrn->bitsPerPixel != 8) && (pNv->Architecture >= NV_ARCH_10)) {
-+    if((pScrn->bitsPerPixel != 8) && (pNv->Architecture >= NV_ARCH_10) &&
-+         ((pNv->Architecture <= NV_ARCH_30) || 
-+            ((pNv->Chipset & 0xfff0) == 0x0040)))
-+    {
-       overlayAdaptor = NVSetupOverlayVideo(pScreen);
-   
-       if(overlayAdaptor)
-@@ -358,8 +369,13 @@
-     for(i = 0; i < NUM_BLIT_PORTS; i++)
-        adapt->pPortPrivates[i].ptr = (pointer)(pPriv);
--    adapt->pAttributes          = NULL;
--    adapt->nAttributes          = 0;
-+    if(pNv->WaitVSyncPossible) {
-+       adapt->pAttributes          = NVBlitAttributes;
-+       adapt->nAttributes          = NUM_BLIT_ATTRIBUTES;
-+    } else {
-+       adapt->pAttributes          = NULL;
-+       adapt->nAttributes          = 0;
-+    }
-     adapt->pImages              = NVImages;
-     adapt->nImages              = NUM_IMAGES_ALL;
-     adapt->PutVideo             = NULL;
-@@ -377,9 +393,12 @@
-     pPriv->grabbedByV4L         = FALSE;
-     pPriv->blitter              = TRUE;
-     pPriv->doubleBuffer         = FALSE;
-+    pPriv->SyncToVBlank         = pNv->WaitVSyncPossible;
-     pNv->blitAdaptor            = adapt;
-+    xvSyncToVBlank              = MAKE_ATOM("XV_SYNC_TO_VBLANK");
-+
-     return adapt;
- }
-@@ -409,8 +428,8 @@
-     adapt->pPortPrivates        = (DevUnion*)(&adapt[1]);
-     pPriv                       = (NVPortPrivPtr)(&adapt->pPortPrivates[1]);
-     adapt->pPortPrivates[0].ptr = (pointer)(pPriv);
--    adapt->pAttributes          = NVAttributes;
--    adapt->nAttributes          = NUM_ATTRIBUTES;
-+    adapt->pAttributes          = NVOverlayAttributes;
-+    adapt->nAttributes          = NUM_OVERLAY_ATTRIBUTES;
-     adapt->pImages              = NVImages;
-     adapt->nImages              = NUM_IMAGES_YUV;
-     adapt->PutVideo             = NULL;
-@@ -571,8 +590,19 @@
-         NVDmaNext (pNv, SURFACE_FORMAT_DEPTH15);
-     }
--    NVDmaStart(pNv, STRETCH_BLIT_FORMAT, 1);
--    NVDmaNext (pNv, format);
-+    if(pPriv->SyncToVBlank) {
-+       NVDmaKickoff(pNv);
-+       NVWaitVSync(pNv);
-+    }
-+
-+    if(pNv->BlendingPossible) {
-+       NVDmaStart(pNv, STRETCH_BLIT_FORMAT, 2);
-+       NVDmaNext (pNv, format);
-+       NVDmaNext (pNv, STRETCH_BLIT_OPERATION_COPY);
-+    } else {
-+       NVDmaStart(pNv, STRETCH_BLIT_FORMAT, 1);
-+       NVDmaNext (pNv, format);
-+    }
-     while(nbox--) {
-        NVDmaStart(pNv, RECT_SOLID_COLOR, 1);
-@@ -757,7 +787,20 @@
-     pointer     data
- )
- {
--    return BadMatch;
-+    NVPortPrivPtr pPriv = (NVPortPrivPtr)data;
-+    NVPtr pNv = NVPTR(pScrnInfo);
-+    
-+    if ((attribute == xvSyncToVBlank) && pNv->WaitVSyncPossible) {
-+        if ((value < 0) || (value > 1))
-+            return BadValue;
-+        pPriv->SyncToVBlank = value;
-+    } else
-+    if (attribute == xvSetDefaults) {
-+        pPriv->SyncToVBlank = pNv->WaitVSyncPossible;
-+    } else
-+       return BadMatch;
-+
-+    return Success;
- }
- static int NVGetBlitPortAttribute
-@@ -768,7 +811,14 @@
-     pointer      data
- )
- {
--    return BadMatch;
-+    NVPortPrivPtr pPriv = (NVPortPrivPtr)data;
-+
-+    if(attribute == xvSyncToVBlank)
-+       *value = (pPriv->SyncToVBlank) ? 1 : 0;
-+    else
-+       return BadMatch;
-+
-+    return Success;
- }
-@@ -1434,8 +1484,8 @@
-    NVGetSurfaceAttribute,
-    NVSetSurfaceAttribute,
-    2046, 2046,
--   NUM_ATTRIBUTES - 1,
--   &NVAttributes[1]
-+   NUM_OVERLAY_ATTRIBUTES - 1,
-+   &NVOverlayAttributes[1]
-   },
-  {
-    &NVImages[2],
-@@ -1447,8 +1497,8 @@
-    NVGetSurfaceAttribute,
-    NVSetSurfaceAttribute,
-    2046, 2046,
--   NUM_ATTRIBUTES - 1,
--   &NVAttributes[1]
-+   NUM_OVERLAY_ATTRIBUTES - 1,
-+   &NVOverlayAttributes[1]
-   },
- };
-Index: programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c    23 Apr 2004 19:42:10 -0000      1.2
-+++ programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c    14 Nov 2004 18:13:27 -0000      1.2.4.1
-@@ -37,7 +37,7 @@
- |*                                                                           *|
-  \***************************************************************************/
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v 1.33 2003/09/21 00:17:34 mvojkovi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v 1.35 2004/03/20 16:25:18 mvojkovi Exp $ */
- #include "nv_include.h"
- #include "xaalocal.h"
-@@ -151,6 +151,19 @@
-     }
- }
-+void
-+NVWaitVSync(NVPtr pNv)
-+{
-+    NVDmaStart(pNv, 0x0000A12C, 1);
-+    NVDmaNext (pNv, 0);
-+    NVDmaStart(pNv, 0x0000A134, 1);
-+    NVDmaNext (pNv, pNv->CRTCnumber);
-+    NVDmaStart(pNv, 0x0000A100, 1);
-+    NVDmaNext (pNv, 0);
-+    NVDmaStart(pNv, 0x0000A130, 1);
-+    NVDmaNext (pNv, 0);
-+}
-+
- /* 
-   currentRop =  0-15  solid fill
-                16-31  8x8 pattern fill
-Index: programs/Xserver/hw/xfree86/input/keyboard/kbd.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/hw/xfree86/input/keyboard/kbd.c   31 Aug 2004 01:36:13 -0000      1.6
-+++ programs/Xserver/hw/xfree86/input/keyboard/kbd.c   16 Dec 2004 03:38:45 -0000      1.6.2.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.6 2004/08/31 01:36:13 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.6.2.1 2004/12/16 03:38:45 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2003/11/03 05:11:47 tsi Exp $ */
- /*
-@@ -12,7 +12,7 @@
-  * xf86Events.c and xf86Io.c which are
-  * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
-  */
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.6 2004/08/31 01:36:13 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.6.2.1 2004/12/16 03:38:45 gisburn Exp $ */
-   
- #define NEED_EVENTS
- #include "X.h"
-@@ -135,7 +135,7 @@
-     "Protocol",               "standard",
-     "AutoRepeat",     "500 30",
-     "XkbRules",               __XKBDEFRULES__,
--    "XkbModel",               "pc101",
-+    "XkbModel",               "pc105",
-     "XkbLayout",      "us",
-     "Panix106",               "off",
-     "CustomKeycodes", "off",
-@@ -372,6 +372,7 @@
-   }
- #endif
-   pKbd->SetLeds(pInfo, pKbd->leds);
-+  pKbd->autoRepeat = ctrl->autoRepeat;
-   return (Success);
- }
-@@ -720,14 +721,14 @@
-   /*
-    * check for an autorepeat-event
-    */
--  if (down) {
-+  if (down && KeyPressed(keycode)) {
-       int num = keycode >> 3;
-       int bit = 1 << (keycode & 7);
--      if ((keyc->down[num] & bit) &&
--          ((kbdfeed->ctrl.autoRepeat != AutoRepeatModeOn) ||
--            keyc->modifierMap[keycode] ||
--            !(kbdfeed->ctrl.autoRepeats[num] & bit)))
--          return;
-+
-+      if ((pKbd->autoRepeat != AutoRepeatModeOn) ||
-+        keyc->modifierMap[keycode] ||
-+        !(kbdfeed->ctrl.autoRepeats[num] & bit))
-+        return;
-   }
-    if (UsePrefix) {
-Index: programs/Xserver/hw/xfree86/loader/dixsym.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v
-retrieving revision 1.5
-retrieving revision 1.5.2.2
-diff -u -u -r1.5 -r1.5.2.2
---- programs/Xserver/hw/xfree86/loader/dixsym.c        19 Aug 2004 04:08:40 -0000      1.5
-+++ programs/Xserver/hw/xfree86/loader/dixsym.c        8 Dec 2004 05:32:54 -0000       1.5.2.2
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.5 2004/08/19 04:08:40 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.5.2.2 2004/12/08 05:32:54 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
-  * 17:11:29 tsi Exp $ */
-@@ -325,15 +325,122 @@
-     SYMFUNC(AdjustWaitForDelay)
-     SYMVAR(noTestExtensions)
-     SYMFUNC(GiveUp)
-+
-+#ifdef BEZIER
-+    SYMVAR(noBezierExtension)
-+#endif
-+#ifdef BIGREQS
-+    SYMVAR(noBigReqExtension)
-+#endif
- #ifdef COMPOSITE
-     SYMVAR(noCompositeExtension)
- #endif
-+#ifdef DAMAGE
-+    SYMVAR(noDamageExtension)
-+#endif
-+#ifdef DBE
-+    SYMVAR(noDbeExtension)
-+#endif
-+#ifdef DPSEXT
-+    SYMVAR(noDPSExtension)
-+#endif
-+#ifdef DPMSExtension
-+    SYMVAR(noDPMSExtension)
-+#endif
-+#ifdef EVI
-+    SYMVAR(noEVIExtension)
-+#endif
-+#ifdef FONTCACHE
-+    SYMVAR(noFontCacheExtension)
-+#endif
-+#ifdef GLXEXT
-+    SYMVAR(noGlxExtension)
-+#endif
-+#ifdef LBX
-+    SYMVAR(noLbxExtension)
-+#endif
-+#ifdef SCREENSAVER
-+    SYMVAR(noScreenSaverExtension)
-+#endif
-+#ifdef MITSHM
-+    SYMVAR(noMITShmExtension)
-+#endif
-+#ifdef MITMISC
-+    SYMVAR(noMITMiscExtension)
-+#endif
-+#ifdef MULTIBUFFER
-+    SYMVAR(noMultibufferExtension)
-+#endif
-+#ifdef RANDR
-+    SYMVAR(noRRExtension)
-+#endif
- #ifdef RENDER
-     SYMVAR(noRenderExtension)
- #endif
-+#ifdef SHAPE
-+    SYMVAR(noShapeExtension)
-+#endif
-+#ifdef XCSECURITY
-+    SYMVAR(noSecurityExtension)
-+#endif
-+#ifdef XSYNC
-+    SYMVAR(noSyncExtension)
-+#endif
-+#ifdef TOGCUP
-+    SYMVAR(noXcupExtension)
-+#endif
-+#ifdef PEXEXT
-+    SYMVAR(noPexExtension)
-+#endif
-+#ifdef RES
-+    SYMVAR(noResExtension)
-+#endif
-+#ifdef XAPPGROUP
-+    SYMVAR(noXagExtension)
-+#endif
-+#ifdef XCMISC
-+    SYMVAR(noXCMiscExtension)
-+#endif
- #ifdef XEVIE
-     SYMVAR(noXevieExtension)
- #endif
-+#ifdef XIE
-+    SYMVAR(noXie)
-+#endif
-+#ifdef XF86BIGFONT
-+    SYMVAR(noXFree86BigfontExtension)
-+#endif
-+#ifdef XFreeXDGA
-+    SYMVAR(noXFree86DGAExtension)
-+#endif
-+#ifdef XF86DRI
-+    SYMVAR(noXFree86DRIExtension)
-+#endif
-+#ifdef XF86MISC
-+    SYMVAR(noXFree86MiscExtension)
-+#endif
-+#ifdef XF86VIDMODE
-+    SYMVAR(noXFree86VidModeExtension)
-+#endif
-+#ifdef XFIXES
-+    SYMVAR(noXFixesExtension)
-+#endif
-+#ifdef XKB
-+/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
-+    SYMVAR(noXkbExtension)
-+#endif
-+#ifdef PANORAMIX
-+    SYMVAR(noPanoramiXExtension)
-+#endif
-+#ifdef XINPUT
-+    SYMVAR(noXInputExtension)
-+#endif
-+#ifdef XIDLE
-+    SYMVAR(noXIdleExtension)
-+#endif
-+#ifdef XV
-+    SYMVAR(noXvExtension)
-+#endif
-     /* log.c */
-     SYMFUNC(LogVWrite)
-@@ -386,7 +493,6 @@
-     /* xkb/xkbInit.c */
-     SYMFUNC(XkbInitKeyboardDeviceStruct)
-     SYMFUNC(XkbSetRulesDflts)
--    SYMVAR(noXkbExtension)
- #endif
- #ifdef XINPUT
-Index: programs/Xserver/hw/xfree86/loader/elfloader.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/loader/elfloader.c     23 Apr 2004 19:54:06 -0000      1.2
-+++ programs/Xserver/hw/xfree86/loader/elfloader.c     8 Dec 2004 06:25:07 -0000       1.2.4.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.2.4.1 2004/12/08 06:25:07 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.61tsi Exp $ */
- /*
-@@ -922,7 +922,7 @@
-           ErrorF("ELFCreateGOT() Unable to reallocate memory!!!!\n");
-           return FALSE;
-       }
--#   if defined(linux) || defined(__OpenBSD__)
-+#   if defined(linux) || defined(__OpenBSD__) || defined(sun)
-       {
-           unsigned long page_size = getpagesize();
-           unsigned long round;
-@@ -1097,7 +1097,7 @@
-       ErrorF("ELFCreatePLT() Unable to allocate memory!!!!\n");
-       return;
-     }
--#   if defined(linux) || defined(__OpenBSD__)
-+#   if defined(linux) || defined(__OpenBSD__) || defined(sun)
-     {
-       unsigned long page_size = getpagesize();
-       unsigned long round;
-@@ -2775,7 +2775,7 @@
-       elffile->lsection[j].size = SecSize(i);
-       elffile->lsection[j].flags = flags;
-       switch (SecType(i)) {
--#if defined(linux) || defined(__OpenBSD__)
-+#if defined(linux) || defined(__OpenBSD__) || defined(sun)
-       case SHT_PROGBITS:
-           {
-               unsigned long page_size = getpagesize();
-@@ -2979,7 +2979,7 @@
-       ErrorF("Unable to allocate ELF sections\n");
-       return NULL;
-     }
--#  if defined(linux) || defined(__OpenBSD__)
-+#  if defined(linux) || defined(__OpenBSD__) || defined(sun)
-     {
-       unsigned long page_size = getpagesize();
-       unsigned long round;
-Index: programs/Xserver/hw/xfree86/loader/extsym.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/extsym.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xfree86/loader/extsym.c        9 Aug 2004 03:40:50 -0000       1.4
-+++ programs/Xserver/hw/xfree86/loader/extsym.c        8 Dec 2004 05:32:54 -0000       1.4.2.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.4 2004/08/09 03:40:50 krh Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.4.2.1 2004/12/08 05:32:54 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
- /*
-@@ -66,7 +66,6 @@
- #ifdef PANORAMIX
-     SYMFUNC(XineramaRegisterConnectionBlockCallback)
-     SYMFUNC(XineramaDeleteResource)
--    SYMVAR(noPanoramiXExtension)
-     SYMVAR(PanoramiXNumScreens)
-     SYMVAR(panoramiXdataPtr)
-     SYMVAR(PanoramiXVisualTable)
-Index: programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c    23 Apr 2004 19:54:07 -0000      1.2
-+++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c    13 Dec 2004 14:03:44 -0000      1.2.4.1
-@@ -677,11 +677,11 @@
- };
- static CARD8 wsSunMap[] = {
--      /* 0x00 */ KEY_NOTUSED,
--      /* 0x01 */ KEY_NOTUSED,         /* stop */
--      /* 0x02 */ KEY_NOTUSED,         /* BrightnessDown / S-VolumeDown */
--      /* 0x03 */ KEY_NOTUSED,         /* again */
--      /* 0x04 */ KEY_NOTUSED,         /* BridgtnessUp / S-VolumeUp */
-+      /* 0x00 */ KEY_Help,
-+      /* 0x01 */ KEY_L1,              /* stop */
-+      /* 0x02 */ KEY_AudioLower,      /* BrightnessDown / S-VolumeDown */
-+      /* 0x03 */ KEY_L2,              /* again */
-+      /* 0x04 */ KEY_AudioRaise,      /* BridgtnessUp / S-VolumeUp */
-       /* 0x05 */ KEY_F1,
-       /* 0x06 */ KEY_F2,
-       /* 0x07 */ KEY_F10,
-@@ -700,10 +700,10 @@
-       /* 0x14 */ KEY_Up,
-       /* 0x15 */ KEY_Pause,
-       /* 0x16 */ KEY_Print,
--      /* 0x17 */ KEY_NOTUSED,         /* props */
-+      /* 0x17 */ KEY_ScrollLock,
-       /* 0x18 */ KEY_Left,
--      /* 0x19 */ KEY_ScrollLock,
--      /* 0x1a */ KEY_NOTUSED,         /* undo */
-+      /* 0x19 */ KEY_L3,              /* props */
-+      /* 0x1a */ KEY_L4,              /* undo */
-       /* 0x1b */ KEY_Down,
-       /* 0x1c */ KEY_Right,
-       /* 0x1d */ KEY_Escape,
-@@ -722,13 +722,13 @@
-       /* 0x2a */ KEY_Tilde,
-       /* 0x2b */ KEY_BackSpace,
-       /* 0x2c */ KEY_Insert,
--      /* 0x2d */ KEY_KP_Equal,
-+      /* 0x2d */ KEY_Mute,            /* Audio Mute */
-       /* 0x2e */ KEY_KP_Divide,
-       /* 0x2f */ KEY_KP_Multiply,
-       /* 0x30 */ KEY_NOTUSED,
--      /* 0x31 */ KEY_NOTUSED,         /* front */
-+      /* 0x31 */ KEY_L5,              /* front */
-       /* 0x32 */ KEY_KP_Decimal,
--      /* 0x33 */ KEY_NOTUSED,         /* copy */
-+      /* 0x33 */ KEY_L6,              /* copy */
-       /* 0x34 */ KEY_Home,
-       /* 0x35 */ KEY_Tab,
-       /* 0x36 */ KEY_Q,
-@@ -744,13 +744,13 @@
-       /* 0x40 */ KEY_LBrace,
-       /* 0x41 */ KEY_RBrace,
-       /* 0x42 */ KEY_Delete,
--      /* 0x43 */ KEY_NOTUSED,         /* compose */
-+      /* 0x43 */ KEY_Menu,            /* compose */
-       /* 0x44 */ KEY_KP_7,
-       /* 0x45 */ KEY_KP_8,
-       /* 0x46 */ KEY_KP_9,
-       /* 0x47 */ KEY_KP_Minus,
--      /* 0x48 */ KEY_NOTUSED,         /* open */
--      /* 0x49 */ KEY_NOTUSED,         /* paste */
-+      /* 0x48 */ KEY_L7,              /* open */
-+      /* 0x49 */ KEY_L8,              /* paste */
-       /* 0x4a */ KEY_End,
-       /* 0x4b */ KEY_NOTUSED,
-       /* 0x4c */ KEY_LCtrl,
-@@ -772,9 +772,9 @@
-       /* 0x5c */ KEY_KP_5,
-       /* 0x5d */ KEY_KP_6,
-       /* 0x5e */ KEY_KP_0,
--      /* 0x5f */ KEY_NOTUSED,         /* find */
-+      /* 0x5f */ KEY_L9,              /* find */
-       /* 0x60 */ KEY_PgUp,
--      /* 0x61 */ KEY_NOTUSED,         /* cut */
-+      /* 0x61 */ KEY_L10,             /* cut */
-       /* 0x62 */ KEY_NumLock,
-       /* 0x63 */ KEY_ShiftL,
-       /* 0x64 */ KEY_Z,
-@@ -801,7 +801,7 @@
-       /* 0x79 */ KEY_Space,
-       /* 0x7a */ KEY_RMeta,
-       /* 0x7b */ KEY_PgDown,
--      /* 0x7c */ KEY_NOTUSED,
-+      /* 0x7c */ KEY_Less,            /* < > on some keyboards */
-       /* 0x7d */ KEY_KP_Plus,
-       /* 0x7e */ KEY_NOTUSED,
-       /* 0x7f */ KEY_NOTUSED
-@@ -1044,9 +1044,11 @@
-       case PCCONS:
-       case PCVT:
-            pKbd->RemapScanCode = ATScancode;
-+         break;
- #endif
- #ifdef WSCONS_SUPPORT
-       case WSCONS:
-+      if (!pKbd->isConsole) {
-            switch (pKbd->wsKbdType) {
-              case WSKBD_TYPE_PC_XT:
-              case WSKBD_TYPE_PC_AT:
-@@ -1061,6 +1063,9 @@
-                     break;
- #endif
- #ifdef WSKBD_TYPE_SUN
-+#ifdef WSKBD_TYPE_SUN5
-+             case WSKBD_TYPE_SUN5:
-+#endif
-              case WSKBD_TYPE_SUN:
-                     pKbd->scancodeMap = &wsSun;
-                     break;
-@@ -1068,6 +1073,9 @@
-              default:
-                   ErrorF("Unknown wskbd type %d\n", pKbd->wsKbdType);
-            }
-+      } else {
-+           pKbd->RemapScanCode = ATScancode;
-+      }
-       break;
- #endif
-   }
-Index: programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c       23 Apr 2004 19:54:07 -0000      1.2
-+++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c       13 Dec 2004 14:03:44 -0000      1.2.4.1
-@@ -143,7 +143,7 @@
- KbdOn(InputInfoPtr pInfo, int what)
- {
-     KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
--#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
-+#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
-     BsdKbdPrivPtr priv = (BsdKbdPrivPtr) pKbd->private;
-     struct termios nTty;
- #endif
-@@ -154,7 +154,7 @@
-     if (pKbd->isConsole) {
-         switch (pKbd->consType) {
--#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
-+#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
-           case SYSCONS:
-           case PCCONS:
-           case PCVT:
-@@ -170,7 +170,10 @@
-                nTty.c_cc[VMIN] = 1;
-                cfsetispeed(&nTty, 9600);
-                cfsetospeed(&nTty, 9600);
--               tcsetattr(pInfo->fd, TCSANOW, &nTty);
-+               if (tcsetattr(pInfo->fd, TCSANOW, &nTty) < 0) {
-+                       xf86Msg(X_ERROR, "KbdOn: tcsetattr: %s\n",
-+                           strerror(errno));
-+               }
-                  break; 
- #endif 
-         }
-@@ -197,7 +200,7 @@
-                                   "or use for example:\n\n"
-                                   "Option \"Protocol\" \"wskbd\"\n"
-                                   "Option \"Device\" \"/dev/wskbd0\"\n"
--                                  "\nin your XF86Config(5) file\n");
-+                                  "\nin your xorg.conf(5) file\n");
-                }
-                break;
- #endif
-@@ -232,7 +235,7 @@
-             case WSCONS:
-                  option = WSKBD_TRANSLATED;
-                  ioctl(xf86Info.consoleFd, WSKBDIO_SETMODE, &option);
--                 tcsetattr(xf86Info.consoleFd, TCSANOW, &(priv->kbdtty));
-+                 tcsetattr(pInfo->fd, TCSANOW, &(priv->kbdtty));
-                break;
- #endif
-         }
-@@ -380,22 +383,30 @@
- }
- #ifdef WSCONS_SUPPORT
-+
- static void
- WSReadInput(InputInfoPtr pInfo)
- {
-     KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
-     struct wscons_event events[64];
--    int n, i;
-+    int type;
-+    int blocked, n, i;
-+
-     if ((n = read( pInfo->fd, events, sizeof(events))) > 0) {
-         n /=  sizeof(struct wscons_event);
--        for (i = 0; i < n; i++)
--           pKbd->PostEvent(pInfo, events[i].value,
--                   events[i].type == WSCONS_EVENT_KEY_DOWN ? TRUE : FALSE);
--      }
-+        for (i = 0; i < n; i++) {
-+          type = events[i].type;
-+          if (type == WSCONS_EVENT_KEY_UP || type == WSCONS_EVENT_KEY_DOWN) {
-+              /* It seems better to block SIGIO there */
-+              blocked = xf86BlockSIGIO();
-+              pKbd->PostEvent(pInfo, (unsigned int)(events[i].value),
-+                              type == WSCONS_EVENT_KEY_DOWN ? TRUE : FALSE);
-+              xf86UnblockSIGIO(blocked);
-+          }
-+      } /* for */
-+    }
- }
--#endif
--#ifdef WSCONS_SUPPORT
- static void
- printWsType(char *type, char *devname)
- {
-@@ -448,15 +459,14 @@
-            pKbd->consType = xf86Info.consType;
-        }
-     } else {
--       pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
-+      pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
-        if (pInfo->fd == -1) {
-            xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
-            xfree(s);
-            return FALSE;
-        }
-        pKbd->isConsole = FALSE;
--       /* XXX What is consType here? */
--       pKbd->consType = SYSCONS;
-+       pKbd->consType = xf86Info.consType;
-        xfree(s);
-     }
-@@ -495,6 +505,11 @@
-                printWsType("Sun", pInfo->name);
-                break;
- #endif
-+#ifdef WSKBD_TYPE_SUN5
-+     case WSKBD_TYPE_SUN5:
-+           xf86Msg(X_PROBED, "Keyboard type: Sun5\n");
-+           break;
-+#endif
-            default:
-                xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
-                                 pInfo->name, pKbd->wsKbdType);
-@@ -535,4 +550,3 @@
-     }
-     return TRUE;
- }
--
-Index: programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.6.2
-diff -u -u -r1.1.1.2 -r1.1.1.2.6.2
---- programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c      25 Nov 2003 19:28:50 -0000      1.1.1.2
-+++ programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c      17 Dec 2004 00:53:09 -0000      1.1.1.2.6.2
-@@ -201,32 +201,46 @@
-  * the chipset scan is to be stopped, or FALSE if the scan is to move on to the
-  * next chipset.
-  */
-+
- Bool
--xf86PreScan460GX(void)
-+xorgProbe460GX(scanpciWrapperOpt flags)
- {
-     pciBusInfo_t *pBusInfo;
-     PCITAG tag;
--    CARD32 tmp;
--    int i, devno;
-     /* Bus zero should already be set up */
-     if (!(pBusInfo = pciBusInfo[0])) {
-       cbn_460gx = -1;
-       return FALSE;
-     }
--
-     /* First look for a 460GX's primary host bridge */
-     tag = PCI_MAKE_TAG(0, 0x10, 0);
--    if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
--      cbn_460gx = -1;
--      return FALSE;
-+    if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
-+      return TRUE;
-     }
-+    cbn_460gx = -1;
-+    
-+    return FALSE;
-+}
-+
-+void
-+xf86PreScan460GX(void)
-+{
-+    pciBusInfo_t *pBusInfo;
-+    PCITAG tag;
-+    CARD32 tmp;
-+    int i, devno;
-+    
-+    if (!(pBusInfo = pciBusInfo[0]))
-+      return;
-+
-     /* Get CBN (Chipset bus number) */
-+    tag = PCI_MAKE_TAG(0, 0x10, 0);
-     if (!(cbn_460gx = (unsigned int)pciReadByte(tag, CBN))) {
-       /* Sanity check failed */
-       cbn_460gx = -1;
--      return TRUE;
-+      return;
-     }
-     if (pciNumBuses <= cbn_460gx)
-@@ -242,7 +256,7 @@
-     if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
-       /* Sanity check failed */
-       cbn_460gx = -1;
--      return TRUE;
-+      return;
-     }
-     /*
-@@ -257,7 +271,7 @@
-           DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
-           /* Sanity check failed */
-           cbn_460gx = -1;
--          return TRUE;
-+          return;
-       }
-       if (devno == 0x10)
-@@ -278,7 +292,7 @@
-           if (cbdevs_460gx & (1 << devno)) {
-               /* Sanity check failed */
-               cbn_460gx = -1;
--              return TRUE;
-+              return;
-           }
-           /*
-@@ -294,7 +308,7 @@
-           if (cbdevs_460gx & (1 << devno)) {
-               /* Sanity check failed */
-               cbn_460gx = -1;
--              return TRUE;
-+              return;
-           }
-           /*
-@@ -310,7 +324,7 @@
-               break;
-           /* Sanity check failed */
-           cbn_460gx = -1;
--          return TRUE;
-+          return;
-       }
-     }
-@@ -337,7 +351,7 @@
-       break;
-     }
--    return TRUE;
-+    return;
- }
- /* This does some 460GX-related processing after the PCI bus scan */
-@@ -423,7 +437,7 @@
-               if (pPCI->funcnum > 0)
-                   break;
--              if ((pBusInfo = pciBusInfo[busno_460gx[i]]))
-+              if ((pBusInfo == pciBusInfo[busno_460gx[i]]))
-                   break;
-               /* Fix bus linkage */
-Index: programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.h      14 Nov 2003 16:48:56 -0000      1.1.1.1
-+++ programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.h      15 Dec 2004 15:24:45 -0000      1.1.1.1.6.1
-@@ -29,8 +29,10 @@
- #define PCI_460GX_H 1
- #include <X11/Xdefs.h>
-+#include <Pci.h>
--Bool xf86PreScan460GX(void);
-+Bool xorgProbe460GX(scanpciWrapperOpt flags);
-+void xf86PreScan460GX(void);
- void xf86PostScan460GX(void);
- #endif
-Index: programs/Xserver/hw/xfree86/os-support/bus/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xfree86/os-support/bus/Imakefile       11 Aug 2004 21:14:17 -0000      1.4
-+++ programs/Xserver/hw/xfree86/os-support/bus/Imakefile       15 Dec 2004 15:24:45 -0000      1.4.2.1
-@@ -126,8 +126,8 @@
- PCIARCHOBJ = sparcPci.o
- # endif
- #elif defined(ia64Architecture)
--PCIARCHSRC = ia64Pci.c 460gxPCI.c e8870PCI.c zx1PCI.c
--PCIARCHOBJ = ia64Pci.o 460gxPCI.o e8870PCI.o zx1PCI.o
-+PCIARCHSRC = 460gxPCI.c e8870PCI.c zx1PCI.c
-+PCIARCHOBJ = 460gxPCI.o e8870PCI.o zx1PCI.o
- #endif
- SRCS = Pci.c $(PCIDRVRSRC) $(SBUSDRVSRC) $(PCIARCHSRC)
-Index: programs/Xserver/hw/xfree86/os-support/bus/Pci.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- programs/Xserver/hw/xfree86/os-support/bus/Pci.c   30 Jul 2004 19:04:14 -0000      1.3
-+++ programs/Xserver/hw/xfree86/os-support/bus/Pci.c   15 Dec 2004 05:52:16 -0000      1.3.2.1
-@@ -954,10 +954,13 @@
-     pciBusInfo_t *busp;
-     int          idx = 0, i;
-     PCITAG       tag;
-+    static Bool  done = FALSE;
--    if (pci_devp[0])
-+    if (done || pci_devp[0])
-       return pci_devp;
-+    done = TRUE;
-+
-     pciInit();
- #ifdef XF86SCANPCI_WRAPPER
-Index: programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.1.1.2.6.1
-diff -u -u -r1.1.1.2 -r1.1.1.2.6.1
---- programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c      25 Nov 2003 19:28:50 -0000      1.1.1.2
-+++ programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c      15 Dec 2004 15:24:45 -0000      1.1.1.2.6.1
-@@ -34,17 +34,23 @@
- #include "Pci.h"
- Bool
--xf86PreScanE8870(void)
-+xorgProbeE8870(scanpciWrapperOpt flags)
- {
-     PCITAG tag;
-     /* Look for an E8870's Hub interface */
-     tag = PCI_MAKE_TAG(0, 0x1E, 0);
--    if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_82801_P2P))
--      return FALSE;
-+    if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_82801_P2P))
-+      return TRUE;
-+
-+    return FALSE;
-+}
-+void
-+xf86PreScanE8870(void)
-+{
-     /* XXX Fill me in... */
--    return TRUE;
-+    return;
- }
- void
-Index: programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.h      14 Nov 2003 16:48:56 -0000      1.1.1.1
-+++ programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.h      15 Dec 2004 15:24:45 -0000      1.1.1.1.6.1
-@@ -29,8 +29,10 @@
- #define PCI_E8870_H 1
- #include <X11/Xdefs.h>
-+#include <Pci.h>
--Bool xf86PreScanE8870(void);
-+Bool xorgProbeE8870(scanpciWrapperOpt flags);
-+void xf86PreScanE8870(void);
- void xf86PostScanE8870(void);
- #endif
-Index: programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c
-===================================================================
-RCS file: programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c
-diff -N programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c
---- programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c       6 Jul 2004 14:49:13 -0000       1.2
-+++ /dev/null  1 Jan 1970 00:00:00 -0000
-@@ -1,61 +0,0 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c,v 1.3 2003/02/23 20:26:49 tsi Exp $ */
--/*
-- * Copyright (C) 2002-2003 The XFree86 Project, Inc.  All Rights Reserved.
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining a copy
-- * of this software and associated documentation files (the "Software"), to
-- * deal in the Software without restriction, including without limitation the
-- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-- * sell copies of the Software, and to permit persons to whom the Software is
-- * furnished to do so, subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be included in
-- * all copies or substantial portions of the Software.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-- * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- * Except as contained in this notice, the name of the XFree86 Project 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
-- * XFree86 Project.
-- */
--
--/*
-- * This file contains the glue needed to support various IA-64 chipsets.
-- */
--
--#include "460gxPCI.h"
--#include "e8870PCI.h"
--#include "zx1PCI.h"
--#include "Pci.h"
--
--void
--ia64ScanPCIWrapper(scanpciWrapperOpt flags)
--{
--
--    if (flags == SCANPCI_INIT) {
--
--      /* PCI configuration space probes should be done first */
--      if (xf86PreScan460GX())
--          return;
--      if (xf86PreScanE8870())
--          return;
--#if 0
--      if (xf86PreScanZX1())
--          return;
--#endif
--    } else /* if (flags == SCANPCI_TERM) */ {
--
--      xf86PostScan460GX();
--      xf86PostScanE8870();
--#if 0
--      xf86PostScanZX1();
--#endif
--    }
--
--}
-Index: programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c       6 Jul 2004 14:37:48 -0000       1.2
-+++ programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c       15 Dec 2004 05:14:44 -0000      1.2.4.1
-@@ -273,7 +273,7 @@
-     switch (xf86Info.pciFlags) {
-       case PCIOsConfig:
--#if ARCH_PCI_OS_INIT
-+#ifdef ARCH_PCI_OS_INIT
-           return;
- #endif
-           
-Index: programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c      6 Jul 2004 14:37:48 -0000       1.3
-+++ programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c      15 Dec 2004 05:48:20 -0000      1.3.4.1
-@@ -113,14 +113,16 @@
-               if (fd != -1)
-                       close(fd);
-               if (bus < 256) {
--                      if (stat("/proc/bus/pci/00", &ignored) < 0)
-+                      sprintf(file,"/proc/bus/pci/%02x",bus);
-+                      if (stat(file, &ignored) < 0)
-                               sprintf(file, "/proc/bus/pci/0000:%02x/%02x.%1x",
-                                       bus, dev, func);
-                       else
-                               sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
-                                       bus, dev, func);
-               } else {
--                      if (stat("/proc/bus/pci/00", &ignored) < 0)
-+                      sprintf(file,"/proc/bus/pci/%04x",bus);
-+                      if (stat(file, &ignored) < 0)
-                               sprintf(file, "/proc/bus/pci/0000:%04x/%02x.%1x",
-                                       bus, dev, func);
-                       else
-Index: programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v
-retrieving revision 1.1.1.4
-retrieving revision 1.1.1.4.6.1
-diff -u -u -r1.1.1.4 -r1.1.1.4.6.1
---- programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c        29 Jan 2004 08:08:47 -0000      1.1.1.4
-+++ programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c        15 Dec 2004 15:24:45 -0000      1.1.1.4.6.1
-@@ -465,13 +465,7 @@
-     NULL,             /* bridge -- dynamically set */
- };
--/*
-- * This checks for, and validates, the presence of the ZX1 chipset, and sets
-- * pZX1mio to a non-NULL pointer accordingly.  This function is called before
-- * the server's PCI bus scan and returns TRUE if the chipset scan is to be
-- * stopped, or FALSE if the scan is to move on to the next chipset.
-- */
--Bool
-+void
- xf86PreScanZX1(void)
- {
-     resRange range;
-@@ -491,7 +485,7 @@
-       mapSize = MIO_SIZE;
-     if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
--      return FALSE;
-+      return;
-     /* Look for ZX1's SBA and IOC */  /* XXX What about Dino? */
-     if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
-@@ -500,7 +494,7 @@
-        DEVID(VENDOR_HP, CHIP_ZX1_IOC))) {
-       xf86UnMapVidMem(-1, pZX1mio, mapSize);
-       pZX1mio = NULL;
--      return FALSE;
-+      return;
-     }
-     /* Map rope configuration space */
-@@ -510,7 +504,7 @@
-       !(pZX1ioa = xf86MapVidMem(-1, VIDMEM_MMIO, ioaaddr, IOA_SIZE))) {
-       xf86UnMapVidMem(-1, pZX1mio, mapSize);
-       pZX1mio = NULL;
--      return TRUE;
-+      return;
-     }
-     for (i = 0;  i < 8;  i++) {
-@@ -924,7 +918,7 @@
-     nRange = 0;
--    return TRUE;
-+    return;
- }
- /* This is called to finalise the results of a PCI bus scan */
-Index: programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.h        14 Nov 2003 16:48:56 -0000      1.1.1.1
-+++ programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.h        15 Dec 2004 15:24:45 -0000      1.1.1.1.6.1
-@@ -30,7 +30,7 @@
- #include <X11/Xdefs.h>
--Bool xf86PreScanZX1(void);
-+void xf86PreScanZX1(void);
- void xf86PostScanZX1(void);
- #endif
-Index: programs/Xserver/hw/xfree86/os-support/linux/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xfree86/os-support/linux/Imakefile     16 Jun 2004 09:39:15 -0000      1.3
-+++ programs/Xserver/hw/xfree86/os-support/linux/Imakefile     15 Dec 2004 15:24:45 -0000      1.3.4.1
-@@ -38,27 +38,32 @@
- #endif
- #if defined(AlphaArchitecture)
--AXP_SRC=lnx_ev56.c xf86Axp.c lnx_axp.c
--AXP_OBJ=lnx_ev56.o xf86Axp.o lnx_axp.o
-+PLATFORM_SRC=lnx_ev56.c xf86Axp.c lnx_axp.c
-+PLATFORM_OBJ=lnx_ev56.o xf86Axp.o lnx_axp.o
-+#endif
-+#if defined (ia64Architecture)
-+PLATFORM_SRC=ia64Pci.c lnx_ia64.c
-+PLATFORM_OBJ=ia64Pci.o lnx_ia64.o
-+PLATFORM_DEFINES=-DOS_PROBE_PCI_CHIPSET=lnxProbePciChipset
- #endif
- SRCS = lnx_init.c lnx_video.c lnx_io.c libc_wrapper.c bios_mmap.c \
-        VTsw_usl.c std_kbdEv.c posix_tty.c $(MOUSESRC) \
-        lnx_pci.c vidmem.c lnx_apm.c $(JOYSTICK_SRC) $(DRI_SRC) $(RES_SRCS) \
--       $(AXP_SRC) lnx_kmod.c lnx_agp.c $(KBDSRC) /*wcHelper.c*/
-+       $(PLATFORM_SRC) lnx_kmod.c lnx_agp.c $(KBDSRC) /*wcHelper.c*/
- OBJS = lnx_init.o lnx_video.o lnx_io.o libc_wrapper.o bios_mmap.o \
-        VTsw_usl.o std_kbdEv.o posix_tty.o $(MOUSEOBJ) \
-        lnx_pci.o vidmem.o lnx_apm.o $(JOYSTICK_OBJ) $(DRI_OBJ) $(RES_OBJS) \
--       $(AXP_OBJ) lnx_kmod.o lnx_agp.o $(KBDOBJ) /*wcHelper.o*/
-+       $(PLATFORM_OBJ) lnx_kmod.o lnx_agp.o $(KBDOBJ) /*wcHelper.o*/
- INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
-            -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(XF86OSSRC)/shared \
--         -I$(DRMSRCDIR)/shared
-+         -I$(XF86OSSRC)/bus -I$(DRMSRCDIR)/shared
- RESDEFINES = -DUSESTDRES
--DEFINES = $(MTRRDEFINES) $(RESDEFINES) -DHAVE_SYSV_IPC
-+DEFINES = $(MTRRDEFINES) $(RESDEFINES) $(PLATFORM_DEFINES) -DHAVE_SYSV_IPC
- #if defined(AlphaArchitecture)
- SpecialObjectRule(lnx_ev56.o, lnx_ev56.c, -mcpu=ev56)
-@@ -114,6 +119,9 @@
- #if defined(AlphaArchitecture)
- LinkSourceFile(xf86Axp.c,../shared)
- #endif
-+#if defined(ia64Architecture)
-+LinkSourceFile(ia64Pci.c,../shared)
-+#endif
- DependTarget()
- InstallDriverSDKNonExecFile(agpgart.h,$(DRIVERSDKINCLUDEDIR)/linux)
-Index: programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c
-===================================================================
-RCS file: programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c
-diff -N programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c    15 Sep 2004 09:23:59 -0000      1.1
-@@ -0,0 +1,45 @@
-+/*
-+ * Copyright 2004, Egbert Eich
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-+ * EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-+ * NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Except as contained in this notice, the name of Egbert Eich shall not
-+ * be used in advertising or otherwise to promote the sale, use or other deal-
-+ *ings in this Software without prior written authorization from Egbert Eich.
-+ *
-+ */
-+
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+
-+#include "ia64Pci.h"
-+#include "Pci.h"
-+
-+#if defined OS_PROBE_PCI_CHIPSET
-+IA64Chipset OS_PROBE_PCI_CHIPSET(scanpciWrapperOpt flags)
-+{
-+    struct stat unused;
-+
-+    if (!stat("/proc/bus/mckinley/zx1",&unused) 
-+      || !stat("/proc/bus/mckinley/zx2",&unused))
-+      return ZX1_CHIPSET;
-+
-+    return NONE_CHIPSET;
-+}
-+#endif
-Index: programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.c
-===================================================================
-RCS file: programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.c
-diff -N programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.c
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.c    15 Sep 2004 09:23:59 -0000      1.1
-@@ -0,0 +1,81 @@
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c,v 1.3 2003/02/23 20:26:49 tsi Exp $ */
-+/*
-+ * Copyright (C) 2002-2003 The XFree86 Project, Inc.  All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Except as contained in this notice, the name of the XFree86 Project 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
-+ * XFree86 Project.
-+ */
-+
-+/*
-+ * This file contains the glue needed to support various IA-64 chipsets.
-+ */
-+
-+#include "460gxPCI.h"
-+#include "e8870PCI.h"
-+#include "zx1PCI.h"
-+#include "Pci.h"
-+#include "ia64Pci.h"
-+
-+void
-+ia64ScanPCIWrapper(scanpciWrapperOpt flags)
-+{
-+    static IA64Chipset chipset = NONE_CHIPSET;
-+    
-+    if (flags == SCANPCI_INIT) {
-+
-+      /* PCI configuration space probes should be done first */
-+      if (xorgProbe460GX(flags)) {
-+          chipset = I460GX_CHIPSET;
-+          xf86PreScan460GX(); 
-+          return;
-+      } else if (xorgProbeE8870(flags)) {
-+          chipset = E8870_CHIPSET;
-+          xf86PreScanE8870();
-+          return;
-+      }
-+#ifdef OS_PROBE_PCI_CHIPSET
-+      chipset = OS_PROBE_PCI_CHIPSET(flags);
-+      switch (chipset) {
-+          case ZX1_CHIPSET:
-+              xf86PreScanZX1();
-+              return;
-+          default:
-+              return;
-+      }
-+#endif
-+    } else /* if (flags == SCANPCI_TERM) */ {
-+
-+      switch (chipset) {
-+          case I460GX_CHIPSET:
-+              xf86PostScan460GX();
-+              return;
-+          case E8870_CHIPSET:
-+              xf86PostScanE8870();
-+              return;
-+          case ZX1_CHIPSET:
-+              xf86PostScanZX1();
-+              return;
-+          default:
-+              return;
-+      }
-+    }
-+}
-Index: programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.h
-===================================================================
-RCS file: programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.h
-diff -N programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.h
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/Xserver/hw/xfree86/os-support/shared/ia64Pci.h    15 Dec 2004 16:03:15 -0000      1.1.4.1
-@@ -0,0 +1,41 @@
-+/*
-+ * Copyright 2004, Egbert Eich
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-+ * EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
-+ * NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Except as contained in this notice, the name of Egbert Eich shall not
-+ * be used in advertising or otherwise to promote the sale, use or other deal-
-+ *ings in this Software without prior written authorization from Egbert Eich.
-+ *
-+ */
-+#ifndef _IA64_PCI_H
-+# define _IA64_PCI_H
-+
-+#include "Pci.h"
-+
-+typedef enum {
-+    NONE_CHIPSET,
-+    I460GX_CHIPSET,
-+    E8870_CHIPSET,
-+    ZX1_CHIPSET
-+} IA64Chipset;
-+
-+# ifdef OS_PROBE_PCI_CHIPSET
-+extern IA64Chipset OS_PROBE_PCI_CHIPSET(scanpciWrapperOpt flags);
-+# endif
-+#endif
-Index: programs/Xserver/hw/xfree86/os-support/sunos/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/os-support/sunos/Imakefile     23 Apr 2004 19:54:13 -0000      1.2
-+++ programs/Xserver/hw/xfree86/os-support/sunos/Imakefile     15 Dec 2004 06:14:27 -0000      1.2.4.1
-@@ -1,5 +1,5 @@
- XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile,v 1.4 2002/10/17 02:22:49 dawes Exp $
--XCOMM $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile,v 1.2 2004/04/23 19:54:13 eich Exp $
-+XCOMM $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/sunos/Imakefile,v 1.2.4.1 2004/12/15 06:14:27 gisburn Exp $
- XCOMM
- XCOMM Copyright 2001 The XFree86 Project, Inc.  All Rights Reserved.
- XCOMM
-@@ -63,6 +63,10 @@
- VTSW_OBJ = VTsw_noop.o
- #endif
-+#ifdef SVR4Architecture
-+SYSVIPCDEFINES = -DHAVE_SYSV_IPC
-+#endif
-+
- SRCS = sun_bios.c sun_init.c $(IO_SRC) $(KBD_SRCS) $(PROWORKS_INOUT_SRC) \
-        sun_mouse.c sun_vid.c agp_noop.c libc_wrapper.c kmod_noop.c pm_noop.c \
-        posix_tty.c sigiostubs.c stdPci.c stdResource.c $(VTSW_SRC)
-@@ -74,7 +78,7 @@
-          -I$(SERVERSRC)/mi -I$(SERVERSRC)/include -I$(SERVERSRC)/Xext \
-          -I$(XINCLUDESRC) -I$(EXTINCSRC)
--DEFINES = -DUSESTDRES
-+DEFINES = -DUSESTDRES $(VENDOR_DEFINES) $(SYSVIPCDEFINES)
- SubdirLibraryRule($(OBJS))
- NormalLibraryObjectRule()
-Index: programs/Xserver/hw/xfree86/xaa/xaaWrapper.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/xaa/xaaWrapper.c,v
-retrieving revision 1.1
-retrieving revision 1.1.2.1
-diff -u -u -r1.1 -r1.1.2.1
---- programs/Xserver/hw/xfree86/xaa/xaaWrapper.c       30 Jul 2004 21:46:38 -0000      1.1
-+++ programs/Xserver/hw/xfree86/xaa/xaaWrapper.c       17 Dec 2004 00:38:21 -0000      1.1.2.1
-@@ -16,16 +16,14 @@
- /* #include "render.h" */
--#if 0
-+#if 1
- #define COND(pDraw) \
-         ((pDraw)->depth \
-                       != (xaaWrapperGetScrPriv(((DrawablePtr)(pDraw))->pScreen))->depth)
--#endif
-+#else
- #define COND(pDraw) 1
--
--#if 0
--static Bool xaaWrapperPreCreateGC(GCPtr pGC);
- #endif
-+
- static Bool xaaWrapperCreateGC(GCPtr pGC);
- static void xaaWrapperValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw);
- static void xaaWrapperDestroyGC(GCPtr pGC);
-@@ -36,53 +34,7 @@
- static void xaaWrapperCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
- static void xaaWrapperDestroyClip(GCPtr pGC);
--#if 0
--static void xaaWrapperFillSpans(DrawablePtr pDraw, GC *pGC, int nInit,
--                      DDXPointPtr pptInit, int *pwidthInit, int fSorted);
--static void xaaWrapperSetSpans(DrawablePtr pDraw, GCPtr       pGC, char *pcharsrc,
--                     DDXPointPtr pptInit, int *pwidthInit, int nspans,
--                     int fSorted);
--static void xaaWrapperPutImage(DrawablePtr pDraw, GCPtr       pGC, int depth, int x, int y,
--                     int w, int h,int leftPad, int format, char *pImage);
--static RegionPtr xaaWrapperCopyPlane(DrawablePtr pSrc,
--                           DrawablePtr pDst, GCPtr pGC,int srcx, int srcy,
--                           int width, int height, int dstx, int dsty,
--                           unsigned long bitPlane);
--static void xaaWrapperPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, int npt,
--                      xPoint *pptInit);
--static void xaaWrapperPolylines(DrawablePtr pDraw, GCPtr pGC, int mode,
--                      int npt, DDXPointPtr pptInit);
--static void xaaWrapperPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg,
--                        xSegment *pSeg);
--static void xaaWrapperPolyRectangle(DrawablePtr  pDraw, GCPtr pGC, int nRects,
--                          xRectangle  *pRects);
--static void xaaWrapperPolyArc( DrawablePtr pDraw, GCPtr       pGC, int narcs, xArc *parcs);
--static void xaaWrapperFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape,
--                        int mode, int count, DDXPointPtr pptInit);
--static void xaaWrapperPolyFillRect(DrawablePtr pDraw, GCPtr pGC, int nRectsInit, 
--                         xRectangle *pRectsInit);
--static RegionPtr xaaWrapperCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GC *pGC,
--                          int srcx, int srcy, int width, int height,
--                          int dstx, int dsty);
--static void xaaWrapperPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
--                        xArc *parcs);
--static int xaaWrapperPolyText8(DrawablePtr pDraw, GCPtr       pGC, int x, int y, int count,
--                     char *chars);
--static int xaaWrapperPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
--                      int count, unsigned short *chars);
--static void xaaWrapperImageText8(DrawablePtr pDraw, GCPtr pGC, int x, 
--                       int y, int count, char *chars);
--static void xaaWrapperImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
--                        int count, unsigned short *chars);
--static void xaaWrapperImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int x, int y,
--                          unsigned int nglyph, CharInfoPtr *ppci,
--                          pointer pglyphBase);
--static void xaaWrapperPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int x, int y,
--                         unsigned int nglyph, CharInfoPtr *ppci,
--                         pointer pglyphBase);
--static void xaaWrapperPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw,
--                       int    dx, int dy, int xOrg, int yOrg);
--#endif
-+
- static void
- xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-            INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
-@@ -145,25 +97,27 @@
-     real->mem = func; \
- }
--#if 0
--#define wrap_pre(priv,real,real_func,mem,func) {\
--    priv->mem = real->real_func; \
--    real->real_func = func; \
--}
--#endif
--
--#define get(priv,real,func,wrap) \
--    priv->wrap = real->func;
--
- #define unwrap(priv,real,mem) {\
-     real->mem = priv->mem; \
- }
--#if 0
--#define unwrap_pre(priv,real,real_func,mem) {\
--    real->real_func = priv->mem; \
-+#define cond_wrap(priv,cond,real,mem,wrapmem,func) {\
-+    if (COND(cond)) \
-+        priv->wrapmem = real->mem; \
-+    else  \
-+      priv->mem = real->mem; \
-+    real->mem = func; \
- }
--#endif
-+
-+#define cond_unwrap(priv,cond,real,mem,wrapmem) {\
-+    if (COND(cond)) \
-+        real->mem = priv->wrapmem; \
-+    else \
-+        real->mem = priv->mem; \
-+}
-+
-+#define get(priv,real,func,wrap) \
-+    priv->wrap = real->func;
- typedef struct _xaaWrapperGCPriv {
-     GCOps   *ops;
-@@ -210,12 +164,11 @@
-     xaaWrapperScrPriv(pWin->drawable.pScreen);
-     Bool ret;
-     
--    unwrap (pScrPriv, pWin->drawable.pScreen, CreateWindow);
--    if (COND(&pWin->drawable))
--      pWin->drawable.pScreen->CreateWindow
--          = pScrPriv->wrapCreateWindow;
-+    cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+              CreateWindow, wrapCreateWindow);
-     ret = pWin->drawable.pScreen->CreateWindow(pWin);
--    wrap(pScrPriv, pWin->drawable.pScreen, CreateWindow, xaaWrapperCreateWindow);
-+    cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, CreateWindow,
-+            wrapCreateWindow, xaaWrapperCreateWindow);
-     return ret;
- }
-@@ -244,11 +197,11 @@
- {
-     xaaWrapperScrPriv(pWin->drawable.pScreen);
--    unwrap (pScrPriv, pWin->drawable.pScreen, WindowExposures);
--    if (COND(&pWin->drawable))
--      pWin->drawable.pScreen->WindowExposures = pScrPriv->wrapWindowExposures;
-+    cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+              WindowExposures, wrapWindowExposures);
-     pWin->drawable.pScreen->WindowExposures(pWin, prgn, other_exposed);
--    wrap(pScrPriv, pWin->drawable.pScreen, WindowExposures, xaaWrapperWindowExposures);
-+    cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+            WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
- }
- static void
-@@ -258,29 +211,24 @@
-     switch (what) {
-       case PW_BORDER:
--          unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBorder);
--          if (COND(&pWin->drawable)) {
--              pWin->drawable.pScreen->PaintWindowBorder
--                  = pScrPriv->wrapPaintWindowBorder;
--                              XAASync(pWin->drawable.pScreen);
--          }
-+          cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+                      PaintWindowBorder, wrapPaintWindowBorder);
-+
-           pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what);
--          wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBorder,
--               xaaWrapperPaintWindow);
-+          cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+                    PaintWindowBorder, wrapPaintWindowBorder,
-+                    xaaWrapperPaintWindow);
-           break;
-       case PW_BACKGROUND:
--          unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBackground);
--          if (COND(&pWin->drawable)) {
--              pWin->drawable.pScreen->PaintWindowBackground
--                  = pScrPriv->wrapPaintWindowBackground;
--              XAASync(pWin->drawable.pScreen);
--          }
-+          cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+                      PaintWindowBackground, wrapPaintWindowBackground);
-+
-           pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what);
--          wrap(pScrPriv, pWin->drawable.pScreen, PaintWindowBackground,
--               xaaWrapperPaintWindow);
-+          cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
-+                    PaintWindowBackground, wrapPaintWindowBackground,
-+                    xaaWrapperPaintWindow);
-           break;
-     }
--
- }
- static Bool
-@@ -378,11 +326,7 @@
-     get (pScrPriv, pScreen, PaintWindowBorder, wrapPaintWindowBorder);
-     get (pScrPriv, pScreen, PaintWindowBackground, wrapPaintWindowBackground);
-     get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
--#if 0
--    wrap_pre (pScrPriv, pScreen, CreateGC, wrapCreateGC, xaaWrapperPreCreateGC);
--#else
-     get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
--#endif
-     get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
-     get (pScrPriv, pScreen, DestroyColormap, wrapDestroyColormap);
-     get (pScrPriv, pScreen, InstallColormap, wrapInstallColormap);
-@@ -435,25 +379,6 @@
-     xaaWrapperCopyClip
- };
--#if 0
--GCOps xaaWrapperGCOps = {
--    xaaWrapperFillSpans, xaaWrapperSetSpans, 
--    xaaWrapperPutImage, xaaWrapperCopyArea, 
--    xaaWrapperCopyPlane, xaaWrapperPolyPoint, 
--    xaaWrapperPolylines, xaaWrapperPolySegment, 
--    xaaWrapperPolyRectangle, xaaWrapperPolyArc, 
--    xaaWrapperFillPolygon, xaaWrapperPolyFillRect, 
--    xaaWrapperPolyFillArc, xaaWrapperPolyText8, 
--    xaaWrapperPolyText16, xaaWrapperImageText8, 
--    xaaWrapperImageText16, xaaWrapperImageGlyphBlt, 
--    xaaWrapperPolyGlyphBlt, xaaWrapperPushPixels,
--#ifdef NEED_LINEHELPER
--    NULL,
--#endif
--    {NULL}            /* devPrivate */
--};
--#endif
--
- #define XAAWRAPPER_GC_FUNC_PROLOGUE(pGC) \
-     xaaWrapperGCPriv(pGC); \
-     unwrap(pGCPriv, pGC, funcs); \
-@@ -463,23 +388,6 @@
-     wrap(pGCPriv, pGC, funcs, &xaaWrapperGCFuncs);  \
-     if (pGCPriv->wrap) wrap(pGCPriv, pGC, ops, pGCPriv->wrapops)
--#if 0
--static Bool
--xaaWrapperPreCreateGC(GCPtr pGC)
--{
--    ScreenPtr         pScreen = pGC->pScreen;
--    xaaWrapperScrPriv(pScreen);
--    xaaWrapperGCPriv(pGC);
--    Bool ret;
--
--    unwrap_pre (pScrPriv, pScreen, CreateGC, wrapCreateGC);
--    ret = (*pScreen->CreateGC) (pGC);
--    wrap_pre (pScrPriv, pScreen, CreateGC, wrapCreateGC, xaaWrapperPreCreateGC);
--
--    return ret;
--}
--#endif
--
- static Bool
- xaaWrapperCreateGC(GCPtr pGC)
- {
-@@ -572,310 +480,6 @@
-     XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
- }
--#if 0
--#define XAAWRAPPER_GC_OP_PROLOGUE(pGC,pDraw) \
--/*     xaaWrapperScrPriv(pDraw->pScreen); */\
--    xaaWrapperGCPriv(pGC);  \
--    GCFuncs *oldFuncs = pGC->funcs; \
--    unwrap(pGCPriv, pGC, funcs);  \
--    unwrap(pGCPriv, pGC, ops); \
--      
--#define XAAWRAPPER_GC_OP_EPILOGUE(pGC,pDraw) \
--    wrap(pGCPriv, pGC, funcs, oldFuncs); \
--    wrap(pGCPriv, pGC, ops, &xaaWrapperGCOps)
--
--static void
--xaaWrapperFillSpans(
--    DrawablePtr pDraw,
--    GC                *pGC,
--    int               nInit,  
--    DDXPointPtr pptInit,      
--    int       *pwidthInit,            
--    int       fSorted 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperSetSpans(
--    DrawablePtr               pDraw,
--    GCPtr             pGC,
--    char              *pcharsrc,
--    DDXPointPtr       pptInit,
--    int                       *pwidthInit,
--    int                       nspans,
--    int                       fSorted 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--
--    (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, pptInit, 
--                        pwidthInit, nspans, fSorted);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--
--static void
--xaaWrapperPutImage(
--    DrawablePtr pDraw,
--    GCPtr     pGC,
--    int               depth, 
--    int x, int y, int w, int h,
--    int               leftPad,
--    int               format,
--    char      *pImage 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, 
--              leftPad, format, pImage);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static RegionPtr
--xaaWrapperCopyArea(
--    DrawablePtr pSrc,
--    DrawablePtr pDst,
--    GC *pGC,
--    int srcx, int srcy,
--    int width, int height,
--    int dstx, int dsty 
--){
--    RegionPtr ret;
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDst);
--    ret = (*pGC->ops->CopyArea)(pSrc, pDst,
--            pGC, srcx, srcy, width, height, dstx, dsty);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDst);
--
--    return ret;
--}
--
--
--static RegionPtr
--xaaWrapperCopyPlane(
--    DrawablePtr       pSrc,
--    DrawablePtr       pDst,
--    GCPtr pGC,
--    int       srcx, int srcy,
--    int       width, int height,
--    int       dstx, int dsty,
--    unsigned long bitPlane 
--){
--    RegionPtr ret;
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDst);
--    ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
--             pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDst);
--    return ret;
--}
--
--static void
--xaaWrapperPolyPoint(
--    DrawablePtr pDraw,
--    GCPtr pGC,
--    int mode,
--    int npt,
--    xPoint *pptInit 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperPolylines(
--    DrawablePtr pDraw,
--    GCPtr     pGC,
--    int               mode,           
--    int               npt,            
--    DDXPointPtr pptInit 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void 
--xaaWrapperPolySegment(
--    DrawablePtr       pDraw,
--    GCPtr     pGC,
--    int               nseg,
--    xSegment  *pSeg
--    ){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperPolyRectangle(
--    DrawablePtr  pDraw,
--    GCPtr        pGC,
--    int                nRects,
--    xRectangle  *pRects 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolyRectangle)(pDraw, pGC, nRects, pRects);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperPolyArc(
--    DrawablePtr       pDraw,
--    GCPtr     pGC,
--    int               narcs,
--    xArc      *parcs 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperFillPolygon(
--    DrawablePtr       pDraw,
--    GCPtr     pGC,
--    int               shape,
--    int               mode,
--    int               count,
--    DDXPointPtr       pptInit 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, pptInit);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void 
--xaaWrapperPolyFillRect(
--    DrawablePtr       pDraw,
--    GCPtr     pGC,
--    int               nRectsInit, 
--    xRectangle        *pRectsInit 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolyFillRect)(pDraw, pGC, nRectsInit, pRectsInit);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperPolyFillArc(
--    DrawablePtr       pDraw,
--    GCPtr     pGC,
--    int               narcs,
--    xArc      *parcs 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static int
--xaaWrapperPolyText8(
--    DrawablePtr pDraw,
--    GCPtr     pGC,
--    int               x, 
--    int       y,
--    int       count,
--    char      *chars 
--){
--    int width;
--    
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    width = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--
--    return width;
--}
--
--static int
--xaaWrapperPolyText16(
--    DrawablePtr pDraw,
--    GCPtr     pGC,
--    int               x,
--    int               y,
--    int       count,
--    unsigned short *chars 
--){
--    int width;
--    
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    width = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--
--    return width;
--}
--
--static void
--xaaWrapperImageText8(
--    DrawablePtr pDraw,
--    GCPtr     pGC,
--    int               x, 
--    int               y,
--    int       count,
--    char      *chars 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperImageText16(
--    DrawablePtr pDraw,
--    GCPtr     pGC,
--    int               x,
--    int               y,
--    int       count,
--    unsigned short *chars 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperImageGlyphBlt(
--    DrawablePtr pDraw,
--    GCPtr pGC,
--    int x, int y,
--    unsigned int nglyph,
--    CharInfoPtr *ppci,
--    pointer pglyphBase 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, x, y, nglyph, 
--                                      ppci, pglyphBase);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperPolyGlyphBlt(
--    DrawablePtr pDraw,
--    GCPtr pGC,
--    int x, int y,
--    unsigned int nglyph,
--    CharInfoPtr *ppci,
--    pointer pglyphBase 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, x, y, nglyph, 
--                              ppci, pglyphBase);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--
--static void
--xaaWrapperPushPixels(
--    GCPtr     pGC,
--    PixmapPtr pBitMap,
--    DrawablePtr pDraw,
--    int       dx, int dy, int xOrg, int yOrg 
--){
--    XAAWRAPPER_GC_OP_PROLOGUE(pGC, pDraw);
--    (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
--    XAAWRAPPER_GC_OP_EPILOGUE(pGC, pDraw);
--}
--#endif
--
- #ifdef RENDER
- static void
- xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-Index: programs/Xserver/hw/xfree86/xf86cfg/interface.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/xf86cfg/interface.c    23 Apr 2004 19:54:18 -0000      1.2
-+++ programs/Xserver/hw/xfree86/xf86cfg/interface.c    15 Dec 2004 03:10:20 -0000      1.2.4.1
-@@ -300,7 +300,7 @@
-     
-     startedx = startx();
-     if (XF86Config_path == NULL)
--      XF86Config_path = XtNewString(__XCONFIGFILE__"-4");
-+      XF86Config_path = XtNewString(__XCONFIGFILE__);
-     if (XkbConfig_path == NULL) {
-       XmuSnprintf(XkbConfig_path_static, sizeof(XkbConfig_path_static),
-                   "%s/%s%s", XFree86Dir, XkbConfigDir, XkbConfigFile);
-@@ -536,9 +536,9 @@
- # endif
- #else
- # ifdef XF86CONFIGDIR
--      XF86Config_path = XtNewString(XF86CONFIGDIR "/"__XCONFIGFILE__"-4");
-+      XF86Config_path = XtNewString(XF86CONFIGDIR "/"__XCONFIGFILE__);
- # else
--      XF86Config_path = XtNewString("/etc/X11/"__XCONFIGFILE__"-4");
-+      XF86Config_path = XtNewString("/etc/X11/"__XCONFIGFILE__);
- # endif
- #endif
-     }
-Index: programs/Xserver/hw/xfree86/xf86cfg/loader.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/xf86cfg/loader.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xfree86/xf86cfg/loader.h       23 Apr 2004 19:54:18 -0000      1.2
-+++ programs/Xserver/hw/xfree86/xf86cfg/loader.h       8 Dec 2004 07:02:46 -0000       1.2.4.1
-@@ -75,7 +75,7 @@
-     unsigned long       num;
-     char *              str;
-     double              realnum;
--    Bool              bool;
-+    Bool              xbool;
-     OptFrequency      freq;
- } ValueUnion;
-Index: programs/Xserver/hw/xwin/ChangeLog
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/ChangeLog,v
-retrieving revision 1.6
-retrieving revision 1.6.2.1
-diff -u -u -r1.6 -r1.6.2.1
---- programs/Xserver/hw/xwin/ChangeLog 3 Aug 2004 10:12:25 -0000       1.6
-+++ programs/Xserver/hw/xwin/ChangeLog 15 Dec 2004 19:22:53 -0000      1.6.2.1
-@@ -1,3 +1,114 @@
-+2004-12-14  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * InitOutput.c:
-+      * winprocarg.c:
-+      EnumDisplayMonitors is not available on Window NT4 and 95. Resolve
-+      the function dynamicly
-+
-+2004-12-08  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * InitOutput.c:
-+      * winprocarg.c:
-+      Added support for placing the main window with the @<monitor#>.
-+      Patch by Mark Fisher, small changes by Alexander Gottwald
-+      
-+2004-12-04  Earle Philhower
-+
-+      * InitOutput.c:
-+      * win.h:
-+      * wincreatewnd.c:
-+      * winprocarg.c:
-+      Optional position -screen parameter (-screen n WxH+X+Y or 
-+      -screen n W H X Y)
-+      
-+2004-11-24  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * winmultiwindowwm.c:
-+      Finally the multiwindow mode defines a default cursor
-+
-+2004-11-11  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * winconfig.c:
-+      added keyboard layout "French (Switzerland)"
-+
-+2004-10-28  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * win.h:
-+      add fRetryCreateSurface
-+      * winshaddnl.c (winBltExposedRegionsShadowDDNL):
-+      try to recreate the primary surface if it was lost
-+      * winshaddnl.c (winCreatePrimarySurfaceShadowDDNL):
-+      mark screen to retry creating the primary surface if it failed
-+
-+2004-10-23  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * winconfig (winConfigFiles):
-+      Simplify /etc/X11/font-dirs parsing
-+
-+2004-10-20  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * XWin.rc, winresource.h, winwndproc.c:
-+      Add ShowCursor entry to tray menu 
-+
-+2004-10-20  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * Imakefile:
-+      Add ETCX11DIR to DEFINES
-+      * InitOutput.c (InitOutput):
-+      * winconfig.c (winConfigFiles) :
-+      Add entries from /etc/X11/font-dirs to default fontpath
-+
-+2004-10-16  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * winprocarg.c (winInitializeDefaultScreens, ddxProcessArgument):
-+      * win.h:
-+      Make multiple monitors default for -multiwindow and -mwextwm.
-+      Added a flag to indicate if the user has overridden the multimonitor
-+      settings. (Øyvind Harboe, Alexander Gottwald)
-+
-+2004-10-05  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * XWin.rc:
-+      Set the dialogstyle to DS_CENTERMOUSE. Dialogs will now popup on the
-+      monitor where the mouse is and not on the center of the whole desktop.
-+
-+2004-10-02  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * winmouse.c (winMouseProc):
-+      Make sure buttons 1-3 are mouse buttons and wheel events are 4-5
-+      Document code
-+      Replace ErrorF with appropriate winMsg
-+      use a symbolic name for the wheel event offset
-+      
-+2004-10-01  Alexander Gottwald  <ago at freedesktop dot org>
-+
-+      * wincreatewnd.c (winCreateBoundingWindowWindowed):
-+      Do not adjust workarea if native windowmanager is used
-+
-+2004-09-22  Kensuke Matsuzaki
-+
-+      * winclipboardthread.c (winClipboardErrorHandler):
-+      * winclipboardwndproc.c (winClipboardWindowProc):
-+      * winclipboardxevents.c (winClipboardFlushXEvents):
-+      Fix clipboard bug with unicode applications.
-+      
-+2004-09-16  Alexander Gottwald <ago at freedesktop dot org>
-+
-+      * wincreatewnd.c (winCreateBoundingWindowWindowed):
-+      Remove code which prevented the use from specifying the window
-+      size in nodecoration mode.      
-+
-+2004-08-26  Chris B  <news at sempermax dot com>
-+
-+      * win.h, winmessages.h:
-+      Add defines for WM_XBUTTON
-+      * winmouse.c (winMouseProc):
-+      Query number of mouse buttons from windows. 
-+      * winmultiwindowwndproc.c (winTopLevelWindowProc):
-+      * winwin32rootlesswndproc.c (winMWExtWMWindowProc):
-+      * winwndproc.c (winWindowProc):
-+      Handle WM_XBUTTON messages.  
-+
- 2004-08-02  Kensuke Matsuzaki
-       * winclipboardthread.c winclipboardwndproc.c: 
-@@ -7,18 +118,18 @@
-       fUseUnicode, because it don't mean wheather Windows support
-       Unicode or not.
-       
--2004-07-31  Alexander Gottwald  <ago@freedesktop.org>
-+2004-07-31  Alexander Gottwald  <ago at freedesktop dot org>
-       * win.h:
-       adjust prototype for winInitCmapPrivates to match Egberts change.       
--2004-07-30  Egbert Eich  <eich@freedesktop.org>
-+2004-07-30  Egbert Eich  <eich at freedesktop dot org>
-       * winallpriv.c: (winInitCmapPrivates):
-       test if colormap with index really exists in the list of
-       installed maps before using it.
--2004-07-09  Alexander Gottwald  <ago@freedesktop.org>
-+2004-07-09  Alexander Gottwald  <ago at freedesktop dot org>
-       * winconfig.c: Add entry for irish layout (ie)
-       * InitOutput.c, winerror.c, winglobals.c: rename g_fUseMsg to 
-@@ -27,38 +138,38 @@
-       -silent-dup-error to allow silent termination if another instance of
-       XWin was found running
--2004-06-27  Alexander Gottwald  <ago@freedesktop.org>
-+2004-06-27  Alexander Gottwald  <ago at freedesktop dot org>
-       * winconfig.c: Add entry for us layout. This changes not much but 
-       removes a strange error message about the unknown us layout. 
--2004-06-24  Alexander Gottwald  <ago@freedesktop.org>
-+2004-06-24  Alexander Gottwald  <ago at freedesktop dot org>
-       * InitOutput.c: Check for textmode mounted /tmp and print a warning
--2004-06-15  Harold Hunt  <huntharo@msu.edu>
-+2004-06-15  Harold Hunt  <huntharo at msu dot edu>
-       * windialogs.c: Fix path to locally installed changelog for the About 
-       dialog box.
--2004-05-27  Alexander Gottwald  <ago@freedesktop.org>
-+2004-05-27  Alexander Gottwald  <ago at freedesktop dot org>
-       * winpriv.c: Create win32 window if not already created
-       * winmultiwindowwindow.c: Export winCreateWindowWindow
--2004-05-27  Alexander Gottwald  <ago@freedesktop.org>
-+2004-05-27  Alexander Gottwald  <ago at freedesktop dot org>
-       * win.h: Allow CYGDEBUG to defined in the Makefile
-       * winwindow.h: Allow CYGWINDOWING_DEBUG to defined in the Makefile
--2004-05-19  Alexander Gottwald  <ago@freedesktop.org>
-+2004-05-19  Alexander Gottwald  <ago at freedesktop dot org>
-       
-       * winmultiwindowicons.c (winInitGlobalIcons): Load the small default
-       icon too
-       * winprefs.h, winprefs.c (winOverrideDefaultIcon): Takes the iconsize
-       as parameter
--2004-05-19  Alexander Gottwald  <ago@freedesktop.org>
-+2004-05-19  Alexander Gottwald  <ago at freedesktop dot org>
-       * win.h, winmultiwindowicons.c (winXIconToHICON): Takes iconsize
-       as parameter 
-@@ -83,14 +194,14 @@
-         winwin32rootless.c (winMWExtWMDestroyFrame): Use winDestroyIcon
-       to free the icon without destroying the global icon.  
-         
--2004-05-17  Alexander Gottwald  <ago@freedesktop.org>
-+2004-05-17  Alexander Gottwald  <ago at freedesktop dot org>
-       * windialogs.c (winExitDlgProc, winAboutDlgProc),
-         winmultiwindowwndproc.c (winTopLevelWindowProc),
-         winwndproc.c (winWindowProc): Check if g_fSoftwareCursor is set 
-       before calling ShowCursor.  
--2004-05-09  Dan Wilks  <Dan_Wilks@intuit.com>
-+2004-05-09  Dan Wilks  <Dan_Wilks at intuit dot com>
-     
-       * winclipboard.h: Add extern prototypes for winDebug, winErrorFVerb
-       copied from winmsg.h.
-Index: programs/Xserver/hw/xwin/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/Imakefile 21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/Imakefile 15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -263,7 +263,7 @@
- VENDOR_DEFINES = $(VENDOR_STRING) $(VENDOR_CONTACT) $(VERSION_STRING)
- DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) \
--      -DPROJECTROOT="\"$(PROJECTROOT)\""
-+      -DPROJECTROOT="\"$(PROJECTROOT)\"" -DETCX11DIR="\"$(ETCX11DIR)\""
- LinkSourceFile(stubs.c,$(SERVERSRC)/Xi)
- SpecialCObjectRule(stubs,$(ICONFIGFILES),$(EXT_DEFINES))
-Index: programs/Xserver/hw/xwin/InitOutput.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/InitOutput.c,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/Xserver/hw/xwin/InitOutput.c      27 Jul 2004 09:53:14 -0000      1.4
-+++ programs/Xserver/hw/xwin/InitOutput.c      15 Dec 2004 19:22:53 -0000      1.4.4.1
-@@ -30,9 +30,7 @@
- #include "win.h"
- #include "winmsg.h"
--#ifdef XWIN_XF86CONFIG
- #include "winconfig.h"
--#endif
- #include "winprefs.h"
- #include "X11/Xlocale.h"
- #include <mntent.h>
-@@ -437,9 +435,15 @@
-         "\tSpecify an optional refresh rate to use in fullscreen mode\n"
-         "\twith a DirectDraw engine.\n");
--  ErrorF ("-screen scr_num [width height]\n"
-+  ErrorF ("-screen scr_num [width height [x y] | [[WxH[+X+Y]][@m]] ]\n"
-         "\tEnable screen scr_num and optionally specify a width and\n"
--        "\theight for that screen.\n");
-+        "\theight and initial position for that screen. Additionally\n"
-+        "\ta monitor number can be specified to start the server on,\n"
-+        "\tat which point, all coordinates become relative to that\n"
-+      "\tmonitor (Not for Windows NT4 and 95). Examples:\n"
-+      "\t -screen 0 800x600+100+100@2 ; 2nd monitor offset 100,100 size 800x600\n"
-+      "\t -screen 0 1024x768@3        ; 3rd monitor size 1024x768\n"
-+      "\t -screen 0 @1 ; on 1st monitor using its full resolution (the default)\n");
-   ErrorF ("-lesspointer\n"
-         "\tHide the windows mouse pointer when it is over an inactive\n"
-@@ -635,6 +639,7 @@
-   winMsg(X_INFO, "XF86Config is not supported\n");
-   winMsg(X_INFO, "See http://x.cygwin.com/docs/faq/cygwin-x-faq.html "
-          "for more information\n");
-+  winConfigFiles ();
- #endif
-   /* Load preferences from XWinrc file */
-Index: programs/Xserver/hw/xwin/XWin.rc
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/XWin.rc,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/XWin.rc   21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/XWin.rc   15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -37,7 +37,7 @@
- /* About */
- ABOUT_BOX DIALOG DISCARDABLE  32, 32, 240, 105
--STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTER
-+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
- CAPTION "About Cygwin/X"
- FONT 8, "MS Sans Serif"
- BEGIN
-@@ -59,7 +59,7 @@
- /* Depth change */
- DEPTH_CHANGE_BOX DIALOG DISCARDABLE   32, 32, 180, 100
--STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTER
-+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE
- FONT 8, "MS Sans Serif"
- CAPTION "Cygwin/X"
- BEGIN
-@@ -73,7 +73,7 @@
- /* Exit */
- EXIT_DIALOG DIALOG DISCARDABLE        32, 32, 180, 78
--STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTER
-+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE
- FONT 8, "MS Sans Serif"
- CAPTION "Cygwin/X - Exit?"
- BEGIN
-@@ -94,6 +94,7 @@
-       POPUP "TRAYICON_MENU"
-       BEGIN
-               MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT
-+              MENUITEM "Show Cursor", ID_APP_SHOWCURSOR
-               MENUITEM "&About...", ID_APP_ABOUT
-               MENUITEM SEPARATOR
-               MENUITEM "E&xit", ID_APP_EXIT
-Index: programs/Xserver/hw/xwin/win.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/win.h,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xwin/win.h     31 Jul 2004 18:33:56 -0000      1.4
-+++ programs/Xserver/hw/xwin/win.h     15 Dec 2004 19:22:53 -0000      1.4.2.1
-@@ -48,6 +48,17 @@
- #define CYGDEBUG                              NO
- #endif
-+/* WM_XBUTTON Messages. They should go into w32api. */
-+#ifndef WM_XBUTTONDOWN
-+# define WM_XBUTTONDOWN 523
-+#endif
-+#ifndef WM_XBUTTONUP
-+# define WM_XBUTTONUP 524
-+#endif
-+#ifndef WM_XBUTTONDBLCLK
-+# define WM_XBUTTONDBLCLK 525
-+#endif
-+
- #define NEED_EVENTS
- #define WIN_DEFAULT_BPP                               0
-@@ -384,6 +395,11 @@
-   DWORD                       dwHeight_mm;
-   DWORD                       dwPaddedWidth;
-+  /* Did the user specify a screen position? */
-+  Bool                        fUserGavePosition;
-+  DWORD                 dwInitialX;
-+  DWORD                 dwInitialY;
-+
-   /*
-    * dwStride is the number of whole pixels that occupy a scanline,
-    * including those pixels that are not displayed.  This is basically
-@@ -414,6 +430,9 @@
- #ifdef XWIN_MULTIWINDOW
-   Bool                        fMultiWindow;
- #endif
-+#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
-+  Bool                        fMultiMonitorOverride;
-+#endif
-   Bool                  fMultipleMonitors;
-   Bool                        fLessPointer;
-   Bool                        fScrollbars;
-@@ -497,6 +516,7 @@
-   LPDIRECTDRAW4               pdd4;
-   LPDIRECTDRAWSURFACE4        pddsShadow4;
-   LPDIRECTDRAWSURFACE4        pddsPrimary4;
-+  BOOL                        fRetryCreateSurface;
-   /* Privates used by both shadow fb DirectDraw servers */
-   LPDIRECTDRAWCLIPPER pddcPrimary;
-Index: programs/Xserver/hw/xwin/winclipboardthread.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardthread.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xwin/winclipboardthread.c      3 Aug 2004 10:12:25 -0000       1.4
-+++ programs/Xserver/hw/xwin/winclipboardthread.c      15 Dec 2004 19:22:53 -0000      1.4.2.1
-@@ -429,8 +429,12 @@
-                pErr->error_code,
-                pszErrorMsg,
-                sizeof (pszErrorMsg));
--  ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n", pszErrorMsg);
--
-+  ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n"
-+        "\tSerial: %d, Request Code: %d, Minor Code: %d\n",
-+        pszErrorMsg,
-+        pErr->serial,
-+        pErr->request_code,
-+        pErr->minor_code);
-   return 0;
- }
-Index: programs/Xserver/hw/xwin/winclipboardwndproc.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardwndproc.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xwin/winclipboardwndproc.c     3 Aug 2004 10:12:25 -0000       1.4
-+++ programs/Xserver/hw/xwin/winclipboardwndproc.c     15 Dec 2004 19:22:53 -0000      1.4.2.1
-@@ -44,6 +44,7 @@
-  */
- extern Bool           g_fUseUnicode;
-+extern Bool           g_fUnicodeSupport;
- extern void           *g_pClipboardDisplay;
- extern Window         g_iClipboardWindow;
- extern Atom           g_atomLastOwnedSelection;
-@@ -445,7 +446,7 @@
-       if (message == WM_RENDERALLFORMATS)
-         fConvertToUnicode = FALSE;
-       else
--        fConvertToUnicode = g_fUseUnicode && (CF_UNICODETEXT == wParam);
-+        fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam);
-       /* Request the selection contents */
-       iReturn = XConvertSelection (pDisplay,
-@@ -521,10 +522,9 @@
-       if (WIN_XEVENTS_NOTIFY != iReturn)
-         {
-           /* Paste no data, to satisfy required call to SetClipboardData */
--          if (fConvertToUnicode)
-+          if (g_fUnicodeSupport)
-             SetClipboardData (CF_UNICODETEXT, NULL);
--          else
--            SetClipboardData (CF_TEXT, NULL);
-+          SetClipboardData (CF_TEXT, NULL);
-         }
-       /* Special handling for WM_RENDERALLFORMATS */
-Index: programs/Xserver/hw/xwin/winclipboardxevents.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardxevents.c,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/hw/xwin/winclipboardxevents.c     3 Aug 2004 10:12:25 -0000       1.4
-+++ programs/Xserver/hw/xwin/winclipboardxevents.c     15 Dec 2004 19:22:53 -0000      1.4.2.1
-@@ -135,8 +135,8 @@
-             iReturn = XChangeProperty (pDisplay,
-                                        event.xselectionrequest.requestor,
-                                        event.xselectionrequest.property,
--                                       event.xselectionrequest.target,
--                                       sizeof (atomTargetArr[0]),
-+                                       XA_ATOM,
-+                                       32,
-                                        PropModeReplace,
-                                        (unsigned char *) atomTargetArr,
-                                        (sizeof (atomTargetArr)
-Index: programs/Xserver/hw/xwin/winconfig.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.c,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/Xserver/hw/xwin/winconfig.c       27 Jul 2004 09:53:14 -0000      1.4
-+++ programs/Xserver/hw/xwin/winconfig.c       15 Dec 2004 19:22:53 -0000      1.4.4.1
-@@ -247,6 +247,7 @@
-     {  0x40b, -1, "pc105", "fi",      NULL, NULL, "Finnish"},
-     {  0x40c, -1, "pc105", "fr",      NULL, NULL, "French (Standard)"},
-     {  0x80c, -1, "pc105", "be",      NULL, NULL, "French (Belgian)"},
-+    { 0x100c, -1, "pc105", "fr_CH",   NULL, NULL, "French (Switzerland)"},
-     {  0x410, -1, "pc105", "it",      NULL, NULL, "Italian"},
-     {  0x411,  7, "jp106", "jp",      NULL, NULL, "Japanese"},
-     {  0x813, -1, "pc105", "be",      NULL, NULL, "Dutch (Belgian)"},  
-@@ -730,6 +731,127 @@
-   return TRUE;
- }
-+#else
-+Bool
-+winConfigFiles ()
-+{
-+  MessageType from;
-+
-+  /* Fontpath */
-+  from = X_DEFAULT;
-+
-+  if (g_cmdline.fontPath)
-+    {
-+      from = X_CMDLINE;
-+      defaultFontPath = g_cmdline.fontPath;
-+    }
-+  else 
-+    {
-+      /* Open fontpath configuration file */
-+      FILE *fontdirs = fopen(ETCX11DIR "/font-dirs", "rt");
-+      if (fontdirs != NULL)
-+        {
-+        char buffer[256];
-+        int needs_sep = TRUE; 
-+        int comment_block = FALSE;
-+
-+        /* get defautl fontpath */
-+        char *fontpath = xstrdup(defaultFontPath);
-+        size_t size = strlen(fontpath);
-+
-+        /* read all lines */
-+        while (!feof(fontdirs))
-+          {
-+            size_t blen;
-+            char *hashchar;
-+            char *str;
-+            int has_eol = FALSE;
-+
-+            /* read one line */
-+            str = fgets(buffer, sizeof(buffer), fontdirs);
-+            if (str == NULL) /* stop on error or eof */
-+              break;
-+
-+              if (strchr(str, '\n') != NULL)
-+                has_eol = TRUE;
-+           
-+            /* check if block is continued comment */
-+            if (comment_block)
-+              {
-+                /* ignore all input */
-+                *str = 0; 
-+                blen = 0; 
-+                if (has_eol) /* check if line ended in this block */
-+                  comment_block = FALSE;
-+              }
-+            else 
-+              {
-+                /* find comment character. ignore all trailing input */
-+                hashchar = strchr(str, '#');
-+                if (hashchar != NULL)
-+                  {
-+                    *hashchar = 0;
-+                    if (!has_eol) /* mark next block as continued comment */
-+                      comment_block = TRUE;
-+                  }
-+              }
-+              
-+            /* strip whitespaces from beginning */
-+            while (*str == ' ' || *str == '\t')
-+              str++;
-+
-+            /* get size, strip whitespaces from end */ 
-+            blen = strlen(str);
-+            while (blen > 0 && (str[blen-1] == ' ' || 
-+                  str[blen-1] == '\t' || str[blen-1] == '\n'))
-+              {
-+                str[--blen] = 0;
-+              }
-+           
-+            /* still something left to add? */ 
-+            if (blen > 0)
-+              {
-+                size_t newsize = size + blen;
-+                /* reserve one character more for ',' */
-+                if (needs_sep)
-+                  newsize++;
-+
-+                /* allocate memory */
-+                if (fontpath == NULL)
-+                  fontpath = malloc(newsize+1);
-+                else
-+                  fontpath = realloc(fontpath, newsize+1);
-+
-+                /* add separator */
-+                if (needs_sep)
-+                  {
-+                    fontpath[size] = ',';
-+                    size++;
-+                    needs_sep = FALSE;
-+                  }
-+
-+                /* mark next line as new entry */
-+                if (has_eol)
-+                  needs_sep = TRUE;
-+                
-+                /* add block */
-+                strncpy(fontpath + size, str, blen);
-+                fontpath[newsize] = 0;
-+                size = newsize;
-+              }
-+          }
-+
-+        /* cleanup */
-+        fclose(fontdirs);  
-+          from = X_CONFIG;
-+          defaultFontPath = xstrdup(fontpath);
-+          free(fontpath);
-+      }
-+    }
-+  winMsg (from, "FontPath set to \"%s\"\n", defaultFontPath);
-+
-+  return TRUE;
-+}
- #endif
-Index: programs/Xserver/hw/xwin/wincreatewnd.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/wincreatewnd.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/wincreatewnd.c    21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/wincreatewnd.c    15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -142,6 +142,8 @@
-   winScreenInfo               *pScreenInfo = pScreenPriv->pScreenInfo;
-   int                 iWidth = pScreenInfo->dwUserWidth;
-   int                 iHeight = pScreenInfo->dwUserHeight;
-+  int                   iPosX;
-+  int                   iPosY;
-   HWND                        *phwnd = &pScreenPriv->hwndScreen;
-   WNDCLASS            wc;
-   RECT                        rcClient, rcWorkArea;
-@@ -193,6 +195,18 @@
-   /* Adjust for auto-hide taskbars */
-   winAdjustForAutoHide (&rcWorkArea);
-+  /* Did the user specify a position? */
-+  if (pScreenInfo->fUserGavePosition)
-+    {
-+      iPosX = pScreenInfo->dwInitialX;
-+      iPosY = pScreenInfo->dwInitialY;
-+    }
-+  else
-+    {
-+      iPosX = rcWorkArea.left;
-+      iPosY = rcWorkArea.top;
-+    }
-+
-   /* Did the user specify a height and width? */
-   if (pScreenInfo->fUserGaveHeightAndWidth)
-     {
-@@ -240,24 +254,6 @@
-               + GetSystemMetrics (SM_CYCAPTION);
-           }
-       }
--      else
--      {
--        /*
--         * User gave a width and height but also said no decoration.
--         * In this case we have to ignore the requested width and height
--         * and instead use the largest possible window that we can.
--         */
--        if (pScreenInfo->fMultipleMonitors)
--          {
--            iWidth = GetSystemMetrics (SM_CXVIRTUALSCREEN);
--            iHeight = GetSystemMetrics (SM_CYVIRTUALSCREEN);
--          }
--        else
--          {
--            iWidth = GetSystemMetrics (SM_CXSCREEN);
--            iHeight = GetSystemMetrics (SM_CYSCREEN);
--          }
--      }
-     }
-   else
-     {
-@@ -289,20 +285,30 @@
-       /* We cannot have scrollbars if we do not have a window border */
-       pScreenInfo->fScrollbars = FALSE;
-     }
-+ 
-+  if (TRUE 
-+#ifdef XWIN_MULTIWINDOWEXTWM
-+       && !pScreenInfo->fMWExtWM
-+#endif
-+#ifdef XWIN_MULTIWINDOW
-+       && !pScreenInfo->fMultiWindow
-+#endif
-+     )
-+    {
-+      /* Trim window width to fit work area */
-+      if (iWidth > (rcWorkArea.right - rcWorkArea.left))
-+        iWidth = rcWorkArea.right - rcWorkArea.left;
-   
--  /* Trim window width to fit work area */
--  if (iWidth > (rcWorkArea.right - rcWorkArea.left))
--    iWidth = rcWorkArea.right - rcWorkArea.left;
--  
--  /* Trim window height to fit work area */
--  if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top))
--    iHeight = rcWorkArea.bottom - rcWorkArea.top;
-+      /* Trim window height to fit work area */
-+      if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top))
-+        iHeight = rcWorkArea.bottom - rcWorkArea.top;
-   
- #if CYGDEBUG
--  winDebug ("winCreateBoundingWindowWindowed - Adjusted width: %d "\
--        "height: %d\n",
--        iWidth, iHeight);
-+      winDebug ("winCreateBoundingWindowWindowed - Adjusted width: %d "\
-+            "height: %d\n",
-+        iWidth, iHeight);
- #endif
-+    }
-   /* Set display and screen-specific tooltip text */
-   if (g_pszQueryHost != NULL)
-@@ -322,8 +328,8 @@
-                           WINDOW_CLASS,       /* Class name */
-                           szTitle,            /* Window name */
-                           dwWindowStyle,
--                          rcWorkArea.left,    /* Horizontal position */
--                          rcWorkArea.top,     /* Vertical position */
-+                          iPosX,              /* Horizontal position */
-+                          iPosY,              /* Vertical position */
-                           iWidth,             /* Right edge */
-                           iHeight,            /* Bottom edge */
-                           (HWND) NULL,        /* No parent or owner window */
-Index: programs/Xserver/hw/xwin/winmessages.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmessages.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xwin/winmessages.h     21 Jun 2004 13:19:32 -0000      1.2
-+++ programs/Xserver/hw/xwin/winmessages.h     15 Dec 2004 19:22:53 -0000      1.2.4.1
-@@ -523,9 +523,9 @@
-       "WM_MBUTTONUP",
-       "WM_MBUTTONDBLCLK",
-       "WM_MOUSEWHEEL",
--      "523",
--      "524",
--      "525",
-+      "WM_XBUTTONDOWN",
-+      "WM_XBUTTONUP",
-+      "WM_XBUTTONDBLCLK",
-       "526",
-       "527",
-       "WM_PARENTNOTIFY",
-Index: programs/Xserver/hw/xwin/winmouse.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmouse.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/winmouse.c        21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/winmouse.c        15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -64,23 +64,44 @@
- int
- winMouseProc (DeviceIntPtr pDeviceInt, int iState)
- {
--  CARD8                       map[6];
-+  int                         lngMouseButtons, i;
-+  int                 lngWheelEvents = 2;
-+  CARD8                       *map;
-   DevicePtr           pDevice = (DevicePtr) pDeviceInt;
-   switch (iState)
-     {
-     case DEVICE_INIT:
--      map[1] = 1;
--      map[2] = 2;
--      map[3] = 3;
--      map[4] = 4;
--      map[5] = 5;
-+      /* Get number of mouse buttons */
-+      lngMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS);
-+
-+      /* Mapping of windows events to X events:
-+       * LEFT:1 MIDDLE:2 RIGHT:3
-+       * SCROLL_UP:4 SCROLL_DOWN:5
-+       * XBUTTON 1:6 XBUTTON 2:7 ...
-+       *
-+       * To map scroll wheel correctly we need at least the 3 normal buttons
-+       */
-+      if (lngMouseButtons < 3)
-+        lngMouseButtons = 3;
-+      winMsg(X_PROBED, "%d mouse buttons found\n", lngMouseButtons);
-+
-+      /* allocate memory: 
-+       * number of buttons + 2x mouse wheel event + 1 extra (offset for map) 
-+       */
-+      map = malloc(sizeof(CARD8) * (lngMouseButtons + lngWheelEvents + 1));
-+    
-+      /* initalize button map */ 
-+      map[0] = 0;
-+      for (i=1; i <= lngMouseButtons + lngWheelEvents; i++)
-+              map[i] = i;
-       InitPointerDeviceStruct (pDevice,
-                              map,
--                             5, /* Buttons 4 and 5 are mouse wheel events */
-+                             lngMouseButtons + lngWheelEvents,
-                              miPointerGetMotionEvents,
-                              winMouseCtrl,
-                              miPointerGetMotionBufferSize ());
-+      free(map);
- #if defined(XFree86Server) && defined(XINPUT)
-       g_winMouseButtonMap = pDeviceInt->button->map;
-Index: programs/Xserver/hw/xwin/winmultiwindowwm.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmultiwindowwm.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/winmultiwindowwm.c        21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/winmultiwindowwm.c        15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -43,6 +43,7 @@
- #include <X11/Xlocale.h>
- #include <X11/Xproto.h>
- #include <X11/Xutil.h>
-+#include <X11/cursorfont.h>
- /* Fixups to prevent collisions between Windows and X headers */
- #define ATOM DWORD
-@@ -180,7 +181,6 @@
- static Bool                     g_shutdown = FALSE;
- static Bool                   redirectError = FALSE;
--
- /*
-  * PushMessage - Push a message onto the queue
-  */
-@@ -1184,6 +1184,16 @@
-   pWMInfo->atmPrivMap  = XInternAtom (pWMInfo->pDisplay,
-                                     WIN_HWND_CACHE,
-                                     False);
-+
-+
-+  if (1) {
-+    Cursor cursor = XCreateFontCursor (pWMInfo->pDisplay, XC_left_ptr);
-+    if (cursor)
-+    {
-+      XDefineCursor (pWMInfo->pDisplay, DefaultRootWindow(pWMInfo->pDisplay), cursor);
-+      XFreeCursor (pWMInfo->pDisplay, cursor);
-+    }
-+  }
- }
-Index: programs/Xserver/hw/xwin/winmultiwindowwndproc.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmultiwindowwndproc.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/winmultiwindowwndproc.c   21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/winmultiwindowwndproc.c   15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -628,6 +628,16 @@
-       break;
-       return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button3, wParam);
-+    case WM_XBUTTONDBLCLK:
-+    case WM_XBUTTONDOWN:
-+      if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
-+      break;
-+      return winMouseButtonsHandle (s_pScreen, ButtonPress, HIWORD(wParam) + 5, wParam);
-+    case WM_XBUTTONUP:
-+      if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
-+      break;
-+      return winMouseButtonsHandle (s_pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam);
-+
-     case WM_MOUSEWHEEL:
- #if CYGMULTIWINDOW_DEBUG
-       ErrorF ("winTopLevelWindowProc - WM_MOUSEWHEEL\n");
-Index: programs/Xserver/hw/xwin/winprocarg.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winprocarg.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/winprocarg.c      27 Jul 2004 09:53:14 -0000      1.3
-+++ programs/Xserver/hw/xwin/winprocarg.c      15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -52,6 +52,55 @@
- extern Bool                   g_fSoftwareCursor;
- extern Bool                   g_fSilentDupError;
-+/* globals required by callback function for monitor information */
-+struct GetMonitorInfoData {
-+    int  requestedMonitor;
-+    int  monitorNum;
-+    Bool bUserSpecifiedMonitor;
-+    Bool bMonitorSpecifiedExists;
-+    int  monitorOffsetX;
-+    int  monitorOffsetY;
-+    int  monitorHeight;
-+    int  monitorWidth;
-+};
-+
-+typedef BOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
-+ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors;
-+
-+BOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data);
-+
-+Bool QueryMonitor(int index, struct GetMonitorInfoData *data)
-+{
-+    /* Load EnumDisplayMonitors from DLL */
-+    HMODULE user32;
-+    FARPROC func;
-+    user32 = LoadLibrary("user32.dll");
-+    if (user32 == NULL)
-+    {
-+        winW32Error(2, "Could not open user32.dll");
-+        return FALSE;
-+    }
-+    func = GetProcAddress(user32, "EnumDisplayMonitors");
-+    if (func == NULL)
-+    {
-+        winW32Error(2, "Could not resolve EnumDisplayMonitors: ");
-+        return FALSE;
-+    }
-+    _EnumDisplayMonitors = (ENUMDISPLAYMONITORSPROC)func;
-+    
-+    /* prepare data */
-+    if (data == NULL)
-+        return FALSE;
-+    memset(data, 0, sizeof(*data));
-+    data->requestedMonitor = index;
-+
-+    /* query information */
-+    _EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data);
-+
-+    /* cleanup */
-+    FreeLibrary(user32);
-+    return TRUE;
-+}
- /*
-  * Function prototypes
-@@ -70,7 +119,6 @@
- void
- winInitializeDefaultScreens (void);
--
- /*
-  * Process arguments on the command line
-  */
-@@ -112,6 +160,7 @@
-       g_ScreenInfo[i].dwUserHeight = dwHeight;
-       g_ScreenInfo[i].fUserGaveHeightAndWidth
-       =  WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH;
-+      g_ScreenInfo[i].fUserGavePosition = FALSE;
-       g_ScreenInfo[i].dwBPP = WIN_DEFAULT_BPP;
-       g_ScreenInfo[i].dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES;
- #ifdef XWIN_EMULATEPSEUDO
-@@ -128,6 +177,9 @@
- #ifdef XWIN_MULTIWINDOW
-       g_ScreenInfo[i].fMultiWindow = FALSE;
- #endif
-+#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
-+      g_ScreenInfo[i].fMultiMonitorOverride = FALSE;
-+#endif
-       g_ScreenInfo[i].fMultipleMonitors = FALSE;
-       g_ScreenInfo[i].fLessPointer = FALSE;
-       g_ScreenInfo[i].fScrollbars = FALSE;
-@@ -247,7 +299,8 @@
-     {
-       int             iArgsProcessed = 1;
-       int             nScreenNum;
--      int             iWidth, iHeight;
-+      int             iWidth, iHeight, iX, iY;
-+      int             iMonitor;
- #if CYGDEBUG
-       winDebug ("ddxProcessArgument - screen - argc: %d i: %d\n",
-@@ -272,8 +325,41 @@
-         return 0;
-         }
-+        /* look for @m where m is monitor number */
-+        if (i + 2 < argc
-+                && 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor)) 
-+      {
-+        struct GetMonitorInfoData data;
-+        if (!QueryMonitor(iMonitor, &data))
-+        {
-+            ErrorF ("ddxProcessArgument - screen - "
-+                    "Querying monitors is not supported on NT4 and Win95\n");
-+        } else if (data.bMonitorSpecifiedExists == TRUE) 
-+        {
-+                winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
-+                iArgsProcessed = 3;
-+                g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE;
-+                g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
-+                g_ScreenInfo[nScreenNum].dwWidth = data.monitorWidth;
-+                g_ScreenInfo[nScreenNum].dwHeight = data.monitorHeight;
-+                g_ScreenInfo[nScreenNum].dwUserWidth = data.monitorWidth;
-+                g_ScreenInfo[nScreenNum].dwUserHeight = data.monitorHeight;
-+                g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX;
-+                g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY;
-+              }
-+              else 
-+        {
-+                /* monitor does not exist, error out */
-+                ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n",
-+                                iMonitor);
-+                UseMsg ();
-+                exit (0);
-+                return 0;
-+              }
-+        }
-+
-       /* Look for 'WxD' or 'W D' */
--      if (i + 2 < argc
-+      else if (i + 2 < argc
-         && 2 == sscanf (argv[i + 2], "%dx%d",
-                         (int *) &iWidth,
-                         (int *) &iHeight))
-@@ -285,6 +371,70 @@
-         g_ScreenInfo[nScreenNum].dwHeight = iHeight;
-         g_ScreenInfo[nScreenNum].dwUserWidth = iWidth;
-         g_ScreenInfo[nScreenNum].dwUserHeight = iHeight;
-+        /* Look for WxD+X+Y */
-+        if (2 == sscanf (argv[i + 2], "%*dx%*d+%d+%d",
-+                         (int *) &iX,
-+                         (int *) &iY))
-+        {
-+          winErrorFVerb (2, "ddxProcessArgument - screen - Found ``X+Y'' arg\n");
-+          g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
-+          g_ScreenInfo[nScreenNum].dwInitialX = iX;
-+          g_ScreenInfo[nScreenNum].dwInitialY = iY;
-+
-+              /* look for WxD+X+Y@m where m is monitor number. take X,Y to be offsets from monitor's root position */
-+              if (1 == sscanf (argv[i + 2], "%*dx%*d+%*d+%*d@%d",
-+                                               (int *) &iMonitor)) 
-+        {
-+          struct GetMonitorInfoData data;
-+          if (!QueryMonitor(iMonitor, &data))
-+          {
-+              ErrorF ("ddxProcessArgument - screen - "
-+                      "Querying monitors is not supported on NT4 and Win95\n");
-+          } else if (data.bMonitorSpecifiedExists == TRUE) 
-+          {
-+                      g_ScreenInfo[nScreenNum].dwInitialX += data.monitorOffsetX;
-+                      g_ScreenInfo[nScreenNum].dwInitialY += data.monitorOffsetY;
-+                }
-+                else 
-+          {
-+                      /* monitor does not exist, error out */
-+                      ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n",
-+                                      iMonitor);
-+                      UseMsg ();
-+                      exit (0);
-+                      return 0;
-+                }
-+
-+              }
-+        }
-+
-+        /* look for WxD@m where m is monitor number */
-+        else if (1 == sscanf(argv[i + 2], "%*dx%*d@%d",
-+                                                 (int *) &iMonitor)) 
-+      {
-+        struct GetMonitorInfoData data;
-+        if (!QueryMonitor(iMonitor, &data))
-+        {
-+                ErrorF ("ddxProcessArgument - screen - "
-+                  "Querying monitors is not supported on NT4 and Win95\n");
-+        } else if (data.bMonitorSpecifiedExists == TRUE) 
-+        {
-+                winErrorFVerb (2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
-+                g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
-+                g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX;
-+                g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY;
-+              }
-+              else 
-+        {
-+                /* monitor does not exist, error out */
-+                ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n",
-+                                iMonitor);
-+                UseMsg ();
-+                exit (0);
-+                return 0;
-+              }
-+
-+        }
-       }
-       else if (i + 3 < argc
-              && 1 == sscanf (argv[i + 2], "%d",
-@@ -299,6 +449,18 @@
-         g_ScreenInfo[nScreenNum].dwHeight = iHeight;
-         g_ScreenInfo[nScreenNum].dwUserWidth = iWidth;
-         g_ScreenInfo[nScreenNum].dwUserHeight = iHeight;
-+        if (i + 5 < argc
-+            && 1 == sscanf (argv[i + 4], "%d",
-+                            (int *) &iX)
-+            && 1 == sscanf (argv[i + 5], "%d",
-+                            (int *) &iY))
-+        {
-+          winErrorFVerb (2, "ddxProcessArgument - screen - Found ``X Y'' arg\n");
-+          iArgsProcessed = 6;
-+          g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
-+          g_ScreenInfo[nScreenNum].dwInitialX = iX;
-+          g_ScreenInfo[nScreenNum].dwInitialY = iY;
-+        }
-       }
-       else
-       {
-@@ -399,12 +561,16 @@
-         /* Parameter is for all screens */
-         for (j = 0; j < MAXSCREENS; j++)
-           {
-+              if (!g_ScreenInfo[j].fMultiMonitorOverride)
-+                g_ScreenInfo[j].fMultipleMonitors = FALSE;
-             g_ScreenInfo[j].fFullScreen = TRUE;
-           }
-       }
-       else
-       {
-         /* Parameter is for a single screen */
-+          if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
-+            g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
-         g_ScreenInfo[g_iLastScreen].fFullScreen = TRUE;
-       }
-@@ -451,12 +617,16 @@
-         /* Parameter is for all screens */
-         for (j = 0; j < MAXSCREENS; j++)
-           {
-+              if (!g_ScreenInfo[j].fMultiMonitorOverride)
-+                g_ScreenInfo[j].fMultipleMonitors = FALSE;
-             g_ScreenInfo[j].fDecoration = FALSE;
-           }
-       }
-       else
-       {
-         /* Parameter is for a single screen */
-+          if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
-+            g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
-         g_ScreenInfo[g_iLastScreen].fDecoration = FALSE;
-       }
-@@ -478,12 +648,16 @@
-         /* Parameter is for all screens */
-         for (j = 0; j < MAXSCREENS; j++)
-           {
-+              if (!g_ScreenInfo[j].fMultiMonitorOverride)
-+                g_ScreenInfo[j].fMultipleMonitors = TRUE;
-             g_ScreenInfo[j].fMWExtWM = TRUE;
-           }
-       }
-       else
-       {
-         /* Parameter is for a single screen */
-+          if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
-+            g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
-         g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE;
-       }
-@@ -505,12 +679,16 @@
-         /* Parameter is for all screens */
-         for (j = 0; j < MAXSCREENS; j++)
-           {
-+              if (!g_ScreenInfo[j].fMultiMonitorOverride)
-+                g_ScreenInfo[j].fMultipleMonitors = FALSE;
-             g_ScreenInfo[j].fRootless = TRUE;
-           }
-       }
-       else
-       {
-         /* Parameter is for a single screen */
-+          if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
-+            g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
-         g_ScreenInfo[g_iLastScreen].fRootless = TRUE;
-       }
-@@ -532,12 +710,16 @@
-         /* Parameter is for all screens */
-         for (j = 0; j < MAXSCREENS; j++)
-           {
-+              if (!g_ScreenInfo[j].fMultiMonitorOverride)
-+                g_ScreenInfo[j].fMultipleMonitors = TRUE;
-             g_ScreenInfo[j].fMultiWindow = TRUE;
-           }
-       }
-       else
-       {
-         /* Parameter is for a single screen */
-+          if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride)
-+            g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
-         g_ScreenInfo[g_iLastScreen].fMultiWindow = TRUE;
-       }
-@@ -560,12 +742,14 @@
-         /* Parameter is for all screens */
-         for (j = 0; j < MAXSCREENS; j++)
-           {
-+              g_ScreenInfo[j].fMultiMonitorOverride = TRUE;
-             g_ScreenInfo[j].fMultipleMonitors = TRUE;
-           }
-       }
-       else
-       {
-         /* Parameter is for a single screen */
-+          g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE;
-         g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE;
-       }
-@@ -574,6 +758,36 @@
-     }
-   /*
-+   * Look for the '-nomultiplemonitors' argument
-+   */
-+  if (IS_OPTION ("-nomultiplemonitors")
-+      || IS_OPTION ("-nomultimonitors"))
-+    {
-+      /* Is this parameter attached to a screen or is it global? */
-+      if (-1 == g_iLastScreen)
-+      {
-+        int                   j;
-+
-+        /* Parameter is for all screens */
-+        for (j = 0; j < MAXSCREENS; j++)
-+          {
-+              g_ScreenInfo[j].fMultiMonitorOverride = TRUE;
-+            g_ScreenInfo[j].fMultipleMonitors = FALSE;
-+          }
-+      }
-+      else
-+      {
-+        /* Parameter is for a single screen */
-+          g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE;
-+        g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE;
-+      }
-+
-+      /* Indicate that we have processed this argument */
-+      return 1;
-+    }
-+
-+
-+  /*
-    * Look for the '-scrollbars' argument
-    */
-   if (IS_OPTION ("-scrollbars"))
-@@ -1254,3 +1468,24 @@
-   ErrorF ("Release: %s\n\n", VERSION_STRING);
-   ErrorF ("Contact: %s\n\n", VENDOR_CONTACT);
- }
-+
-+/*
-+ * getMonitorInfo - callback function used to return information from the enumeration of monitors attached
-+ */
-+
-+BOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) 
-+{
-+  struct GetMonitorInfoData* data = (struct GetMonitorInfoData*)_data;
-+  // only get data for monitor number specified in <data>
-+  data->monitorNum++;
-+  if (data->monitorNum == data->requestedMonitor) 
-+  {
-+      data->bMonitorSpecifiedExists = TRUE;
-+      data->monitorOffsetX = rect->left;
-+      data->monitorOffsetY = rect->top;
-+      data->monitorHeight  = rect->bottom - rect->top;
-+      data->monitorWidth   = rect->right  - rect->left;
-+    return FALSE;
-+  }
-+  return TRUE;
-+}
-Index: programs/Xserver/hw/xwin/winresource.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winresource.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/hw/xwin/winresource.h     21 Jun 2004 13:19:32 -0000      1.2
-+++ programs/Xserver/hw/xwin/winresource.h     15 Dec 2004 19:22:53 -0000      1.2.4.1
-@@ -48,6 +48,7 @@
- #define ID_APP_HIDE_ROOT      201
- #define ID_APP_ALWAYS_ON_TOP  202
- #define ID_APP_ABOUT          203
-+#define ID_APP_SHOWCURSOR             204
- #define ID_ABOUT_UG           300
- #define ID_ABOUT_FAQ          301
-Index: programs/Xserver/hw/xwin/winshadddnl.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winshadddnl.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/winshadddnl.c     21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/winshadddnl.c     15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -141,11 +141,21 @@
-                                      &ddsd,
-                                      &pScreenPriv->pddsPrimary4,
-                                      NULL);
-+  pScreenPriv->fRetryCreateSurface = FALSE;
-   if (FAILED (ddrval))
-     {
--      ErrorF ("winCreatePrimarySurfaceShadowDDNL - Could not create primary "
--            "surface: %08x\n",
--            (unsigned int) ddrval);
-+      if (ddrval == DDERR_NOEXCLUSIVEMODE)
-+        {
-+          /* Recreating the surface failed. Mark screen to retry later */ 
-+          pScreenPriv->fRetryCreateSurface = TRUE;
-+          winDebug ("winCreatePrimarySurfaceShadowDDNL - Could not create "
-+                "primary surface: DDERR_NOEXCLUSIVEMODE\n");
-+        }
-+      else
-+        {
-+          ErrorF ("winCreatePrimarySurfaceShadowDDNL - Could not create "
-+                "primary surface: %08x\n", (unsigned int) ddrval);
-+        }
-       return FALSE;
-     }
-   
-@@ -1055,6 +1065,17 @@
-   Bool                        fReturn = TRUE;
-   int                 i;
-+  /* Quite common case. The primary surface was lost (maybe because of depth
-+   * change). Try to create a new primary surface. Bail out if this fails */
-+  if (pScreenPriv->pddsPrimary4 == NULL && pScreenPriv->fRetryCreateSurface &&
-+      !winCreatePrimarySurfaceShadowDDNL(pScreen))
-+    {
-+      Sleep(100);
-+      return FALSE;
-+    }
-+  if (pScreenPriv->pddsPrimary4 == NULL)
-+    return FALSE;  
-+  
-   /* BeginPaint gives us an hdc that clips to the invalidated region */
-   hdcUpdate = BeginPaint (pScreenPriv->hwndScreen, &ps);
-   if (hdcUpdate == NULL)
-Index: programs/Xserver/hw/xwin/winwin32rootlesswndproc.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winwin32rootlesswndproc.c,v
-retrieving revision 1.3
-retrieving revision 1.3.2.1
-diff -u -u -r1.3 -r1.3.2.1
---- programs/Xserver/hw/xwin/winwin32rootlesswndproc.c 3 Aug 2004 10:12:25 -0000       1.3
-+++ programs/Xserver/hw/xwin/winwin32rootlesswndproc.c 15 Dec 2004 19:22:53 -0000      1.3.2.1
-@@ -652,6 +652,18 @@
-       ReleaseCapture ();
-       return winMouseButtonsHandle (pScreen, ButtonRelease, Button3, wParam);
-+    case WM_XBUTTONDBLCLK:
-+    case WM_XBUTTONDOWN:
-+      if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-+      break;
-+      SetCapture (hwnd);
-+      return winMouseButtonsHandle (pScreen, ButtonPress, HIWORD(wParam) + 5, wParam);
-+    case WM_XBUTTONUP:
-+      if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
-+      break;
-+      ReleaseCapture ();
-+      return winMouseButtonsHandle (pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam);
-+
-     case WM_MOUSEWHEEL:
- #if CYGMULTIWINDOW_DEBUG
-       winDebug ("winMWExtWMWindowProc - WM_MOUSEWHEEL\n");
-Index: programs/Xserver/hw/xwin/winwndproc.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winwndproc.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/hw/xwin/winwndproc.c      21 Jun 2004 13:19:32 -0000      1.3
-+++ programs/Xserver/hw/xwin/winwndproc.c      15 Dec 2004 19:22:53 -0000      1.3.4.1
-@@ -873,6 +873,28 @@
-       ReleaseCapture ();
-       return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button3, wParam);
-+    case WM_XBUTTONDBLCLK:
-+    case WM_XBUTTONDOWN:
-+      if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
-+      break;
-+      if (s_pScreenInfo->fRootless
-+#ifdef XWIN_MULTIWINDOWEXTWM
-+        || s_pScreenInfo->fMWExtWM
-+#endif
-+        )
-+      SetCapture (hwnd);
-+      return winMouseButtonsHandle (s_pScreen, ButtonPress, HIWORD(wParam) + 5, wParam);
-+    case WM_XBUTTONUP:
-+      if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
-+      break;
-+      if (s_pScreenInfo->fRootless
-+#ifdef XWIN_MULTIWINDOWEXTWM
-+        || s_pScreenInfo->fMWExtWM
-+#endif
-+        )
-+      ReleaseCapture ();
-+      return winMouseButtonsHandle (s_pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam);
-+
-     case WM_TIMER:
-       if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
-       break;
-@@ -1139,6 +1161,9 @@
-         /* Display Exit dialog */
-         winDisplayExitDialog (s_pScreenPriv);
-         return 0;
-+    case ID_APP_SHOWCURSOR:
-+      winDebug("ShowCursor: %d\n", ShowCursor(TRUE));
-+      return 0;
- #ifdef XWIN_MULTIWINDOW
-       case ID_APP_HIDE_ROOT:
-Index: programs/Xserver/include/globals.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/include/globals.h,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/include/globals.h 31 Jul 2004 09:14:06 -0000      1.4
-+++ programs/Xserver/include/globals.h 8 Dec 2004 05:28:11 -0000       1.4.2.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/include/globals.h,v 1.4 2004/07/31 09:14:06 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/include/globals.h,v 1.4.2.1 2004/12/08 05:28:11 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/include/globals.h,v 1.3 1999/09/25 14:38:21 dawes Exp $ */
- #ifndef _XSERV_GLOBAL_H_
-@@ -42,23 +42,163 @@
- #endif
- #ifdef PANORAMIX
--extern Bool noPanoramiXExtension;
- extern Bool PanoramiXMapped;
- extern Bool PanoramiXVisibilityNotifySent;
- extern Bool PanoramiXWindowExposureSent;
- extern Bool PanoramiXOneExposeRequest;
- #endif
-+#ifdef BEZIER
-+extern Bool noBezierExtension;
-+#endif
-+
-+#ifdef BIGREQS
-+extern Bool noBigReqExtension;
-+#endif
-+
-+#ifdef COMPOSITE
-+extern Bool noCompositeExtension;
-+#endif
-+
-+#ifdef DAMAGE
-+extern Bool noDamageExtension;
-+#endif
-+
-+#ifdef DBE
-+extern Bool noDbeExtension;
-+#endif
-+
-+#ifdef DPSEXT
-+extern Bool noDPSExtension;
-+#endif
-+
-+#ifdef DPMSExtension
-+extern Bool noDPMSExtension;
-+#endif
-+
-+#ifdef EVI
-+extern Bool noEVIExtension;
-+#endif
-+
-+#ifdef FONTCACHE
-+extern Bool noFontCacheExtension;
-+#endif
-+
-+#ifdef GLXEXT
-+extern Bool noGlxExtension;
-+#endif
-+
-+#ifdef LBX
-+extern Bool noLbxExtension;
-+#endif
-+
-+#ifdef SCREENSAVER
-+extern Bool noScreenSaverExtension;
-+#endif
-+
-+#ifdef MITSHM
-+extern Bool noMITShmExtension;
-+#endif
-+
-+#ifdef MITMISC
-+extern Bool noMITMiscExtension;
-+#endif
-+
-+#ifdef MULTIBUFFER
-+extern Bool noMultibufferExtension;
-+#endif
-+
-+#ifdef RANDR
-+extern Bool noRRExtension;
-+#endif
-+
- #ifdef RENDER
- extern Bool noRenderExtension;
- #endif
-+#ifdef SHAPE
-+extern Bool noShapeExtension;
-+#endif
-+
-+#ifdef XCSECURITY
-+extern Bool noSecurityExtension;
-+#endif
-+
-+#ifdef XSYNC
-+extern Bool noSyncExtension;
-+#endif
-+
-+#ifdef TOGCUP
-+extern Bool noXcupExtension;
-+#endif
-+
-+#ifdef PEXEXT
-+extern Bool noPexExtension;
-+#endif
-+
-+#ifdef RES
-+extern Bool noResExtension;
-+#endif
-+
-+#ifdef XAPPGROUP
-+extern Bool noXagExtension;
-+#endif
-+
-+#ifdef XCMISC
-+extern Bool noXCMiscExtension;
-+#endif
-+
- #ifdef XEVIE
- extern Bool noXevieExtension;
- #endif
--#ifdef COMPOSITE
--extern Bool noCompositeExtension;
-+#ifdef XIE
-+extern Bool noXie;
-+#endif
-+
-+#ifdef XF86BIGFONT
-+extern Bool noXFree86BigfontExtension;
-+#endif
-+
-+#ifdef XFreeXDGA
-+extern Bool noXFree86DGAExtension;
-+#endif
-+
-+#ifdef XF86DRI
-+extern Bool noXFree86DRIExtension;
-+#endif
-+
-+#ifdef XF86MISC
-+extern Bool noXFree86MiscExtension;
-+#endif
-+
-+#ifdef XF86VIDMODE
-+extern Bool noXFree86VidModeExtension;
-+#endif
-+
-+#ifdef XFIXES
-+extern Bool noXFixesExtension;
-+#endif
-+
-+#ifdef XKB
-+/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
-+extern Bool noXkbExtension;
-+#endif
-+
-+#ifdef PANORAMIX
-+extern Bool noPanoramiXExtension;
-+#endif
-+
-+#ifdef XINPUT
-+extern Bool noXInputExtension;
-+#endif
-+
-+#ifdef XIDLE
-+extern Bool noXIdleExtension;
-+#endif
-+
-+#ifdef XV
-+extern Bool noXvExtension;
- #endif
--#endif /* _XSERV_GLOBAL_H_ */
-+#endif /* !_XSERV_GLOBAL_H_ */
-Index: programs/Xserver/mi/micmap.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/mi/micmap.c,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/Xserver/mi/micmap.c       30 Jun 2004 20:06:56 -0000      1.3
-+++ programs/Xserver/mi/micmap.c       17 Dec 2004 00:38:22 -0000      1.3.4.1
-@@ -55,10 +55,11 @@
- int
- miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
- {
--    /* By the time we are processing requests, we can guarantee that there
--     * is always a colormap installed */
--    *pmaps = miInstalledMaps[pScreen->myNum]->mid;
--    return (1);
-+    if (miInstalledMaps[pScreen->myNum]) {
-+      *pmaps = miInstalledMaps[pScreen->myNum]->mid;
-+      return (1);
-+    }
-+    return 0;
- }
- void
-Index: programs/Xserver/mi/miinitext.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v
-retrieving revision 1.12
-retrieving revision 1.12.2.3
-diff -u -u -r1.12 -r1.12.2.3
---- programs/Xserver/mi/miinitext.c    12 Aug 2004 08:45:33 -0000      1.12
-+++ programs/Xserver/mi/miinitext.c    13 Dec 2004 05:48:41 -0000      1.12.2.3
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.12 2004/08/12 08:45:33 anholt Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.12.2.3 2004/12/13 05:48:41 gisburn Exp $ */
- /* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.67 2003/01/12 02:44:27 dawes Exp $ */
- /***********************************************************
-@@ -74,7 +74,6 @@
- #undef SCREENSAVER
- #undef XIDLE
- #undef XRECORD
--#undef DBE
- #undef XF86VIDMODE
- #undef XF86MISC
- #undef XFreeXDGA
-@@ -88,21 +87,123 @@
- #undef XEVIE
- #endif /* PRINT_ONLY_SERVER */
--#ifdef PANORAMIX
--extern Bool noPanoramiXExtension;
--#endif
-+
- extern Bool noTestExtensions;
--#ifdef XKB
--extern Bool noXkbExtension;
-+
-+#ifdef BEZIER
-+extern Bool noBezierExtension;
-+#endif
-+#ifdef BIGREQS
-+extern Bool noBigReqExtension;
-+#endif
-+#ifdef COMPOSITE
-+extern Bool noCompositeExtension;
-+#endif
-+#ifdef DAMAGE
-+extern Bool noDamageExtension;
-+#endif
-+#ifdef DBE
-+extern Bool noDbeExtension;
-+#endif
-+#ifdef DPSEXT
-+extern Bool noDPSExtension;
-+#endif
-+#ifdef DPMSExtension
-+extern Bool noDPMSExtension;
-+#endif
-+#ifdef EVI
-+extern Bool noEVIExtension;
-+#endif
-+#ifdef FONTCACHE
-+extern Bool noFontCacheExtension;
-+#endif
-+#ifdef GLXEXT
-+extern Bool noGlxExtension;
-+#endif
-+#ifdef LBX
-+extern Bool noLbxExtension;
-+#endif
-+#ifdef SCREENSAVER
-+extern Bool noScreenSaverExtension;
-+#endif
-+#ifdef MITSHM
-+extern Bool noMITShmExtension;
-+#endif
-+#ifdef MITMISC
-+extern Bool noMITMiscExtension;
-+#endif
-+#ifdef MULTIBUFFER
-+extern Bool noMultibufferExtension;
-+#endif
-+#ifdef RANDR
-+extern Bool noRRExtension;
- #endif
- #ifdef RENDER
- extern Bool noRenderExtension;
- #endif
-+#ifdef SHAPE
-+extern Bool noShapeExtension;
-+#endif
-+#ifdef XCSECURITY
-+extern Bool noSecurityExtension;
-+#endif
-+#ifdef XSYNC
-+extern Bool noSyncExtension;
-+#endif
-+#ifdef TOGCUP
-+extern Bool noXcupExtension;
-+#endif
-+#ifdef PEXEXT
-+extern Bool noPexExtension;
-+#endif
-+#ifdef RES
-+extern Bool noResExtension;
-+#endif
-+#ifdef XAPPGROUP
-+extern Bool noXagExtension;
-+#endif
-+#ifdef XCMISC
-+extern Bool noXCMiscExtension;
-+#endif
- #ifdef XEVIE
- extern Bool noXevieExtension;
- #endif
--#ifdef COMPOSITE
--extern Bool noCompositeExtension;
-+#ifdef XIE
-+extern Bool noXie;
-+#endif
-+#ifdef XF86BIGFONT
-+extern Bool noXFree86BigfontExtension;
-+#endif
-+#ifdef XFreeXDGA
-+extern Bool noXFree86DGAExtension;
-+#endif
-+#ifdef XF86DRI
-+extern Bool noXFree86DRIExtension;
-+#endif
-+#ifdef XF86MISC
-+extern Bool noXFree86MiscExtension;
-+#endif
-+#ifdef XF86VIDMODE
-+extern Bool noXFree86VidModeExtension;
-+#endif
-+#ifdef XFIXES
-+extern Bool noXFixesExtension;
-+#endif
-+#ifdef XKB
-+/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
-+extern Bool noXkbExtension;
-+#endif
-+#ifdef PANORAMIX
-+extern Bool noPanoramiXExtension;
-+#endif
-+#ifdef XINPUT
-+extern Bool noXInputExtension;
-+#endif
-+#ifdef XIDLE
-+extern Bool noXIdleExtension;
-+#endif
-+#ifdef XV
-+extern Bool noXvExtension;
- #endif
- #ifndef XFree86LOADER
-@@ -299,21 +400,118 @@
- static ExtensionToggle ExtensionToggleList[] =
- {
--    { "XTEST", &noTestExtensions },
--#ifdef PANORAMIX
--    { "XINERAMA", &noPanoramiXExtension },
-+    /* sort order is extension name string as shown in xdpyinfo */
-+#ifdef BEZIER
-+    { "BEZIER", &noBezierExtension },
-+#endif
-+#ifdef BIGREQS
-+    { "BIG-REQUESTS", &noBigReqExtension },
-+#endif
-+#ifdef COMPOSITE
-+    { "Composite", &noCompositeExtension },
-+#endif
-+#ifdef DAMAGE
-+    { "DAMAGE", &noDamageExtension },
-+#endif
-+#ifdef DBE
-+    { "DOUBLE-BUFFER", &noDbeExtension },
-+#endif
-+#ifdef DPSEXT
-+    { "DPSExtension", &noDPSExtension },
-+#endif
-+#ifdef DPMSExtension
-+    { "DPMS", &noDPMSExtension },
-+#endif
-+#ifdef EVI
-+    { "Extended-Visual-Information", &noEVIExtension },
-+#endif
-+#ifdef FONTCACHE
-+    { "FontCache", &noFontCacheExtension },
-+#endif
-+#ifdef GLXEXT
-+    { "GLX", &noGlxExtension },
-+#endif
-+#ifdef LBX
-+    { "LBX", &noLbxExtension },
-+#endif
-+#ifdef SCREENSAVER
-+    { "MIT-SCREEN-SAVER", &noScreenSaverExtension },
-+#endif
-+#ifdef MITSHM
-+    { SHMNAME, &noMITShmExtension },
-+#endif
-+#ifdef MITMISC
-+    { "MIT-SUNDRY-NONSTANDARD", &noMITMiscExtension },
-+#endif
-+#ifdef MULTIBUFFER
-+    { "Multi-Buffering", &noMultibufferExtension },
-+#endif
-+#ifdef RANDR
-+    { "RANDR", &noRRExtension },
- #endif
- #ifdef RENDER
-     { "RENDER", &noRenderExtension },
- #endif
--#ifdef XKB
--    { "XKEYBOARD", &noXkbExtension },
-+#ifdef SHAPE
-+    { "SHAPE", &noShapeExtension },
-+#endif
-+#ifdef XCSECURITY
-+    { "SECURITY", &noSecurityExtension },
-+#endif
-+#ifdef XSYNC
-+    { "SYNC", &noSyncExtension },
-+#endif
-+#ifdef TOGCUP
-+    { "TOG-CUP", &noXcupExtension },
-+#endif
-+#ifdef PEXEXT
-+    { "X3D-PEX", &noPexExtension },
-+#endif
-+#ifdef RES
-+    { "X-Resource", &noResExtension },
-+#endif
-+#ifdef XAPPGROUP
-+    { "XC-APPGROUP", &noXagExtension },
-+#endif
-+#ifdef XCMISC
-+    { "XC-MISC", &noXCMiscExtension },
- #endif
- #ifdef XEVIE
-     { "XEVIE", &noXevieExtension },
- #endif
--#ifdef COMPOSITE
--    { "Composite", &noCompositeExtension },
-+#ifdef XF86BIGFONT
-+    { "XFree86-Bigfont", &noXFree86BigfontExtension },
-+#endif
-+#ifdef XFreeXDGA
-+    { "XFree86-DGA", &noXFree86DGAExtension },
-+#endif
-+#ifdef XF86DRI
-+    { "XFree86-DRI", &noXFree86DRIExtension },
-+#endif
-+#ifdef XF86MISC
-+    { "XFree86-Misc", &noXFree86MiscExtension },
-+#endif
-+#ifdef XF86VIDMODE
-+    { "XFree86-VidModeExtension", &noXFree86VidModeExtension },
-+#endif
-+#ifdef XFIXES
-+    { "XFIXES", &noXFixesExtension },
-+#endif
-+#ifdef XIE
-+    { "XIE", &noXie },
-+#endif
-+#ifdef PANORAMIX
-+    { "XINERAMA", &noPanoramiXExtension },
-+#endif
-+#ifdef XINPUT
-+    { "XInputExtension", &noXInputExtension },
-+#endif
-+#ifdef XKB
-+    { "XKEYBOARD", &noXkbExtension },
-+#endif
-+    { "XTEST", &noTestExtensions },
-+#ifdef XV
-+    { "XVideo", &noXvExtension },
- #endif
-     { NULL, NULL }
- };
-@@ -357,134 +555,136 @@
- # endif
- #endif
- #ifdef BEZIER
--    BezierExtensionInit();
-+    if (!noBezierExtension) BezierExtensionInit();
- #endif
- #ifdef XTESTEXT1
-     if (!noTestExtensions) XTestExtension1Init();
- #endif
- #ifdef SHAPE
--    ShapeExtensionInit();
-+    if (!noShapeExtension) ShapeExtensionInit();
- #endif
- #ifdef MITSHM
--    ShmExtensionInit();
-+    if (!noMITShmExtension) ShmExtensionInit();
- #endif
- #ifdef EVI
--    EVIExtensionInit();
-+    if (!noEVIExtension) EVIExtensionInit();
- #endif
- #ifdef PEXEXT
--    PexExtensionInit();
-+    if (!noPexExtension) PexExtensionInit();
- #endif
- #ifdef MULTIBUFFER
--    MultibufferExtensionInit();
-+    if (!noMultibufferExtension) MultibufferExtensionInit();
- #endif
- #if defined(XINPUT) && !defined(NO_HW_ONLY_EXTS)
--    XInputExtensionInit();
-+    if (!noXInputExtension) XInputExtensionInit();
- #endif
- #ifdef XTEST
-     if (!noTestExtensions) XTestExtensionInit();
- #endif
- #ifdef BIGREQS
--    BigReqExtensionInit();
-+    if (!noBigReqExtension) BigReqExtensionInit();
- #endif
- #ifdef MITMISC
--    MITMiscExtensionInit();
-+    if (!noMITMiscExtension) MITMiscExtensionInit();
- #endif
- #ifdef XIDLE
--    XIdleExtensionInit();
-+    if (!noXIdleExtension) XIdleExtensionInit();
- #endif
- #ifdef XTRAP
-     if (!noTestExtensions) DEC_XTRAPInit();
- #endif
- #if defined(SCREENSAVER) && !defined(PRINT_ONLY_SERVER)
--    ScreenSaverExtensionInit ();
-+    if (!noScreenSaverExtension) ScreenSaverExtensionInit ();
- #endif
- #ifdef XV
--    XvExtensionInit();
--    XvMCExtensionInit();
-+    if (!noXvExtension) {
-+      XvExtensionInit();
-+      XvMCExtensionInit();
-+    }
- #endif
- #ifdef XIE
--    XieInit();
-+    if (!noXie) XieInit();
- #endif
- #ifdef XSYNC
--    SyncExtensionInit();
-+    if (!noSyncExtension) SyncExtensionInit();
- #endif
- #if defined(XKB) && !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS)
-     if (!noXkbExtension) XkbExtensionInit();
- #endif
- #ifdef XCMISC
--    XCMiscExtensionInit();
-+    if (!noXCMiscExtension) XCMiscExtensionInit();
- #endif
- #ifdef XRECORD
-     if (!noTestExtensions) RecordExtensionInit(); 
- #endif
- #ifdef LBX
--    LbxExtensionInit();
-+    if (!noLbxExtension) LbxExtensionInit();
- #endif
- #ifdef DBE
--    DbeExtensionInit();
-+    if (!noDbeExtension) DbeExtensionInit();
- #endif
- #ifdef XAPPGROUP
--    XagExtensionInit();
-+    if (!noXagExtension) XagExtensionInit();
- #endif
- #ifdef XCSECURITY
--    SecurityExtensionInit();
-+    if (!noSecurityExtension) SecurityExtensionInit();
- #endif
- #ifdef XPRINT
--    XpExtensionInit();
-+    XpExtensionInit(); /* server-specific extension, cannot be disabled */
- #endif
- #ifdef TOGCUP
--    XcupExtensionInit();
-+    if (!noXcupExtension) XcupExtensionInit();
- #endif
- #if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS)
--    DPMSExtensionInit();
-+    if (!noDPMSExtension) DPMSExtensionInit();
- #endif
- #ifdef FONTCACHE
--    FontCacheExtensionInit();
-+    if (!noFontCacheExtension) FontCacheExtensionInit();
- #endif
- #ifdef XF86BIGFONT
--    XFree86BigfontExtensionInit();
-+    if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
- #endif
- #if !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS)
- #if defined(XF86VIDMODE)
--    XFree86VidModeExtensionInit();
-+    if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit();
- #endif
- #if defined(XF86MISC)
--    XFree86MiscExtensionInit();
-+    if (!noXFree86MiscExtension) XFree86MiscExtensionInit();
- #endif
- #if defined(XFreeXDGA)
--    XFree86DGAExtensionInit();
-+    if (!noXFree86DGAExtension) XFree86DGAExtensionInit();
- #endif
- #ifdef XF86DRI
--    XFree86DRIExtensionInit();
-+    if (!noXFree86DRIExtension) XFree86DRIExtensionInit();
- #endif
- #endif
- #ifdef GLXEXT
- #ifndef __DARWIN__
--    GlxExtensionInit();
-+    if (!noGlxExtension) GlxExtensionInit();
- #else
--    DarwinGlxExtensionInit();
-+    if (!noGlxExtension) DarwinGlxExtensionInit();
- #endif
- #endif
- #ifdef DPSEXT
- #ifndef XPRINT
--    DPSExtensionInit();
-+    if (!noDPSExtension) DPSExtensionInit();
- #endif
- #endif
- #ifdef XFIXES
-     /* must be before Render to layer DisplayCursor correctly */
--    XFixesExtensionInit();
-+    if (!noXFixesExtension) XFixesExtensionInit();
- #endif
- #ifdef RENDER
-     if (!noRenderExtension) RenderExtensionInit();
- #endif
- #ifdef RANDR
--    RRExtensionInit();
-+    if (!noRRExtension) RRExtensionInit();
- #endif
- #ifdef RES
--    ResExtensionInit();
-+    if (!noResExtension) ResExtensionInit();
- #endif
- #ifdef DMXEXT
--    DMXExtensionInit();
-+    DMXExtensionInit(); /* server-specific extension, cannot be disabled */
- #endif
- #ifdef XEVIE
-     if (!noXevieExtension) XevieExtensionInit();
-@@ -493,7 +693,7 @@
-     if (!noCompositeExtension) CompositeExtensionInit();
- #endif
- #ifdef DAMAGE
--    DamageExtensionInit();
-+    if (!noDamageExtension) DamageExtensionInit();
- #endif
- }
-@@ -511,96 +711,37 @@
- }
- #else /* XFree86LOADER */
--#if 0
--/* FIXME:The names here must come from the headers. those with ?? are 
--   not included in X11R6.3 sample implementation, so there's a problem... */
--/* XXX use the correct #ifdefs for symbols not present when an extension
--   is disabled */
--ExtensionModule extension[] =
--{
--    { NULL, "BEZIER", NULL, NULL },   /* ?? */
--    { NULL, "XTEST1", &noTestExtensions, NULL }, /* ?? */
--    { NULL, "SHAPE", NULL, NULL },
--    { NULL, "MIT-SHM", NULL, NULL },
--    { NULL, "X3D-PEX", NULL, NULL },
--    { NULL, "Multi-Buffering", NULL, NULL },
--    { NULL, "XInputExtension", NULL, NULL },
--    { NULL, "XTEST", &noTestExtensions, NULL },
--    { NULL, "BIG-REQUESTS", NULL, NULL },
--    { NULL, "MIT-SUNDRY-NONSTANDARD", NULL, NULL },
--    { NULL, "XIDLE", NULL, NULL },    /* ?? */
--    { NULL, "XTRAP", &noTestExtensions, NULL }, /* ?? */
--    { NULL, "MIT-SCREEN-SAVER", NULL, NULL },
--    { NULL, "XVideo", NULL, NULL },   /* ?? */
--    { NULL, "XIE", NULL, NULL },
--    { NULL, "SYNC", NULL, NULL },
--#ifdef XKB
--    { NULL, "XKEYBOARD", &noXkbExtension, NULL },
--#else
--    { NULL, "NOXKEYBOARD", NULL, NULL },
--#endif
--    { NULL, "XC-MISC", NULL, NULL },
--    { NULL, "RECORD", &noTestExtensions, NULL },
--    { NULL, "LBX", NULL, NULL },
--    { NULL, "DOUBLE-BUFFER", NULL, NULL },
--    { NULL, "XC-APPGROUP", NULL, NULL },
--    { NULL, "SECURITY", NULL, NULL },
--    { NULL, "XpExtension", NULL, NULL },
--    { NULL, "XFree86-VidModeExtension", NULL, NULL },
--    { NULL, "XFree86-Misc", NULL, NULL },
--    { NULL, "XFree86-DGA", NULL, NULL },
--    { NULL, "DPMS", NULL, NULL },
--    { NULL, "GLX", NULL, NULL },
--    { NULL, "TOG-CUP", NULL, NULL },
--    { NULL, "Extended-Visual-Information", NULL, NULL },
--#ifdef PANORAMIX
--    { NULL, "XINERAMA", &noPanoramiXExtension, NULL },
--#else
--    { NULL, "NOXINERAMA", NULL, NULL },
--#endif
--    { NULL, "XFree86-Bigfont", NULL, NULL },
--    { NULL, "XFree86-DRI", NULL, NULL },
--    { NULL, "Adobe-DPS-Extension", NULL, NULL },
--    { NULL, "FontCache", NULL, NULL },
--    { NULL, "RENDER", NULL, NULL },
--    { NULL, "RANDR", NULL, NULL },
--    { NULL, "X-Resource", NULL, NULL },
--    { NULL, "DMX", NULL, NULL },
--    { NULL, NULL, NULL, NULL }
--};
--#endif
--
- /* List of built-in (statically linked) extensions */
- static ExtensionModule staticExtensions[] = {
- #ifdef BEZIER
--    { BezierExtensionInit, "BEZIER", NULL, NULL, NULL },
-+    { BezierExtensionInit, "BEZIER", &noBezierExtension, NULL, NULL },
- #endif
- #ifdef XTESTEXT1
-     { XTestExtension1Init, "XTEST1", &noTestExtensions, NULL, NULL },
- #endif
- #ifdef MITSHM
--    { ShmExtensionInit, SHMNAME, NULL, NULL, NULL },
-+    { ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL },
- #endif
- #ifdef XINPUT
--    { XInputExtensionInit, "XInputExtension", NULL, NULL, NULL },
-+    { XInputExtensionInit, "XInputExtension", &noXInputExtension, NULL, NULL },
- #endif
- #ifdef XTEST
-     { XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
- #endif
- #ifdef XIDLE
--    { XIdleExtensionInit, "XIDLE", NULL, NULL, NULL },
-+    { XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
- #endif
- #ifdef XKB
-     { XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
- #endif
- #ifdef LBX
--    { LbxExtensionInit, LBXNAME, NULL, NULL, NULL },
-+    { LbxExtensionInit, LBXNAME, &noLbxExtension, NULL, NULL },
- #endif
- #ifdef XAPPGROUP
--    { XagExtensionInit, XAGNAME, NULL, NULL, NULL },
-+    { XagExtensionInit, XAGNAME, &noXagExtension, NULL, NULL },
- #endif
- #ifdef XCSECURITY
--    { SecurityExtensionInit, SECURITY_EXTENSION_NAME, NULL, NULL, NULL },
-+    { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
- #endif
- #ifdef XPRINT
-     { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
-@@ -610,22 +751,22 @@
- #endif
- #ifdef XFIXES
-     /* must be before Render to layer DisplayCursor correctly */
--    { XFixesExtensionInit, "XFIXES", NULL, NULL, NULL },
-+    { XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL, NULL },
- #endif
- #ifdef XF86BIGFONT
--    { XFree86BigfontExtensionInit, XF86BIGFONTNAME, NULL, NULL, NULL },
-+    { XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension, NULL, NULL },
- #endif
- #ifdef RENDER
-     { RenderExtensionInit, "RENDER", &noRenderExtension, NULL, NULL },
- #endif
- #ifdef RANDR
--    { RRExtensionInit, "RANDR", NULL, NULL, NULL },
-+    { RRExtensionInit, "RANDR", &noRRExtension, NULL, NULL },
- #endif
- #ifdef COMPOSITE
-     { CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL },
- #endif
- #ifdef DAMAGE
--    { DamageExtensionInit, "DAMAGE", NULL, NULL },
-+    { DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL },
- #endif
- #ifdef XEVIE
-     { XevieExtensionInit, "XEVIE", &noXevieExtension, NULL },
-Index: programs/Xserver/miext/damage/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/miext/damage/Imakefile,v
-retrieving revision 1.4
-retrieving revision 1.4.2.1
-diff -u -u -r1.4 -r1.4.2.1
---- programs/Xserver/miext/damage/Imakefile    2 Sep 2004 04:04:47 -0000       1.4
-+++ programs/Xserver/miext/damage/Imakefile    15 Dec 2004 04:53:06 -0000      1.4.2.1
-@@ -8,8 +8,7 @@
- #endif
- #endif
--#if (defined(XWinServer) && XWinServer && BuildXWinMultiWindowExtWM) || \
--    (defined(XDarwinServer) && XDarwinServer && DarwinQuartzSupport)
-+#if BuildRootless
- DEFINES = -DROOTLESS_WORKAROUND
- #endif
-Index: programs/Xserver/miext/damage/damage.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/miext/damage/damage.c,v
-retrieving revision 1.11
-retrieving revision 1.11.2.1
-diff -u -u -r1.11 -r1.11.2.1
---- programs/Xserver/miext/damage/damage.c     3 Sep 2004 16:18:23 -0000       1.11
-+++ programs/Xserver/miext/damage/damage.c     13 Dec 2004 00:56:07 -0000      1.11.2.1
-@@ -1349,7 +1349,7 @@
-     DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-     if (checkGCDamage (pDrawable, pGC))
--      damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
-+      x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars,
-                   Linear8Bit, TT_POLY8);
-     else
-       x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars);
-@@ -1368,7 +1368,7 @@
-     DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable);
-     if (checkGCDamage (pDrawable, pGC))
--      damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
-+      x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars,
-                   FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit,
-                   TT_POLY16);
-     else
-Index: programs/Xserver/os/WaitFor.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/os/WaitFor.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/Xserver/os/WaitFor.c      23 Apr 2004 19:54:28 -0000      1.2
-+++ programs/Xserver/os/WaitFor.c      13 Dec 2004 01:45:15 -0000      1.2.4.1
-@@ -663,17 +663,11 @@
-     if (!DPMSEnabled)
-         return;
--    if (DPMSStandbyTime > 0) {
--        DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime,
--                                    DPMSStandbyTimerExpire, NULL);
--    }
--    if (DPMSSuspendTime > 0) {
--        DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime,
--                                    DPMSSuspendTimerExpire, NULL);
--    }
--    if (DPMSOffTime > 0) {
--        DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime,
--                                DPMSOffTimerExpire, NULL);
--    }
-+    DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime,
-+                              DPMSStandbyTimerExpire, NULL);
-+    DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime,
-+                              DPMSSuspendTimerExpire, NULL);
-+    DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime,
-+                          DPMSOffTimerExpire, NULL);
- }
- #endif
-Index: programs/Xserver/os/utils.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/Xserver/os/utils.c,v
-retrieving revision 1.6
-retrieving revision 1.6.2.3
-diff -u -u -r1.6 -r1.6.2.3
---- programs/Xserver/os/utils.c        11 Aug 2004 22:27:50 -0000      1.6
-+++ programs/Xserver/os/utils.c        8 Dec 2004 06:34:31 -0000       1.6.2.3
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.6 2004/08/11 22:27:50 kem Exp $ */
-+/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.6.2.3 2004/12/08 06:34:31 gisburn Exp $ */
- /* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
- /*
-@@ -119,8 +119,126 @@
- #ifdef RENDER
- #include "picture.h"
-+#endif
-+
-+Bool noTestExtensions;
-+#ifdef BEZIER
-+Bool noBezierExtension = FALSE;
-+#endif
-+#ifdef BIGREQS
-+Bool noBigReqExtension = FALSE;
-+#endif
-+#ifdef COMPOSITE
-+/* COMPOSITE is disabled by default for now until the
-+ * interface is stable */
-+Bool noCompositeExtension = TRUE;
-+#endif
-+#ifdef DAMAGE
-+Bool noDamageExtension = FALSE;
-+#endif
-+#ifdef DBE
-+Bool noDbeExtension = FALSE;
-+#endif
-+#ifdef DPSEXT
-+Bool noDPSExtension = FALSE;
-+#endif
-+#ifdef DPMSExtension
-+Bool noDPMSExtension = FALSE;
-+#endif
-+#ifdef EVI
-+Bool noEVIExtension = FALSE;
-+#endif
-+#ifdef FONTCACHE
-+Bool noFontCacheExtension = FALSE;
-+#endif
-+#ifdef GLXEXT
-+Bool noGlxExtension = FALSE;
-+#endif
-+#ifdef LBX
-+Bool noLbxExtension = FALSE;
-+#endif
-+#ifdef SCREENSAVER
-+Bool noScreenSaverExtension = FALSE;
-+#endif
-+#ifdef MITSHM
-+Bool noMITShmExtension = FALSE;
-+#endif
-+#ifdef MITMISC
-+Bool noMITMiscExtension = FALSE;
-+#endif
-+#ifdef MULTIBUFFER
-+Bool noMultibufferExtension = FALSE;
-+#endif
-+#ifdef RANDR
-+Bool noRRExtension = FALSE;
-+#endif
-+#ifdef RENDER
- Bool noRenderExtension = FALSE;
- #endif
-+#ifdef SHAPE
-+Bool noShapeExtension = FALSE;
-+#endif
-+#ifdef XCSECURITY
-+Bool noSecurityExtension = FALSE;
-+#endif
-+#ifdef XSYNC
-+Bool noSyncExtension = FALSE;
-+#endif
-+#ifdef TOGCUP
-+Bool noXcupExtension = FALSE;
-+#endif
-+#ifdef PEXEXT
-+Bool noPexExtension = FALSE;
-+#endif
-+#ifdef RES
-+Bool noResExtension = FALSE;
-+#endif
-+#ifdef XAPPGROUP
-+Bool noXagExtension = FALSE;
-+#endif
-+#ifdef XCMISC
-+Bool noXCMiscExtension = FALSE;
-+#endif
-+#ifdef XEVIE
-+/* Xevie is disabled by default for now until the
-+ * interface is stable */
-+Bool noXevieExtension = TRUE;
-+#endif
-+#ifdef XIE
-+Bool noXie = FALSE;
-+#endif
-+#ifdef XF86BIGFONT
-+Bool noXFree86BigfontExtension = FALSE;
-+#endif
-+#ifdef XFreeXDGA
-+Bool noXFree86DGAExtension = FALSE;
-+#endif
-+#ifdef XF86DRI
-+Bool noXFree86DRIExtension = FALSE;
-+#endif
-+#ifdef XF86MISC
-+Bool noXFree86MiscExtension = FALSE;
-+#endif
-+#ifdef XF86VIDMODE
-+Bool noXFree86VidModeExtension = FALSE;
-+#endif
-+#ifdef XFIXES
-+Bool noXFixesExtension = FALSE;
-+#endif
-+/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
-+#ifdef PANORAMIX
-+/* Xinerama is disabled by default unless enabled via +xinerama */
-+Bool noPanoramiXExtension = TRUE;
-+#endif
-+#ifdef XINPUT
-+Bool noXInputExtension = FALSE;
-+#endif
-+#ifdef XIDLE
-+Bool noXIdleExtension = FALSE;
-+#endif
-+#ifdef XV
-+Bool noXvExtension = FALSE;
-+#endif
- #define X_INCLUDE_NETDB_H
- #include <X11/Xos_r.h>
-@@ -128,24 +246,14 @@
- #include <errno.h>
- Bool CoreDump;
--Bool noTestExtensions;
- #ifdef PANORAMIX
--Bool noPanoramiXExtension = TRUE;
- Bool PanoramiXVisibilityNotifySent = FALSE;
- Bool PanoramiXMapped = FALSE;
- Bool PanoramiXWindowExposureSent = FALSE;
- Bool PanoramiXOneExposeRequest = FALSE;
- #endif
--#ifdef XEVIE
--Bool noXevieExtension = TRUE;
--#endif
--
--#ifdef COMPOSITE
--Bool noCompositeExtension = TRUE;
--#endif
--
- int auditTrailLevel = 1;
- Bool Must_have_memory = FALSE;
-@@ -553,7 +661,7 @@
-     ErrorF("-v                     screen-saver without video blanking\n");
-     ErrorF("-wm                    WhenMapped default backing-store\n");
-     ErrorF("-x string              loads named extension at init time \n");
--    ErrorF("-maxbigreqsize       set maximal bigrequest size \n");
-+    ErrorF("-maxbigreqsize         set maximal bigrequest size \n");
- #ifdef PANORAMIX
-     ErrorF("+xinerama              Enable XINERAMA extension\n");
-     ErrorF("-xinerama              Disable XINERAMA extension\n");
-@@ -900,11 +1008,11 @@
-           defaultBackingStore = WhenMapped;
-         else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
-              if(++i < argc) {
--                 int reqSizeArg = atoi(argv[i]);
-+                 long reqSizeArg = atol(argv[i]);
-                  /* Request size > 128MB does not make much sense... */
--                 if( reqSizeArg > 0 && reqSizeArg < 128 ) {
--                     maxBigRequestSize = (reqSizeArg * 1048576) - 1;
-+                 if( reqSizeArg > 0L && reqSizeArg < 128L ) {
-+                     maxBigRequestSize = (reqSizeArg * 1048576L) - 1L;
-                  }
-                  else
-                  {
-Index: programs/mkfontscale/mkfontscale.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/mkfontscale/mkfontscale.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/mkfontscale/mkfontscale.c 23 Apr 2004 19:54:36 -0000      1.2
-+++ programs/mkfontscale/mkfontscale.c 13 Dec 2004 13:50:44 -0000      1.2.4.1
-@@ -19,7 +19,7 @@
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
- */
--/* $XdotOrg: xc/programs/mkfontscale/mkfontscale.c,v 1.2 2004/04/23 19:54:36 eich Exp $ */
-+/* $XdotOrg: xc/programs/mkfontscale/mkfontscale.c,v 1.2.4.1 2004/12/13 13:50:44 gisburn Exp $ */
- /* $XFree86: xc/programs/mkfontscale/mkfontscale.c,v 1.21 2003/12/10 02:58:07 dawes Exp $ */
- #include <stdio.h>
-@@ -63,7 +63,8 @@
- #endif
- char *encodings_array[] =
--    { "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
-+    { "ascii-0",
-+      "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
-       "iso8859-6", "iso8859-6.8", "iso8859-6.8x", "iso8859-6.16",
-       "iso8859-7", "iso8859-8", "iso8859-9", "iso8859-10",
-       "iso8859-11", "iso8859-12", "iso8859-13", "iso8859-14",
-Index: programs/xdm/resource.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xdm/resource.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xdm/resource.c    23 Apr 2004 19:54:42 -0000      1.2
-+++ programs/xdm/resource.c    15 Dec 2004 01:53:41 -0000      1.2.4.1
-@@ -1,4 +1,4 @@
--/* $XdotOrg: xc/programs/xdm/resource.c,v 1.2 2004/04/23 19:54:42 eich Exp $ */
-+/* $XdotOrg: xc/programs/xdm/resource.c,v 1.2.4.1 2004/12/15 01:53:41 gisburn Exp $ */
- /* $Xorg: resource.c,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $ */
- /*
-@@ -237,7 +237,7 @@
- #if !defined(ARC4_RANDOM)
- { "randomFile",       "RandomFile",   DM_STRING,      &randomFile,
-                               DEF_RANDOM_FILE} ,
--{ "prgndSocket", "PrngdSocket", DM_STRING,    &prngdSocket, 
-+{ "prngdSocket", "PrngdSocket", DM_STRING,    &prngdSocket, 
-                               DEF_PRNGD_SOCKET},
- { "prngdPort", "PrngdPort",   DM_INT,         (char **) &prngdPort,
-                               DEF_PRNGD_PORT},
-Index: programs/xedit/lisp/lisp.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xedit/lisp/lisp.c,v
-retrieving revision 1.5
-retrieving revision 1.5.2.1
-diff -u -u -r1.5 -r1.5.2.1
---- programs/xedit/lisp/lisp.c 2 Sep 2004 08:40:32 -0000       1.5
-+++ programs/xedit/lisp/lisp.c 15 Dec 2004 01:09:36 -0000      1.5.2.1
-@@ -46,7 +46,6 @@
- #endif
- #if defined(linux)
--#include <asm/page.h>  /* for PAGE_SIZE */
- #define HAS_GETPAGESIZE
- #define HAS_SC_PAGESIZE       /* _SC_PAGESIZE may be an enum for Linux */
- #endif
-Index: programs/xkbcomp/rules/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xkbcomp/rules/Imakefile,v
-retrieving revision 1.3
-retrieving revision 1.3.4.1
-diff -u -u -r1.3 -r1.3.4.1
---- programs/xkbcomp/rules/Imakefile   29 May 2004 19:33:22 -0000      1.3
-+++ programs/xkbcomp/rules/Imakefile   15 Dec 2004 02:54:52 -0000      1.3.4.1
-@@ -1,5 +1,5 @@
- XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:54:41 cpqbld Exp $
--XCOMM $XdotOrg: xc/programs/xkbcomp/rules/Imakefile,v 1.3 2004/05/29 19:33:22 alanc Exp $
-+XCOMM $XdotOrg: xc/programs/xkbcomp/rules/Imakefile,v 1.3.4.1 2004/12/15 02:54:52 gisburn Exp $
-     DATAFILES = README sgi xorg sun
-     LISTFILES = sgi.lst xorg.lst xorg-it.lst sun.lst xorg.xml
-@@ -10,4 +10,6 @@
- InstallMultiple($(LISTFILES),$(LIBDIR)/xkb/rules)
- InstallCreateLink($(LIBDIR)/xkb/rules,xorg,xfree86)
- InstallCreateLink($(LIBDIR)/xkb/rules,xorg.lst,xfree86.lst)
-+InstallCreateLink($(LIBDIR)/xkb/rules,xorg-it.lst,xfree86-it.lst)
-+InstallCreateLink($(LIBDIR)/xkb/rules,xorg.xml,xfree86.xml)
- DependTarget()
-Index: programs/xkbcomp/symbols/inet
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xkbcomp/symbols/inet,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xkbcomp/symbols/inet      23 Apr 2004 19:54:52 -0000      1.2
-+++ programs/xkbcomp/symbols/inet      15 Dec 2004 03:00:47 -0000      1.2.4.1
-@@ -16,7 +16,7 @@
- // setxkbmap 'my_kb_layout' -variant 'my_kb_variant' -model 'my_eak_type'
- // All keyboards listed here should be also mentioned in
--// xc/programs/xkbcomp/rules/xfree86, xfree86.lst and xfree86.xml.
-+// xc/programs/xkbcomp/rules: xorg, xorg.lst and xorg.xml.
- // Acer
-Index: programs/xkbcomp/symbols/macintosh/us
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xkbcomp/symbols/macintosh/us,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xkbcomp/symbols/macintosh/us      23 Apr 2004 19:54:54 -0000      1.2
-+++ programs/xkbcomp/symbols/macintosh/us      15 Dec 2004 02:12:54 -0000      1.2.4.1
-@@ -147,6 +147,7 @@
-     include "compose(rwin)"
-     include "apple(extended)"
-+    include "srvr_ctrl(xfree86)"
- // *** FIXME
- //    key <LSGT> {    [ quoteleft,    asciitilde      ]       };
-Index: programs/xlsfonts/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xlsfonts/Imakefile,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/xlsfonts/Imakefile        23 Apr 2004 19:54:58 -0000      1.2
-+++ programs/xlsfonts/Imakefile        13 Dec 2004 05:26:50 -0000      1.2.4.2
-@@ -1,12 +1,26 @@
- XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:54:53 cpqbld Exp $
-+#if BuildXprintLib && BuildXprintClients
-+#  define XlsFontsUseXprint YES
-+#endif /* BuildXprintLib && BuildXprintClients */
-+#if XlsFontsUseXprint
-+     PRINT_LIBS = -lXprintUtil $(XPLIB)
-+     PRINT_DEFS = -DBUILD_PRINTSUPPORT
-+#endif /* XlsFontsUseXprint */
--XCOMM $XFree86$
-         DEPLIBS = $(DEPXONLYLIB)
--LOCAL_LIBRARIES = $(XONLYLIB)
-+LOCAL_LIBRARIES = $(PRINT_LIBS) $(XLIB)
-+        DEFINES = $(PRINT_DEFS)
-            SRCS = xlsfonts.c dsimple.c
-            OBJS = xlsfonts.o dsimple.o
- ComplexProgramTarget(xlsfonts)
-+
-+#ifdef HasDocBookTools
-+all:: xlsfonts.man xlsfonts.html
-+
-+ConvertDocBookToManPage(xlsfonts.sgml, xlsfonts.man)
-+ConvertDocBookToHTML(xlsfonts.sgml, xlsfonts.html)
-+#endif /* HasDocBookTools */
-Index: programs/xlsfonts/dsimple.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xlsfonts/dsimple.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xlsfonts/dsimple.c        23 Apr 2004 19:54:58 -0000      1.2
-+++ programs/xlsfonts/dsimple.c        13 Dec 2004 05:21:05 -0000      1.2.4.1
-@@ -41,6 +41,9 @@
-  * Written by Mark Lillibridge.   Last updated 7/1/87
-  */
-+#ifdef BUILD_PRINTSUPPORT
-+#include <X11/XprintUtil/xprintutil.h>
-+#endif /* BUILD_PRINTSUPPORT */
- #include "dsimple.h"
- /*
-@@ -55,9 +58,13 @@
- /* This stuff is defined in the calling program by just_display.h */
--char *program_name = "unknown_program";
--Display *dpy;
--int screen;
-+char    *program_name = "unknown_program";
-+Display *dpy = NULL;
-+int      screen = 0;
-+Bool     printer_output = False; /* Video or printer output ? */
-+#ifdef BUILD_PRINTSUPPORT
-+XPContext pcontext = None;
-+#endif /* BUILD_PRINTSUPPORT */
- static void _bitmap_error(int, char *);
-@@ -131,6 +138,43 @@
- }
-+#ifdef BUILD_PRINTSUPPORT
-+/*
-+ * Get_Printer_Name (argc, argv) Look for -printer, -p,
-+ * If found, remove it from command line.  Don't go past a lone -.
-+ */
-+char *Get_Printer_Name(pargc, argv)
-+    int *pargc;  /* MODIFIED */
-+    char **argv; /* MODIFIED */
-+{
-+    int argc = *pargc;
-+    char **pargv = argv+1;
-+    char *printername = NULL;
-+    int i;
-+
-+    for (i = 1; i < argc; i++) {
-+      char *arg = argv[i];
-+
-+      if (!strcmp (arg, "-printer") || !strcmp (arg, "-p")) {
-+          if (++i >= argc) usage ();
-+
-+          printername = argv[i];
-+          *pargc -= 2;
-+          continue;
-+      }
-+      if (!strcmp(arg,"-")) {
-+              while (i<argc)
-+                      *pargv++ = argv[i++];
-+              break;
-+      }
-+      *pargv++ = arg;
-+    }
-+
-+    *pargv = NULL;
-+    return (printername);
-+}
-+#endif /* BUILD_PRINTSUPPORT */
-+
- /*
-  * Open_Display: Routine to open a display with correct error handling.
-  *               Does not require dpy or screen defined on entry.
-@@ -163,8 +207,60 @@
- int *argc;      /* MODIFIED */
- char **argv;    /* MODIFIED */
- {
--      dpy = Open_Display (Get_Display_Name(argc, argv));
--      screen = DefaultScreen(dpy);
-+        char *displayname = NULL,
-+             *printername = NULL;
-+        
-+        displayname = Get_Display_Name(argc, argv);
-+#ifdef BUILD_PRINTSUPPORT
-+        printername = Get_Printer_Name(argc, argv);
-+        
-+        if (displayname && printername) {
-+          fprintf (stderr, "%s:  you cannot specify -printer (-p) and -display (-d) at the same time.\n",
-+                   program_name);
-+          usage ();
-+        }
-+
-+        if (printername) {
-+            printer_output = True;
-+            
-+            if (XpuGetPrinter(printername, &dpy, &pcontext) != 1) {
-+                fprintf(stderr, "%s: Cannot open printer '%s'.\n", program_name, printername);
-+                exit(EXIT_FAILURE);
-+            }
-+
-+            screen = XScreenNumberOfScreen(XpGetScreenOfContext(dpy, pcontext));
-+        }
-+        else
-+#endif /* BUILD_PRINTSUPPORT */
-+        {
-+            printer_output = False;
-+
-+          dpy = Open_Display (displayname);
-+          screen = XDefaultScreen(dpy);
-+        }
-+}
-+
-+/*
-+ * Close_Display: Close display
-+ */
-+void Close_Display(void)
-+{
-+    if (dpy == NULL)
-+      return;
-+      
-+#ifdef BUILD_PRINTSUPPORT
-+    if (printer_output) {
-+        XpuClosePrinterDisplay(dpy, pcontext);
-+        dpy            = NULL;
-+        pcontext       = None;
-+        printer_output = False;
-+    }
-+    else
-+#endif /* BUILD_PRINTSUPPORT */
-+    {
-+        XCloseDisplay(dpy);
-+        dpy = NULL;
-+    }
- }
-@@ -517,5 +613,6 @@
-       vfprintf(stderr, msg, args);
-       va_end(args);
-       fprintf(stderr, "\n");
--      exit(1);
-+        Close_Display();
-+      exit(EXIT_FAILURE);
- }
-Index: programs/xlsfonts/dsimple.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xlsfonts/dsimple.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xlsfonts/dsimple.h        23 Apr 2004 19:54:58 -0000      1.2
-+++ programs/xlsfonts/dsimple.h        13 Dec 2004 05:21:05 -0000      1.2.4.1
-@@ -39,11 +39,23 @@
-  * Send bugs, etc. to chariot@athena.mit.edu.
-  */
-+    /* Simple helper macros */
-+#ifndef MAX
-+#define MAX(a,b) (((a)>(b))?(a):(b))
-+#endif /* MAX */
-+#ifndef MIN
-+#define MIN(a,b) (((a)<(b))?(a):(b))
-+#endif /* MIN */
-+
-     /* Global variables used by routines in just_display.c */
- extern char *program_name;                   /* Name of this program */
- extern Display *dpy;                         /* The current display */
- extern int screen;                           /* The current screen */
-+extern Bool printer_output;                  /* Video or printer output ? */
-+#ifdef BUILD_PRINTSUPPORT
-+extern XPContext pcontext;                   /* The current print context */
-+#endif /* BUILD_PRINTSUPPORT */
- #define INIT_NAME program_name=argv[0]        /* use this in main to setup
-                                                  program_name */
-@@ -53,8 +65,12 @@
- char *Malloc(unsigned);
- char *Realloc(char *, int);
- char *Get_Display_Name(int *, char **);
-+#ifdef BUILD_PRINTSUPPORT
-+char *Get_Printer_Name(int *, char **);
-+#endif /* BUILD_PRINTSUPPORT */
- Display *Open_Display(char *);
- void Setup_Display_And_Screen(int *, char **);
-+void Close_Display(void);
- XFontStruct *Open_Font(char *);
- void Beep(void);
- Pixmap ReadBitmapFile(Drawable, char *, int *, int *, int *, int *);
-Index: programs/xlsfonts/xlsfonts.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xlsfonts/xlsfonts.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/xlsfonts/xlsfonts.c       23 Apr 2004 19:54:58 -0000      1.2
-+++ programs/xlsfonts/xlsfonts.c       13 Dec 2004 05:26:50 -0000      1.2.4.2
-@@ -31,407 +31,575 @@
- #include <X11/Xos.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#include <limits.h>
-+#ifdef BUILD_PRINTSUPPORT
-+#include <X11/XprintUtil/xprintutil.h>
-+#endif /* BUILD_PRINTSUPPORT */
- #include "dsimple.h"
--#define N_START 1000  /* Maximum # of fonts to start with */
--
--int max_output_line_width = 79;
--int output_line_padding = 3;
--int columns = 0;
--
--#define L_SHORT 0
--#define L_MEDIUM 1
--#define L_LONG 2
-+#define N_START INT_MAX  /* Maximum # of fonts to start with (should
-+                          * always be be > 10000 as modern OSes like 
-+                          * Solaris 8 already have more than 9000 XLFD
-+                          * fonts available) */
-+
-+#define L_SHORT    0
-+#define L_MEDIUM   1
-+#define L_LONG     2
- #define L_VERYLONG 3
--Bool  sort_output = True;
--Bool  open_instead_of_list = False;
--int   long_list = L_SHORT;
--int   nnames = N_START;
--int   font_cnt;
--int   min_max;
-+static int  max_output_line_width     = 79;
-+static int  output_line_padding       = 3;
-+static int  columns                   = 0;
-+
-+static Bool sort_output               = True;
-+static Bool open_instead_of_list      = False;
-+static int  long_list                 = L_SHORT;
-+static int  nnames                    = N_START;
-+static int  font_cnt                  = 0;
-+static int  min_max;
-+
- typedef struct {
--      char            *name;
--      XFontStruct     *info;
-+  char           *name;
-+  XFontStruct    *info;
-+#ifdef BUILD_PRINTSUPPORT
-+  char           *listfonts_modes;
-+#endif /* BUILD_PRINTSUPPORT */
- } FontList;
--FontList      *font_list;
-+static FontList *font_list = NULL;
--static void get_list(char *);
-+/* Local prototypes */
-+#ifdef BUILD_PRINTSUPPORT
-+static Bool IsListfontsModesChangeSupported(char *mode);
-+static int  SetListfontsModes(const char *attrname, Bool enableattr);
-+#endif /* BUILD_PRINTSUPPORT */
-+static void get_list(char *pattern);
-+static int  compare(const void *arg1, const void *arg2);
- static void show_fonts(void);
--static void copy_number(char **, char **, int, int);
--static void do_query_font(Display *, char *);
--static int compare(const void *, const void *);
--#ifndef max
--static int max(int, int);
--#endif
--static int IgnoreError(Display *, XErrorEvent *);
--static void PrintProperty(XFontProp *);
--static void ComputeFontType(XFontStruct *);
--static void print_character_metrics(register XFontStruct *);
--
--
--void
--usage()
--{
--      fprintf (stderr,"usage:  %s [-options] [-fn pattern]\n", program_name);
--      fprintf (stderr, "where options include:\n");
--      fprintf (stderr,
--      "    -l[l[l]]                 give long info about each font\n");
--      fprintf (stderr,
--      "    -m                       give character min and max bounds\n");
--      fprintf (stderr,
--      "    -C                       force columns\n");
--      fprintf (stderr,
--      "    -1                       force single column\n");
--      fprintf (stderr,
--      "    -u                       keep output unsorted\n");
--      fprintf (stderr,
--      "    -o                       use OpenFont/QueryFont instead of ListFonts\n");
--      fprintf (stderr,
--      "    -w width                 maximum width for multiple columns\n");
--      fprintf (stderr,
--      "    -n columns               number of columns if multi column\n");
--      fprintf (stderr,
--      "    -display displayname     X server to contact\n");
--      fprintf (stderr,
--          "\n");
--      exit(1);
--}
--
--int
--main(argc, argv)
--int argc;
--char **argv;    
--{
--      int     argcnt = 0, i;
--
--      INIT_NAME;
--
--      /* Handle command line arguments, open display */
--      Setup_Display_And_Screen(&argc, argv);
--      for (argv++, argc--; argc; argv++, argc--) {
--              if (argv[0][0] == '-') {
--                      if (argcnt > 0) usage ();
--                      for (i=1; argv[0][i]; i++)
--                              switch(argv[0][i]) {
--                              case 'l':
--                                      long_list++;
--                                      break;
--                              case 'm':
--                                      min_max++;
--                                      break;
--                              case 'C':
--                                      columns = 0;
--                                      break;
--                              case '1':
--                                      columns = 1;
--                                      break;
--                              case 'f':
--                                      if (--argc <= 0) usage ();
--                                      argcnt++;
--                                      argv++;
--                                      get_list(argv[0]);
--                                      goto next;
--                              case 'w':
--                                      if (--argc <= 0) usage ();
--                                      argv++;
--                                      max_output_line_width = atoi(argv[0]);
--                                      goto next;
--                              case 'n':
--                                      if (--argc <= 0) usage ();
--                                      argv++;
--                                      columns = atoi(argv[0]);
--                                      goto next;
--                              case 'o':
--                                      open_instead_of_list = True;
--                                      break;
--                              case 'u':
--                                      sort_output = False;
--                                      break;
--                              default:
--                                      usage();
--                                      break;
--                              }
--                      if (i == 1)
--                              usage();
--              } else {
--                      argcnt++;
--                      get_list(argv[0]);
--              }
--        next: ;
--      }
--      if (argcnt == 0)
--              get_list("*");
--      show_fonts();
--      exit(0);
--}
--
--void
--get_list(pattern)
--      char    *pattern;
--{
--      int     available = nnames+1,
--              i;
--      char    **fonts;
--      XFontStruct     *info;
--
--      /* Get list of fonts matching pattern */
--      for (;;) {
--              if (open_instead_of_list) {
--                  info = XLoadQueryFont (dpy, pattern);
--
--                  if (info) {
--                      fonts = &pattern;
--                      available = 1;
--                      XUnloadFont (dpy, info->fid);
--                  } else {
--                      fonts = NULL;
--                  }
--                  break;
--              }
--                  
--              if (long_list == L_MEDIUM)
--                      fonts = XListFontsWithInfo(dpy,
--                              pattern, nnames, &available, &info);
--              else
--                      fonts = XListFonts(dpy, pattern, nnames, &available);
--              if (fonts == NULL || available < nnames)
--                      break;
--              if (long_list == L_MEDIUM)
--                      XFreeFontInfo(fonts, info, available);
--              else
--                      XFreeFontNames(fonts);
--              nnames = available * 2;
--      }
--
--      if (fonts == NULL) {
--              fprintf(stderr, "%s: pattern \"%s\" unmatched\n",
--                      program_name, pattern);
--              return;
--      }
--
--      font_list = (FontList *)Realloc((char *)font_list,
--              (font_cnt + available) * sizeof(FontList));
--      for (i=0; i<available; i++) {
--              font_list[font_cnt].name = fonts[i];
--              if (long_list == L_MEDIUM)
--                      font_list[font_cnt].info = info + i;
--              else
--                      font_list[font_cnt].info = NULL;
--              font_cnt++;
--      }
--}
--
--static int
--compare(arg1, arg2)
--    const void *arg1;
--    const void *arg2;
--{
--      const FontList *f1 = arg1;
--      const FontList *f2 = arg2;
--      const char *p1 = f1->name;
--      const char *p2 = f2->name;
--
--      while (*p1 && *p2 && *p1 == *p2)
--              p1++, p2++;
--      return(*p1 - *p2);
--}
--
--void
--show_fonts()
--{
--      int     i;
--
--      if (font_cnt == 0)
--              return;
--
--      /* first sort the output */
--      if (sort_output) qsort(font_list, font_cnt, sizeof(FontList), compare);
--
--      if (long_list > L_MEDIUM) {
--          for (i = 0; i < font_cnt; i++) {
--              do_query_font (dpy, font_list[i].name);
--          }
--          return;
--      }
--
--      if (long_list == L_MEDIUM) {
--              XFontStruct     *pfi;
--              char            *string;
--
--              printf("DIR  ");
--              printf("MIN  ");
--              printf("MAX ");
--              printf("EXIST ");
--              printf("DFLT ");
--              printf("PROP ");
--              printf("ASC ");
--              printf("DESC ");
--              printf("NAME");
--              printf("\n");
--              for (i=0; i<font_cnt; i++) {
--                      pfi = font_list[i].info;
--                      if (!pfi) {
--                          fprintf (stderr, 
--                           "%s:  no font information for font \"%s\".\n",
--                                   program_name, 
--                                   font_list[i].name ? 
--                                   font_list[i].name : "");
--                          continue;
--                      }
--                      switch(pfi->direction) {
--                      case FontLeftToRight: string = "-->"; break;
--                      case FontRightToLeft: string = "<--"; break;
--                      default:              string = "???"; break;
--                      }
--                      printf("%-4s", string);
--                      if (pfi->min_byte1 == 0
--                       && pfi->max_byte1 == 0) {
--                              printf(" %3d ", pfi->min_char_or_byte2);
--                              printf(" %3d ", pfi->max_char_or_byte2);
--                      } else {
--                              printf("*%3d ", pfi->min_byte1);
--                              printf("*%3d ", pfi->max_byte1);
--                      }
--                      printf("%5s ", pfi->all_chars_exist ? "all" : "some");
--                      printf("%4d ", pfi->default_char);
--                      printf("%4d ", pfi->n_properties);
--                      printf("%3d ", pfi->ascent);
--                      printf("%4d ", pfi->descent);
--                      printf("%s\n", font_list[i].name);
--                      if (min_max) {
--                              char    min[ BUFSIZ ],
--                                      max[ BUFSIZ ];
--                              char    *pmax = max,
--                                      *pmin = min;
--
--                              strcpy(pmin, "     min(l,r,w,a,d) = (");
--                              strcpy(pmax, "     max(l,r,w,a,d) = (");
--                              pmin += strlen(pmin);
--                              pmax += strlen(pmax);
--
--                              copy_number(&pmin, &pmax,
--                                      pfi->min_bounds.lbearing,
--                                      pfi->max_bounds.lbearing);
--                              *pmin++ = *pmax++ = ',';
--                              copy_number(&pmin, &pmax,
--                                      pfi->min_bounds.rbearing,
--                                      pfi->max_bounds.rbearing);
--                              *pmin++ = *pmax++ = ',';
--                              copy_number(&pmin, &pmax,
--                                      pfi->min_bounds.width,
--                                      pfi->max_bounds.width);
--                              *pmin++ = *pmax++ = ',';
--                              copy_number(&pmin, &pmax,
--                                      pfi->min_bounds.ascent,
--                                      pfi->max_bounds.ascent);
--                              *pmin++ = *pmax++ = ',';
--                              copy_number(&pmin, &pmax,
--                                      pfi->min_bounds.descent,
--                                      pfi->max_bounds.descent);
--                              *pmin++ = *pmax++ = ')';
--                              *pmin = *pmax = '\0';
--                              printf("%s\n", min);
--                              printf("%s\n", max);
--                      }
--              }
--              return;
--      }
--
--      if ((columns == 0 && isatty(1)) || columns > 1) {
--              int     width,
--                      max_width = 0,
--                      lines_per_column,
--                      j,
--                      index;
--
--              for (i=0; i<font_cnt; i++) {
--                      width = strlen(font_list[i].name);
--                      if (width > max_width)
--                              max_width = width;
--              }
--              if (max_width == 0)
--                      Fatal_Error("all %d fontnames listed are zero length",
--                                  font_cnt);
--
--              if (columns == 0) {
--                  if ((max_width * 2) + output_line_padding >
--                      max_output_line_width) {
--                      columns = 1;
--                  } else {
--                      max_width += output_line_padding;
--                      columns = ((max_output_line_width +
--                                  output_line_padding) / max_width);
--                  }
--              } else {
--                  max_width += output_line_padding;
--              }
--              if (columns <= 1) goto single_column;
--
--              if (font_cnt < columns)
--                      columns = font_cnt;
--              lines_per_column = (font_cnt + columns - 1) / columns;
--
--              for (i=0; i<lines_per_column; i++) {
--                      for (j=0; j<columns; j++) {
--                              index = j * lines_per_column + i;
--                              if (index >= font_cnt)
--                                      break;
--                              if (j+1 == columns)
--                                      printf("%s", font_list[ index ].name);
--                              else
--                                      printf("%-*s",
--                                              max_width, 
--                                              font_list[ index ].name);
--                      }
--                      printf("\n");
--              }
--              return;
--      }
--
--      single_column:
--      for (i=0; i<font_cnt; i++)
--              printf("%s\n", font_list[i].name);
--}
--
--#ifndef max
--static int
--max(i, j)
--      int     i, j;
--{
--      if (i > j)
--              return (i);
--      return(j);
--}
--#endif
--
--void
--copy_number(pp1, pp2, n1, n2)
--      char    **pp1, **pp2;
--      int     n1, n2;
--{
--      char    *p1 = *pp1;
--      char    *p2 = *pp2;
--      int     w;
--
--      sprintf(p1, "%d", n1);
--      sprintf(p2, "%d", n2);
--      w = max(strlen(p1), strlen(p2));
--      sprintf(p1, "%*d", w, n1);
--      sprintf(p2, "%*d", w, n2);
--      p1 += strlen(p1);
--      p2 += strlen(p2);
--      *pp1 = p1;
--      *pp2 = p2;
-+static void copy_number(char **pp1, char**pp2, int n1, int n2);
-+static int  IgnoreError(Display *disp, XErrorEvent *event);
-+static void PrintProperty(XFontProp *prop);
-+static void ComputeFontType(XFontStruct *fs);
-+static void print_character_metrics(register XFontStruct *info);
-+static void do_query_font (Display *dpy, char *name);
-+
-+void usage(void)
-+{
-+    fprintf (stderr, "usage:  %s [-options] [-fn pattern]\n", program_name);
-+    fprintf (stderr, "where options include:\n");
-+    fprintf (stderr, "    -l[l[l]]                 give long info about each font\n");
-+    fprintf (stderr, "    -m                       give character min and max bounds\n");
-+    fprintf (stderr, "    -C                       force columns\n");
-+    fprintf (stderr, "    -1                       force single column\n");
-+    fprintf (stderr, "    -u                       keep output unsorted\n");
-+#ifdef BUILD_PRINTSUPPORT
-+    fprintf (stderr, "    -b                       list printer builtin fonts\n");
-+    fprintf (stderr, "    -B                       do not list printer builtin fonts\n");
-+    fprintf (stderr, "    -g                       list glyph fonts\n");
-+    fprintf (stderr, "    -G                       do not list glyph fonts\n");
-+    fprintf (stderr, "    -x mode                  enable listfont mode\n");
-+    fprintf (stderr, "    -X mode                  disable listfont mode\n");
-+#endif /* BUILD_PRINTSUPPORT */
-+    fprintf (stderr, "    -o                       use OpenFont/QueryFont instead of ListFonts\n");
-+    fprintf (stderr, "    -w width                 maximum width for multiple columns\n");
-+    fprintf (stderr, "    -n columns               number of columns if multi column\n");
-+    fprintf (stderr, "    -display displayname     X server to contact\n");
-+    fprintf (stderr, "    -d displayname           (alias for -display displayname)\n");
-+#ifdef BUILD_PRINTSUPPORT
-+    fprintf (stderr, "    -printer printername     printer to use\n");
-+    fprintf (stderr, "    -p printername           (alias for -p printername)\n");
-+#endif /* BUILD_PRINTSUPPORT */
-+    fprintf (stderr, "\n");
-+    Close_Display();
-+    exit(EXIT_FAILURE);
-+}
-+
-+int main(int argc, char **argv)
-+{
-+    int argcnt = 0, i;
-+    char *mode;
-+
-+    INIT_NAME;
-+
-+    /* Handle command line arguments, open display */
-+    Setup_Display_And_Screen(&argc, argv);
-+
-+#ifdef BUILD_PRINTSUPPORT
-+    if (printer_output) {
-+        /* XListFonts*()/XLoadFont*() honor xp-listfonts-modes only 
-+         * if there is an context _SET_ for this display */
-+        XpSetContext(dpy, pcontext);
-+    }
-+#endif /* BUILD_PRINTSUPPORT */
-+
-+    for (argv++, argc--; argc; argv++, argc--) {
-+        if (argv[0][0] == '-') {
-+            if (argcnt > 0) usage ();
-+            for (i=1; argv[0][i]; i++)
-+                switch(argv[0][i]) {
-+                case 'l':
-+                    long_list++;
-+                    break;
-+                case 'm':
-+                    min_max++;
-+                    break;
-+                case 'C':
-+                    columns = 0;
-+                    break;
-+                case '1':
-+                    columns = 1;
-+                    break;
-+                case 'f': /* "-fn" */
-+                    if (--argc <= 0) usage ();
-+                    if (argv[0][i+1] != 'n') usage ();
-+                    argcnt++;
-+                    argv++;
-+                    get_list(argv[0]);
-+                    goto next;
-+                case 'w':
-+                    if (--argc <= 0) usage ();
-+                    argv++;
-+                    max_output_line_width = atoi(argv[0]);
-+                    goto next;
-+                case 'n':
-+                    if (--argc <= 0) usage ();
-+                    argv++;
-+                    columns = atoi(argv[0]);
-+                    goto next;
-+                case 'o':
-+                    open_instead_of_list = True;
-+                    break;
-+                case 'u':
-+                    sort_output = False;
-+                    break;
-+#ifdef BUILD_PRINTSUPPORT
-+                case 'b':
-+                    mode = "xp-list-internal-printer-fonts";
-+                    if (!printer_output)
-+                        Fatal_Error("Option '%c' only supported for printers.", argv[0][i]);
-+                    if (!IsListfontsModesChangeSupported(mode))
-+                        Fatal_Error("Printer does not support changing '%s'.", mode);
-+                    SetListfontsModes(mode, True);
-+                    break;
-+                case 'B':
-+                    mode = "xp-list-internal-printer-fonts";
-+                    if (!printer_output)
-+                        Fatal_Error("Option '%c' only supported for printers.", argv[0][i]);
-+                    if (!IsListfontsModesChangeSupported(mode))
-+                        Fatal_Error("Printer does not support changing '%s'.", mode);
-+                    SetListfontsModes(mode, False);
-+                    break;
-+                case 'g':
-+                    mode = "xp-list-glyph-fonts";
-+                    if (!printer_output)
-+                        Fatal_Error("Option '%c' only supported for printers.", argv[0][i]);
-+                    if (!IsListfontsModesChangeSupported(mode))
-+                        Fatal_Error("Printer does not support changing '%s'.", mode);
-+                    SetListfontsModes(mode, True);
-+                    break;
-+                case 'G':
-+                    mode = "xp-list-glyph-fonts";
-+                    if (!printer_output)
-+                        Fatal_Error("Option '%c' only supported for printers.", argv[0][i]);
-+                    if (!IsListfontsModesChangeSupported(mode))
-+                        Fatal_Error("Printer does not support changing '%s'.", mode);
-+                    SetListfontsModes(mode, False);
-+                    break;
-+                case 'x':
-+                    if (--argc <= 0) usage ();
-+                    argv++;
-+                    mode = argv[0];
-+                    if (!printer_output)
-+                        Fatal_Error("Option '%c' only supported for printers.", argv[0][i-1]);
-+                    if (!IsListfontsModesChangeSupported(mode))
-+                        Fatal_Error("Printer does not support changing '%s'.", mode);
-+                    SetListfontsModes(mode, True);
-+                    goto next;
-+                case 'X':
-+                    if (--argc <= 0) usage ();
-+                    argv++;
-+                    mode = argv[0];
-+                    if (!printer_output)
-+                        Fatal_Error("Option '%c' only supported for printers.", argv[0][i-1]);
-+                    if (!IsListfontsModesChangeSupported(mode))
-+                        Fatal_Error("Printer does not support changing '%s'.", mode);
-+                    SetListfontsModes(mode, False);
-+                    goto next;
-+#endif /* BUILD_PRINTSUPPORT */
-+                default:
-+                    usage();
-+                    break;
-+                }
-+            if (i == 1)
-+                usage();
-+        } else {
-+            argcnt++;
-+            get_list(argv[0]);
-+        }
-+      next: ;
-+    }
-+
-+    if (argcnt == 0)
-+        get_list("*");
-+
-+    show_fonts();
-+    
-+    Close_Display();
-+    return EXIT_SUCCESS;
-+}
-+
-+#ifdef BUILD_PRINTSUPPORT
-+/* This should be moved to XprintUtils */
-+static 
-+Bool IsListfontsModesChangeSupported(char *mode)
-+{
-+    char *value;
-+    Bool  isSupported;
-+    
-+    value = XpGetOneAttribute(dpy, pcontext, XPPrinterAttr, "xp-listfonts-modes-supported"); 
-+    if (!value)
-+        return False;
-+      
-+    isSupported = (strstr(value, mode) != NULL)?(True):(False);
-+    XFree(value);
-+      
-+    return isSupported;
-+}
-+
-+/* XXX: This should be moved to XprintUtils (and should have a Document/Page-level
-+ * option and should verify that the matching leven supports xp-listfonts-modes
-+ * changes)*/
-+static
-+int SetListfontsModes(const char *attrname, Bool enableattr)
-+{
-+  char *value,
-+       *newvalue;
-+  
-+  value = XpGetOneAttribute(dpy, pcontext, XPDocAttr, "xp-listfonts-modes");
-+  if (!value)
-+      value = strdup("");
-+
-+  /* Set attribute */
-+  if (enableattr)
-+  {
-+      /* Return success if |attrname| is already set */
-+      if (strstr(value, attrname) != NULL)
-+      {
-+          XFree(value);
-+          return 1; /* success */
-+      }
-+
-+      newvalue = malloc(strlen(value) + strlen(attrname) + 2);
-+      if (!newvalue)
-+      {
-+          XFree(value);
-+          Fatal_Error("SetListfontsModes: No memory.");
-+      }
-+
-+      sprintf(newvalue, "%s %s", value, attrname);
-+      XpuSetOneAttribute(dpy, pcontext, XPDocAttr, "*xp-listfonts-modes", newvalue, XPAttrMerge);
-+
-+      free(newvalue);
-+      XFree(value);
-+      return 1; /* success */
-+  }
-+  else
-+  {
-+      char *s, /* copy string "source" */
-+           *d; /* copy string "destination" */
-+
-+      /* Return success if |attrname| not set */
-+      d = strstr(value, attrname);
-+      if (d == NULL)
-+      {
-+          XFree(value);
-+          return 1; /* success */
-+      }
-+
-+      /* strip |attrname| from |value| */
-+      s = d+strlen(attrname);
-+      while( (*d++ = *s++) != '\0' )
-+          ;
-+
-+      XpuSetOneAttribute(dpy, pcontext, XPDocAttr, "*xp-listfonts-modes", value, XPAttrMerge);
-+
-+      XFree(value);
-+      return 1; /* success */
-+  } 
-+}
-+#endif /* BUILD_PRINTSUPPORT */
-+
-+static
-+void get_list(char *pattern)
-+{
-+    int           available = nnames+1,
-+                  i;
-+    char        **fonts;
-+    XFontStruct  *info;
-+
-+    /* Get list of fonts matching pattern */
-+    for (;;) {
-+        if (open_instead_of_list) {
-+            info = XLoadQueryFont (dpy, pattern);
-+
-+            if (info) {
-+                fonts = &pattern;
-+                available = 1;
-+                XUnloadFont (dpy, info->fid);
-+            } else {
-+                fonts = NULL;
-+            }
-+            break;
-+        }
-+            
-+        if (long_list == L_MEDIUM)
-+            fonts = XListFontsWithInfo(dpy, pattern, nnames, &available, &info);
-+        else
-+            fonts = XListFonts(dpy, pattern, nnames, &available);
-+        if (fonts == NULL || available < nnames)
-+            break;
-+        if (long_list == L_MEDIUM)
-+            XFreeFontInfo(fonts, info, available);
-+        else
-+            XFreeFontNames(fonts);
-+        nnames = available * 2;
-+    }
-+
-+    if (fonts == NULL) {
-+        fprintf(stderr, "%s: pattern \"%s\" unmatched\n",
-+                program_name, pattern);
-+        return;
-+    }
-+
-+    font_list = (FontList *)Realloc((char *)font_list,
-+            (font_cnt + available) * sizeof(FontList));
-+    for (i=0; i<available; i++) {
-+        font_list[font_cnt].name = fonts[i];
-+        if (long_list == L_MEDIUM)
-+            font_list[font_cnt].info = info + i;
-+        else
-+            font_list[font_cnt].info = NULL;
-+
-+#ifdef BUILD_PRINTSUPPORT
-+        if (printer_output) {
-+            char *listfonts_modes;
-+
-+            listfonts_modes = XpGetOneAttribute(dpy, pcontext, XPDocAttr, "xp-listfonts-modes");
-+
-+            /* Save status of xp-listfonts-modes */
-+            font_list[font_cnt].listfonts_modes = strdup(listfonts_modes?listfonts_modes:"");
-+
-+            if (listfonts_modes)
-+                XFree(listfonts_modes);
-+        }
-+        else
-+        {
-+            font_list[font_cnt].listfonts_modes = NULL;
-+        }
-+#endif /* BUILD_PRINTSUPPORT */
-+        
-+        font_cnt++;
-+    }
-+}
-+
-+static
-+int compare(const void *arg1, const void *arg2)
-+{
-+    const FontList *f1 = arg1;
-+    const FontList *f2 = arg2;
-+    const char *p1 = f1->name;
-+    const char *p2 = f2->name;
-+
-+    while (*p1 && *p2 && *p1 == *p2)
-+            p1++, p2++;
-+    return(*p1 - *p2);
-+}
-+
-+static
-+void show_fonts(void)
-+{
-+    int i;
-+
-+    if (font_cnt == 0)
-+        return;
-+
-+    /* first sort the output */
-+    if (sort_output) qsort(font_list, font_cnt, sizeof(FontList), compare);
-+
-+    if (long_list > L_MEDIUM) {
-+        for (i = 0; i < font_cnt; i++) {
-+#ifdef BUILD_PRINTSUPPORT
-+            if (printer_output) {
-+                /* Restore saved xp-listfonts-modes status */
-+                XpuSetOneAttribute(dpy, pcontext, XPDocAttr, "*xp-listfonts-modes", font_list[i].listfonts_modes, XPAttrMerge);
-+            }
-+#endif /* BUILD_PRINTSUPPORT */
-+
-+            do_query_font (dpy, font_list[i].name);
-+        }
-+        return;
-+    }
-+
-+    if (long_list == L_MEDIUM) {
-+        XFontStruct *pfi;
-+        char        *string;
-+
-+        printf("DIR  ");
-+        printf("MIN  ");
-+        printf("MAX ");
-+        printf("EXIST ");
-+        printf("DFLT ");
-+        printf("PROP ");
-+        printf("ASC ");
-+        printf("DESC ");
-+        printf("NAME");
-+        printf("\n");
-+        for (i=0; i<font_cnt; i++) {
-+            pfi = font_list[i].info;
-+            if (!pfi) {
-+                fprintf(stderr, "%s:  no font information for font \"%s\".\n",
-+                        program_name, 
-+                        font_list[i].name ? 
-+                        font_list[i].name : "");
-+                continue;
-+            }
-+            switch(pfi->direction) {
-+                case FontLeftToRight: string = "-->"; break;
-+                case FontRightToLeft: string = "<--"; break;
-+                default:              string = "???"; break;
-+            }
-+            printf("%-4s", string);
-+            if (pfi->min_byte1 == 0 &&
-+                pfi->max_byte1 == 0) {
-+                printf(" %3d ", pfi->min_char_or_byte2);
-+                printf(" %3d ", pfi->max_char_or_byte2);
-+            } else {
-+                printf("*%3d ", pfi->min_byte1);
-+                printf("*%3d ", pfi->max_byte1);
-+            }
-+            printf("%5s ", pfi->all_chars_exist ? "all" : "some");
-+            printf("%4d ", pfi->default_char);
-+            printf("%4d ", pfi->n_properties);
-+            printf("%3d ", pfi->ascent);
-+            printf("%4d ", pfi->descent);
-+            printf("%s\n", font_list[i].name);
-+            if (min_max) {
-+                char  min[ BUFSIZ ],
-+                      max[ BUFSIZ ];
-+                char *pmax = max,
-+                     *pmin = min;
-+
-+                strcpy(pmin, "     min(l,r,w,a,d) = (");
-+                strcpy(pmax, "     max(l,r,w,a,d) = (");
-+                pmin += strlen(pmin);
-+                pmax += strlen(pmax);
-+
-+                copy_number(&pmin, &pmax,
-+                            pfi->min_bounds.lbearing,
-+                            pfi->max_bounds.lbearing);
-+                *pmin++ = *pmax++ = ',';
-+                copy_number(&pmin, &pmax,
-+                            pfi->min_bounds.rbearing,
-+                            pfi->max_bounds.rbearing);
-+                *pmin++ = *pmax++ = ',';
-+                copy_number(&pmin, &pmax,
-+                            pfi->min_bounds.width,
-+                            pfi->max_bounds.width);
-+                *pmin++ = *pmax++ = ',';
-+                copy_number(&pmin, &pmax,
-+                            pfi->min_bounds.ascent,
-+                            pfi->max_bounds.ascent);
-+                *pmin++ = *pmax++ = ',';
-+                copy_number(&pmin, &pmax,
-+                            pfi->min_bounds.descent,
-+                            pfi->max_bounds.descent);
-+                *pmin++ = *pmax++ = ')';
-+                *pmin = *pmax = '\0';
-+                printf("%s\n", min);
-+                printf("%s\n", max);
-+            }
-+        }
-+        return;
-+    }
-+
-+    if ((columns == 0 && isatty(1)) || columns > 1) {
-+        int width,
-+            max_width = 0,
-+            lines_per_column,
-+            j,
-+            index;
-+
-+        for (i=0; i<font_cnt; i++) {
-+            width = strlen(font_list[i].name);
-+            if (width > max_width)
-+                max_width = width;
-+        }
-+        if (max_width == 0)
-+            Fatal_Error("all %d fontnames listed are zero length", font_cnt);
-+
-+        if (columns == 0) {
-+            if ((max_width * 2) + output_line_padding >
-+                max_output_line_width) {
-+                columns = 1;
-+            } else {
-+                max_width += output_line_padding;
-+                columns = ((max_output_line_width +
-+                            output_line_padding) / max_width);
-+            }
-+        } else {
-+            max_width += output_line_padding;
-+        }
-+        if (columns <= 1) goto single_column;
-+
-+        if (font_cnt < columns)
-+            columns = font_cnt;
-+        lines_per_column = (font_cnt + columns - 1) / columns;
-+
-+        for (i=0; i<lines_per_column; i++) {
-+            for (j=0; j<columns; j++) {
-+                index = j * lines_per_column + i;
-+                if (index >= font_cnt)
-+                    break;
-+                if (j+1 == columns)
-+                    printf("%s", font_list[ index ].name);
-+                else
-+                    printf("%-*s",
-+                           max_width, 
-+                           font_list[ index ].name);
-+            }
-+            printf("\n");
-+        }
-+        return;
-+    }
-+
-+  single_column:
-+    for (i=0; i<font_cnt; i++)
-+        printf("%s\n", font_list[i].name);
-+}
-+
-+static
-+void copy_number(char **pp1, char**pp2, int n1, int n2)
-+{
-+    char *p1 = *pp1;
-+    char *p2 = *pp2;
-+    int   w;
-+
-+    sprintf(p1, "%d", n1);
-+    sprintf(p2, "%d", n2);
-+    w = MAX(strlen(p1), strlen(p2));
-+    sprintf(p1, "%*d", w, n1);
-+    sprintf(p2, "%*d", w, n2);
-+    p1 += strlen(p1);
-+    p2 += strlen(p2);
-+    *pp1 = p1;
-+    *pp2 = p2;
- }
- /* ARGSUSED */
--static int IgnoreError(disp, event)
--    Display *disp;
--    XErrorEvent *event;
-+static
-+int IgnoreError(Display *disp, XErrorEvent *event)
- {
-     return 0;
- }
-@@ -446,8 +614,8 @@
- #define PrintBounds(_what,_ptr) \
- {   register XCharStruct *p = (_ptr); \
--    printf (bounds_metrics_fmt, _what, p->width, p->lbearing, \
--        p->rbearing, p->ascent, p->descent, p->attributes); }
-+    printf (bounds_metrics_fmt, (_what), p->width, p->lbearing, \
-+          p->rbearing, p->ascent, p->descent, p->attributes); }
- static char* stringValued [] = { /* values are atoms */
-@@ -474,7 +642,14 @@
-     "RASTERIZER_VERSION",
-     /* other registered font properties (see the X.org Registry, sec. 15) */
-+    
-+#ifdef BUILD_PRINTSUPPORT   
-+    /* Used by Xprint's Postscript and PDF DDX */
-     "_ADOBE_POSTSCRIPT_FONTNAME",
-+    
-+    /* Used by Xprint's PCL DDXs */
-+    "PCL_FONT_NAME",
-+#endif /* BUILD_PRINTSUPPORT */
-     /* unregistered font properties */
-     "CHARSET_COLLECTIONS",
-@@ -488,8 +663,8 @@
-      NULL
-     };
--static void PrintProperty (prop)
--    XFontProp *prop;
-+static
-+void PrintProperty(XFontProp *prop)
- {
-     char *atom, *value;
-     char nosuch[40];
-@@ -498,9 +673,9 @@
-     atom = XGetAtomName(dpy, prop->name);
-     if (!atom) {
--      atom = nosuch;
--      nosuch[0] = '\0';
--      (void)sprintf (atom, "No such atom = %ld", prop->name);
-+        atom = nosuch;
-+        nosuch[0] = '\0';
-+        (void)sprintf (atom, "No such atom = %ld", prop->name);
-     }
-     printf ("      %s", atom);
-@@ -510,20 +685,20 @@
-     putchar(' ');
-     for (i = 0; ; i++) {
--      if (stringValued[i] == NULL) {
--          printf ("%ld\n", prop->card32);
--          break;
--      }
--      if (strcmp(stringValued[i], atom) == 0) {
--          value = XGetAtomName(dpy, prop->card32);
--          if (value == NULL)
--              printf ("%ld (expected string value)\n", prop->card32);
--          else {
--              printf ("%s\n", value);
--              XFree (value);
--          }
--          break;
--      }
-+        if (stringValued[i] == NULL) {
-+            printf ("%ld\n", prop->card32);
-+            break;
-+        }
-+        if (strcmp(stringValued[i], atom) == 0) {
-+            value = XGetAtomName(dpy, prop->card32);
-+            if (value == NULL)
-+                printf ("%ld (expected string value)\n", prop->card32);
-+            else {
-+                printf ("%s\n", value);
-+                XFree (value);
-+            }
-+            break;
-+        }
-     } 
-     if (atom != nosuch) XFree (atom);
-     XSetErrorHandler (oldhandler);
-@@ -531,8 +706,7 @@
- static void
--ComputeFontType (fs)
--    XFontStruct *fs;
-+ComputeFontType(XFontStruct *fs)
- {
-     int i;
-     Bool char_cell = True;
-@@ -542,66 +716,65 @@
-     printf ("  font type:\t\t");
-     if (fs->min_bounds.width != fs->max_bounds.width) {
--      printf ("Proportional (min and max widths not equal)\n");
--      return;
-+        printf ("Proportional (min and max widths not equal)\n");
-+        return;
-     }
-     if (awatom) {
--      for (i = 0; i < fs->n_properties; i++) {
--          if (fs->properties[i].name == awatom &&
--              (fs->max_bounds.width * 10) != fs->properties[i].card32) {
--              char_cell = False;
--              reason = "font width not equal to AVERAGE_WIDTH";
--              break;
--          }
--      }
-+        for (i = 0; i < fs->n_properties; i++) {
-+            if (fs->properties[i].name == awatom &&
-+                (fs->max_bounds.width * 10) != fs->properties[i].card32) {
-+                char_cell = False;
-+                reason = "font width not equal to AVERAGE_WIDTH";
-+                break;
-+            }
-+        }
-     }
-     if (fs->per_char) {
--      for (i = fs->min_char_or_byte2, cs = fs->per_char;
--           i <= fs->max_char_or_byte2; i++, cs++) {
--          if (cs->width == 0) continue;
--          if (cs->width != fs->max_bounds.width) {
--              /* this shouldn't happen since we checked above */
--              printf ("Proportional (characters not all the same width)\n");
--              return;
--          }
--          if (char_cell) {
--              if (cs->width < 0) {
--                  if (!(cs->width <= cs->lbearing &&
--                        cs->lbearing <= cs->rbearing &&
--                        cs->rbearing <= 0)) {
--                      char_cell = False;
--                      reason = "ink outside bounding box";
--                  }
--              } else {
--                  if (!(0 <= cs->lbearing &&
--                        cs->lbearing <= cs->rbearing &&
--                        cs->rbearing <= cs->width)) {
--                      char_cell = False;
--                      reason = "ink outside bounding box";
--                  }
--              }
--              if (!(cs->ascent <= fs->ascent &&
--                    cs->descent <= fs->descent)) {
--                  char_cell  = False;
--                  reason = "characters not all same ascent or descent";
--              }
--          }
--      }
-+        for (i = fs->min_char_or_byte2, cs = fs->per_char;
-+             i <= fs->max_char_or_byte2; i++, cs++) {
-+            if (cs->width == 0) continue;
-+            if (cs->width != fs->max_bounds.width) {
-+                /* this shouldn't happen since we checked above */
-+                printf ("Proportional (characters not all the same width)\n");
-+                return;
-+            }
-+            if (char_cell) {
-+                if (cs->width < 0) {
-+                    if (!(cs->width <= cs->lbearing &&
-+                          cs->lbearing <= cs->rbearing &&
-+                          cs->rbearing <= 0)) {
-+                        char_cell = False;
-+                        reason = "ink outside bounding box";
-+                    }
-+                } else {
-+                    if (!(0 <= cs->lbearing &&
-+                          cs->lbearing <= cs->rbearing &&
-+                          cs->rbearing <= cs->width)) {
-+                        char_cell = False;
-+                        reason = "ink outside bounding box";
-+                    }
-+                }
-+                if (!(cs->ascent <= fs->ascent &&
-+                      cs->descent <= fs->descent)) {
-+                    char_cell  = False;
-+                    reason = "characters not all same ascent or descent";
-+                }
-+            }
-+        }
-     }
-     printf ("%s", char_cell ? "Character Cell" : "Monospaced");
-     if (reason) printf (" (%s)", reason);
-     printf ("\n");
--      
-+        
-     return;
- }
- static void
--print_character_metrics (info)
--    register XFontStruct *info;
-+print_character_metrics(register XFontStruct *info)
- {
-     register XCharStruct *pc = info->per_char;
-     register int i, j;
-@@ -610,49 +783,46 @@
-     printf ("  character metrics:\n");
-     saven = ((info->min_byte1 << 8) | info->min_char_or_byte2);
-     for (j = info->min_byte1; j <= info->max_byte1; j++) {
--      n = saven;
--      for (i = info->min_char_or_byte2; i <= info->max_char_or_byte2; i++) {
--          char *s = XKeysymToString ((KeySym) n);
--          printf (char_metrics_fmt, j, i, n, pc->width, pc->lbearing,
--                  pc->rbearing, pc->ascent, pc->descent, pc->attributes,
--                  s ? s : ".");
--          pc++;
--          n++;
--      }
--      saven += 256;
-+        n = saven;
-+        for (i = info->min_char_or_byte2; i <= info->max_char_or_byte2; i++) {
-+            char *s = XKeysymToString ((KeySym) n);
-+            printf (char_metrics_fmt, j, i, n, pc->width, pc->lbearing,
-+                    pc->rbearing, pc->ascent, pc->descent, pc->attributes,
-+                    s ? s : ".");
-+            pc++;
-+            n++;
-+        }
-+        saven += 256;
-     }
- }
--
--void
--do_query_font (dpy, name)
--    Display *dpy;
--    char *name;
-+static
-+void do_query_font (Display *dpy, char *name)
- {
-     register int i;
-     register XFontStruct *info = XLoadQueryFont (dpy, name);
-     if (!info) {
--      fprintf (stderr, "%s:  unable to get info about font \"%s\"\n",
--               program_name, name);
--      return;
-+        fprintf (stderr, "%s:  unable to get info about font \"%s\"\n",
-+                 program_name, name);
-+        return;
-     }
-     printf ("name:  %s\n", name ? name : "(nil)");
-     printf ("  direction:\t\t%s\n", ((info->direction == FontLeftToRight)
--                                   ? "left to right" : "right to left"));
-+                                     ? "left to right" : "right to left"));
-     printf ("  indexing:\t\t%s\n", 
--          ((info->min_byte1 == 0 && info->max_byte1 == 0) ? "linear" :
--           "matrix"));
-+            ((info->min_byte1 == 0 && info->max_byte1 == 0) ? "linear" :
-+             "matrix"));
-     printf ("  rows:\t\t\t0x%02x thru 0x%02x (%d thru %d)\n",
--          info->min_byte1, info->max_byte1,
--          info->min_byte1, info->max_byte1);
-+            info->min_byte1, info->max_byte1,
-+            info->min_byte1, info->max_byte1);
-     printf ("  columns:\t\t0x%02x thru 0x%02x (%d thru %d)\n",
--          info->min_char_or_byte2, info->max_char_or_byte2,
--          info->min_char_or_byte2, info->max_char_or_byte2);
-+            info->min_char_or_byte2, info->max_char_or_byte2,
-+            info->min_char_or_byte2, info->max_char_or_byte2);
-     printf ("  all chars exist:\t%s\n",
--      (info->all_chars_exist) ? "yes" : "no");
-+        (info->all_chars_exist) ? "yes" : "no");
-     printf ("  default char:\t\t0x%04x (%d)\n",
--          info->default_char, info->default_char);
-+            info->default_char, info->default_char);
-     printf ("  ascent:\t\t%d\n", info->ascent);
-     printf ("  descent:\t\t%d\n", info->descent);
-     ComputeFontType (info);
-@@ -660,11 +830,13 @@
-     PrintBounds ("min", &info->min_bounds);
-     PrintBounds ("max", &info->max_bounds);
-     if (info->per_char && long_list >= L_VERYLONG) 
--      print_character_metrics (info);
-+        print_character_metrics (info);
-     printf ("  properties:\t\t%d\n", info->n_properties);
-     for (i = 0; i < info->n_properties; i++)
--      PrintProperty (&info->properties[i]);
-+        PrintProperty (&info->properties[i]);
-     printf ("\n");
-     XFreeFontInfo (NULL, info, 1);
- }
-+
-+
-Index: programs/xlsfonts/xlsfonts.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xlsfonts/xlsfonts.man,v
-retrieving revision 1.2
-retrieving revision 1.2.4.2
-diff -u -u -r1.2 -r1.2.4.2
---- programs/xlsfonts/xlsfonts.man     23 Apr 2004 19:54:58 -0000      1.2
-+++ programs/xlsfonts/xlsfonts.man     15 Dec 2004 07:17:48 -0000      1.2.4.2
-@@ -1,105 +1,175 @@
--.\" $Xorg: xlsfonts.man,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $
--.\" Copyright 1988, 1998  The Open Group
--.\" 
--.\" Permission to use, copy, modify, distribute, and sell this software and its
--.\" documentation for any purpose is hereby granted without fee, provided that
--.\" the above copyright notice appear in all copies and that both that
--.\" copyright notice and this permission notice appear in supporting
--.\" documentation.
--.\" 
--.\" The above copyright notice and this permission notice shall be included
--.\" in all copies or substantial portions of the Software.
--.\" 
--.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
--.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
--.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
--.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
--.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
--.\" OTHER DEALINGS IN THE SOFTWARE.
--.\" 
--.\" Except as contained in this notice, the name of The 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/programs/xlsfonts/xlsfonts.man,v 1.7 2001/01/27 18:21:18 dawes Exp $
--.\"
--.TH XLSFONTS 1 __xorgversion__
-+.\" -*- coding: us-ascii -*-
-+.TH xlsfonts __appmansuffix__ "8 October 2004"  
- .SH NAME
- xlsfonts \- server font list displayer for X
- .SH SYNOPSIS
--.B xlsfonts
--[\-options ...] [\-fn pattern]
-+.ad l
-+\fBxlsfonts\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-display \fBhost:dpy\fR\fR] [\fB\-l\fR] [\fB\-ll\fR] [\fB\-lll\fR] [\fB\-m\fR] [\fB\-C\fR] [\fB\-1\fR] [\fB\-w \fBwidth\fR\fR] [\fB\-n \fBcolumns\fR\fR] [\fB\-u\fR] [\fB\-o\fR] [\fB\-fn \fBpattern\fR\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.PP
-+.ad l
-+\fBxlsfonts\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+\fB\-printer \fBprintername\fR\fR [\fB\-l\fR] [\fB\-ll\fR] [\fB\-lll\fR] [\fB\-m\fR] [\fB\-C\fR] [\fB\-1\fR] [\fB\-w \fBwidth\fR\fR] [\fB\-n \fBcolumns\fR\fR] [\fB\-u\fR] [\fB\-o\fR] [\fB\-b\fR] [\fB\-B\fR] [\fB\-g\fR] [\fB\-G\fR] [\fB\-x \fBmode\fR\fR] [\fB\-X \fBmode\fR\fR] [\fB\-fn \fBpattern\fR\fR]
-+'in \n(.iu-\nxu
-+.ad b
- .SH DESCRIPTION
--.I Xlsfonts
--lists the fonts that match the given \fIpattern\fP.
--The wildcard character "*" may be used to match any sequence of
--characters (including none), and "?" to match any single character.
-+xlsfonts lists the fonts that match the given pattern.
-+The wildcard character "*" may be used to match any sequence of characters
-+(including none), and "?" to match any single character.
- If no pattern is given, "*" is assumed.
- .PP
--The "*" and "?" characters must be quoted to prevent them from
--being expanded by the shell.
--.SH "OPTIONS"
--.PP
--.TP 8
--.B \-display \fIhost\fP:\fIdpy\fP
-+The "*" and "?" characters must be quoted to prevent them from being expanded by the shell.
-+.SH OPTIONS
-+.TP 
-+\fB\-display \fIhost:dpy\fB\fR 
- This option specifies the X server to contact.
--.PP
--.TP 8
--.B \-l
--Lists some attributes of the font on one line in addition to its name.
--.TP 8
--.B \-ll
--Lists font properties in addition to \fB\-l\fP output.
--.TP 8
--.B \-lll
--Lists character metrics in addition to \fB\-ll\fP output.
--.TP 8
--.B \-m
--This option indicates that long listings should also print the minimum and
--maximum bounds of each font.
--.TP 8
--.B \-C
--This option indicates that listings should use multiple columns.  This is the
--same as \fB\-n 0\fP.
--.TP 8
--.B \-1
--This option indicates that listings should use a single column.  This is the
--same as \fB\-n 1\fP.
--.TP 8
--.B \-w \fIwidth\fP
--This option specifies the width in characters that should be used in 
--figuring out how many columns to print.  The default is 79.
--.TP 8
--.B \-n \fIcolumns\fP
--This option specifies the number of columns to use in displaying the output.
--By default, it will attempt to fit as many columns of font names into the 
--number of character specified by \fB\-w \fIwidth\fR.
--.TP 8
--.B \-u
-+.TP 
-+\fB\-printer \fIprintername\fB\fR 
-+This option specifies the Xprint printer to contact.
-+.TP 
-+\fB\-d \fIhost:dpy\fB\fR 
-+Same as \fB\-display \fIhost:dpy\fB\fR.
-+.TP 
-+\fB\-p \fIprintername\fB\fR 
-+Same as \fB\-printer \fIprintername\fB\fR.
-+.TP 
-+\fB\-l\fR 
-+Lists some attributes of the font on one line in addition
-+to its name.
-+.TP 
-+\fB\-ll\fR 
-+Lists font properties in addition to \fB\-l\fR output.
-+.TP 
-+\fB\-lll\fR 
-+Lists character metrics in addition to \fB\-ll\fR output.
-+.TP 
-+\fB\-m\fR 
-+This option indicates that long listings should also print
-+the minimum and maximum bounds of each font.
-+.TP 
-+\fB\-C\fR 
-+This option indicates that listings should use multiple columns.
-+This is the same as \fB\-n 0\fR.
-+.TP 
-+\fB\-1\fR 
-+This option indicates that listings should use a single column.
-+This is the same as \fB\-n 1\fR.
-+.TP 
-+\fB\-w \fIwidth\fB\fR 
-+This option specifies the width in characters that should be
-+used in figuring out how many columns to print.
-+The default is 79.
-+.TP 
-+\fB\-n \fIcolumns\fB\fR 
-+This option specifies the number of columns to use in
-+displaying the output. By default, it will attempt to
-+fit as many columns of font names into the number of
-+character specified by \fB\-w\fR width.
-+.TP 
-+\fB\-u\fR 
- This option indicates that the output should be left unsorted.
--.TP 8
--.B \-o
--This option indicates that \fIxlsfonts\fP should do an \fBOpenFont\fP (and
--\fBQueryFont\fP, if appropriate) rather than a \fBListFonts\fP.  This is
--useful if \fBListFonts\fP or \fBListFontsWithInfo\fP fail to list a known
--font (as is the case with some scaled font systems).
--.TP 8
--.B \-fn \fIpattern\fP
-+.TP 
-+\fB\-o\fR 
-+This option indicates that xlsfonts should do an OpenFont
-+(and QueryFont, if appropriate) rather than a ListFonts.
-+This is useful if ListFonts or ListFontsWithInfo fail to
-+list a known font (as is the case with some scaled font
-+systems).
-+.TP 
-+\fB\-b\fR 
-+List printer builtin fonts.
-+This is the same as \fB\-x xp\-list\-internal\-printer\-fonts\fR.
-+
-+(printer mode only)
-+.TP 
-+\fB\-B\fR 
-+Do not list printer builtin fonts.
-+This is the same as \fB\-X xp\-list\-internal\-printer\-fonts\fR.
-+
-+(printer mode only)
-+.TP 
-+\fB\-g\fR 
-+List glyph fonts.
-+This is the same as \fB\-x xp\-list\-glyph\-fonts\fR.
-+
-+(printer mode only)
-+.TP 
-+\fB\-G\fR 
-+Do not list glyph fonts.
-+This is the same as \fB\-X xp\-list\-glyph\-fonts\fR.
-+
-+(printer mode only)
-+.TP 
-+\fB\-x \fImode\fB\fR 
-+Enable listfont mode \fImode\fR.
-+
-+Supported modes are:
-+.RS 
-+.TP 
-+xp-listinternal-printer-fonts
-+If \fBxp\-listinternal\-printer\-fonts\fR was set
-+(via option \fB\-b\fR or
-+\fB\-x xp\-listinternal\-printer\-fonts\fR xlsfonts
-+will include all of the fonts defined as internal printer fonts.
-+.TP 
-+xp-list-glyph-fonts
-+If \fBxp\-list\-glyph\-fonts\fR was set (via option \fB\-g\fR or
-+\fB\-x xp\-list\-glyph\-fonts\fR) xlsfonts will
-+include all of the fonts available to the server which have
-+glyphs associated with them.
-+.RE
-+
-+
-+The default value is implicitly determined by the ddx driver to be the
-+all of the listfonts modes specified in the \fBxp\-listfonts\-modes\-supported\fR
-+printer attribute.
-+
-+
-+The value of \fBxp\-listfonts\-modes\-supported\fR and
-+\fBxp\-listfonts\-modes\fR (the defaults) can be looked-up via
-+\fBxplsprinters\fR(__appmansuffix__).
-+
-+
-+(printer mode only)
-+.TP 
-+\fB\-X \fImode\fB\fR 
-+Disable listfont mode \fImode\fR.
-+See option \fB\-x\fR for a list of valid
-+\fImode\fR values.
-+
-+(printer mode only)
-+.TP 
-+\fB\-fn \fIpattern\fB\fR 
- This option specifies the font name pattern to match.
--.PP
- .SH "SEE ALSO"
--X(__miscmansuffix__), Xserver(1), xset(1), xfd(1),
--.I "X Logical Font Description Conventions"
-+\fBX\fR(__miscmansuffix__), \fBXprint\fR(__miscmansuffix__), \fBXserver\fR(__appmansuffix__), \fBxset\fR(__appmansuffix__), \fBxfd\fR(__appmansuffix__), \fBxplsprinters\fR(__appmansuffix__), X Logical Font Description Conventions
- .SH ENVIRONMENT
--.TP 8
--.B DISPLAY
--to get the default host and display to use.
-+.TP 
-+\fBDISPLAY\fR 
-+\fBDISPLAY\fR must be set to get the default host and display to use.
-+.TP 
-+\fBXPSERVERLIST\fR 
-+\fBXPSERVERLIST\fR must be set for the \fB\-printer\fR option
-+identifying the available Xprint servers.
-+See \fBXprint\fR(__miscmansuffix__)
-+for more details.
- .SH BUGS
--Doing ``xlsfonts -l'' can tie up your server for a very long time.
--This is really a bug with single-threaded non-preemptable servers, not with
--this program.
-+Doing ``xlsfonts -l'' can tie up your server for a very long time. 
-+This is really a bug with single-threaded
-+non-preemptable servers, not with this program.
- .SH AUTHOR
--Mark Lillibridge, MIT Project Athena; Jim Fulton, MIT X Consortium;
--Phil Karlton, SGI
-+
-+Mark Lillibridge
-+.PP
-+Jim Fulton
-+.PP
-+Phil Karlton
-+.PP
-+Roland Mainz
-+
-Index: programs/xlsfonts/xlsfonts.sgml
-===================================================================
-RCS file: programs/xlsfonts/xlsfonts.sgml
-diff -N programs/xlsfonts/xlsfonts.sgml
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ programs/xlsfonts/xlsfonts.sgml    15 Dec 2004 07:17:48 -0000      1.2.4.2
-@@ -0,0 +1,473 @@
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
-+
-+<!-- Process this file with DocBook tools to generate the output format
-+(such as manual pages or HTML documents).
-+
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
-+__miscmansuffix__ etc. have to be replaced first (in theory that's the
-+job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
-+A quick way to do that is to filter this document via
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+assuming that env vars like MANSUFFIX etc. have been set to the matching
-+manual volume numbers.
-+  -->
-+
-+<refentry>
-+  <refmeta>
-+    <refentrytitle>xlsfonts</refentrytitle>
-+    <manvolnum>__appmansuffix__</manvolnum>
-+  </refmeta>
-+
-+  <refnamediv>
-+    <refname>xlsfonts</refname>
-+    <refpurpose>server font list displayer for X</refpurpose>
-+  </refnamediv>
-+
-+  <refsynopsisdiv>
-+    <!-- video mode -->
-+    <cmdsynopsis>
-+      <command>xlsfonts</command>
-+
-+      <arg><option>-display <replaceable>host:dpy</replaceable></option></arg>
-+
-+      <arg><option>-l</option></arg>
-+
-+      <arg><option>-ll</option></arg>
-+
-+      <arg><option>-lll</option></arg>
-+
-+      <arg><option>-m</option></arg>
-+
-+      <arg><option>-C</option></arg>
-+
-+      <arg><option>-1</option></arg>
-+
-+      <arg><option>-w <replaceable>width</replaceable></option></arg>
-+
-+      <arg><option>-n <replaceable>columns</replaceable></option></arg>
-+
-+      <arg><option>-u</option></arg>
-+
-+      <arg><option>-o</option></arg>
-+
-+      <arg><option>-fn <replaceable>pattern</replaceable></option></arg>     
-+    </cmdsynopsis>
-+
-+    <!-- printer mode -->
-+    <cmdsynopsis>
-+      <command>xlsfonts</command>
-+
-+      <arg choice="plain"><option>-printer <replaceable>printername</replaceable></option></arg>
-+
-+      <arg><option>-l</option></arg>
-+
-+      <arg><option>-ll</option></arg>
-+
-+      <arg><option>-lll</option></arg>
-+
-+      <arg><option>-m</option></arg>
-+
-+      <arg><option>-C</option></arg>
-+
-+      <arg><option>-1</option></arg>
-+
-+      <arg><option>-w <replaceable>width</replaceable></option></arg>
-+
-+      <arg><option>-n <replaceable>columns</replaceable></option></arg>
-+
-+      <arg><option>-u</option></arg>
-+
-+      <arg><option>-o</option></arg>
-+
-+      <arg><option>-b</option></arg>
-+
-+      <arg><option>-B</option></arg>
-+
-+      <arg><option>-g</option></arg>
-+
-+      <arg><option>-G</option></arg>
-+
-+      <arg><option>-x <replaceable>mode</replaceable></option></arg>
-+
-+      <arg><option>-X <replaceable>mode</replaceable></option></arg>
-+
-+      <arg><option>-fn <replaceable>pattern</replaceable></option></arg>     
-+    </cmdsynopsis>
-+  </refsynopsisdiv>
-+
-+  <refsect1>
-+    <title>DESCRIPTION</title>
-+
-+    <para>
-+      <command>xlsfonts</command> lists the fonts that match the given pattern.
-+      The wildcard character "*" may be used to match any sequence of characters
-+      (including none), and "?" to match any single character.
-+      If no pattern is given, "*" is assumed.
-+    </para>
-+    <para>
-+      The "*" and "?" characters must be quoted to prevent them from being expanded by the shell.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>OPTIONS</title>
-+
-+    <variablelist>
-+      <varlistentry>
-+        <term><option>-display <replaceable>host:dpy</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option specifies the X server to contact.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-printer <replaceable>printername</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option specifies the Xprint printer to contact.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-d <replaceable>host:dpy</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Same as <option>-display <replaceable>host:dpy</replaceable></option>.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-p <replaceable>printername</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Same as <option>-printer <replaceable>printername</replaceable></option>.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-l</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Lists some attributes of the font on one line in addition
-+            to its name.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-ll</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Lists font properties in addition to <option>-l</option> output.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+      
-+      <varlistentry>
-+        <term><option>-lll</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Lists character metrics in addition to <option>-ll</option> output.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-m</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option indicates that long listings should also print
-+            the minimum and maximum bounds of each font.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-C</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option indicates that listings should use multiple columns.
-+            This is the same as <option>-n 0</option>.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-1</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option indicates that listings should use a single column.
-+            This is the same as <option>-n 1</option>.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-w <replaceable>width</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option specifies the width in characters that should be
-+            used in figuring out how many columns to print.
-+            The default is 79.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-n <replaceable>columns</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option specifies the number of columns to use in
-+            displaying the output. By default, it will attempt to
-+            fit as many columns of font names into the number of
-+            character specified by <option>-w</option> width.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-u</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option indicates that the output should be left unsorted.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-o</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option indicates that xlsfonts should do an OpenFont
-+            (and QueryFont, if appropriate) rather than a ListFonts.
-+            This is useful if ListFonts or ListFontsWithInfo fail to
-+            list a known font (as is the case with some scaled font
-+            systems).
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-b</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            List printer builtin fonts.
-+            This is the same as <option>-x xp-list-internal-printer-fonts</option>.
-+          </para>
-+          <para>
-+            (printer mode only)
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-B</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Do not list printer builtin fonts.
-+            This is the same as <option>-X xp-list-internal-printer-fonts</option>.
-+          </para>
-+          <para>
-+            (printer mode only)
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-g</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            List glyph fonts.
-+            This is the same as <option>-x xp-list-glyph-fonts</option>.
-+          </para>
-+          <para>
-+            (printer mode only)
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-G</option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Do not list glyph fonts.
-+            This is the same as <option>-X xp-list-glyph-fonts</option>.
-+          </para>
-+          <para>
-+            (printer mode only)
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-x <replaceable>mode</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Enable listfont mode <replaceable>mode</replaceable>.
-+          </para>
-+          <para>
-+            Supported modes are:
-+            <variablelist>
-+              <varlistentry>
-+                <term>xp-listinternal-printer-fonts</term>
-+                <listitem>
-+                  <para>
-+                    If <literal>xp-listinternal-printer-fonts</literal> was set
-+                    (via option <option>-b</option> or
-+                    <option>-x xp-listinternal-printer-fonts</option> <command>xlsfonts</command>
-+                    will include all of the fonts defined as internal printer fonts.
-+                  </para>
-+                </listitem>
-+              </varlistentry>
-+
-+              <varlistentry>
-+                <term>xp-list-glyph-fonts</term>
-+                <listitem>
-+                  <para>
-+                    If <literal>xp-list-glyph-fonts</literal> was set (via option <option>-g</option> or
-+                    <option>-x xp-list-glyph-fonts</option>) <command>xlsfonts</command> will
-+                    include all of the fonts available to the server which have
-+                    glyphs associated with them.
-+                  </para>
-+                </listitem>
-+              </varlistentry>
-+            </variablelist>
-+
-+            <para>
-+              The default value is implicitly determined by the ddx driver to be the
-+              all of the listfonts modes specified in the <literal>xp-listfonts-modes-supported</literal>
-+              printer attribute.
-+            </para>
-+                                
-+            <para>
-+              The value of <literal>xp-listfonts-modes-supported</literal> and
-+              <literal>xp-listfonts-modes</literal> (the defaults) can be looked-up via
-+              <citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry>.
-+            </para>
-+          </para>
-+
-+          <para>
-+            (printer mode only)
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+
-+      <varlistentry>
-+        <term><option>-X <replaceable>mode</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            Disable listfont mode <replaceable>mode</replaceable>.
-+            See option <option>-x</option> for a list of valid
-+            <replaceable>mode</replaceable> values.
-+          </para>
-+          <para>
-+            (printer mode only)
-+          </para>
-+        </listitem>
-+      </varlistentry>      
-+
-+      <varlistentry>
-+        <term><option>-fn <replaceable>pattern</replaceable></option>
-+        </term>
-+        <listitem>
-+          <para>
-+            This option specifies the font name pattern to match.
-+          </para>
-+        </listitem>
-+      </varlistentry>
-+    </variablelist>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>SEE ALSO</title>
-+    <para>
-+      <simplelist type="inline">
-+        <member><citerefentry><refentrytitle>X</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xset</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xfd</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member>X Logical Font Description Conventions</member>
-+      </simplelist>
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>ENVIRONMENT</title>
-+
-+    <variablelist>
-+      <varlistentry>
-+        <term><envar>DISPLAY</envar>
-+        </term>
-+        <listitem>
-+          <para><envar>DISPLAY</envar> must be set to get the default host and display to use.
-+        </para>
-+      </listitem>
-+      </varlistentry>
-+      
-+      <varlistentry>
-+        <term><envar>XPSERVERLIST</envar>
-+        </term>
-+        <listitem>
-+          <para><envar>XPSERVERLIST</envar> must be set for the <option>-printer</option> option
-+          identifying the available Xprint servers.
-+            See <citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
-+          for more details.
-+        </para>
-+      </listitem>
-+      </varlistentry>
-+    </variablelist>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>BUGS</title>
-+
-+    <para>
-+      Doing ``xlsfonts -l'' can tie up your server for a very long time. 
-+      This is really a bug  with  single-threaded
-+      non-preemptable servers, not with this program.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-+    <title>AUTHOR</title>
-+
-+    <para>
-+      <simplelist>
-+        <member><othercredit><firstname>Mark</firstname> <surname>Lillibridge</surname> <affiliation><orgname>MIT Project Athena</orgname></affiliation></othercredit></member>
-+        <member><othercredit><firstname>Jim</firstname> <surname>Fulton</surname> <affiliation><orgname>MIT X Consortium</orgname></affiliation></othercredit></member>
-+        <member><othercredit><firstname>Phil</firstname> <surname>Karlton</surname> <affiliation><orgname>SGI</orgname></affiliation></othercredit></member>
-+        <member><othercredit><firstname>Roland</firstname> <surname>Mainz</surname> <affiliation><orgname>University Giessen</orgname></affiliation></othercredit></member>
-+      </simplelist>
-+    </para>
-+  </refsect1>
-+
-+</refentry>
-+
-+
-Index: programs/xman/print.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xman/print.c,v
-retrieving revision 1.1
-retrieving revision 1.1.4.1
-diff -u -u -r1.1 -r1.1.4.1
---- programs/xman/print.c      8 Jun 2004 02:44:35 -0000       1.1
-+++ programs/xman/print.c      13 Dec 2004 07:15:56 -0000      1.1.4.1
-@@ -294,6 +294,10 @@
-     apd->jobtitle = jobtitle;
-     n = 0;
-+    /* Override any geometry resource settings as XawPrintShell adjusts it's size
-+     * to the current page siue when |XawPrintLAYOUTMODE_DRAWABLEAREA| or
-+     * |XawPrintLAYOUTMODE_PAGESIZE| are used. */
-+    XtSetArg(args[n], XtNgeometry,    "+0+0");                          n++;
-     XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
-     apd->printshell = CreatePrintShell(toplevel, apd->pscreen, "printshell", args, n);
-Index: programs/xman/search.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xman/search.c,v
-retrieving revision 1.5
-retrieving revision 1.5.2.1
-diff -u -u -r1.5 -r1.5.2.1
---- programs/xman/search.c     2 Sep 2004 08:40:33 -0000       1.5
-+++ programs/xman/search.c     13 Dec 2004 07:11:51 -0000      1.5.2.1
-@@ -169,6 +169,10 @@
-     return(NULL);
-   }
-+  if (strlen(search_string) >= BUFSIZ) {
-+    PopupWarning(man_globals, "Search string too long.");
-+    return(NULL);
-+  }
-   if (search_string[0] == ' ') {
-     PopupWarning(man_globals, "First character cannot be a space.");
-     return(NULL);
-@@ -205,16 +209,17 @@
-       strcpy(path,manpath);
-     }
--    sprintf(label,"Results of apropos search on: %s", search_string);
-+    snprintf(label, sizeof(label), 
-+      "Results of apropos search on: %s", search_string);
- #ifdef NO_MANPATH_SUPPORT     /* not quite correct, but the best I can do. */
--    sprintf(cmdbuf, APROPOS_FORMAT, search_string, mantmp);
-+    snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
- #else
--    sprintf(cmdbuf, APROPOS_FORMAT, path, search_string, mantmp);
-+    snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, path, search_string, mantmp);
- #endif
-     if(system(cmdbuf) != 0) { /* execute search. */
--      sprintf(error_buf,"Something went wrong trying to run %s\n",cmdbuf);
-+      snprintf(error_buf, sizeof(error_buf), "Something went wrong trying to run %s\n",cmdbuf);
-       PopupWarning(man_globals, error_buf);
-     }
-@@ -232,7 +237,7 @@
-     unlink(mantmp);
--    sprintf(string_buf,"%s: nothing appropriate", search_string);
-+    snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate", search_string);
-     /*
-      * Check first LOOKLINES lines for "nothing appropriate".
-@@ -263,14 +268,15 @@
-       return(NULL);
-     }
-   
--    strcpy(man_globals->manpage_title,label);
-+    snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title), 
-+           "%s", label);
-     ChangeLabel(man_globals->label,label);
-     fseek(file, 0L, SEEK_SET);                /* reset file to point at top. */
-   }
-   else {                      /* MANUAL SEACH */
-     file = DoManualSearch(man_globals, search_string);
-     if (file == NULL) {
--      sprintf(string_buf,"No manual entry for %s.", search_string);
-+      snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
-       ChangeLabel(man_globals->label, string_buf);
-       if (man_globals->label == NULL)
-       PopupWarning(man_globals, string_buf);
-Index: programs/xmodmap/pf.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xmodmap/pf.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- programs/xmodmap/pf.c      14 Nov 2003 16:49:23 -0000      1.1.1.1
-+++ programs/xmodmap/pf.c      8 Dec 2004 06:16:20 -0000       1.1.1.1.6.1
-@@ -87,8 +87,12 @@
-     int i;
-     char *cp;
--    len = strlen (buffer);
--
-+    /* copy buffer since it may point to unwritable date */
-+    len = strlen(buffer);
-+    cp = chk_malloc(len + 1);
-+    strcpy(cp, buffer);
-+    buffer = cp;
-+    
-     for (i = 0; i < len; i++) {               /* look for blank lines */
-       register char c = buffer[i];
-       if (!(isspace(c) || c == '\n')) break;
-Index: programs/xmodmap/xmodmap.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xmodmap/xmodmap.c,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xmodmap/xmodmap.c 23 Apr 2004 19:54:59 -0000      1.2
-+++ programs/xmodmap/xmodmap.c 8 Dec 2004 06:16:20 -0000       1.2.4.1
-@@ -51,6 +51,16 @@
-     exit (status);
- }
-+void *
-+chk_malloc(size_t n_bytes)
-+{
-+    void *buf = malloc(n_bytes);
-+    if (!buf) {
-+      fprintf(stderr, "%s: Could not allocate %d bytes\n", ProgramName, (int)n_bytes);
-+      Exit(-1);
-+    }
-+    return buf;
-+}
- static char *help_message[] = {
- "\nwhere options include:",
-@@ -244,9 +254,10 @@
-             case 's':
-             case 'l':
-             case 'c': {
--                char cmd[80];         /* big enough to hold line */
-+                char *cmd;
-                 didAnything = True;
-                 if (++i >= argc) usage ();
-+                cmd = chk_malloc (strlen ("remove control = ") + strlen (argv[i]) + 1);
-                 (void) sprintf (cmd, "remove %s = %s",
-                                 ((arg[1] == 's') ? "shift" :
-                                  ((arg[1] == 'l') ? "lock" :
-@@ -265,10 +276,10 @@
-             case '3':
-             case '4':
-             case '5': {
--                char cmd[80];         /* big enough to hold line */
-+                char *cmd;
-                 didAnything = True;
-                 if (++i >= argc) usage ();
--
-+                cmd = chk_malloc (strlen ("add modX = ") + strlen (argv[i]) + 1);
-                 (void) sprintf (cmd, "add mod%c = %s", arg[1], argv[i]);
-                 process_line (cmd);
-                 continue;
-@@ -281,9 +292,10 @@
-             case 's':
-             case 'l':
-             case 'c': {
--                char cmd[80];         /* big enough to hold line */
-+                char *cmd;
-                 didAnything = True;
-                 if (++i >= argc) usage ();
-+                cmd = chk_malloc (strlen ("add control = ") + strlen (argv[i]) + 1);
-                 (void) sprintf (cmd, "add %s = %s",
-                                 ((arg[1] == 's') ? "shift" :
-                                  ((arg[1] == 'l') ? "lock" :
-Index: programs/xmodmap/xmodmap.h
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xmodmap/xmodmap.h,v
-retrieving revision 1.2
-retrieving revision 1.2.4.1
-diff -u -u -r1.2 -r1.2.4.1
---- programs/xmodmap/xmodmap.h 23 Apr 2004 19:54:59 -0000      1.2
-+++ programs/xmodmap/xmodmap.h 8 Dec 2004 06:16:20 -0000       1.2.4.1
-@@ -56,3 +56,5 @@
- extern void PrintKeyTable(Bool exprs, FILE *fp);
- extern void PrintPointerMap(FILE *fp);
- extern int SetPointerMap(unsigned char *map, int n);
-+
-+extern void *chk_malloc(size_t n_bytes);
-Index: programs/xmore/print.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xmore/print.c,v
-retrieving revision 1.4
-retrieving revision 1.4.4.1
-diff -u -u -r1.4 -r1.4.4.1
---- programs/xmore/print.c     8 Jun 2004 02:44:35 -0000       1.4
-+++ programs/xmore/print.c     13 Dec 2004 07:15:56 -0000      1.4.4.1
-@@ -305,6 +305,10 @@
-     apd->jobtitle = jobtitle;
-     n = 0;
-+    /* Override any geometry resource settings as XawPrintShell adjusts it's size
-+     * to the current page siue when |XawPrintLAYOUTMODE_DRAWABLEAREA| or
-+     * |XawPrintLAYOUTMODE_PAGESIZE| are used. */
-+    XtSetArg(args[n], XtNgeometry,    "+0+0");                          n++;
-     XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
-     apd->printshell = CreatePrintShell(toplevel, apd->pscreen, "printshell", args, n);
-Index: programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpawhelloworld/xpawhelloworld.c      23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xpawhelloworld/xpawhelloworld.c      13 Dec 2004 07:15:56 -0000      1.2.6.1
-@@ -302,6 +302,10 @@
-     if( doPrint )
-     {
-       n = 0;
-+      /* Override any geometry resource settings as XawPrintShell adjusts it's size
-+       * to the current page siue when |XawPrintLAYOUTMODE_DRAWABLEAREA| or
-+       * |XawPrintLAYOUTMODE_PAGESIZE| are used. */
-+      XtSetArg(args[n], XtNgeometry,    "+0+0");                          n++;
-       XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
-       print_shell = XtCreatePopupShell("myprintshell", 
-                                        xawPrintShellWidgetClass, 
-Index: programs/xphelloworld/xphelloworld/xphelloworld.html
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xphelloworld/xphelloworld.html,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xphelloworld/xphelloworld.html       23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xphelloworld/xphelloworld.html       15 Dec 2004 07:17:48 -0000      1.2.6.1
-@@ -1,9 +1,9 @@
--<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xphelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2590201"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xphelloworld &#8212; sends a test page to an Xprint printer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xphelloworld</tt>  [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-printargs
--      <i class="replaceable"><tt>arg</tt></i>=<i class="replaceable"><tt>value</tt></i> [,...]</tt>] [<tt class="option">-v</tt>] [<tt class="option">-text <i class="replaceable"><tt>text</tt></i></tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2804938"></a><h2>DESCRIPTION</h2><p><span><b class="command">xphelloworld</b></span> is a utility for Xprint, the
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xphelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589918"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xphelloworld &#8212; sends a test page to an Xprint printer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xphelloworld</tt>  [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-printargs
-+      <i class="replaceable"><tt>arg</tt></i>=<i class="replaceable"><tt>value</tt></i> [,...]</tt>] [<tt class="option">-v</tt>] [<tt class="option">-text <i class="replaceable"><tt>text</tt></i></tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2804934"></a><h2>DESCRIPTION</h2><p><span><b class="command">xphelloworld</b></span> is a utility for Xprint, the
-       printing system for the X Window system. It sends a test page to
-       the specified printer (or the default printer, if none is specified).
--    </p></div><div class="refsect1" lang="en"><a name="id2804964"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-printargs <i class="replaceable"><tt>arg</tt></i>=<i class="replaceable"><tt>value</tt></i> [,...]</tt></span></dt><dd xmlns:ns1=""><p>Args:
--          </p><div class="variablelist"><dl><dt><span class="term"><b class="userinput"><tt>tofile=<i class="replaceable"><tt>filename</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>papersize=<i class="replaceable"><tt>paper name</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>orientation=<i class="replaceable"><tt>orientation</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>resolution=<i class="replaceable"><tt>DPI</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>plex=<i class="replaceable"><tt>plex</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>title=<i class="replaceable"><tt>string</tt></i></tt></b></span></dt><dd><p></p></dd></dl></div></dd><dt><span class="term"><tt class="option">-text <i class="replaceable"><tt>text</tt></i></tt></span></dt><dd><p>Sample text to print. Default is &quot;hello world from X11 print system&quot;.</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805099"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-+    </p></div><div class="refsect1" lang="en"><a name="id2804960"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-printargs <i class="replaceable"><tt>arg</tt></i>=<i class="replaceable"><tt>value</tt></i> [,...]</tt></span></dt><dd xmlns:ns1=""><p>Args:
-+          </p><div class="variablelist"><dl><dt><span class="term"><b class="userinput"><tt>tofile=<i class="replaceable"><tt>filename</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>papersize=<i class="replaceable"><tt>paper name</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>orientation=<i class="replaceable"><tt>orientation</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>resolution=<i class="replaceable"><tt>DPI</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>plex=<i class="replaceable"><tt>plex</tt></i></tt></b></span></dt><dd><p></p></dd><dt><span class="term"><b class="userinput"><tt>title=<i class="replaceable"><tt>string</tt></i></tt></b></span></dt><dd><p></p></dd></dl></div></dd><dt><span class="term"><tt class="option">-text <i class="replaceable"><tt>text</tt></i></tt></span></dt><dd><p>Sample text to print. Default is &quot;hello world from X11 print system&quot;.</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805098"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-             identifying the available Xprint servers.
-               See <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>
-             for more details.
-Index: programs/xphelloworld/xphelloworld/xphelloworld.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xphelloworld/xphelloworld.man,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xphelloworld/xphelloworld.man        23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xphelloworld/xphelloworld.man        15 Dec 2004 07:17:48 -0000      1.2.6.1
-@@ -1,64 +1,63 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "XPHELLOWORLD" "__mansuffix__" "13 February 2004" "" ""
-+.\" -*- coding: us-ascii -*-
-+.TH xphelloworld __appmansuffix__ "8 October 2004"  
- .SH NAME
- xphelloworld \- sends a test page to an Xprint printer
- .SH SYNOPSIS
--
--\fBxphelloworld\fR [ \fB-printer \fIprinternname\fB\fR]  [ \fB-printargs
--\fIarg\fB=\fIvalue\fB [,...]\fR]  [ \fB-v\fR]  [ \fB-text \fItext\fB\fR]  [ \fB-h\fR] 
--
--.SH "DESCRIPTION"
--.PP
--\fBxphelloworld\fR is a utility for Xprint, the
-+.ad l
-+\fBxphelloworld\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-printer \fBprinternname\fR\fR] [\fB\-printargs
-+\fBarg\fR= \fBvalue\fR [,...]\fR] [\fB\-v\fR] [\fB\-text \fBtext\fR\fR] [\fB\-h\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+xphelloworld is a utility for Xprint, the
- printing system for the X Window system. It sends a test page to
- the specified printer (or the default printer, if none is specified).
--.SH "OPTIONS"
--.TP
--\fB-printer \fIprinternname\fB \fR
-+.SH OPTIONS
-+.TP 
-+\fB\-printer \fIprinternname\fB\fR 
- printer to use
--.TP
--\fB-printargs \fIarg\fB=\fIvalue\fB [,...] \fR
-+.TP 
-+\fB\-printargs \fIarg\fB=\fIvalue\fB [,...]\fR 
- Args:
--.RS
--.TP
-+.RS 
-+.TP 
- \fBtofile=\fIfilename\fB\fR
--.TP
-+.TP 
- \fBpapersize=\fIpaper name\fB\fR
--.TP
-+.TP 
- \fBorientation=\fIorientation\fB\fR
--.TP
-+.TP 
- \fBresolution=\fIDPI\fB\fR
--.TP
-+.TP 
- \fBplex=\fIplex\fB\fR
--.TP
-+.TP 
- \fBtitle=\fIstring\fB\fR
- .RE
--.TP
--\fB-text \fItext\fB \fR
-+
-+.TP 
-+\fB\-text \fItext\fB\fR 
- Sample text to print. Default is "hello world from X11 print system".
--.TP
--\fB-v \fR
-+.TP 
-+\fB\-v\fR 
- verbose output
--.TP
--\fB-h \fR
-+.TP 
-+\fB\-h\fR 
- print usage
--.SH "ENVIRONMENT"
--.TP
--\fBXPSERVERLIST \fR
-+.SH ENVIRONMENT
-+.TP 
-+\fBXPSERVERLIST\fR 
- \fB${XPSERVERLIST}\fR must be set,
- identifying the available Xprint servers.
- See \fBXprint\fR(__miscmansuffix__)
- for more details.
- .SH "KNOWN BUGS"
--.PP
--The \fB-text\fR option assumes that the text is in ISO8859-1 encoding
-+The \fB\-text\fR option assumes that the text is in ISO8859-1 encoding
- (the \fB${LANG}\fR environment variable is not honored in this case).
--A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html <URL:http://xprint.mozdev.org/xprint_bugs.html>).
-+
-+A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html).
- .SH "SEE ALSO"
--.PP
--\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__mansuffix__), \fBxpxmhelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpxthelloworld\fR(__mansuffix__), \fBxpsimplehelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
-+\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-Index: programs/xphelloworld/xphelloworld/xphelloworld.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xphelloworld/xphelloworld.sgml,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xphelloworld/xphelloworld.sgml       23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xphelloworld/xphelloworld.sgml       15 Dec 2004 07:17:48 -0000      1.2.6.1
-@@ -1,13 +1,13 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
- <!-- Process this file with DocBook tools to generate the output format
- (such as manual pages or HTML documents).
--Note that strings like __mansuffix__, __filemansuffix__, __libmansuffix__,
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
- __miscmansuffix__ etc. have to be replaced first (in theory that's the
- job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
- A quick way to do that is to filter this document via
--/usr/bin/sed "s/__mansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
- assuming that env vars like MANSUFFIX etc. have been set to the matching
- manual volume numbers.
-   -->
-@@ -15,7 +15,7 @@
- <refentry>
-   <refmeta>
-     <refentrytitle>xphelloworld</refentrytitle>
--    <manvolnum>__mansuffix__</manvolnum>
-+    <manvolnum>__appmansuffix__</manvolnum>
-   </refmeta>
-   <refnamediv>
-     <refname>xphelloworld</refname>
-@@ -159,16 +159,16 @@
-         <!-- Xprint general references -->
-         <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- <!--
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- -->
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-         <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-         <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-Index: programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.html
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.html,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.html   23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.html   15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,4 +1,4 @@
--<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpsimplehelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2590201"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xpsimplehelloworld &#8212; &quot;Hello World&quot;-like Xprint sample utility based on plain X11 rendering calls</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xpsimplehelloworld</tt>  [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-v</tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2802597"></a><h2>DESCRIPTION</h2><p><span><b class="command">xpsimplehelloworld</b></span> is a sample utility for Xprint, the
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpsimplehelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589918"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xpsimplehelloworld &#8212; &quot;Hello World&quot;-like Xprint sample utility based on plain X11 rendering calls</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xpsimplehelloworld</tt>  [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-v</tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2802638"></a><h2>DESCRIPTION</h2><p><span><b class="command">xpsimplehelloworld</b></span> is a sample utility for Xprint, the
-       printing system for the X Window system. It demonstrates how to send a test page to
-       the specified printer (or the default printer, if none is specified) using plain X11
-       rendering instructions and without using special toolkit support (like one of
-@@ -7,10 +7,10 @@
-       <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>
-       or
-       <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>)).
--    </p></div><div class="refsect1" lang="en"><a name="id2804967"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2804998"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-+    </p></div><div class="refsect1" lang="en"><a name="id2804961"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2804998"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-             identifying the available Xprint servers.
-               See <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>
-             for more details.
--        </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805031"></a><h2>KNOWN BUGS</h2><p>
-+        </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805030"></a><h2>KNOWN BUGS</h2><p>
-       A full list of bugs can be obtained from the Xprint.org bug database (<a href="http://xprint.mozdev.org/xprint_bugs.html" target="_top">http://xprint.mozdev.org/xprint_bugs.html</a>).
--    </p></div><div class="refsect1" lang="en"><a name="id2805040"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-+    </p></div><div class="refsect1" lang="en"><a name="id2805039"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-Index: programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.man,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.man    23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.man    15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,18 +1,17 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "XPSIMPLEHELLOWORLD" "__mansuffix__" "13 February 2004" "" ""
-+.\" -*- coding: us-ascii -*-
-+.TH xpsimplehelloworld __appmansuffix__ "8 October 2004"  
- .SH NAME
--xpsimplehelloworld \- \&"Hello World\&"-like Xprint sample utility based on plain X11 rendering calls
-+xpsimplehelloworld \- "Hello World"-like Xprint sample utility based on plain X11 rendering calls
- .SH SYNOPSIS
--
--\fBxpsimplehelloworld\fR [ \fB-printer \fIprinternname\fB\fR]  [ \fB-v\fR]  [ \fB-h\fR] 
--
--.SH "DESCRIPTION"
--.PP
--\fBxpsimplehelloworld\fR is a sample utility for Xprint, the
-+.ad l
-+\fBxpsimplehelloworld\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-printer \fBprinternname\fR\fR] [\fB\-v\fR] [\fB\-h\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+xpsimplehelloworld is a sample utility for Xprint, the
- printing system for the X Window system. It demonstrates how to send a test page to
- the specified printer (or the default printer, if none is specified) using plain X11
- rendering instructions and without using special toolkit support (like one of
-@@ -21,26 +20,24 @@
- \fBXmPrintShell\fR(__libmansuffix__)
- or
- \fBXawPrintShell\fR(__libmansuffix__))).
--.SH "OPTIONS"
--.TP
--\fB-printer \fIprinternname\fB \fR
-+.SH OPTIONS
-+.TP 
-+\fB\-printer \fIprinternname\fB\fR 
- printer to use
--.TP
--\fB-v \fR
-+.TP 
-+\fB\-v\fR 
- verbose output
--.TP
--\fB-h \fR
-+.TP 
-+\fB\-h\fR 
- print usage
--.SH "ENVIRONMENT"
--.TP
--\fBXPSERVERLIST \fR
-+.SH ENVIRONMENT
-+.TP 
-+\fBXPSERVERLIST\fR 
- \fB${XPSERVERLIST}\fR must be set,
- identifying the available Xprint servers.
- See \fBXprint\fR(__miscmansuffix__)
- for more details.
- .SH "KNOWN BUGS"
--.PP
--A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html <URL:http://xprint.mozdev.org/xprint_bugs.html>).
-+A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html).
- .SH "SEE ALSO"
--.PP
--\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__mansuffix__), \fBxphelloworld\fR(__mansuffix__), \fBxpxmhelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpxthelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
-+\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-Index: programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.sgml,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.sgml   23 Apr 2004 19:55:00 -0000      1.2
-+++ programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.sgml   15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,13 +1,13 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
- <!-- Process this file with DocBook tools to generate the output format
- (such as manual pages or HTML documents).
--Note that strings like __mansuffix__, __filemansuffix__, __libmansuffix__,
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
- __miscmansuffix__ etc. have to be replaced first (in theory that's the
- job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
- A quick way to do that is to filter this document via
--/usr/bin/sed "s/__mansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
- assuming that env vars like MANSUFFIX etc. have been set to the matching
- manual volume numbers.
-   -->
-@@ -15,7 +15,7 @@
- <refentry>
-   <refmeta>
-     <refentrytitle>xpsimplehelloworld</refentrytitle>
--    <manvolnum>__mansuffix__</manvolnum>
-+    <manvolnum>__appmansuffix__</manvolnum>
-   </refmeta>
-   <refnamediv>
-     <refname>xpsimplehelloworld</refname>
-@@ -113,16 +113,16 @@
-         <!-- Xprint general references -->
-         <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- <!--
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- -->
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-         <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-         <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-Index: programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.html
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.html,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.html   23 Apr 2004 19:55:02 -0000      1.2
-+++ programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.html   15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,13 +1,13 @@
--<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpxmhelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2590201"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xpxmhelloworld &#8212; &quot;Hello World&quot;-like Xprint sample utility based on the Motif2 toolkit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xpxmhelloworld</tt>  [<tt class="option">-print</tt>] [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-v</tt>] [<tt class="option">-h</tt>]  <i class="replaceable"><tt>string</tt></i>... </p></div></div><div class="refsect1" lang="en"><a name="id2804937"></a><h2>DESCRIPTION</h2><p><span><b class="command">xpxmhelloworld</b></span> is a sample utility for Xprint, the
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpxmhelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589918"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xpxmhelloworld &#8212; &quot;Hello World&quot;-like Xprint sample utility based on the Motif2 toolkit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xpxmhelloworld</tt>  [<tt class="option">-print</tt>] [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-v</tt>] [<tt class="option">-h</tt>]  <i class="replaceable"><tt>string</tt></i>... </p></div></div><div class="refsect1" lang="en"><a name="id2802566"></a><h2>DESCRIPTION</h2><p><span><b class="command">xpxmhelloworld</b></span> is a sample utility for Xprint, the
-       printing system for the X Window system. It demonstrates how to send a test page to
-       the specified printer (or the default printer, if none is specified) based on
-       the Motif2 toolkit using the
-       <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>
-       widget class.
--    </p></div><div class="refsect1" lang="en"><a name="id2804971"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-print</tt></span></dt><dd><p>Print (default is to display on the video Xserver)</p></dd><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805011"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-+    </p></div><div class="refsect1" lang="en"><a name="id2804966"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-print</tt></span></dt><dd><p>Print (default is to display on the video Xserver)</p></dd><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805012"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-             identifying the available Xprint servers.
-               See <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>
-             for more details.
-         </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805044"></a><h2>KNOWN BUGS</h2><p>
-       A full list of bugs can be obtained from the Xprint.org bug database (<a href="http://xprint.mozdev.org/xprint_bugs.html" target="_top">http://xprint.mozdev.org/xprint_bugs.html</a>).
--    </p></div><div class="refsect1" lang="en"><a name="id2805053"></a><h2>SEE ALSO</h2><p><span class="simplelist"><a href="http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm" target="_top">http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm</a>, <a href="http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm" target="_top">http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm</a>, <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-+    </p></div><div class="refsect1" lang="en"><a name="id2805054"></a><h2>SEE ALSO</h2><p><span class="simplelist"><a href="http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm" target="_top">http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm</a>, <a href="http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm" target="_top">http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm</a>, <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-Index: programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.man,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.man    23 Apr 2004 19:55:02 -0000      1.2
-+++ programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.man    15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,46 +1,43 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "XPXMHELLOWORLD" "__mansuffix__" "13 February 2004" "" ""
-+.\" -*- coding: us-ascii -*-
-+.TH xpxmhelloworld __appmansuffix__ "8 October 2004"  
- .SH NAME
--xpxmhelloworld \- \&"Hello World\&"-like Xprint sample utility based on the Motif2 toolkit
-+xpxmhelloworld \- "Hello World"-like Xprint sample utility based on the Motif2 toolkit
- .SH SYNOPSIS
--
--\fBxpxmhelloworld\fR [ \fB-print\fR]  [ \fB-printer \fIprinternname\fB\fR]  [ \fB-v\fR]  [ \fB-h\fR]  \fB\fIstring\fB\fR\fI ...\fR
--
--.SH "DESCRIPTION"
--.PP
--\fBxpxmhelloworld\fR is a sample utility for Xprint, the
-+.ad l
-+\fBxpxmhelloworld\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-print\fR] [\fB\-printer \fBprinternname\fR\fR] [\fB\-v\fR] [\fB\-h\fR] \fBstring\fR \&...
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+xpxmhelloworld is a sample utility for Xprint, the
- printing system for the X Window system. It demonstrates how to send a test page to
- the specified printer (or the default printer, if none is specified) based on
- the Motif2 toolkit using the
- \fBXmPrintShell\fR(__libmansuffix__)
- widget class.
--.SH "OPTIONS"
--.TP
--\fB-print \fR
-+.SH OPTIONS
-+.TP 
-+\fB\-print\fR 
- Print (default is to display on the video Xserver)
--.TP
--\fB-printer \fIprinternname\fB \fR
-+.TP 
-+\fB\-printer \fIprinternname\fB\fR 
- printer to use
--.TP
--\fB-v \fR
-+.TP 
-+\fB\-v\fR 
- verbose output
--.TP
--\fB-h \fR
-+.TP 
-+\fB\-h\fR 
- print usage
--.SH "ENVIRONMENT"
--.TP
--\fBXPSERVERLIST \fR
-+.SH ENVIRONMENT
-+.TP 
-+\fBXPSERVERLIST\fR 
- \fB${XPSERVERLIST}\fR must be set,
- identifying the available Xprint servers.
- See \fBXprint\fR(__miscmansuffix__)
- for more details.
- .SH "KNOWN BUGS"
--.PP
--A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html <URL:http://xprint.mozdev.org/xprint_bugs.html>).
-+A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html).
- .SH "SEE ALSO"
--.PP
--http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm <URL:http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm>, http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm <URL:http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm>, \fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__mansuffix__), \fBxphelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpxthelloworld\fR(__mansuffix__), \fBxpsimplehelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
-+http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmPrintShell.htm, http://nscp.upenn.edu/aix4.3html/libs/motiftr/XmText.htm, \fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-Index: programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.sgml,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.sgml   23 Apr 2004 19:55:02 -0000      1.2
-+++ programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.sgml   15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,13 +1,13 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
- <!-- Process this file with DocBook tools to generate the output format
- (such as manual pages or HTML documents).
--Note that strings like __mansuffix__, __filemansuffix__, __libmansuffix__,
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
- __miscmansuffix__ etc. have to be replaced first (in theory that's the
- job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
- A quick way to do that is to filter this document via
--/usr/bin/sed "s/__mansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
- assuming that env vars like MANSUFFIX etc. have been set to the matching
- manual volume numbers.
-   -->
-@@ -15,7 +15,7 @@
- <refentry>
-   <refmeta>
-     <refentrytitle>xpxmhelloworld</refentrytitle>
--    <manvolnum>__mansuffix__</manvolnum>
-+    <manvolnum>__appmansuffix__</manvolnum>
-   </refmeta>
-   <refnamediv>
-     <refname>xpxmhelloworld</refname>
-@@ -121,16 +121,16 @@
-         <!-- Xprint general references -->
-         <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- <!--
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- -->
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-         <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-         <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-Index: programs/xphelloworld/xpxthelloworld/xpxthelloworld.html
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.html,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpxthelloworld/xpxthelloworld.html   23 Apr 2004 19:55:03 -0000      1.2
-+++ programs/xphelloworld/xpxthelloworld/xpxthelloworld.html   15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,4 +1,4 @@
--<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpxthelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2590201"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xpxthelloworld &#8212; &quot;Hello World&quot;-like Xprint sample utility based on the Xt toolkit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xpxthelloworld</tt>  [<tt class="option">-print</tt>] [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-v</tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2802567"></a><h2>DESCRIPTION</h2><p><span><b class="command">xpxthelloworld</b></span> is a sample utility for Xprint, the
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpxthelloworld</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589918"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xpxthelloworld &#8212; &quot;Hello World&quot;-like Xprint sample utility based on the Xt toolkit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xpxthelloworld</tt>  [<tt class="option">-print</tt>] [<tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt>] [<tt class="option">-v</tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2802597"></a><h2>DESCRIPTION</h2><p><span><b class="command">xpxthelloworld</b></span> is a sample utility for Xprint, the
-       printing system for the X Window system. It demonstrates how to send a test page to
-       the specified printer (or the default printer, if none is specified) based on
-       the Xt toolkit without using one of the special print shell widget classes
-@@ -6,10 +6,10 @@
-       <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>
-       or
-       <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>).
--    </p></div><div class="refsect1" lang="en"><a name="id2804972"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-print</tt></span></dt><dd><p>Print (default is to display on the video Xserver)</p></dd><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805011"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-+    </p></div><div class="refsect1" lang="en"><a name="id2804968"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-print</tt></span></dt><dd><p>Print (default is to display on the video Xserver)</p></dd><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printernname</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-v</tt></span></dt><dd><p>verbose output</p></dd><dt><span class="term"><tt class="option">-h</tt></span></dt><dd><p>print usage</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805011"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-             identifying the available Xprint servers.
-               See <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>
-             for more details.
--        </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805043"></a><h2>KNOWN BUGS</h2><p>
-+        </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805044"></a><h2>KNOWN BUGS</h2><p>
-       A full list of bugs can be obtained from the Xprint.org bug database (<a href="http://xprint.mozdev.org/xprint_bugs.html" target="_top">http://xprint.mozdev.org/xprint_bugs.html</a>).
--    </p></div><div class="refsect1" lang="en"><a name="id2805052"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-+    </p></div><div class="refsect1" lang="en"><a name="id2805053"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xplsprinters</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-Index: programs/xphelloworld/xpxthelloworld/xpxthelloworld.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.man,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpxthelloworld/xpxthelloworld.man    23 Apr 2004 19:55:03 -0000      1.2
-+++ programs/xphelloworld/xpxthelloworld/xpxthelloworld.man    15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,18 +1,17 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "XPXTHELLOWORLD" "__mansuffix__" "13 February 2004" "" ""
-+.\" -*- coding: us-ascii -*-
-+.TH xpxthelloworld __appmansuffix__ "8 October 2004"  
- .SH NAME
--xpxthelloworld \- \&"Hello World\&"-like Xprint sample utility based on the Xt toolkit
-+xpxthelloworld \- "Hello World"-like Xprint sample utility based on the Xt toolkit
- .SH SYNOPSIS
--
--\fBxpxthelloworld\fR [ \fB-print\fR]  [ \fB-printer \fIprinternname\fB\fR]  [ \fB-v\fR]  [ \fB-h\fR] 
--
--.SH "DESCRIPTION"
--.PP
--\fBxpxthelloworld\fR is a sample utility for Xprint, the
-+.ad l
-+\fBxpxthelloworld\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-print\fR] [\fB\-printer \fBprinternname\fR\fR] [\fB\-v\fR] [\fB\-h\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+xpxthelloworld is a sample utility for Xprint, the
- printing system for the X Window system. It demonstrates how to send a test page to
- the specified printer (or the default printer, if none is specified) based on
- the Xt toolkit without using one of the special print shell widget classes
-@@ -20,29 +19,27 @@
- \fBXmPrintShell\fR(__libmansuffix__)
- or
- \fBXawPrintShell\fR(__libmansuffix__)).
--.SH "OPTIONS"
--.TP
--\fB-print \fR
-+.SH OPTIONS
-+.TP 
-+\fB\-print\fR 
- Print (default is to display on the video Xserver)
--.TP
--\fB-printer \fIprinternname\fB \fR
-+.TP 
-+\fB\-printer \fIprinternname\fB\fR 
- printer to use
--.TP
--\fB-v \fR
-+.TP 
-+\fB\-v\fR 
- verbose output
--.TP
--\fB-h \fR
-+.TP 
-+\fB\-h\fR 
- print usage
--.SH "ENVIRONMENT"
--.TP
--\fBXPSERVERLIST \fR
-+.SH ENVIRONMENT
-+.TP 
-+\fBXPSERVERLIST\fR 
- \fB${XPSERVERLIST}\fR must be set,
- identifying the available Xprint servers.
- See \fBXprint\fR(__miscmansuffix__)
- for more details.
- .SH "KNOWN BUGS"
--.PP
--A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html <URL:http://xprint.mozdev.org/xprint_bugs.html>).
-+A full list of bugs can be obtained from the Xprint.org bug database (http://xprint.mozdev.org/xprint_bugs.html).
- .SH "SEE ALSO"
--.PP
--\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__mansuffix__), \fBxphelloworld\fR(__mansuffix__), \fBxpxmhelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpsimplehelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
-+\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-Index: programs/xphelloworld/xpxthelloworld/xpxthelloworld.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.sgml,v
-retrieving revision 1.2
-retrieving revision 1.2.6.1
-diff -u -u -r1.2 -r1.2.6.1
---- programs/xphelloworld/xpxthelloworld/xpxthelloworld.sgml   23 Apr 2004 19:55:03 -0000      1.2
-+++ programs/xphelloworld/xpxthelloworld/xpxthelloworld.sgml   15 Dec 2004 07:17:49 -0000      1.2.6.1
-@@ -1,13 +1,13 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
- <!-- Process this file with DocBook tools to generate the output format
- (such as manual pages or HTML documents).
--Note that strings like __mansuffix__, __filemansuffix__, __libmansuffix__,
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
- __miscmansuffix__ etc. have to be replaced first (in theory that's the
- job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
- A quick way to do that is to filter this document via
--/usr/bin/sed "s/__mansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
- assuming that env vars like MANSUFFIX etc. have been set to the matching
- manual volume numbers.
-   -->
-@@ -15,7 +15,7 @@
- <refentry>
-   <refmeta>
-     <refentrytitle>xpxthelloworld</refentrytitle>
--    <manvolnum>__mansuffix__</manvolnum>
-+    <manvolnum>__appmansuffix__</manvolnum>
-   </refmeta>
-   <refnamediv>
-     <refname>xpxthelloworld</refname>
-@@ -121,16 +121,16 @@
-         <!-- Xprint general references -->
-         <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- <!--
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- -->
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-         <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-         <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-Index: programs/xplsprinters/xplsprinters.html
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xplsprinters/xplsprinters.html,v
-retrieving revision 1.4
-retrieving revision 1.4.4.2
-diff -u -u -r1.4 -r1.4.4.2
---- programs/xplsprinters/xplsprinters.html    29 Jun 2004 17:10:13 -0000      1.4
-+++ programs/xplsprinters/xplsprinters.html    15 Dec 2004 07:17:49 -0000      1.4.4.2
-@@ -1,8 +1,8 @@
--<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xplsprinters</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2590201"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xplsprinters &#8212; shows a list of Xprint printers and it's attributes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xplsprinters</tt>  [<tt class="option">-printer <i class="replaceable"><tt>printername</tt></i></tt>] [<tt class="option">-d</tt>] [<tt class="option">-l</tt>] [<tt class="option">-dump</tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2804932"></a><h2>DESCRIPTION</h2><p><span><b class="command">xplsprinters</b></span> is a utility for Xprint, the
-+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xplsprinters</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2589918"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xplsprinters &#8212; shows a list of Xprint printers and it's attributes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xplsprinters</tt>  [<tt class="option">-printer <i class="replaceable"><tt>printername</tt></i></tt>] [<tt class="option">-d</tt>] [<tt class="option">-l</tt>] [<tt class="option">-dump</tt>] [<tt class="option">-h</tt>]</p></div></div><div class="refsect1" lang="en"><a name="id2802600"></a><h2>DESCRIPTION</h2><p><span><b class="command">xplsprinters</b></span> is a utility for Xprint, the
-       printing system for the X Window system. It can deliver both a list
-       of printers and attributes supported for a specific list of
-       printers.
--    </p></div><div class="refsect1" lang="en"><a name="id2804945"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printername</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-dump</tt></span></dt><dd><p>dump all available printer attributes</p></dd><dt><span class="term"><tt class="option">-h | -?</tt></span></dt><dd><p>print usage</p></dd><dt><span class="term"><tt class="option">-d</tt></span></dt><dd><p>print description for each printer</p></dd><dt><span class="term"><tt class="option">-l</tt></span></dt><dd><p>list detailed printer attribute information</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805006"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-+    </p></div><div class="refsect1" lang="en"><a name="id2804939"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">-printer <i class="replaceable"><tt>printername</tt></i></tt></span></dt><dd><p>printer to use</p></dd><dt><span class="term"><tt class="option">-dump</tt></span></dt><dd><p>dump all available printer attributes</p></dd><dt><span class="term"><tt class="option">-h | -?</tt></span></dt><dd><p>print usage</p></dd><dt><span class="term"><tt class="option">-d</tt></span></dt><dd><p>print description for each printer</p></dd><dt><span class="term"><tt class="option">-l</tt></span></dt><dd><p>list detailed printer attribute information</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2805006"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><tt class="envar">XPSERVERLIST</tt></span></dt><dd><p><tt class="envar">${XPSERVERLIST}</tt> must be set,
-           identifying the available Xprint servers.
-             See <span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>
-           for more details.
-@@ -27,4 +27,7 @@
-         orientation=landscape
-         default_plex=
-         plex=simplex
--</tt></pre></div></div><div class="refsect1" lang="en"><a name="id2805097"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xprehashprinterlist</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-+</tt></pre></div></div><div class="refsect1" lang="en"><a name="id2805098"></a><h2>NOTES</h2><p>
-+      The list of builtin fonts supported by a printer can be obtained
-+      using the <span><b class="command">xlsfonts</b></span> command.
-+    </p></div><div class="refsect1" lang="en"><a name="id2805108"></a><h2>SEE ALSO</h2><p><span class="simplelist"><span class="citerefentry"><span class="refentrytitle">Xprint</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">X11</span>(7)</span>, <span class="citerefentry"><span class="refentrytitle">xprehashprinterlist</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xphelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxmhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpawhelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpxthelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xpsimplehelloworld</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">xlsfonts</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xserver</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">Xprt</span>(1x)</span>, <span class="citerefentry"><span class="refentrytitle">libXp</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">libXprintAppUtils</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XmPrintShell</span>(3x)</span>, <span class="citerefentry"><span class="refentrytitle">XawPrintShell</span>(3x)</span>, Xprint FAQ (<a href="http://xprint.mozdev.org/docs/Xprint_FAQ.html" target="_top">http://xprint.mozdev.org/docs/Xprint_FAQ.html</a>), Xprint main site (<a href="http://xprint.mozdev.org/" target="_top">http://xprint.mozdev.org/</a>)</span></p></div></div></body></html>
-Index: programs/xplsprinters/xplsprinters.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xplsprinters/xplsprinters.man,v
-retrieving revision 1.4
-retrieving revision 1.4.4.2
-diff -u -u -r1.4 -r1.4.4.2
---- programs/xplsprinters/xplsprinters.man     29 Jun 2004 17:10:13 -0000      1.4
-+++ programs/xplsprinters/xplsprinters.man     15 Dec 2004 07:17:49 -0000      1.4.4.2
-@@ -1,48 +1,46 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "XPLSPRINTERS" "__mansuffix__" "29 June 2004" "" ""
-+.\" -*- coding: us-ascii -*-
-+.TH xplsprinters __appmansuffix__ "8 October 2004"  
- .SH NAME
- xplsprinters \- shows a list of Xprint printers and it's attributes
- .SH SYNOPSIS
--
--\fBxplsprinters\fR [ \fB-printer \fIprintername\fB\fR]  [ \fB-d\fR]  [ \fB-l\fR]  [ \fB-dump\fR]  [ \fB-h\fR] 
--
--.SH "DESCRIPTION"
--.PP
--\fBxplsprinters\fR is a utility for Xprint, the
-+.ad l
-+\fBxplsprinters\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-printer \fBprintername\fR\fR] [\fB\-d\fR] [\fB\-l\fR] [\fB\-dump\fR] [\fB\-h\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+xplsprinters is a utility for Xprint, the
- printing system for the X Window system. It can deliver both a list
- of printers and attributes supported for a specific list of
- printers.
--.SH "OPTIONS"
--.TP
--\fB-printer \fIprintername\fB \fR
-+.SH OPTIONS
-+.TP 
-+\fB\-printer \fIprintername\fB\fR 
- printer to use
--.TP
--\fB-dump \fR
-+.TP 
-+\fB\-dump\fR 
- dump all available printer attributes
--.TP
--\fB-h | -? \fR
-+.TP 
-+\fB\-h | \-?\fR 
- print usage
--.TP
--\fB-d \fR
-+.TP 
-+\fB\-d\fR 
- print description for each printer
--.TP
--\fB-l \fR
-+.TP 
-+\fB\-l\fR 
- list detailed printer attribute information
--.SH "ENVIRONMENT"
--.TP
--\fBXPSERVERLIST \fR
-+.SH ENVIRONMENT
-+.TP 
-+\fBXPSERVERLIST\fR 
- \fB${XPSERVERLIST}\fR must be set,
- identifying the available Xprint servers.
- See \fBXprint\fR(__miscmansuffix__)
- for more details.
--.SH "EXAMPLES"
--.SS "LIST ALL AVAILABLE \&"X PRINT SPECIFIERS\&" (PRINTER NAMES)"
-+.SH EXAMPLES
-+\fBList all available "X Print Specifiers" (printer names)\fR
- .PP
--
- .nf
- % \fBxplsprinters\fR
- .fi
-@@ -56,24 +54,26 @@
- printer: xp_ps_spooldir_tmp_Xprintjobs@meridian:19
- printer: xp_pdf_spooldir_tmp_Xprintjobs@meridian:19
- .fi
--.SS "GET INFORMATION ABOUT THE SUPPORTED ATTRIBUTES OF PRINTER \&"PS002\&":"
--.PP
-+.PP
-+\fBGet information about the supported attributes of printer "ps002":\fR
-+.PP
- .nf
--% \fBxplsprinters -printer ps002 -l\fR
-+% \fBxplsprinters \-printer ps002 \-l\fR
- .fi
- .PP
- would print:
- .nf
-+
- printer: ps002@castor:18
-         description=
--        model-identifier=HPDJ1600C
--        default-medium=iso-a4
--        default-input-tray=
--        medium-source-sizes-supported=iso-a4 false 6.35 203.65 6.35 290.65
--        medium-source-sizes-supported=na-letter false 6.35 209.55 6.35 273.05
--        default-printer-resolution=300
-+        model\-identifier=HPDJ1600C
-+        default\-medium=iso\-a4
-+        default\-input\-tray=
-+        medium\-source\-sizes\-supported=iso\-a4 false 6.35 203.65 6.35 290.65
-+        medium\-source\-sizes\-supported=na\-letter false 6.35 209.55 6.35 273.05
-+        default\-printer\-resolution=300
-         resolution=300
-         default_orientation=
-         orientation=portrait
-@@ -81,6 +81,9 @@
-         default_plex=
-         plex=simplex
- .fi
-+
-+.SH NOTES
-+The list of builtin fonts supported by a printer can be obtained
-+using the xlsfonts command.
- .SH "SEE ALSO"
--.PP
--\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxprehashprinterlist\fR(__mansuffix__), \fBxphelloworld\fR(__mansuffix__), \fBxpxmhelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpxthelloworld\fR(__mansuffix__), \fBxpsimplehelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
-+\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxprehashprinterlist\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBxlsfonts\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-Index: programs/xplsprinters/xplsprinters.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xplsprinters/xplsprinters.sgml,v
-retrieving revision 1.4
-retrieving revision 1.4.4.2
-diff -u -u -r1.4 -r1.4.4.2
---- programs/xplsprinters/xplsprinters.sgml    29 Jun 2004 17:10:13 -0000      1.4
-+++ programs/xplsprinters/xplsprinters.sgml    15 Dec 2004 07:17:49 -0000      1.4.4.2
-@@ -1,13 +1,13 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
- <!-- Process this file with DocBook tools to generate the output format
- (such as manual pages or HTML documents).
--Note that strings like __mansuffix__, __filemansuffix__, __libmansuffix__,
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
- __miscmansuffix__ etc. have to be replaced first (in theory that's the
- job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
- A quick way to do that is to filter this document via
--/usr/bin/sed "s/__mansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
- assuming that env vars like MANSUFFIX etc. have been set to the matching
- manual volume numbers.
-   -->
-@@ -15,7 +15,7 @@
- <refentry>
-   <refmeta>
-     <refentrytitle>xplsprinters</refentrytitle>
--    <manvolnum>__mansuffix__</manvolnum>
-+    <manvolnum>__appmansuffix__</manvolnum>
-   </refmeta>
-   <refnamediv>
-@@ -151,6 +151,14 @@
-   </refsect1>
-   <refsect1>
-+    <title>NOTES</title>
-+    <para>
-+      The list of builtin fonts supported by a printer can be obtained
-+      using the <command>xlsfonts</command> command.
-+    </para>
-+  </refsect1>
-+
-+  <refsect1>
-     <title>SEE ALSO</title>
-     <para>
-       <simplelist type="inline">
-@@ -161,16 +169,17 @@
-         <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
- <!--
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- -->
--        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xlsfonts</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-         <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-         <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-Index: programs/xprehashprinterlist/xprehashprinterlist.man
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xprehashprinterlist/xprehashprinterlist.man,v
-retrieving revision 1.1
-retrieving revision 1.1.4.1
-diff -u -u -r1.1 -r1.1.4.1
---- programs/xprehashprinterlist/xprehashprinterlist.man       29 Jun 2004 17:10:13 -0000      1.1
-+++ programs/xprehashprinterlist/xprehashprinterlist.man       15 Dec 2004 07:17:49 -0000      1.1.4.1
-@@ -1,41 +1,39 @@
--.\" This manpage has been automatically generated by docbook2man 
--.\" from a DocBook document.  This tool can be found at:
--.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
--.\" Please send any bug reports, improvements, comments, patches, 
--.\" etc. to Steve Cheng <steve@ggi-project.org>.
--.TH "XPREHASHPRINTERLIST" "__mansuffix__" "29 June 2004" "" ""
-+.\" -*- coding: us-ascii -*-
-+.TH xprehashprinterlist __appmansuffix__ "8 October 2004"  
- .SH NAME
- xprehashprinterlist \- Recomputes the list of available printers.
- .SH SYNOPSIS
--
--\fBxprehashprinterlist\fR [ \fB-v\fR]  [ \fB-h\fR] 
--
--.SH "DESCRIPTION"
--.PP
--\fBxprehashprinterlist\fR causes all Xprint servers
--to recompute (update) their lists of available  printers, and update the
-+.ad l
-+\fBxprehashprinterlist\fR \kx
-+.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-+'in \n(.iu+\nxu
-+[\fB\-v\fR] [\fB\-h\fR]
-+'in \n(.iu-\nxu
-+.ad b
-+.SH DESCRIPTION
-+xprehashprinterlist causes all Xprint servers
-+to recompute (update) their lists of available printers, and update the
- attributes for the printers. The intended usage of this tool is that
- a system administrator can run it after changing the printer topology.
--.SH "OPTIONS"
--.TP
--\fB-v \fR
-+.SH OPTIONS
-+.TP 
-+\fB\-v\fR 
- generate verbose output
--.TP
--\fB-h | -? \fR
-+.TP 
-+\fB\-h | \-?\fR 
- print usage
--.SH "ENVIRONMENT"
--.TP
--\fBXPSERVERLIST \fR
-+.SH ENVIRONMENT
-+.TP 
-+\fBXPSERVERLIST\fR 
- \fB${XPSERVERLIST}\fR must be set,
- identifying the available Xprint servers.
- See \fBXprint\fR(__miscmansuffix__)
- for more details.
--.SH "EXAMPLES"
--.SS "UPDATE THE LIST OF AVAILABLE PRINTERS"
-+.SH EXAMPLES
-+\fBUpdate the list of available printers\fR
- .PP
--
- .nf
--% \fBxprehashprinterlist -v\fR
-+% \fBxprehashprinterlist \-v\fR
- .fi
- .PP
- would print:
-@@ -43,11 +41,10 @@
- .nf
- Rehashing printer list on server 'meridian:34'
- .fi
--.SH "NOTES"
--.PP
--\fBxprehashprinterlist\fR rehashes all printer lists of all print servers.
--Alternatively \fBxset rehashprinterlist\fR may be used to rehash only the
-+
-+.SH NOTES
-+xprehashprinterlist rehashes all printer lists of all print servers.
-+Alternatively xset rehashprinterlist may be used to rehash only the
- list of printers in one print server.
- .SH "SEE ALSO"
--.PP
--\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxset\fR(__mansuffix__), \fBxplsprinters\fR(__mansuffix__), \fBxphelloworld\fR(__mansuffix__), \fBxpxmhelloworld\fR(__mansuffix__), \fBxpawhelloworld\fR(__mansuffix__), \fBxpxthelloworld\fR(__mansuffix__), \fBxpsimplehelloworld\fR(__mansuffix__), \fBXserver\fR(__mansuffix__), \fBXprt\fR(__mansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html <URL:http://xprint.mozdev.org/docs/Xprint_FAQ.html>), Xprint main site (http://xprint.mozdev.org/ <URL:http://xprint.mozdev.org/>)
-+\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxset\fR(__appmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBXprt\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)
-Index: programs/xprehashprinterlist/xprehashprinterlist.sgml
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xprehashprinterlist/xprehashprinterlist.sgml,v
-retrieving revision 1.1
-retrieving revision 1.1.4.1
-diff -u -u -r1.1 -r1.1.4.1
---- programs/xprehashprinterlist/xprehashprinterlist.sgml      29 Jun 2004 17:10:13 -0000      1.1
-+++ programs/xprehashprinterlist/xprehashprinterlist.sgml      15 Dec 2004 07:17:49 -0000      1.1.4.1
-@@ -1,13 +1,13 @@
--<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" '/usr/share/sgml/docbook_4.2/docbook.dtd'>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
- <!-- Process this file with DocBook tools to generate the output format
- (such as manual pages or HTML documents).
--Note that strings like __mansuffix__, __filemansuffix__, __libmansuffix__,
-+Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
- __miscmansuffix__ etc. have to be replaced first (in theory that's the
- job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
- A quick way to do that is to filter this document via
--/usr/bin/sed "s/__mansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
-+/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__miscmansuffix__/${MISCMANSUFFIX}/g"
- assuming that env vars like MANSUFFIX etc. have been set to the matching
- manual volume numbers.
-   -->
-@@ -15,7 +15,7 @@
- <refentry>
-   <refmeta>
-     <refentrytitle>xprehashprinterlist</refentrytitle>
--    <manvolnum>__mansuffix__</manvolnum>
-+    <manvolnum>__appmansuffix__</manvolnum>
-   </refmeta>
-   <refnamediv>
-@@ -116,17 +116,17 @@
-         <member><citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
- <!--
--        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xprehashprinterlist</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
- -->
--        <member><citerefentry><refentrytitle>xset</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
--        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__mansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xset</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xplsprinters</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xphelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxmhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpawhelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpxthelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>xpsimplehelloworld</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xserver</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-+        <member><citerefentry><refentrytitle>Xprt</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-         <!-- ToDO: Add manual pages for the single Xprint DDX implementations (PostScript/PDF/PCL/PCL-MONO/Raster/etc.) -->
-         <member><citerefentry><refentrytitle>libXp</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-         <member><citerefentry><refentrytitle>libXprintUtils</refentrytitle><manvolnum>__libmansuffix__</manvolnum></citerefentry></member>
-Index: programs/xrx/helper/helper.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xrx/helper/helper.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- programs/xrx/helper/helper.c       14 Nov 2003 16:49:23 -0000      1.1.1.1
-+++ programs/xrx/helper/helper.c       15 Dec 2004 01:22:19 -0000      1.1.1.1.6.1
-@@ -526,4 +526,6 @@
-     /* then wait for it... */
-     XtAppMainLoop(app_context);
-+
-+    return EXIT_SUCCESS;
- }
-Index: programs/xset/Imakefile
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xset/Imakefile,v
-retrieving revision 1.7
-retrieving revision 1.7.2.1
-diff -u -u -r1.7 -r1.7.2.1
---- programs/xset/Imakefile    2 Sep 2004 08:40:33 -0000       1.7
-+++ programs/xset/Imakefile    13 Dec 2004 07:21:02 -0000      1.7.2.1
-@@ -16,12 +16,12 @@
- #if BuildXprintLib && BuildXprintClients
-     DEPXPRINTLIBS = $(DEPXPRINTLIB)
-        XPRINTLIBS = $(XPLIB)
--    XPRINTDEFINES = -DINCLUDE_XPRINT_SUPPORT
-+    XPRINTDEFINES = -DBUILD_PRINTSUPPORT
- #endif
-         DEFINES = ExtensionDefines DPMSDefines \
-                 FontCacheExtensionDefines \
--                XkbDefines
-+                XkbDefines $(XPRINTDEFINES)
-         DEPLIBS = $(DEPXMUULIB) $(DEPXLIB) $(DEPXF86LIBS) $(DEPFONTLIBS)
- LOCAL_LIBRARIES = $(XMUULIB) $(XF86LIBS) $(FONTLIBS) $(XPRINTLIBS) $(XLIB)
-Index: programs/xset/xset.c
-===================================================================
-RCS file: /cvs/xorg/xc/programs/xset/xset.c,v
-retrieving revision 1.5
-retrieving revision 1.5.2.1
-diff -u -u -r1.5 -r1.5.2.1
---- programs/xset/xset.c       2 Sep 2004 05:50:38 -0000       1.5
-+++ programs/xset/xset.c       13 Dec 2004 07:21:02 -0000      1.5.2.1
-@@ -88,7 +88,7 @@
- static Status set_font_cache(Display *, long, long, long);
- static void query_cache_status(Display *dpy);
- #endif
--#ifdef INCLUDE_XPRINT_SUPPORT
-+#ifdef BUILD_PRINTSUPPORT
- #include <X11/extensions/Print.h>
- #endif
-@@ -206,7 +206,7 @@
- if (dpy == NULL) {
-   fprintf(stderr, "%s:  unable to open display \"%s\"\n",
-         argv[0], XDisplayName (disp));
--  exit(1);
-+  exit(EXIT_FAILURE);
- }
- XSetErrorHandler (local_xerror);
- for (i = 1; i < argc; ) {
-@@ -356,7 +356,7 @@
-       }
-   }
- #endif
--#ifdef INCLUDE_XPRINT_SUPPORT
-+#ifdef BUILD_PRINTSUPPORT
-   else if (strcmp(arg, "rehashprinterlist") == 0) { /* rehash list of printers */
-       short dummy;
-       if (XpQueryVersion(dpy, &dummy, &dummy)) {
-@@ -517,20 +517,20 @@
-             {
-                 fprintf(stderr, "illegal combination of values\n");
-                 fprintf(stderr, "  standby time of %d is greater than suspend time of %d\n", standby_timeout, suspend_timeout);
--                exit(0);
-+                exit(EXIT_FAILURE);
-             }
-             if ((off_timeout != 0)&&(suspend_timeout > off_timeout))
-             {
-                 fprintf(stderr, "illegal combination of values\n");
-                 fprintf(stderr, "  suspend time of %d is greater than off time of %d\n", suspend_timeout, off_timeout);
--                exit(0);
-+                exit(EXIT_FAILURE);
-             }
-             if ((suspend_timeout == 0)&&(off_timeout != 0)&&
-                 (standby_timeout > off_timeout))
-             {
-                 fprintf(stderr, "illegal combination of values\n");
-                 fprintf(stderr, "  standby time of %d is greater than off time of %d\n", standby_timeout, off_timeout);
--                exit(0);
-+                exit(EXIT_FAILURE);
-             }
-             DPMSEnable(dpy);
-             DPMSSetTimeouts(dpy, standby_timeout, suspend_timeout, off_timeout);
-@@ -948,7 +948,7 @@
-           fprintf (stderr, 
-                    "%s: internal error, only parsed %d of %d directories.\n",
-                    progName, i, ndirs);
--          exit (1);
-+          exit (EXIT_FAILURE);
-       }
-     }
-           
-@@ -1513,7 +1513,7 @@
-     fprintf (stderr, "    Show font cache statistics:\n");
-     fprintf (stderr, "\t fc s\n");
- #endif
--#ifdef INCLUDE_XPRINT_SUPPORT
-+#ifdef BUILD_PRINTSUPPORT
-     fprintf (stderr, "    To control Xprint features:\n");
-     fprintf (stderr, "\t rehashprinterlist      Recomputes the list of available printers\n");
- #endif
-@@ -1546,14 +1546,14 @@
-     fprintf (stderr, "\t s expose             s noexpose\n");
-     fprintf (stderr, "\t s activate           s reset\n");
-     fprintf (stderr, "    For status information:  q\n");
--    exit(0);
-+    exit(EXIT_SUCCESS);
- }
- static void
- error(char *message)
- {
-     fprintf( stderr, "%s: %s\n", progName, message );
--    exit( 1 );
-+    exit(EXIT_FAILURE);
- }
-Index: util/memleak/getretmips.c
-===================================================================
-RCS file: /cvs/xorg/xc/util/memleak/getretmips.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.1.1.1.6.1
-diff -u -u -r1.1.1.1 -r1.1.1.1.6.1
---- util/memleak/getretmips.c  14 Nov 2003 16:49:24 -0000      1.1.1.1
-+++ util/memleak/getretmips.c  13 Dec 2004 04:07:51 -0000      1.1.1.1.6.1
-@@ -184,12 +184,15 @@
-       }
-       ra = (unsigned long *) sp[rc->raOffset>>2];
-       sp += rc->spAdjust >> 2;
--      *results++ = ((unsigned long) ra) - 8;
-       if (ra[-2] == mainCall)
-       {
-           *results++ = 0;
-           break;
-       }
-+      else
-+      {
-+          *results++ = ((unsigned long) ra) - 8;
-+      }
-       max--;
-     }
- }
This page took 2.289749 seconds and 4 git commands to generate.