+++ /dev/null
---- XFree86-3.3.5/xc/config/cf/xfree86.cf.3dfxalpha Wed Dec 1 09:57:15 1999
-+++ XFree86-3.3.5/xc/config/cf/xfree86.cf Wed Dec 1 09:58:24 1999
-@@ -121,7 +121,7 @@
- #endif
- #endif
- #ifndef XF86SvgaDrivers
--#define XF86SvgaDrivers mga s3v
-+#define XF86SvgaDrivers mga s3v tdfx
- #endif
- #ifndef XF86Vga2Drivers
- #define XF86Vga2Drivers generic
+++ /dev/null
-diff -ur xc.orig/programs/Xserver/hw/xfree86/common/compiler.h xc/programs/Xserver/hw/xfree86/common/compiler.h
---- xc.orig/programs/Xserver/hw/xfree86/common/compiler.h Fri Dec 8 22:58:34 2000
-+++ xc/programs/Xserver/hw/xfree86/common/compiler.h Sun Mar 18 17:23:33 2001
-@@ -1514,19 +1514,17 @@
- /* Changed to kill noise generated by gcc's -Wcast-align */
- #define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset)
- #define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset)
--# if defined (JENSEN_SUPPORT)
- #define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset)
-+# if defined (JENSEN_SUPPORT)
- #define MMIO_OUT32(base, offset, val) \
- (*xf86WriteMmio32)((CARD32)(val), base, offset)
- #define MMIO_ONB32(base, offset, val) \
- (*xf86WriteMmioNB32)((CARD32)(val), base, offset)
- # else
--#define MMIO_IN32(base, offset) \
-- *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset))
- #define MMIO_OUT32(base, offset, val) \
- do { \
-- *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \
- write_mem_barrier(); \
-+ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \
- } while (0)
- #define MMIO_ONB32(base, offset, val) \
- *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c Mon Dec 4 19:55:22 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c Sun Apr 1 20:51:03 2001
-@@ -838,6 +838,7 @@
- if (info->scanline_direct) return;
- --info->scanline_h;
- while (left) {
-+ write_mem_barrier();
- if (left <= 8) {
- /* Last scanline - finish write to DATA_LAST */
- if (info->scanline_h == 0) {
-@@ -980,6 +981,7 @@
- if (info->scanline_direct) return;
- --info->scanline_h;
- while (left) {
-+ write_mem_barrier();
- if (left <= 8) {
- /* Last scanline - finish write to DATA_LAST */
- if (info->scanline_h == 0) {
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c Sat Mar 17 17:57:15 2001
-+++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c Sun Mar 18 16:51:29 2001
-@@ -1016,8 +1016,8 @@
- if (!xf86LoadSubModule(pScrn, "ddc")) return FALSE;
- xf86LoaderReqSymLists(ddcSymbols, NULL);
-
--#if defined(__powerpc__)
-- /* Int10 is broken on PPC */
-+#if defined(__powerpc__) || defined(__alpha__)
-+ /* Int10 is broken on PPC and some Alphas */
- return TRUE;
- #else
- if (xf86LoadSubModule(pScrn, "vbe")) {
-@@ -1156,7 +1156,8 @@
- static Bool R128PreInitInt10(ScrnInfoPtr pScrn)
- {
- R128InfoPtr info = R128PTR(pScrn);
--#if 1
-+#if 1 && !defined(__alpha__)
-+ /* int10 is broken on some Alphas */
- if (xf86LoadSubModule(pScrn, "int10")) {
- xf86Int10InfoPtr pInt;
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c Wed Nov 29 11:42:11 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c Fri Mar 23 16:20:46 2001
-@@ -585,7 +585,13 @@
- info->scanline_h = h;
- info->scanline_words = (w + 31) >> 5;
-
-- if ((info->scanline_words * h) <= 9) {
-+#ifdef __alpha__
-+ /* always indirect for Alpha */
-+ if (0)
-+#else
-+ if ((info->scanline_words * h) <= 9)
-+#endif
-+ {
- /* Turn on direct for less than 9 dword colour expansion */
- info->scratch_buffer[0]
- = (unsigned char *)(ADDRREG(RADEON_HOST_DATA_LAST)
-@@ -621,6 +627,7 @@
- if (info->scanline_direct) return;
- --info->scanline_h;
- while (left) {
-+ write_mem_barrier();
- if (left <= 8) {
- /* Last scanline - finish write to DATA_LAST */
- if (info->scanline_h == 0) {
-@@ -699,7 +706,13 @@
- info->scanline_h = h;
- info->scanline_words = (w * info->scanline_bpp + 31) >> 5;
-
-- if ((info->scanline_words * h) <= 9) {
-+#ifdef __alpha__
-+ /* always indirect for Alpha */
-+ if (0)
-+#else
-+ if ((info->scanline_words * h) <= 9)
-+#endif
-+ {
- /* Turn on direct for less than 9 dword colour expansion */
- info->scratch_buffer[0]
- = (unsigned char *)(ADDRREG(RADEON_HOST_DATA_LAST)
-@@ -735,6 +748,7 @@
- if (info->scanline_direct) return;
- --info->scanline_h;
- while (left) {
-+ write_mem_barrier();
- if (left <= 8) {
- /* Last scanline - finish write to DATA_LAST */
- if (info->scanline_h == 0) {
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c Sat Jun 24 14:19:54 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c Sun Mar 18 16:53:54 2001
-@@ -324,28 +324,6 @@
- GLINT_WRITE_REG(d<<16,dY);
- }
-
--static void MoveDWORDS(
-- register CARD32* dest,
-- register CARD32* src,
-- register int dwords )
--{
-- while(dwords & ~0x03) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- *(dest + 2) = *(src + 2);
-- *(dest + 3) = *(src + 3);
-- src += 4;
-- dest += 4;
-- dwords -= 4;
-- }
-- if (!dwords) return;
-- *dest = *src;
-- if (dwords == 1) return;
-- *(dest + 1) = *(src + 1);
-- if (dwords == 2) return;
-- *(dest + 2) = *(src + 2);
--}
--
- #define Sync_tag 0x188
-
- static void
-@@ -572,7 +550,8 @@
- while (dwords >= infoRec->ColorExpandRange) {
- GLINT_WAIT(infoRec->ColorExpandRange);
- GLINT_WRITE_REG((infoRec->ColorExpandRange - 2)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
- infoRec->ColorExpandRange - 1);
- dwords -= (infoRec->ColorExpandRange - 1);
- src += (infoRec->ColorExpandRange - 1);
-@@ -580,7 +559,8 @@
- if (dwords) {
- GLINT_WAIT(dwords);
- GLINT_WRITE_REG((dwords - 1)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
- }
- pGlint->cpucount += 1;
- #if 0
-@@ -887,7 +867,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- srcp += infoRec->ColorExpandRange - 1;
-@@ -897,7 +878,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/glint.h xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/glint.h Wed Nov 29 11:42:16 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h Sun Mar 18 21:36:41 2001
-@@ -120,6 +120,7 @@
- Bool UseBlockWrite;
- Bool UseFireGL3000;
- Bool VGAcore;
-+ Bool ScanlineDirect;
- int MXFbSize;
- CARD32 rasterizerMode;
- int MinClock;
-@@ -141,6 +142,7 @@
- DrawablePtr CurrentDrawable;
- I2CBusPtr DDCBus, VSBus;
- CARD8* XAAScanlineColorExpandBuffers[2];
-+ CARD8* ScratchBuffer;
- CARD32 RasterizerSwap;
- int PM3_Config2D;
- int PM3_Render2D;
-@@ -282,6 +284,10 @@
- LOCO *colors, VisualPtr pVisual);
- void Permedia2LoadPalette16(ScrnInfoPtr pScrn, int numColors, int *indices,
- LOCO *colors, VisualPtr pVisual);
-+void Permedia3LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
-+ LOCO *colors, VisualPtr pVisual);
-+void Permedia3LoadPalette16(ScrnInfoPtr pScrn, int numColors, int *indices,
-+ LOCO *colors, VisualPtr pVisual);
- void Permedia2I2CUDelay(I2CBusPtr b, int usec);
- void Permedia2I2CPutBits(I2CBusPtr b, int scl, int sda);
- void Permedia2I2CGetBits(I2CBusPtr b, int *scl, int *sda);
-@@ -314,4 +320,8 @@
- CARD32 GLINT_VERB_READ_REG(GLINTPtr, CARD32 r, char *file, int line);
-
- void GLINTRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
-+
-+void GLINT_MoveBYTES(CARD32* dest, unsigned char* src, int dwords);
-+void GLINT_MoveWORDS(CARD32* dest, unsigned short* src, int dwords);
-+void GLINT_MoveDWORDS(CARD32* dest, CARD32* src, int dwords);
- #endif /* _GLINT_H_ */
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c Fri Dec 8 22:58:55 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c Sun Mar 18 21:39:59 2001
-@@ -2610,8 +2610,17 @@
- if (!miCreateDefColormap(pScreen))
- return FALSE;
-
-+ if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) {
-+ if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits,
-+ (pGlint->FBDev) ? fbdevHWLoadPalette :
-+ ((pScrn->depth == 16) ? Permedia3LoadPalette16:Permedia3LoadPalette),
-+ NULL,
-+ CMAP_RELOAD_ON_MODE_SWITCH |
-+ ((pScrn->overlayFlags & OVERLAY_8_32_PLANAR)
-+ ? 0 : CMAP_PALETTED_TRUECOLOR)))
-+ return FALSE;
-+ } else
- if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) ||
-- (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) ||
- (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) ||
- (pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA2)) {
- if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits,
-@@ -3051,16 +3060,86 @@
- {
- if (xf86GetVerbosity() > 2)
- ErrorF("[0x%04x] <- 0x%08x (%s, %d)\n", r, v, file, line);
-+#if defined(__alpha__)
-+ GLINT_WRITE_REG(v, r);
-+#else
- *(volatile CARD32 *)((char *) pGlint->IOBase + r) = v;
-+#endif
- }
-
- CARD32
- GLINT_VERB_READ_REG(GLINTPtr pGlint, CARD32 r, char *file, int line)
- {
-- CARD32 v = *(volatile CARD32 *)((char *) pGlint->IOBase + r);
-+ CARD32 v;
-
-+#if defined(__alpha__)
-+ v = GLINT_READ_REG(r);
-+#else
-+ v = *(volatile CARD32 *)((char *) pGlint->IOBase + r);
-+#endif
- if (xf86GetVerbosity() > 2)
- ErrorF("[0x%04x] -> 0x%08x (%s, %d)\n", r, v, file, line);
- return v;
- }
- #endif
-+
-+void GLINT_MoveBYTES(
-+ register CARD32* dest,
-+ register unsigned char* src,
-+ register int dwords)
-+{
-+#if defined(__alpha__)
-+ write_mem_barrier();
-+#endif
-+ while(dwords) {
-+ *dest = *src;
-+ src += 1;
-+ dest += 1;
-+ dwords -= 1;
-+ }
-+}
-+
-+void GLINT_MoveWORDS(
-+ register CARD32* dest,
-+ register unsigned short* src,
-+ register int dwords)
-+{
-+#if defined(__alpha__)
-+ write_mem_barrier();
-+#endif
-+ while(dwords & ~0x01) {
-+ *dest = *src;
-+ *(dest + 1) = *(src + 1);
-+ src += 2;
-+ dest += 2;
-+ dwords -= 2;
-+ }
-+ if(dwords)
-+ *dest = *src;
-+ return;
-+}
-+
-+void GLINT_MoveDWORDS(
-+ register CARD32* dest,
-+ register CARD32* src,
-+ register int dwords)
-+{
-+#if defined(__alpha__)
-+ write_mem_barrier();
-+#endif
-+ while(dwords & ~0x03) {
-+ *dest = *src;
-+ *(dest + 1) = *(src + 1);
-+ *(dest + 2) = *(src + 2);
-+ *(dest + 3) = *(src + 3);
-+ src += 4;
-+ dest += 4;
-+ dwords -= 4;
-+ }
-+ if (!dwords) return;
-+ *dest = *src;
-+ if (dwords == 1) return;
-+ *(dest + 1) = *(src + 1);
-+ if (dwords == 2) return;
-+ *(dest + 2) = *(src + 2);
-+}
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h Fri Oct 27 21:23:07 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h Sun Mar 18 17:05:13 2001
-@@ -1201,10 +1201,17 @@
-
- #define GLINT_SLOW_WRITE_REG(v,r) \
- do{ \
-- GLINTDACDelay(5); \
-+ mem_barrier(); \
-+ GLINT_WAIT(1); \
-+ mem_barrier(); \
- GLINT_WRITE_REG(v,r); \
-- GLINTDACDelay(5); \
- }while(0)
-+
-+#define GLINT_SET_INDEX(index) \
-+do{ \
-+ GLINT_SLOW_WRITE_REG(((index)>>8)&0xff,PM2VDACIndexRegHigh); \
-+ GLINT_SLOW_WRITE_REG((index)&0xff,PM2VDACIndexRegLow); \
-+} while(0)
-
- #define GLINT_SECONDARY_SLOW_WRITE_REG(v,r) \
- do{ \
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c Fri Mar 31 17:55:43 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c Sun Mar 18 16:55:14 2001
-@@ -356,8 +356,6 @@
- Permedia2SubsequentColorExpandScanline;
- }
-
-- infoPtr->ColorExpandRange = MAX_FIFO_ENTRIES;
--
- infoPtr->WriteBitmap = Permedia2WriteBitmap;
-
- if (pScrn->bitsPerPixel == 8)
-@@ -427,10 +425,14 @@
- CHECKCLIPPING;
-
- while (GLINT_READ_REG(DMACount) != 0);
-- GLINT_WAIT(1);
-- GLINT_WRITE_REG(0, GlintSync);
-+
-+ GLINT_SLOW_WRITE_REG(0xc00, FilterMode);
-+
-+ GLINT_WAIT(2);
-+ GLINT_SLOW_WRITE_REG(0, GlintSync);
-+
- do {
-- while(GLINT_READ_REG(OutFIFOWords) == 0);
-+ while(GLINT_READ_REG(OutFIFOWords) == 0);
- #define Sync_tag 0x188
- } while (GLINT_READ_REG(OutputFIFO) != Sync_tag);
- }
-@@ -733,63 +735,6 @@
- TRACE_EXIT("Permedia2SubsequentFillRectSolid");
- }
-
--static void MoveBYTE(
-- register CARD32* dest,
-- register unsigned char* src,
-- register int dwords
--)
--{
-- while(dwords) {
-- *dest = *src;
-- src += 1;
-- dest += 1;
-- dwords -= 1;
-- }
--}
--
--static void MoveWORDS(
-- register CARD32* dest,
-- register unsigned short* src,
-- register int dwords
--)
--{
-- while(dwords & ~0x01) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- src += 2;
-- dest += 2;
-- dwords -= 2;
-- }
-- switch(dwords) {
-- case 0: return;
-- case 1: *dest = *src;
-- return;
-- }
--}
--
--static void MoveDWORDS(
-- register CARD32* dest,
-- register CARD32* src,
-- register int dwords )
--{
-- while(dwords & ~0x03) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- *(dest + 2) = *(src + 2);
-- *(dest + 3) = *(src + 3);
-- src += 4;
-- dest += 4;
-- dwords -= 4;
-- }
-- if (!dwords) return;
-- *dest = *src;
-- if (dwords == 1) return;
-- *(dest + 1) = *(src + 1);
-- if (dwords == 2) return;
-- *(dest + 2) = *(src + 2);
--}
--
--
- static void
- Permedia2SetupForMono8x8PatternFill24bpp(ScrnInfoPtr pScrn,
- int patternx, int patterny,
-@@ -1117,10 +1062,10 @@
- Permedia2SetClippingRectangle(pScrn,x+skipleft,y,x+w,y+h);
-
- if (pScrn->bitsPerPixel == 24) {
-- GLINT_WAIT(10);
-+ GLINT_WAIT(10);
- } else {
- GLINT_WAIT(11);
-- DO_PLANEMASK(planemask);
-+ DO_PLANEMASK(planemask);
- }
- LOADROP(rop);
- Permedia2LoadCoord(pScrn, x&0xFFFF, y, w, h);
-@@ -1137,39 +1082,40 @@
- mode = 0;
- GLINT_WRITE_REG(UNIT_ENABLE, ColorDDAMode);
- GLINT_WRITE_REG(BitMaskPackingEachScanline|
-- pGlint->RasterizerSwap,RasterizerMode);
-+ pGlint->RasterizerSwap,RasterizerMode);
- }
-
- if(bg == -1) {
- /* >>>>> set fg <<<<<<<< */
- REPLICATE(fg);
-- if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-- GLINT_WRITE_REG(fg, FBBlockColor);
-+ if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-+ GLINT_WRITE_REG(fg, FBBlockColor);
- } else {
-- GLINT_WRITE_REG(fg, ConstantColor);
-+ GLINT_WRITE_REG(fg, ConstantColor);
- }
- } else if(rop == GXcopy) {
-- /* >>>>> set bg <<<<<<< */
-- /* >>>>> draw rect (x,y,w,h) */
-- REPLICATE(bg);
-- if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-+ /* >>>>> set bg <<<<<<< */
-+ /* >>>>> draw rect (x,y,w,h) */
-+ REPLICATE(bg);
-+ if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
- GLINT_WRITE_REG(bg, FBBlockColor);
- } else {
- GLINT_WRITE_REG(bg, ConstantColor);
- }
-- GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive |mode,Render);
-+ GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive |mode,
-+ Render);
- /* >>>>>> set fg <<<<<< */
- REPLICATE(fg);
-- if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-+ if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
- GLINT_WRITE_REG(fg, FBBlockColor);
- } else {
- GLINT_WRITE_REG(fg, ConstantColor);
- }
- } else {
-- SecondPass = TRUE;
-+ SecondPass = TRUE;
- /* >>>>> set fg <<<<<<< */
- REPLICATE(fg);
-- if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-+ if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
- GLINT_WRITE_REG(fg, FBBlockColor);
- } else {
- GLINT_WRITE_REG(fg, ConstantColor);
-@@ -1188,8 +1134,8 @@
- GLINT_WAIT(dwords);
- /* 0x0D is the TAG value for BitMaskPattern */
- GLINT_WRITE_REG(((dwords - 1) << 16) | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-- (CARD32 *)srcpntr, dwords);
-+ GLINT_MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32 *)srcpntr, dwords);
- srcpntr += srcwidth;
- }
-
-@@ -1198,12 +1144,13 @@
- /* >>>>>> invert bitmask and set bg <<<<<<<< */
- REPLICATE(bg);
- GLINT_WAIT(3);
-- if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-- GLINT_WRITE_REG(InvertBitMask|pGlint->RasterizerSwap,RasterizerMode);
-+ if ((pScrn->bitsPerPixel != 24) && (rop == GXcopy)) {
-+ GLINT_WRITE_REG(InvertBitMask|pGlint->RasterizerSwap,
-+ RasterizerMode);
- GLINT_WRITE_REG(bg, FBBlockColor);
- } else {
-- GLINT_WRITE_REG(InvertBitMask|BitMaskPackingEachScanline|
-- pGlint->RasterizerSwap, RasterizerMode);
-+ GLINT_WRITE_REG(InvertBitMask|BitMaskPackingEachScanline|
-+ pGlint->RasterizerSwap, RasterizerMode);
- GLINT_WRITE_REG(bg, ConstantColor);
- }
- goto SECOND_PASS;
-@@ -1276,13 +1223,15 @@
- count = dwords;
- address = ((y * pScrn->displayWidth) + x) >> 2;
- srcp = (CARD32*)src;
-+ GLINT_WAIT(1);
- GLINT_WRITE_REG(address, TextureDownloadOffset);
- while(count >= MAX_FIFO_ENTRIES) {
- GLINT_WAIT(MAX_FIFO_ENTRIES);
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x11 << 4) |
- 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- address += MAX_FIFO_ENTRIES - 1;
-@@ -1293,7 +1242,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D,
- OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1304,7 +1254,7 @@
- } else {
- char align = (x & pGlint->bppalign);
-
--
-+ GLINT_WAIT(1);
- GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode);
- if (rop == GXcopy) {
- GLINT_WAIT(6);
-@@ -1329,7 +1279,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcp += MAX_FIFO_ENTRIES - 1;
-@@ -1339,7 +1290,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1353,7 +1305,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveBYTES(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned char *)srcpbyte, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcpbyte += MAX_FIFO_ENTRIES - 1;
-@@ -1363,7 +1316,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveBYTES(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned char *)srcpbyte, count);
- }
- src += srcwidth;
-@@ -1435,13 +1389,15 @@
- count = dwords;
- address = ((y * pScrn->displayWidth) + x) >> 1;
- srcp = (CARD32*)src;
-+ GLINT_WAIT(1);
- GLINT_WRITE_REG(address, TextureDownloadOffset);
- while(count >= MAX_FIFO_ENTRIES) {
- GLINT_WAIT(MAX_FIFO_ENTRIES);
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x11 << 4) |
- 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- address += MAX_FIFO_ENTRIES - 1;
-@@ -1452,7 +1408,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D,
- OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1488,7 +1445,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcp += MAX_FIFO_ENTRIES - 1;
-@@ -1498,7 +1456,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1512,7 +1471,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned short *)srcpword, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcpword += MAX_FIFO_ENTRIES - 1;
-@@ -1522,7 +1482,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned short *)srcpword, count);
- }
- src += srcwidth;
-@@ -1590,7 +1551,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveBYTES(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned char *)srcpbyte, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcpbyte += MAX_FIFO_ENTRIES - 1;
-@@ -1600,7 +1562,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveBYTES(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned char *)srcpbyte, count);
- }
- src += srcwidth;
-@@ -1613,7 +1576,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcp += MAX_FIFO_ENTRIES - 1;
-@@ -1623,7 +1587,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1689,13 +1654,15 @@
- count = dwords;
- address = (y * pScrn->displayWidth) + x;
- srcp = (CARD32*)src;
-+ GLINT_WAIT(1);
- GLINT_WRITE_REG(address, TextureDownloadOffset);
- while(count >= MAX_FIFO_ENTRIES) {
- GLINT_WAIT(MAX_FIFO_ENTRIES);
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x11 << 4) |
- 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- address += MAX_FIFO_ENTRIES - 1;
-@@ -1706,7 +1673,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D,
- OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1732,7 +1700,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
- count -= MAX_FIFO_ENTRIES - 1;
- srcp += MAX_FIFO_ENTRIES - 1;
-@@ -1742,7 +1711,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2ramdac.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm2ramdac.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2ramdac.c Sat Jul 17 23:26:57 1999
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm2ramdac.c Sun Mar 18 22:26:08 2001
-@@ -104,16 +104,21 @@
- VisualPtr pVisual
- ){
- GLINTPtr pGlint = GLINTPTR(pScrn);
-- int i, index, shift;
-+ int i, index, shift = 0, j, repeat = 1;
-
-- shift = (pScrn->depth == 15) ? 3 : 0;
-+ if (pScrn->depth == 15) {
-+ repeat = 8;
-+ shift = 3;
-+ }
-
- for(i = 0; i < numColors; i++) {
- index = indices[i];
-- Permedia2WriteAddress(pScrn, index << shift);
-- Permedia2WriteData(pScrn, colors[index].red);
-- Permedia2WriteData(pScrn, colors[index].green);
-- Permedia2WriteData(pScrn, colors[index].blue);
-+ for (j = 0; j < repeat; j++) {
-+ Permedia2WriteAddress(pScrn, (index << shift)+j);
-+ Permedia2WriteData(pScrn, colors[index].red);
-+ Permedia2WriteData(pScrn, colors[index].green);
-+ Permedia2WriteData(pScrn, colors[index].blue);
-+ }
- /* for video i/o */
- GLINT_SLOW_WRITE_REG(index, TexelLUTIndex);
- GLINT_SLOW_WRITE_REG((colors[index].red & 0xFF) |
-@@ -132,14 +137,16 @@
- VisualPtr pVisual
- ){
- GLINTPtr pGlint = GLINTPTR(pScrn);
-- int i, index;
-+ int i, index, j;
-
- for(i = 0; i < numColors; i++) {
- index = indices[i];
-- Permedia2WriteAddress(pScrn, index << 2);
-- Permedia2WriteData(pScrn, colors[index >> 1].red);
-- Permedia2WriteData(pScrn, colors[index].green);
-- Permedia2WriteData(pScrn, colors[index >> 1].blue);
-+ for (j = 0; j < 4; j++) {
-+ Permedia2WriteAddress(pScrn, (index << 2)+j);
-+ Permedia2WriteData(pScrn, colors[index >> 1].red);
-+ Permedia2WriteData(pScrn, colors[index].green);
-+ Permedia2WriteData(pScrn, colors[index >> 1].blue);
-+ }
- GLINT_SLOW_WRITE_REG(index, TexelLUTIndex);
- GLINT_SLOW_WRITE_REG((colors[index].red & 0xFF) |
- ((colors[index].green & 0xFF) << 8) |
-@@ -147,10 +154,12 @@
- TexelLUTData);
-
- if(index <= 31) {
-- Permedia2WriteAddress(pScrn, index << 3);
-- Permedia2WriteData(pScrn, colors[index].red);
-- Permedia2WriteData(pScrn, colors[(index << 1) + 1].green);
-- Permedia2WriteData(pScrn, colors[index].blue);
-+ for (j = 0; j < 4; j++) {
-+ Permedia2WriteAddress(pScrn, (index << 3)+j);
-+ Permedia2WriteData(pScrn, colors[index].red);
-+ Permedia2WriteData(pScrn, colors[(index << 1) + 1].green);
-+ Permedia2WriteData(pScrn, colors[index].blue);
-+ }
- }
- }
- }
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2v_dac.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm2v_dac.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2v_dac.c Sat Mar 17 17:57:15 2001
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm2v_dac.c Sun Mar 18 17:43:30 2001
-@@ -406,7 +406,10 @@
- int bg, int fg
- )
- {
-- /* A 2 color cursor uses last 2 indexes into hardware cursor palette */
-+ GLINTPtr pGlint = GLINTPTR(pScrn);
-+
-+ if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) {
-+ /* PM3 uses last 2 indexes into hardware cursor palette fg first...*/
- Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+39, 0x00, (fg>>16)&0xff);
- Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+40, 0x00, (fg>>8)&0xff);
- Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+41, 0x00, fg & 0xff);
-@@ -414,6 +417,16 @@
- Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+42, 0x00, (bg>>16)&0xff);
- Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+43, 0x00, (bg>>8)&0xff);
- Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+44, 0x00, bg & 0xff);
-+ } else {
-+ /* PM2v uses first 2 indexes into hardware cursor palette bg first...*/
-+ Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+0, 0x00, (bg>>16)&0xff);
-+ Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+1, 0x00, (bg>>8)&0xff);
-+ Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+2, 0x00, bg & 0xff);
-+
-+ Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+3, 0x00, (fg>>16)&0xff);
-+ Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+4, 0x00, (fg>>8)&0xff);
-+ Permedia2vOutIndReg(pScrn, PM2VDACRDCursorPalette+5, 0x00, fg & 0xff);
-+ }
- }
-
- static Bool
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2vramdac.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm2vramdac.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm2vramdac.c Fri Feb 12 17:52:05 1999
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm2vramdac.c Sun Mar 18 16:51:30 2001
-@@ -43,8 +43,7 @@
- GLINTPtr pGlint = GLINTPTR(pScrn);
- unsigned char tmp = 0x00;
-
-- GLINT_SLOW_WRITE_REG((reg>>8) & 0xff, PM2VDACIndexRegHigh);
-- GLINT_SLOW_WRITE_REG(reg&0xff, PM2VDACIndexRegLow);
-+ GLINT_SET_INDEX(reg);
-
- if (mask != 0x00)
- tmp = GLINT_READ_REG (PM2VDACIndexData) & mask;
-@@ -58,8 +57,7 @@
- GLINTPtr pGlint = GLINTPTR(pScrn);
- unsigned char ret;
-
-- GLINT_SLOW_WRITE_REG (reg&0xff, PM2VDACIndexRegLow);
-- GLINT_SLOW_WRITE_REG((reg>>8) & 0xff, PM2VDACIndexRegHigh);
-+ GLINT_SET_INDEX(reg);
- ret = GLINT_READ_REG (PM2VDACIndexData);
-
- return (ret);
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c Wed Nov 29 11:42:17 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c Sun Mar 18 20:15:21 2001
-@@ -47,7 +47,6 @@
- #include "xaalocal.h" /* For replacements */
-
- #define DEBUG 0
--#define USE_DIRECT_FIFO_WRITES 1
-
- #if DEBUG
- # define TRACE_ENTER(str) ErrorF("pm3_accel: " str " %d\n",pScrn->scrnIndex)
-@@ -86,26 +85,35 @@
- int x_offset, int y_offset, int x, int y,
- int w, int h);
- /* Color Expansion Fills */
--static void Permedia3SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
-- int fg, int bg, int rop,unsigned int planemask);
--static void Permedia3SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
-- int x, int y, int w, int h, int skipleft);
-+static void Permedia3SetupForScanlineCPUToScreenColorExpandFill(
-+ ScrnInfoPtr pScrn,
-+ int fg, int bg, int rop,
-+ unsigned int planemask);
-+static void Permedia3SubsequentScanlineCPUToScreenColorExpandFill(
-+ ScrnInfoPtr pScrn, int x,
-+ int y, int w, int h, int skipleft);
-+static void Permedia3SubsequentColorExpandScanline(
-+ ScrnInfoPtr pScrn,
-+ int bufno);
- /* Direct Fifo Bitmap Writes */
- static void Permedia3WriteBitmap(ScrnInfoPtr pScrn, int x, int y, int w, int h,
- unsigned char *src, int srcwidth, int skipleft,
- int fg, int bg, int rop,unsigned int planemask);
- /* Images Writes */
--static void Permedia3SetupForImageWrite(ScrnInfoPtr pScrn, int rop,
-+static void Permedia3SetupForScanlineImageWrite(ScrnInfoPtr pScrn, int rop,
- unsigned int planemask, int trans_color,
- int bpp, int depth);
--static void Permedia3SubsequentImageWriteRect(ScrnInfoPtr pScrn,
-+static void Permedia3SubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn,
- int x, int y, int w, int h, int skipleft);
-+static void Permedia3SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno);
- /* Direct Fifo Pixmap Writes */
- static void Permedia3WritePixmap(ScrnInfoPtr pScrn, int x, int y, int w, int h,
- unsigned char *src, int srcwidth, int rop,
- unsigned int planemask, int transparency_color,
- int bpp, int depth);
-
-+#define MAX_FIFO_ENTRIES 120
-+
- void
- Permedia3InitializeEngine(ScrnInfoPtr pScrn)
- {
-@@ -407,51 +415,52 @@
- infoPtr->SubsequentMono8x8PatternFillRect =
- Permedia3SubsequentMono8x8PatternFillRect;
-
--#if USE_DIRECT_FIFO_WRITES
-- /* Direct Fifo Bitmap Writes */
-+ /* Bitmap Writes */
- infoPtr->WriteBitmapFlags = 0;
- infoPtr->WriteBitmap = Permedia3WriteBitmap;
--#endif
--
-- /* Color Expand Fills */
-- infoPtr->CPUToScreenColorExpandFillFlags =
-- /*
-- SYNC_AFTER_COLOR_EXPAND |
-- */
-- LEFT_EDGE_CLIPPING |
-- BIT_ORDER_IN_BYTE_LSBFIRST |
-- CPU_TRANSFER_BASE_FIXED |
-- CPU_TRANSFER_PAD_DWORD;
-- infoPtr->ColorExpandBase = pGlint->IOBase + BitMaskPattern;
-- infoPtr->ColorExpandRange = 4;
-- infoPtr->SetupForCPUToScreenColorExpandFill =
-- Permedia3SetupForCPUToScreenColorExpandFill;
-- infoPtr->SubsequentCPUToScreenColorExpandFill =
-- Permedia3SubsequentCPUToScreenColorExpandFill;
-
--#if USE_DIRECT_FIFO_WRITES
-- /* Direct Fifo Images Writes */
-+ /* Pixmap Writes */
- infoPtr->WritePixmapFlags = 0;
- infoPtr->WritePixmap = Permedia3WritePixmap;
--#else
-+
-+ /* Color Expand Fills */
-+ infoPtr->ScanlineCPUToScreenColorExpandFillFlags =
-+ LEFT_EDGE_CLIPPING |
-+ LEFT_EDGE_CLIPPING_NEGATIVE_X |
-+ BIT_ORDER_IN_BYTE_LSBFIRST |
-+ CPU_TRANSFER_PAD_DWORD;
-+
-+ infoPtr->NumScanlineColorExpandBuffers = 1;
-+ pGlint->ScratchBuffer = xalloc(((pScrn->virtualX+62)/32*4)
-+ + (pScrn->virtualX
-+ * pScrn->bitsPerPixel / 8));
-+ infoPtr->ScanlineColorExpandBuffers =
-+ pGlint->XAAScanlineColorExpandBuffers;
-+ pGlint->XAAScanlineColorExpandBuffers[0] =
-+ pGlint->IOBase + OutputFIFO + 4;
-+
-+ infoPtr->SetupForScanlineCPUToScreenColorExpandFill =
-+ Permedia3SetupForScanlineCPUToScreenColorExpandFill;
-+ infoPtr->SubsequentScanlineCPUToScreenColorExpandFill =
-+ Permedia3SubsequentScanlineCPUToScreenColorExpandFill;
-+ infoPtr->SubsequentColorExpandScanline =
-+ Permedia3SubsequentColorExpandScanline;
-+
- /* Images Writes */
-- infoPtr->ImageWriteFlags =
-- NO_GXCOPY |
-- /*
-- SYNC_AFTER_IMAGE_WRITE |
-- */
-- LEFT_EDGE_CLIPPING |
-- LEFT_EDGE_CLIPPING_NEGATIVE_X |
-- BIT_ORDER_IN_BYTE_LSBFIRST |
-- CPU_TRANSFER_BASE_FIXED |
-- CPU_TRANSFER_PAD_DWORD;
-- infoPtr->ImageWriteBase = pGlint->IOBase + PM3FBSourceData;
-- infoPtr->ImageWriteRange = 4;
-- infoPtr->SetupForImageWrite =
-- Permedia3SetupForImageWrite;
-- infoPtr->SubsequentImageWriteRect =
-- Permedia3SubsequentImageWriteRect;
--#endif
-+ infoPtr->ScanlineImageWriteFlags = NO_GXCOPY |
-+ LEFT_EDGE_CLIPPING |
-+ LEFT_EDGE_CLIPPING_NEGATIVE_X |
-+ BIT_ORDER_IN_BYTE_LSBFIRST |
-+ CPU_TRANSFER_PAD_DWORD;
-+ infoPtr->NumScanlineImageWriteBuffers = 1;
-+ infoPtr->ScanlineImageWriteBuffers =
-+ pGlint->XAAScanlineColorExpandBuffers;
-+ infoPtr->SetupForScanlineImageWrite =
-+ Permedia3SetupForScanlineImageWrite;
-+ infoPtr->SubsequentScanlineImageWriteRect =
-+ Permedia3SubsequentScanlineImageWriteRect;
-+ infoPtr->SubsequentImageWriteScanline =
-+ Permedia3SubsequentImageWriteScanline;
-
- /* Available Framebuffer Area for XAA. */
- AvailFBArea.x1 = 0;
-@@ -461,7 +470,7 @@
- pScrn->bitsPerPixel / 8);
- /* Alan does this ???
- AvailFBArea.y2 = ((pGlint->FbMapSize > 16384*1024) ? 16384*1024 :
-- pGlint->FbMapSize) / (pScrn->displayWidth
-+ pGlint->FbMapSize) / (pScrn->displayWidth *
- pScrn->bitsPerPixel / 8);
- */
-
-@@ -491,8 +500,12 @@
- CHECKCLIPPING;
-
- while (GLINT_READ_REG(DMACount) != 0);
-- GLINT_WAIT(1);
-+
-+ GLINT_WAIT(3);
-+ GLINT_WRITE_REG(3, BroadcastMask); /* hack! this shouldn't be needed */
-+ GLINT_WRITE_REG(0x400, FilterMode);
- GLINT_WRITE_REG(0, GlintSync);
-+
- do {
- while(GLINT_READ_REG(OutFIFOWords) == 0);
- } while (GLINT_READ_REG(OutputFIFO) != PM3SyncTag);
-@@ -700,11 +713,15 @@
- }
-
- /* Color Expansion Fills */
--static void Permedia3SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
-- int fg, int bg, int rop,unsigned int planemask)
--{
-+static void
-+Permedia3SetupForScanlineCPUToScreenColorExpandFill(
-+ ScrnInfoPtr pScrn,
-+ int fg, int bg,
-+ int rop,
-+ unsigned int planemask
-+){
- GLINTPtr pGlint = GLINTPTR(pScrn);
-- TRACE_ENTER("Permedia3SetupForCPUToScreenColorExpandFill");
-+
- REPLICATE(fg);
- pGlint->PM3_Render2D =
- PM3Render2D_SpanOperation |
-@@ -729,14 +746,23 @@
- GLINT_WRITE_REG(fg, PM3ForegroundColor);
- DO_PLANEMASK(planemask);
- GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D);
-- TRACE_EXIT("Permedia3SetupForCPUToScreenColorExpandFill");
- }
--static void Permedia3SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
-- int x, int y, int w, int h, int skipleft)
--{
-+
-+static void
-+Permedia3SubsequentScanlineCPUToScreenColorExpandFill(
-+ ScrnInfoPtr pScrn,
-+ int x, int y, int w, int h,
-+ int skipleft
-+){
- GLINTPtr pGlint = GLINTPTR(pScrn);
-- TRACE_ENTER("Permedia3SubsequentCPUToScreenColorExpandFill");
-- GLINT_WAIT(4);
-+
-+ TRACE_ENTER("Permedia2SubsequentScanlineCPUToScreenColorExpandFill");
-+
-+ pGlint->dwords = ((w + 31) >> 5); /* dwords per scanline */
-+
-+ pGlint->cpucount = h;
-+
-+ GLINT_WAIT(5);
- GLINT_WRITE_REG(((y&0x0fff)<<16)|((x+skipleft)&0x0fff), ScissorMinXY);
- GLINT_WRITE_REG((((y+h)&0x0fff)<<16)|((x+w)&0x0fff), ScissorMaxXY);
- GLINT_WRITE_REG(
-@@ -746,16 +772,60 @@
- GLINT_WRITE_REG(pGlint->PM3_Render2D |
- PM3Render2D_Width(w) | PM3Render2D_Height(h),
- PM3Render2D);
-- TRACE_EXIT("Permedia3SubsequentCPUToScreenColorExpandFill");
-+
-+#ifdef __alpha__
-+ if (0) /* force ALPHA to use indirect always */
-+#else
-+ if ((pGlint->dwords*h) < MAX_FIFO_ENTRIES)
-+#endif
-+ {
-+ /* Turn on direct for less than 120 dword colour expansion */
-+ pGlint->XAAScanlineColorExpandBuffers[0] = pGlint->IOBase+OutputFIFO+4;
-+ pGlint->ScanlineDirect = 1;
-+ GLINT_WRITE_REG(((pGlint->dwords*h)-1)<<16 | 0x0D, OutputFIFO);
-+ GLINT_WAIT(pGlint->dwords*h);
-+ } else {
-+ /* Use indirect for anything else */
-+ pGlint->XAAScanlineColorExpandBuffers[0] = pGlint->ScratchBuffer;
-+ pGlint->ScanlineDirect = 0;
-+ }
-+
-+ pGlint->cpucount--;
- }
-
-+static void
-+Permedia3SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
-+{
-+ GLINTPtr pGlint = GLINTPTR(pScrn);
-+ CARD32 *srcp = (CARD32*)pGlint->XAAScanlineColorExpandBuffers[bufno];
-+ int dwords = pGlint->dwords;
-+
-+ if (!pGlint->ScanlineDirect) {
-+ while(dwords >= MAX_FIFO_ENTRIES) {
-+ GLINT_WAIT(MAX_FIFO_ENTRIES);
-+ GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | 0x0D, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
-+ dwords -= MAX_FIFO_ENTRIES - 1;
-+ srcp += MAX_FIFO_ENTRIES - 1;
-+ }
-+ if(dwords) {
-+ GLINT_WAIT(dwords + 1);
-+ GLINT_WRITE_REG(((dwords - 1) << 16) | 0x0D, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)srcp, dwords);
-+ }
-+ }
-+}
-
- /* Images Writes */
--static void Permedia3SetupForImageWrite(ScrnInfoPtr pScrn, int rop,
-+static void Permedia3SetupForScanlineImageWrite(ScrnInfoPtr pScrn, int rop,
- unsigned int planemask, int trans_color, int bpp, int depth)
- {
- GLINTPtr pGlint = GLINTPTR(pScrn);
-- TRACE_ENTER("Permedia3SetupForImageWrite");
-+ TRACE_ENTER("Permedia3SetupForScanlineImageWrite");
- pGlint->PM3_Render2D =
- PM3Render2D_SpanOperation |
- PM3Render2D_XPositive |
-@@ -771,14 +841,18 @@
- GLINT_WAIT(2);
- DO_PLANEMASK(planemask);
- GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D);
-- TRACE_EXIT("Permedia3SetupForImageWrite");
-+ TRACE_EXIT("Permedia3SetupForScanlineImageWrite");
- }
--static void Permedia3SubsequentImageWriteRect(ScrnInfoPtr pScrn,
-+
-+static void Permedia3SubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn,
- int x, int y, int w, int h, int skipleft)
- {
- GLINTPtr pGlint = GLINTPTR(pScrn);
-- TRACE_ENTER("Permedia3SubsequentImageWrite");
-- GLINT_WAIT(4);
-+ TRACE_ENTER("Permedia3SubsequentScanlineImageWrite");
-+ pGlint->dwords = (((w * pScrn->bitsPerPixel) + 3) >> 2); /* per scanline */
-+
-+ pGlint->cpucount = h;
-+ GLINT_WAIT(5);
- GLINT_WRITE_REG(((y&0x0fff)<<16)|((x+skipleft)&0x0fff), ScissorMinXY);
- GLINT_WRITE_REG((((y+h)&0x0fff)<<16)|((x+w)&0x0fff), ScissorMaxXY);
- GLINT_WRITE_REG(
-@@ -788,18 +862,63 @@
- GLINT_WRITE_REG(pGlint->PM3_Render2D |
- PM3Render2D_Width(w) | PM3Render2D_Height(h),
- PM3Render2D);
-- TRACE_EXIT("Permedia3SubsequentImageWrite");
--}
-
-+#ifdef __alpha__
-+ if (0) /* force ALPHA to use indirect always */
-+#else
-+ if (pGlint->dwords < MAX_FIFO_ENTRIES)
-+#endif
-+ {
-+ /* Turn on direct for less than 120 dword colour expansion */
-+ pGlint->XAAScanlineColorExpandBuffers[0] = pGlint->IOBase+OutputFIFO+4;
-+ pGlint->ScanlineDirect = 1;
-+ GLINT_WRITE_REG(((pGlint->dwords*h)-1)<<16 | (0x15<<4) | 0x05,
-+ OutputFIFO);
-+ GLINT_WAIT(pGlint->dwords);
-+ } else {
-+ /* Use indirect for anything else */
-+ pGlint->XAAScanlineColorExpandBuffers[0] = pGlint->ScratchBuffer;
-+ pGlint->ScanlineDirect = 0;
-+ }
-
--/* Defines for Direct Fifo access */
-+ pGlint->cpucount--;
-+ TRACE_EXIT("Permedia3SubsequentScanlineImageWrite");
-+}
-
--#define WriteRange 120
--#define PciRetryWriteRange 1023
--#define WriteBase_Fixed ((CARD32 *)(pGlint->IOBase + PM3FBSourceData))
--#define WriteBase ((CARD32 *)(pGlint->IOBase + OutputFIFO + 4))
-+static void
-+Permedia3SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
-+{
-+ GLINTPtr pGlint = GLINTPTR(pScrn);
-+ int dwords = pGlint->dwords;
-
--/* Direct Fifo Bitmap Writes */
-+ if (pGlint->ScanlineDirect) {
-+ if (pGlint->cpucount--)
-+ GLINT_WAIT(dwords);
-+ return;
-+ } else {
-+ while(dwords >= MAX_FIFO_ENTRIES) {
-+ GLINT_WAIT(MAX_FIFO_ENTRIES);
-+ GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
-+ 0x05, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)pGlint->XAAScanlineColorExpandBuffers[bufno],
-+ MAX_FIFO_ENTRIES - 1);
-+ dwords -= MAX_FIFO_ENTRIES - 1;
-+ }
-+ if(dwords) {
-+ GLINT_WAIT(dwords + 1);
-+ GLINT_WRITE_REG(((dwords - 1) << 16) | (0x15 << 4) |
-+ 0x05, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)pGlint->XAAScanlineColorExpandBuffers[bufno],
-+ dwords);
-+ }
-+ }
-+}
-+
-+/* Bitmap Writes */
-
- static void
- Permedia3WriteBitmap(ScrnInfoPtr pScrn,
-@@ -810,59 +929,85 @@
- unsigned int planemask
- )
- {
-- int dwords;
-- int ApertureRange;
-+ int dwords, count;
-+ CARD32 *srcp;
- GLINTPtr pGlint = GLINTPTR(pScrn);
- TRACE_ENTER("Permedia3WriteBitmap");
-
- w += skipleft;
- x -= skipleft;
-- dwords = (w + 31) >>5;
-- if (pGlint->UsePCIRetry) ApertureRange = PciRetryWriteRange;
-- else ApertureRange = WriteRange;
-
- /* width of the stuff to copy in 32 bit words */
-- Permedia3SetupForCPUToScreenColorExpandFill(pScrn, fg, bg, rop, planemask);
-- Permedia3SubsequentCPUToScreenColorExpandFill(pScrn, x, y, w, h, skipleft);
-+ dwords = (w + 31) >>5;
-
-- if (dwords > ApertureRange) {
-- while(h--) {
-- XAAMoveDWORDS_FixedBase(WriteBase_Fixed, (CARD32*)src, dwords);
-- src += srcwidth;
-- }
-- } else {
-- /* the src is exatcly as wide as the target rectangle. We copy all
-- * of it, so no need to separate stuff by scanline */
-- if(srcwidth == (dwords << 5)) {
-- /* decrement contains the number of lines that can be
-- * put in the fifo */
-- int decrement = ApertureRange/dwords;
--
-- while(h > decrement) {
-- GLINT_WAIT(dwords * decrement);
-- GLINT_WRITE_REG((((dwords * decrement)-1) << 16) | 0xd,
-- OutputFIFO);
-- XAAMoveDWORDS(WriteBase, (CARD32*)src, dwords * decrement);
-- src += (srcwidth * decrement);
-- h -= decrement;
-- }
-- if(h) {
-- GLINT_WAIT(dwords * h);
-- GLINT_WRITE_REG((((dwords * h)-1) << 16) | 0xd, OutputFIFO);
-- XAAMoveDWORDS(WriteBase, (CARD32*)src, dwords * h);
-- }
-- } else {
-- while(h--) {
-- GLINT_WAIT(dwords);
-- GLINT_WRITE_REG(((dwords-1) << 16) | 0xd, OutputFIFO);
-- XAAMoveDWORDS(WriteBase, (CARD32*)src, dwords);
-- src += srcwidth;
-- }
-- }
-+ REPLICATE(fg);
-+ pGlint->PM3_Render2D =
-+ PM3Render2D_SpanOperation |
-+ PM3Render2D_XPositive |
-+ PM3Render2D_YPositive |
-+ PM3Render2D_Operation_SyncOnBitMask;
-+ pGlint->PM3_Config2D =
-+ PM3Config2D_UserScissorEnable |
-+ PM3Config2D_UseConstantSource |
-+ PM3Config2D_ForegroundROPEnable |
-+ PM3Config2D_ForegroundROP(rop) |
-+ PM3Config2D_FBWriteEnable;
-+ if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted))
-+ pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable;
-+ if (bg != -1) {
-+ REPLICATE(bg);
-+ pGlint->PM3_Config2D |= PM3Config2D_OpaqueSpan;
-+ GLINT_WAIT(8);
-+ GLINT_WRITE_REG(bg, BackgroundColor);
-+ }
-+ else GLINT_WAIT(7);
-+ GLINT_WRITE_REG(fg, PM3ForegroundColor);
-+ DO_PLANEMASK(planemask);
-+ GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D);
-+ GLINT_WRITE_REG(((y&0x0fff)<<16)|((x+skipleft)&0x0fff), ScissorMinXY);
-+ GLINT_WRITE_REG((((y+h)&0x0fff)<<16)|((x+w)&0x0fff), ScissorMaxXY);
-+ GLINT_WRITE_REG(
-+ PM3RectanglePosition_XOffset(x) |
-+ PM3RectanglePosition_YOffset(y),
-+ PM3RectanglePosition);
-+ GLINT_WRITE_REG(pGlint->PM3_Render2D |
-+ PM3Render2D_Width(w) | PM3Render2D_Height(h),
-+ PM3Render2D);
-+
-+#ifdef __alpha__
-+ mem_barrier(); /* dunno why, but this helps on older Alpha CPUs */
-+#endif
-+
-+ while(h--) {
-+ count = dwords;
-+ srcp = (CARD32*)src;
-+ while(count >= MAX_FIFO_ENTRIES) {
-+ GLINT_WAIT(MAX_FIFO_ENTRIES);
-+ GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) |
-+ 0x0D, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
-+ count -= MAX_FIFO_ENTRIES - 1;
-+ srcp += MAX_FIFO_ENTRIES - 1;
-+ }
-+ if(count) {
-+ GLINT_WAIT(count + 1);
-+ GLINT_WRITE_REG(((count - 1) << 16) | 0x0D, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)srcp, count);
-+ }
-+ src += srcwidth;
- }
-+
-+ Permedia3DisableClipping(pScrn);
-+ Permedia3Sync(pScrn);
-+
- TRACE_EXIT("Permedia3WriteBitmap");
- }
--/* Direct Fifo Images Writes */
-+
-+/* Pixmap Writes */
-
- static void
- Permedia3WritePixmap(
-@@ -876,10 +1021,10 @@
- int bpp, int depth
- )
- {
-- int dwords;
-+ int dwords, count;
- int skipleft = (long)src & 0x03L;
- int Bpp = bpp >> 3;
-- int ApertureRange;
-+ CARD32 *srcp;
- GLINTPtr pGlint = GLINTPTR(pScrn);
- TRACE_ENTER("Permedia3WritePixmap");
-
-@@ -896,48 +1041,67 @@
-
- src = (unsigned char*)((long)src & ~0x03L);
- }
-- Permedia3SetupForImageWrite(pScrn, rop, planemask, trans, bpp, depth);
-- Permedia3SubsequentImageWriteRect(pScrn, x, y, w, h, skipleft);
-+
-+ pGlint->PM3_Render2D =
-+ PM3Render2D_SpanOperation |
-+ PM3Render2D_XPositive |
-+ PM3Render2D_YPositive |
-+ PM3Render2D_Operation_SyncOnHostData;
-+ pGlint->PM3_Config2D =
-+ PM3Config2D_UserScissorEnable |
-+ PM3Config2D_ForegroundROPEnable |
-+ PM3Config2D_ForegroundROP(rop) |
-+ PM3Config2D_FBWriteEnable;
-+ if ((rop!=GXclear)&&(rop!=GXset)&&(rop!=GXcopy)&&(rop!=GXcopyInverted))
-+ pGlint->PM3_Config2D |= PM3Config2D_FBDestReadEnable;
-+ GLINT_WAIT(6);
-+ DO_PLANEMASK(planemask);
-+ GLINT_WRITE_REG(pGlint->PM3_Config2D, PM3Config2D);
-+ GLINT_WRITE_REG(((y&0x0fff)<<16)|((x+skipleft)&0x0fff), ScissorMinXY);
-+ GLINT_WRITE_REG((((y+h)&0x0fff)<<16)|((x+w)&0x0fff), ScissorMaxXY);
-+ GLINT_WRITE_REG(
-+ PM3RectanglePosition_XOffset(x) |
-+ PM3RectanglePosition_YOffset(y),
-+ PM3RectanglePosition);
-+ GLINT_WRITE_REG(pGlint->PM3_Render2D |
-+ PM3Render2D_Width(w) | PM3Render2D_Height(h),
-+ PM3Render2D);
-+
-+#ifdef __alpha__
-+ mem_barrier(); /* dunno why, but this helps on older Alpha CPUs */
-+#endif
-
- /* width of the stuff to copy in 32 bit words */
- dwords = ((w * Bpp) + 3) >> 2;
-- if (pGlint->UsePCIRetry) ApertureRange = PciRetryWriteRange;
-- else ApertureRange = WriteRange;
-
-- if (dwords > ApertureRange) {
-- while(h--) {
-- XAAMoveDWORDS_FixedBase(WriteBase_Fixed, (CARD32*)src, dwords);
-- src += srcwidth;
-- }
-- } else {
-- /* the src is exatcly as wide as the target rectangle. We copy all
-- * of it, so no need to separate stuff by scanline */
-- if(srcwidth == (dwords << 2)) {
-- /* decrement contains the number of lines that can be
-- * put in the fifo */
-- int decrement = ApertureRange/dwords;
--
-- while(h > decrement) {
-- GLINT_WAIT(dwords * decrement);
-- GLINT_WRITE_REG((((dwords * decrement)-1) << 16) | 0x155,
-- OutputFIFO);
-- XAAMoveDWORDS(WriteBase, (CARD32*)src, dwords * decrement);
-- src += (srcwidth * decrement);
-- h -= decrement;
-- }
-- if(h) {
-- GLINT_WAIT(dwords * h);
-- GLINT_WRITE_REG((((dwords * h)-1) << 16) | 0x155, OutputFIFO);
-- XAAMoveDWORDS(WriteBase, (CARD32*)src, dwords * h);
-- }
-- } else {
-- while(h--) {
-- GLINT_WAIT(dwords);
-- GLINT_WRITE_REG(((dwords-1) << 16) | 0x155, OutputFIFO);
-- XAAMoveDWORDS(WriteBase, (CARD32*)src, dwords);
-- src += srcwidth;
-- }
-- }
-+ while(h--) {
-+ count = dwords;
-+ srcp = (CARD32*)src;
-+ while(count >= MAX_FIFO_ENTRIES) {
-+ GLINT_WAIT(MAX_FIFO_ENTRIES);
-+ /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
-+ GLINT_WRITE_REG(((MAX_FIFO_ENTRIES - 2) << 16) | (0x15 << 4) |
-+ 0x05, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)srcp, MAX_FIFO_ENTRIES - 1);
-+ count -= MAX_FIFO_ENTRIES - 1;
-+ srcp += MAX_FIFO_ENTRIES - 1;
-+ }
-+ if(count) {
-+ GLINT_WAIT(count + 1);
-+ /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
-+ GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
-+ 0x05, OutputFIFO);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ (CARD32*)srcp, count);
-+ }
-+ src += srcwidth;
- }
-+
-+ Permedia3DisableClipping(pScrn);
-+ Permedia3Sync(pScrn);
-+
- TRACE_EXIT("Permedia3WritePixmap");
- }
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c Sat Mar 17 17:57:15 2001
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_dac.c Sun Mar 18 21:35:54 2001
-@@ -320,7 +320,7 @@
- pReg->glintRegs[VClkCtl >> 3] = (GLINT_READ_REG(VClkCtl) & 0xFFFFFFFC);
- pReg->glintRegs[PMScreenBase >> 3] = 0;
-
-- pReg->glintRegs[ChipConfig >> 3] = GLINT_READ_REG(ChipConfig) & 0xFFFFFFDD;
-+ pReg->glintRegs[ChipConfig >> 3] = GLINT_READ_REG(ChipConfig) & 0xFFFFFFFD;
- pReg->DacRegs[PM2VDACRDDACControl] = 0x00;
-
- {
-@@ -524,4 +524,80 @@
- Permedia2vOutIndReg(pScrn, PM2VDACRDDClk0PostScale, 0x00,
- glintReg->DacRegs[PM2VDACRDDClk0PostScale]);
- Permedia2vOutIndReg(pScrn, PM2VDACIndexClockControl, 0x00, temp|0x03);
-+}
-+
-+void Permedia3LoadPalette(
-+ ScrnInfoPtr pScrn,
-+ int numColors,
-+ int *indices,
-+ LOCO *colors,
-+ VisualPtr pVisual
-+){
-+#if 0 /* NOT YET */
-+ GLINTPtr pGlint = GLINTPTR(pScrn);
-+#endif
-+ int i, index, shift = 0, j, repeat = 1;
-+
-+ if (pScrn->depth == 15) {
-+ repeat = 8;
-+ shift = 3;
-+ }
-+
-+ for(i = 0; i < numColors; i++) {
-+ index = indices[i];
-+ for (j = 0; j < repeat; j++) {
-+ Permedia2WriteAddress(pScrn, (index << shift)+j);
-+ Permedia2WriteData(pScrn, colors[index].red);
-+ Permedia2WriteData(pScrn, colors[index].green);
-+ Permedia2WriteData(pScrn, colors[index].blue);
-+ }
-+ /* for video i/o */
-+#if 0 /* NOT YET */
-+ GLINT_SLOW_WRITE_REG(index, PM3LUTIndex);
-+ GLINT_SLOW_WRITE_REG((colors[index].red & 0xFF) |
-+ ((colors[index].green & 0xFF) << 8) |
-+ ((colors[index].blue & 0xFF) << 16),
-+ PM3LUTData);
-+#endif
-+ }
-+}
-+
-+/* special one for 565 mode */
-+void Permedia3LoadPalette16(
-+ ScrnInfoPtr pScrn,
-+ int numColors,
-+ int *indices,
-+ LOCO *colors,
-+ VisualPtr pVisual
-+){
-+#if 0 /* NOT YET */
-+ GLINTPtr pGlint = GLINTPTR(pScrn);
-+#endif
-+ int i, index, j;
-+
-+ for(i = 0; i < numColors; i++) {
-+ index = indices[i];
-+ for (j = 0; j < 4; j++) {
-+ Permedia2WriteAddress(pScrn, (index << 2)+j);
-+ Permedia2WriteData(pScrn, colors[index >> 1].red);
-+ Permedia2WriteData(pScrn, colors[index].green);
-+ Permedia2WriteData(pScrn, colors[index >> 1].blue);
-+ }
-+#if 0 /* NOT YET */
-+ GLINT_SLOW_WRITE_REG(index, PM3LUTIndex);
-+ GLINT_SLOW_WRITE_REG((colors[index].red & 0xFF) |
-+ ((colors[index].green & 0xFF) << 8) |
-+ ((colors[index].blue & 0xFF) << 16),
-+ PM3LUTData);
-+#endif
-+
-+ if(index <= 31) {
-+ for (j = 0; j < 4; j++) {
-+ Permedia2WriteAddress(pScrn, (index << 3)+j);
-+ Permedia2WriteData(pScrn, colors[index].red);
-+ Permedia2WriteData(pScrn, colors[(index << 1) + 1].green);
-+ Permedia2WriteData(pScrn, colors[index].blue);
-+ }
-+ }
-+ }
- }
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm_accel.c xc/programs/Xserver/hw/xfree86/drivers/glint/pm_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/pm_accel.c Sat Jun 24 14:19:55 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/pm_accel.c Sun Mar 18 16:57:17 2001
-@@ -301,62 +301,6 @@
- return (XAAInit(pScreen, infoPtr));
- }
-
--static void MoveBYTE(
-- register CARD32* dest,
-- register unsigned char* src,
-- register int dwords
--)
--{
-- while(dwords) {
-- *dest = *src;
-- src += 1;
-- dest += 1;
-- dwords -= 1;
-- }
--}
--
--static void MoveWORDS(
-- register CARD32* dest,
-- register unsigned short* src,
-- register int dwords
--)
--{
-- while(dwords & ~0x01) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- src += 2;
-- dest += 2;
-- dwords -= 2;
-- }
-- switch(dwords) {
-- case 0: return;
-- case 1: *dest = *src;
-- return;
-- }
--}
--
--static void MoveDWORDS(
-- register CARD32* dest,
-- register CARD32* src,
-- register int dwords )
--{
-- while(dwords & ~0x03) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- *(dest + 2) = *(src + 2);
-- *(dest + 3) = *(src + 3);
-- src += 4;
-- dest += 4;
-- dwords -= 4;
-- }
-- if (!dwords) return;
-- *dest = *src;
-- if (dwords == 1) return;
-- *(dest + 1) = *(src + 1);
-- if (dwords == 2) return;
-- *(dest + 2) = *(src + 2);
--}
--
- static void PermediaLoadCoord(
- ScrnInfoPtr pScrn,
- int x, int y,
-@@ -779,15 +723,16 @@
- while (dwords >= infoRec->ColorExpandRange) {
- GLINT_WAIT(infoRec->ColorExpandRange);
- GLINT_WRITE_REG((infoRec->ColorExpandRange - 2)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
-- infoRec->ColorExpandRange - 1);
-+ GLINT_MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ src, infoRec->ColorExpandRange - 1);
- dwords -= (infoRec->ColorExpandRange - 1);
- src += (infoRec->ColorExpandRange - 1);
- }
- if (dwords) {
- GLINT_WAIT(dwords);
- GLINT_WRITE_REG((dwords - 1)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
-+ GLINT_MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ src,dwords);
- }
- pGlint->cpucount += 1;
- #if 0
-@@ -915,7 +860,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16)
- | (0x11 << 4) | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- address += infoRec->ColorExpandRange - 1;
-@@ -926,7 +872,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D,
- OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -955,7 +902,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) |
- (0x15 << 4) | 0x05, OutputFIFO);
-- MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveBYTES(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned char *)srcpbyte, infoRec->ColorExpandRange-1);
- count -= infoRec->ColorExpandRange - 1;
- srcpbyte += infoRec->ColorExpandRange - 1;
-@@ -965,7 +913,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveBYTE((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveBYTES(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned char *)srcpbyte, count);
- }
- src += srcwidth;
-@@ -1038,7 +987,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) |
- (0x11 << 4) | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- address += infoRec->ColorExpandRange - 1;
-@@ -1049,7 +999,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D,
- OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1078,7 +1029,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) |
- (0x15 << 4) | 0x05, OutputFIFO);
-- MoveWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned short *)srcpword,infoRec->ColorExpandRange-1);
- count -= infoRec->ColorExpandRange - 1;
- srcpword += infoRec->ColorExpandRange - 1;
-@@ -1088,7 +1040,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (unsigned short *)srcpword, count);
- }
- src += srcwidth;
-@@ -1162,7 +1115,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) |
- (0x11 << 4) | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- address += infoRec->ColorExpandRange - 1;
-@@ -1173,7 +1127,8 @@
- /* (0x11 << 4) | 0x0D is the TAG for TextureData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x11 << 4) | 0x0D,
- OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-@@ -1196,7 +1151,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) |
- (0x15 << 4) | 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- srcp += infoRec->ColorExpandRange - 1;
-@@ -1206,7 +1162,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/sx_accel.c xc/programs/Xserver/hw/xfree86/drivers/glint/sx_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/sx_accel.c Wed Apr 12 10:44:41 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/sx_accel.c Sun Mar 18 16:57:36 2001
-@@ -298,28 +298,6 @@
- }
- }
-
--static void MoveDWORDS(
-- register CARD32* dest,
-- register CARD32* src,
-- register int dwords )
--{
-- while(dwords & ~0x03) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- *(dest + 2) = *(src + 2);
-- *(dest + 3) = *(src + 3);
-- src += 4;
-- dest += 4;
-- dwords -= 4;
-- }
-- if (!dwords) return;
-- *dest = *src;
-- if (dwords == 1) return;
-- *(dest + 1) = *(src + 1);
-- if (dwords == 2) return;
-- *(dest + 2) = *(src + 2);
--}
--
- static void
- SXSync(
- ScrnInfoPtr pScrn
-@@ -519,7 +497,8 @@
- while (dwords >= infoRec->ColorExpandRange) {
- GLINT_WAIT(infoRec->ColorExpandRange);
- GLINT_WRITE_REG((infoRec->ColorExpandRange - 2)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
- infoRec->ColorExpandRange - 1);
- dwords -= (infoRec->ColorExpandRange - 1);
- src += (infoRec->ColorExpandRange - 1);
-@@ -527,7 +506,8 @@
- if (dwords) {
- GLINT_WAIT(dwords);
- GLINT_WRITE_REG((dwords - 1)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
- }
- pGlint->cpucount += 1;
- }
-@@ -809,7 +789,8 @@
- /* (0x0f << 4) | 0x0e is the TAG for GLINTColor */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) | (0x0F << 4) |
- 0x0E, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- srcp += infoRec->ColorExpandRange - 1;
-@@ -819,7 +800,8 @@
- /* (0x0F << 4) | 0x0E is the TAG for GLINTColor */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x0f << 4) |
- 0x0e, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c Wed May 10 16:01:32 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c Sun Mar 18 16:57:58 2001
-@@ -326,28 +326,6 @@
- #endif
- }
-
--static void MoveDWORDS(
-- register CARD32* dest,
-- register CARD32* src,
-- register int dwords )
--{
-- while(dwords & ~0x03) {
-- *dest = *src;
-- *(dest + 1) = *(src + 1);
-- *(dest + 2) = *(src + 2);
-- *(dest + 3) = *(src + 3);
-- src += 4;
-- dest += 4;
-- dwords -= 4;
-- }
-- if (!dwords) return;
-- *dest = *src;
-- if (dwords == 1) return;
-- *(dest + 1) = *(src + 1);
-- if (dwords == 2) return;
-- *(dest + 2) = *(src + 2);
--}
--
- static void
- TXSync(
- ScrnInfoPtr pScrn
-@@ -541,7 +519,8 @@
- while (dwords >= infoRec->ColorExpandRange) {
- GLINT_WAIT(infoRec->ColorExpandRange);
- GLINT_WRITE_REG((infoRec->ColorExpandRange - 2)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,
- infoRec->ColorExpandRange - 1);
- dwords -= (infoRec->ColorExpandRange - 1);
- src += (infoRec->ColorExpandRange - 1);
-@@ -549,7 +528,8 @@
- if (dwords) {
- GLINT_WAIT(dwords);
- GLINT_WRITE_REG((dwords - 1)<<16 | 0x0D, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4), src,dwords);
- }
- pGlint->cpucount += 1;
- }
-@@ -848,7 +828,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((infoRec->ColorExpandRange - 2) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, infoRec->ColorExpandRange - 1);
- count -= infoRec->ColorExpandRange - 1;
- srcp += infoRec->ColorExpandRange - 1;
-@@ -858,7 +839,8 @@
- /* (0x15 << 4) | 0x05 is the TAG for FBSourceData */
- GLINT_WRITE_REG(((count - 1) << 16) | (0x15 << 4) |
- 0x05, OutputFIFO);
-- MoveDWORDS((CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
-+ GLINT_MoveDWORDS(
-+ (CARD32*)((char*)pGlint->IOBase + OutputFIFO + 4),
- (CARD32*)srcp, count);
- }
- src += srcwidth;
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c Sat Mar 17 17:57:15 2001
-+++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c Sun Mar 18 17:19:13 2001
-@@ -37,6 +37,16 @@
- #include "mga_dri.h"
- #endif
-
-+#if defined(__alpha__)
-+#define MGAMoveDWORDS(d,s,c) \
-+do { \
-+ write_mem_barrier(); \
-+ XAAMoveDWORDS((d),(s),(c)); \
-+} while (0)
-+#else
-+#define MGAMoveDWORDS(d,s,c) XAAMoveDWORDS((d),(s),(c))
-+#endif
-+
- static void MGANAME(SubsequentScreenToScreenCopy)(ScrnInfoPtr pScrn,
- int srcX, int srcY, int dstX, int dstY,
- int w, int h);
-@@ -964,6 +974,8 @@
-
- CHECK_DMA_QUIESCENT(pMga, pScrn);
-
-+ mem_barrier(); /*??*/
-+
- while(MGAISBUSY());
- /* flush cache before a read (mga-1064g 5.1.6) */
- OUTREG8(MGAREG_CRTC_INDEX, 0);
-@@ -1599,7 +1611,13 @@
- OUTREG(MGAREG_FXBNDRY, ((x + w - 1) << 16) | (x & 0xFFFF));
- OUTREG(MGAREG_YDSTLEN + MGAREG_EXEC, (y << 16) | h);
-
-- if(pMga->expandDWORDs > pMga->FifoSize) {
-+#ifdef __alpha__
-+ /* force Alpha to always use indirect */
-+ if(1)
-+#else
-+ if(pMga->expandDWORDs > pMga->FifoSize)
-+#endif
-+ {
- pMga->AccelInfoRec->SubsequentColorExpandScanline =
- MGANAME(SubsequentColorExpandScanlineIndirect);
- pMga->AccelInfoRec->ScanlineColorExpandBuffers =
-@@ -1624,13 +1642,13 @@
-
- while(dwords > pMga->FifoSize) {
- WAITFIFO(pMga->FifoSize);
-- XAAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, pMga->FifoSize);
-+ MGAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, pMga->FifoSize);
- src += pMga->FifoSize;
- dwords -= pMga->FifoSize;
- }
-
- WAITFIFO(dwords);
-- XAAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, dwords);
-+ MGAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, dwords);
-
- if(!(--pMga->expandRows)) {
- if(pMga->expandRemaining) {
-@@ -1726,13 +1744,13 @@
-
- while(dwords > pMga->FifoSize) {
- WAITFIFO(pMga->FifoSize);
-- XAAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, pMga->FifoSize);
-+ MGAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, pMga->FifoSize);
- src += pMga->FifoSize;
- dwords -= pMga->FifoSize;
- }
-
- WAITFIFO(dwords);
-- XAAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, dwords);
-+ MGAMoveDWORDS((CARD32*)(pMga->ColorExpandBase), src, dwords);
-
- if(!(--pMga->expandRows)) {
- DISABLE_CLIP();
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/tga/IBM561ramdac.c xc/programs/Xserver/hw/xfree86/drivers/tga/IBM561ramdac.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/tga/IBM561ramdac.c Mon Oct 23 17:16:50 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/tga/IBM561ramdac.c Sun Mar 18 16:51:30 2001
-@@ -533,7 +533,6 @@
- TGAPtr pTga = TGAPTR(pScrn);
-
- unsigned int temp1[6] = {0,0,0,0,0,0};
-- struct monitor_data * c_table = &crystal_table;
-
- /*
- * Set-up av9110 to 14.3 Mhz as reference for 561's PLL
-@@ -555,10 +554,10 @@
- IBM561WriteReg(pScrn, IBM561_CONFIG_REG_4, 0x20 );
-
- /* IBM561WriteReg(pScrn, IBM561_PLL_VCO_DIV_REG, 0xc8 ); */
-- IBM561WriteReg(pScrn, IBM561_PLL_VCO_DIV_REG, c_table->ibm561_vco_div);
-+ IBM561WriteReg(pScrn, IBM561_PLL_VCO_DIV_REG, tga_c_table->ibm561_vco_div);
-
- /* IBM561WriteReg(pScrn, IBM561_PLL_REF_REG, 0x08 ); */
-- IBM561WriteReg(pScrn, IBM561_PLL_REF_REG, c_table->ibm561_ref );
-+ IBM561WriteReg(pScrn, IBM561_PLL_REF_REG, tga_c_table->ibm561_ref );
-
- IBM561WriteReg(pScrn, IBM561_DIV_DOT_CLK_REG, 0xb0 );
-
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/tga/tga.h xc/programs/Xserver/hw/xfree86/drivers/tga/tga.h
---- xc.orig/programs/Xserver/hw/xfree86/drivers/tga/tga.h Fri Oct 27 21:23:37 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/tga/tga.h Sun Mar 18 16:51:30 2001
-@@ -120,7 +120,9 @@
- unsigned int ibm561_ref;
- };
-
--extern struct monitor_data crystal_table;
-+extern struct monitor_data tga_crystal_table[];
-+extern int tga_crystal_table_entries;
-+extern struct monitor_data *tga_c_table;
-
- /* Prototypes */
-
-@@ -131,6 +133,7 @@
- Bool saveFonts*/);
- Bool DEC21030Init(ScrnInfoPtr pScrn, DisplayModePtr mode);
- void write_av9110(ScrnInfoPtr pScrn, unsigned int *);
-+void TGA2SetupMode(ScrnInfoPtr pScrn);
-
- /* tga_accel.c */
- Bool DEC21030AccelInit(ScreenPtr pScreen);
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/tga/tga_dac.c xc/programs/Xserver/hw/xfree86/drivers/tga/tga_dac.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/tga/tga_dac.c Fri Oct 27 21:23:37 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/tga/tga_dac.c Sun Mar 18 16:51:30 2001
-@@ -49,45 +49,114 @@
- /* There lies an ICS1562 Clock Generator. */
- ICS1562_CalcClockBits(freq, pll_bits);
-
-- switch (pTga->Chipset) {
-- case PCI_CHIP_DEC21030:
-- /*
-- * For the DEC 21030 TGA:
-- * This requires the 55 clock bits be written in a serial manner to
-- * bit 0 of the CLOCK register and on the 56th bit set the hold flag.
-- */
-- for (i = 0;i <= 6; i++) {
-- for (j = 0; j <= 7; j++) {
-- temp = (pll_bits[i] >> (7-j)) & 1;
-- if (i == 6 && j == 7)
-- temp |= 2;
-- TGA_WRITE_REG(temp, TGA_CLOCK_REG);
-- }
-+ /*
-+ * For the DEC 21030 TGA:
-+ * This requires the 55 clock bits be written in a serial manner to
-+ * bit 0 of the CLOCK register and on the 56th bit set the hold flag.
-+ */
-+ for (i = 0;i <= 6; i++) {
-+ for (j = 0; j <= 7; j++) {
-+ temp = (pll_bits[i] >> (7-j)) & 1;
-+ if (i == 6 && j == 7)
-+ temp |= 2;
-+ TGA_WRITE_REG(temp, TGA_CLOCK_REG);
- }
-- break;
--
-- case PCI_CHIP_TGA2:
-- /*
-- * For the DEC TGA2:
-- * This requires the 55 clock bits be written in a serial manner to
-- * bit 0 of the CLOCK register and on the 56th bit set the hold flag.
-- */
--#if 0
-- /* ?? FIXME FIXME FIXME ?? */
-- for (i = 0;i <= 6; i++) {
-- for (j = 0; j <= 7; j++) {
-- temp = (pll_bits[i] >> (7-j)) & 1;
-- if (i == 6 && j == 7)
-- temp |= 2;
-- TGA_WRITE_REG(temp, TGA_CLOCK_REG);
-- }
-- }
--#endif
-- break;
- }
- }
-
--struct monitor_data crystal_table =
-+struct monitor_data tga_crystal_table[] = {
-+{
-+/* Option 0 Monitor Info 130.8 */
-+1024, /* rows */
-+1280, /* columns */
-+130, /* 130.8 Mhz */
-+72, /* refresh rate */
-+1024, /* v scanlines */
-+3, /* v front porch */
-+3, /* v sync */
-+33, /* v back porch */
-+1280, /* h pixels */
-+32, /* h front porch */
-+160, /* h sync */
-+232, /* h back porch */
-+/* AV9110 clock serial load information 130.808 */
-+0x40, /* 0:6 VCO frequency divider N */
-+0x7, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* IBM561 PLL setup data 130.808 */
-+0xC8, /* VCO Div: PFR=0x3, M-65=49 */
-+0x8 /* REF: N=0x8 */
-+},
-+{
-+/* Option 3 Monitor Info 104.00 Mhz */
-+900, /* rows */
-+1152, /* columns */
-+104, /* 104 Mhz */
-+72, /* refresh rate */
-+900, /* v scanlines */
-+6, /* v front porch */
-+10, /* v sync */
-+44, /* v back porch */
-+1152, /* h pixels */
-+64, /* h front porch */
-+112, /* h sync */
-+176, /* h back porch */
-+/* 103.994 MHz av9110 clock serial load information */
-+0x6d, /* 0:6 VCO frequency divider N */
-+0xf, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 104.00 MHz IBM561 PLL setup data */
-+0x96, /* VCO Div: PFR=2, M=57 */
-+0x6 /* REF: N=6 */
-+},
-+#if 1
-+{
-+/* Option 6 Monitor Info 74.00 Mhz */
-+768, /* rows */
-+1024, /* columns */
-+74, /* 74 Mhz */
-+72, /* refresh rate */
-+768, /* v scanlines */
-+1, /* v front porch */
-+6, /* v sync */
-+22, /* v back porch */
-+1024, /* h pixels */
-+16, /* h front porch */
-+128, /* h sync */
-+128, /* h back porch */
-+/* 74.00 MHz AV9110 clock serial load information */
-+0x2a, /* 0:6 VCO frequency divider N */
-+0x41, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 74.00 MHz IBM561 PLL setup data */
-+0x9C, /* VCO Div: PFR=2, M=0x5D*/
-+0x9 /* REF: N=0x9 */
-+},
-+#else
- {
- /* Option 5 Monitor Info 75.00 Mhz */
- 768, /* rows */
-@@ -117,8 +186,406 @@
- /* 75.00 MHz IBM561 PLL setup data */
- 0x93, /* VCO Div: PFR=2, M=0x54 */
- 0x8 /* REF: N=0x8 */
-+},
-+#endif
-+{
-+/* Option 9 Monitor Info 50 Mhz ergo SVGA */
-+600, /* rows */
-+800, /* columns */
-+50, /* 50 Mhz */
-+72, /* refresh rate */
-+600, /* v scanlines */
-+37, /*(31 tga)v front porch */
-+6, /* v sync */
-+23, /*(29 tga)v back porch */
-+800, /* h pixels */
-+56, /* h front porch */
-+120, /* h sync */
-+64, /* h back porch */
-+/*50.00 Mhz AV9110 clock serial load information */
-+0x37, /* 0:6 VCO frequency divider N */
-+0x3f, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 50.00 MHz IBM561 PLL setup data */
-+0x45, /* VCO Div: PFR=1, M=46*/
-+0x5 /* REF: N=5 */
-+},
-+{
-+/* Option B Monitor Info 31.5 Mhz ergo VGA */
-+480, /* rows */
-+640, /* columns */
-+32, /* 32 Mhz */
-+72, /* refresh rate */
-+480, /* v scanlines */
-+9, /* v front porch */
-+3, /* v sync */
-+28, /* v back porch */
-+640, /* h pixels */
-+24, /* h front porch */
-+40, /* h sync */
-+128, /* h back porch */
-+/* 31.50 MHz AV9110 clock serial load information */
-+0x16, /* 0:6 VCO frequency divider N */
-+0x05, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 31.50 MHz IBM561 PLL setup data */
-+0x17, /* VCO Div: PFR=0, M=0x58 */
-+0x5 /* REF: N=0x5 */
-+},
-+#ifdef ALLOW_LT_72_HZ
-+{
-+/* Option 1 Monitor Info 119.84 Mhz */
-+1024, /* rows */
-+1280, /* columns */
-+119, /* 119 Mhz */
-+66, /* refresh rate */
-+1024, /* v scanlines */
-+3, /* v front porch */
-+3, /* v sync */
-+33, /* v back porch */
-+1280, /* h pixels */
-+32, /* h front porch */
-+160, /* h sync */
-+232, /* h back porch */
-+/* 119.84MHz AV9110 clock serial load information */
-+0x2d, /* 0:6 VCO frequency divider N */
-+0x2b, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8) */
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* IBM561 PLL setup data 119.84 */
-+0x82, /* VCO Div: PFR=0x2, M=0x43 */
-+0x4 /* REF: N=0x4 */
-+},
-+{
-+/* Option 2 Monitor Info 108.18 Mhz */
-+1024, /* rows */
-+1280, /* columns */
-+108, /* 108 Mhz */
-+60, /* refresh rate */
-+1024, /* v scanlines */
-+3, /* v front porch */
-+3, /* v sync */
-+26, /* v back porch */
-+1280, /* h pixels */
-+44, /* h front porch */
-+184, /* h sync */
-+200, /* h back porch */
-+/* 108.18 MHz av9110 Clk serial load information */
-+0x11, /* 0:6 VCO frequency divider N */
-+0x9, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 108.18 MHz IBM561 PLL setup data */
-+0xB8, /* VCO Div: PFR=2, M=79 */
-+0x8 /* REF: N=0x8 */
-+},
-+{
-+/* Option 5 Monitor Info 75.00 Mhz */
-+768, /* rows */
-+1024, /* columns */
-+75, /* 74 Mhz */
-+70, /* refresh rate */
-+768, /* v scanlines */
-+3, /* v front porch */
-+6, /* v sync */
-+29, /* v back porch */
-+1024, /* h pixels */
-+24, /* h front porch */
-+136, /* h sync */
-+144, /* h back porch */
-+/* 75.00 MHz AV9110 clock serial load information */
-+0x6e, /* 0:6 VCO frequency divider N */
-+0x15, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 75.00 MHz IBM561 PLL setup data */
-+0x93, /* VCO Div: PFR=2, M=0x54 */
-+0x8 /* REF: N=0x8 */
-+},
-+{
-+/* Option 7 Monitor Info 69 Mhz DEC 72 Hz */
-+864, /* rows */
-+1024, /* columns */
-+69, /* 69.x Mhz */
-+60, /* refresh rate */
-+864, /* v scanlines */
-+0, /* v front porch */
-+3, /* v sync */
-+34, /* v back porch */
-+1024, /* h pixels */
-+12, /* h front porch */
-+128, /* h sync */
-+116, /* h back porch */
-+/* 69.00 Mhz AV9110 clock serial load information */
-+0x35, /* 0:6 VCO frequency divider N */
-+0xb, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 69.00 MHz IBM561 PLL setup data */
-+0xA9, /* VCO Div: PFR=2, M=0x6A */
-+0xB /* REF: N=0xB */
-+},
-+{
-+/* Option 8 Monitor Info 65 Mhz */
-+768, /* rows */
-+1024, /* columns */
-+65, /* 65 Mhz */
-+60, /* refresh rate */
-+768, /* v scanlines */
-+7, /* v front porch */
-+9, /* v sync */
-+26, /* v back porch */
-+1024, /* h pixels */
-+56, /* h front porch */
-+64, /* h sync */
-+200, /* h back porch */
-+/* 65.00 MHz AV9110 clock serial load information */
-+0x6d, /* 0:6 VCO frequency divider N */
-+0x0c, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 65.00 MHz IBM561 PLL setup data */
-+0xAC, /* VCO Div: PFR=2, M=0x6D */
-+0xC /* REF: N=0xC */
-+},
-+{
-+/* Option A Monitor Info 40 Mhz SVGA */
-+600, /* rows */
-+800, /* columns */
-+40, /* 40 Mhz */
-+60, /* refresh rate */
-+600, /* v scanlines */
-+1, /* v front porch */
-+4, /* v sync */
-+23, /* v back porch */
-+800, /* h pixels */
-+40, /* h front porch */
-+128, /* h sync */
-+88, /* h back porch */
-+/* 40.00 MHz AV9110 clock serial load information */
-+0x5f, /* 0:6 VCO frequency divider N */
-+0x11, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 40.00 MHz IBM561 PLL setup data */
-+0x42, /* VCO Div: PFR=1, M=43 */
-+0x6 /* REF: N=0x6 */
-+},
-+{
-+/* Option C Monitor Info 25.175 Mhz VGA */
-+480, /* rows */
-+640, /* columns */
-+25, /* 25.175 Mhz */
-+60, /* refresh rate */
-+480, /* v scanlines */
-+10, /* v front porch */
-+2, /* v sync */
-+33, /* v back porch */
-+640, /* h pixels */
-+16, /* h front porch */
-+96, /* h sync */
-+48, /* h back porch */
-+/* 25.175 MHz AV9110 clock serial load information */
-+0x66, /* 0:6 VCO frequency divider N */
-+0x1d, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 25.175 MHz IBM561 PLL setup data */
-+0x3E, /* VCO Div: PFR=0, M=0x7F */
-+0x9 /* REF: N=0x9 */
-+},
-+{
-+/* Option E Monitor Info 110 Mhz */
-+1024, /* rows */
-+1280, /* columns */
-+110,
-+60, /* refresh rate */
-+1024, /* v scanlines */
-+6, /* v front porch */
-+7, /* v sync */
-+44, /* v back porch */
-+1280, /* h pixels */
-+19, /* h front porch */
-+163, /* h sync */
-+234, /* h back porch */
-+/* 110.0 MHz AV9110 clock serial load information */
-+0x60, /* 0:6 VCO frequency divider N */
-+0x32, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8) */
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 110.0 MHz IBM561 PLL setup data */
-+0xBA, /* VCO Div: PFR=0x2, M=0x7B */
-+0x8 /* REF: N=0x8 */
-+},
-+#endif /* ALLOW_LT_72_HZ */
-+#ifdef /* ALLOW_GT_72_HZ */
-+{
-+/* Option D Monitor Info 135 Mhz */
-+1024, /* rows */
-+1280, /* columns */
-+135, /* 135 Mhz */
-+75, /* refresh rate */
-+1024, /* v scanlines */
-+1, /* v front porch */
-+3, /* v sync */
-+38, /* v back porch */
-+1280, /* h pixels */
-+16, /* h front porch */
-+144, /* h sync */
-+248, /* h back porch */
-+/* 135.0 MHz AV9110 clock serial load information */
-+0x42, /* 0:6 VCO frequency divider N */
-+0x07, /* 7:13 Reference frequency divide M */
-+0x0, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8) */
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 135.0 MHz IBM561 PLL setup data */
-+0xC1, /* VCO Div: PFR=0x3, M=0x42 */
-+0x7 /* REF: N=0x7 */
-+},
-+#ifdef ALLOW_GT_1280x1024
-+{
-+/* Option 4 Monitor Info 175.5 Mhz (8-plane) */
-+1200, /* rows */
-+1600, /* columns */
-+175, /* clock */
-+65, /* refresh rate */
-+1200, /* v scanlines */
-+1, /* v front porch */
-+3, /* v sync */
-+46, /* v back porch */
-+1600, /* h pixels */
-+32, /* h front porch */
-+192, /* h sync */
-+336, /* h back porch */
-+/* 110.0 MHz AV9110 clock serial load information */
-+0x5F, /* 0:6 VCO frequency divider N */
-+0x3E, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8)
-+*/
-+0x1, /* 15:16 CLK/X output divide X */
-+0x1, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 110.0 MHz IBM561 PLL setup data */
-+0xE1, /* VCO Div: PFR=0x3, M-65=0x21 */
-+0x8 /* REF: N=0x8 */
-+},
-+{
-+/* Option F Monitor Info (24-plane) */
-+1200, /* rows */
-+1600, /* columns */
-+202.5, /* 130.8 Mhz */
-+75, /* refresh rate */
-+1200, /* v scanlines */
-+1, /* v front porch */
-+3, /* v sync */
-+46, /* v back porch */
-+1600, /* h pixels */
-+32, /* h front porch */
-+192, /* h sync */
-+336, /* h back porch */
-+/* AV9110 clock serial load information 130.808 */
-+0x60, /* 0:6 VCO frequency divider N */
-+0x32, /* 7:13 Reference frequency divide M */
-+0x1, /* 14 VCO pre-scale divide V (0=div.by 1,1=by 8) */
-+0x1, /* 15:16 CLK/X output divide X */
-+0x2, /* 17:18 VCO output divide R */
-+1, /* 19 CLK Output enable. */
-+1, /* 20 CLK/X Output enable */
-+0, /* reserved, should be set to 0 */
-+0, /* Reference clock select on CLK 1=ref */
-+1, /* reserved, should be set to 1 */
-+/* 110.0 MHz IBM561 PLL setup data */
-+0xE2, /* bogus VCO Div: PFR=0x2, M=0x7B */
-+0x7 /* bogus REF: N=0x8 */
-+}
-+#endif /* ALLOW_GT_1280x1024 */
-+#endif /* ALLOW_GT_72_HZ */
- };
-
-+int tga_crystal_table_entries = sizeof(tga_crystal_table)/sizeof(struct monitor_data);
-+
-+struct monitor_data *tga_c_table;
-+
- /* ICS av9110 is only used on TGA2 */
-
- void
-@@ -142,30 +609,58 @@
- TGA2_WRITE_CLOCK_REG(0x0, 0xf800);
- }
-
-+void TGA2SetupMode(ScrnInfoPtr pScrn)
-+{
-+ int i;
-+
-+ /*
-+ * HACK HACK HACK
-+ *
-+ * We do not know how to generate arbitrary clocks, so we search
-+ * the crystal_table above for a match. Sigh...
-+ */
-+ tga_c_table = tga_crystal_table;
-+ for (i = 0; i < tga_crystal_table_entries; i++, tga_c_table++) {
-+ if ((tga_c_table->max_rows == pScrn->currentMode->VDisplay) &&
-+ (tga_c_table->max_cols == pScrn->currentMode->HDisplay)) {
-+ ErrorF("Found a matching mode (%d)!\n", i);
-+ break;
-+ }
-+ }
-+ if (i == tga_crystal_table_entries) {
-+#ifdef FOR_NOW
-+ FatalError("Unable to find a workable mode");
-+#else
-+ ErrorF("Unable to find a matching mode!\n");
-+ /* tga_c_table = &tga_crystal_table[4]; *//* 640x480 @ 72 */
-+ tga_c_table = &tga_crystal_table[2]; /* 1024x768 @ 72 */
-+#endif
-+ }
-+ return;
-+}
-+
- static void
- ICS9110ClockSelect(ScrnInfoPtr pScrn, int freq)
- {
- unsigned int temp, temp1[6];
-- struct monitor_data *c_table;
-+ int i;
-
- /* There lies an ICS9110 Clock Generator. */
- /* ICS9110_CalcClockBits(freq, pll_bits); */
-
-- c_table = &crystal_table;
--
- /* the following is based on munge_ics() from the
- TRU64 kernel TGA driver */
-
-- temp = (unsigned int)(c_table->vco_div |
-- (c_table->ref_div << 7) |
-- (c_table->vco_pre << 14) |
-- (c_table->clk_div << 15) |
-- (c_table->vco_out_div << 17) |
-- (c_table->clk_out_en << 19) |
-- (c_table->clk_out_enX << 20) |
-- (c_table->res0 << 21) |
-- (c_table->clk_sel << 22) |
-- (c_table->res1 << 23));
-+ temp = (unsigned int)(tga_c_table->vco_div |
-+ (tga_c_table->ref_div << 7) |
-+ (tga_c_table->vco_pre << 14) |
-+ (tga_c_table->clk_div << 15) |
-+ (tga_c_table->vco_out_div << 17) |
-+ (tga_c_table->clk_out_en << 19) |
-+ (tga_c_table->clk_out_enX << 20) |
-+ (tga_c_table->res0 << 21) |
-+ (tga_c_table->clk_sel << 22) |
-+ (tga_c_table->res1 << 23));
-
- temp1[0] = (temp & 0x00000001) | ((temp & 0x00000002) << 7) |
- ((temp & 0x00000004) << 14) | ((temp & 0x00000008) << 21);
-diff -ur xc.orig/programs/Xserver/hw/xfree86/drivers/tga/tga_driver.c xc/programs/Xserver/hw/xfree86/drivers/tga/tga_driver.c
---- xc.orig/programs/Xserver/hw/xfree86/drivers/tga/tga_driver.c Mon Dec 4 19:56:22 2000
-+++ xc/programs/Xserver/hw/xfree86/drivers/tga/tga_driver.c Sun Mar 18 16:51:30 2001
-@@ -954,6 +954,15 @@
- /* Set the current mode to the first in the list */
- pScrn->currentMode = pScrn->modes;
-
-+ /*
-+ This is a bit of a hack; we seem to have to init
-+ the TGA2 chipset knowing what the mode is, so we
-+ do this now as soon as we know it...
-+ */
-+ if (pTga->Chipset == PCI_CHIP_TGA2) {
-+ TGA2SetupMode(pScrn);
-+ }
-+
- /* Print the list of modes being used */
- xf86PrintModes(pScrn);
-
-diff -ur xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c
---- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c Sat Mar 17 17:57:16 2001
-+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c Sun Mar 18 16:51:30 2001
-@@ -10,28 +10,28 @@
- axpDevice lnxGetAXP(void);
-
- static AXP axpList[] = {
-- { "Tsunami", NULL, NULL, TSUNAMI },
-- { "Eiger", NULL, NULL, TSUNAMI },
-- {"Noname", NULL, NULL, LCA },
-- { "AlphaBook1", NULL, NULL, LCA },
-- {"EB66", NULL, NULL, LCA},
-- {"EB64+",NULL,NULL, APECS},
-+ {"Tsunami",NULL,NULL,TSUNAMI},
-+ {"Eiger",NULL,NULL,TSUNAMI},
-+ {"Noname",NULL,NULL,LCA},
-+ {"AlphaBook1",NULL,NULL,LCA},
-+ {"EB66",NULL,NULL,LCA},
-+ {"EB64+",NULL,NULL,APECS},
- {"Noritake",NULL,"EV5",CIA},
- {"Noritake",NULL,"EV56",CIA},
- {"Noritake",NULL,NULL,APECS},
-- {"XL",NULL,NULL,APECS},
-+ {"XL",NULL,NULL,APECS},
- {"Avanti",NULL,NULL,APECS},
- {"Mikasa",NULL,"EV5",CIA},
- {"Mikasa",NULL,"EV56",CIA},
- {"Mikasa",NULL,NULL,APECS},
- {"EB164","EB164",NULL,CIA},
-- {"EB164","PC164", NULL,CIA},
-- {"EB164","RX164",NULL, POLARIS},
-- {"EB164","SX164",NULL, PYXIS},
-- {"EB164","LX164",NULL, PYXIS},
-+ {"EB164","PC164",NULL,CIA},
-+ {"EB164","RX164",NULL,POLARIS},
-+ {"EB164","SX164",NULL,PYXIS},
-+ {"EB164","LX164",NULL,PYXIS},
- {"Alcor",NULL,NULL,CIA},
- {"Takara",NULL,NULL,CIA},
-- {"Sable",NULL, "EV5",T2_GAMMA},
-+ {"Sable",NULL,"EV5",T2_GAMMA},
- {"Sable",NULL,"EV56",T2_GAMMA},
- {"Sable",NULL,NULL,T2},
- {"Rawhide",NULL,NULL,MCPCIA},
-diff -ur xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c
---- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c Thu Feb 17 08:45:49 2000
-+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c Sun Mar 18 16:51:30 2001
-@@ -29,18 +29,21 @@
- int
- readDense8(pointer Base, register unsigned long Offset)
- {
-+ mem_barrier();
- return *(volatile CARD8*) ((unsigned long)Base+(Offset));
- }
-
- int
- readDense16(pointer Base, register unsigned long Offset)
- {
-+ mem_barrier();
- return *(volatile CARD16*) ((unsigned long)Base+(Offset));
- }
-
- int
- readDense32(pointer Base, register unsigned long Offset)
- {
-+ mem_barrier();
- return *(volatile CARD32*)((unsigned long)Base+(Offset));
- }
-
-@@ -65,20 +68,20 @@
- void
- writeDense8(int Value, pointer Base, register unsigned long Offset)
- {
-+ write_mem_barrier();
- *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value;
-- mem_barrier();
- }
-
- void
- writeDense16(int Value, pointer Base, register unsigned long Offset)
- {
-+ write_mem_barrier();
- *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value;
-- mem_barrier();
- }
-
- void
- writeDense32(int Value, pointer Base, register unsigned long Offset)
- {
-+ write_mem_barrier();
- *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value;
-- mem_barrier();
- }
-diff -ur xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
---- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c Fri Dec 8 22:59:56 2000
-+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c Sun Mar 18 17:29:04 2001
-@@ -614,15 +614,16 @@
-
- Offset += (unsigned long)Base - (unsigned long)lnxBase;
- shift = (Offset & 0x3) << 3;
-- if (Offset >= (hae_thresh)) {
-+ if (Offset >= (hae_thresh)) {
- msb = Offset & hae_mask;
- Offset -= msb;
- if (msb_set != msb) {
-- sethae(msb);
-- msb_set = msb;
-+ sethae(msb);
-+ msb_set = msb;
- }
-- }
-+ }
-
-+ mem_barrier();
- result = *(vuip) ((unsigned long)lnxSBase + (Offset << 5));
- result >>= shift;
- return 0xffUL & result;
-@@ -636,14 +637,16 @@
-
- Offset += (unsigned long)Base - (unsigned long)lnxBase;
- shift = (Offset & 0x2) << 3;
-- if (Offset >= hae_thresh) {
-+ if (Offset >= hae_thresh) {
- msb = Offset & hae_mask;
- Offset -= msb;
-- if (msb_set != msb) {
-- sethae(msb);
-- msb_set = msb;
-- }
-+ if (msb_set != msb) {
-+ sethae(msb);
-+ msb_set = msb;
-+ }
- }
-+
-+ mem_barrier();
- result = *(vuip)((unsigned long)lnxSBase+(Offset<<5)+(1<<(5-2)));
- result >>= shift;
- return 0xffffUL & result;
-@@ -652,6 +655,8 @@
- static int
- readSparse32(pointer Base, register unsigned long Offset)
- {
-+ /* note that this is actually doing a DENSE read... */
-+ mem_barrier();
- return *(vuip)((unsigned long)Base+(Offset));
- }
-
-@@ -670,8 +675,8 @@
- msb_set = msb;
- }
- }
-+ write_mem_barrier();
- *(vuip) ((unsigned long)lnxSBase + (Offset << 5)) = b * 0x01010101;
-- mem_barrier();
- }
-
- static void
-@@ -689,17 +694,16 @@
- msb_set = msb;
- }
- }
-- *(vuip)((unsigned long)lnxSBase+(Offset<<5)+(1<<(5-2))) =
-- w * 0x00010001;
-- mem_barrier();
--
-+ write_mem_barrier();
-+ *(vuip)((unsigned long)lnxSBase+(Offset<<5)+(1<<(5-2))) = w * 0x00010001;
- }
-
- static void
- writeSparse32(int Value, pointer Base, register unsigned long Offset)
- {
-+ /* note that this is actually doing a DENSE write... */
-+ write_mem_barrier();
- *(vuip)((unsigned long)Base + (Offset)) = Value;
-- mem_barrier();
- return;
- }
-
-diff -ur xc.orig/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h
---- xc.orig/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h Fri Dec 8 22:59:49 2000
-+++ xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h Sun Mar 18 16:51:30 2001
-@@ -194,13 +194,6 @@
- extern Bool xf86UnbindGARTMemory(int screenNum, int key);
- extern Bool xf86EnableAGP(int screenNum, CARD32 mode);
-
--#if defined(__alpha__)
--extern void xf86JensenMemToBus(char *, long, long, int);
--extern void xf86JensenBusToMem(char *, char *, unsigned long, int);
--extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int);
--extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
--#endif /* __alpha__ */
--
- /* These routines are in shared/sigio.c and are not loaded as part of the
- module. These routines are small, and the code if very POSIX-signal (or
- OS-signal) specific, so it seemed better to provide more complex
+++ /dev/null
---- XFree86-3.9.17/xc/config/cf/xfree86.cf Thu Dec 30 05:07:26 1999
-+++ XFree86-3.9.17.new/xc/config/cf/xfree86.cf Sat Feb 12 10:37:51 2000
-@@ -992,7 +992,7 @@
- #endif
-
- #ifndef DefaultGcc2DebugOpt
--# define DefaultGcc2DebugOpt -g
-+# define DefaultGcc2DebugOpt
- #endif
-
- #if HasGcc2 && DebuggableLibraries
+++ /dev/null
---- XFree86-4.3.99.14/xc/lib/GL/mesa/src/math/Imakefile.inc.orig 2003-10-10 13:02:44.000000000 +0200
-+++ XFree86-4.3.99.14/xc/lib/GL/mesa/src/math/Imakefile.inc 2003-10-12 14:33:09.000000000 +0200
-@@ -26,20 +23,14 @@
- LinkSourceFile(m_xform.c, $(MESASRCDIR)/src/math)
- #endif
-
-- MESA_MATH_OBJS = $(MESAMATHBUILDDIR)m_debug_clip.o \
-- $(MESAMATHBUILDDIR)m_debug_norm.o \
-- $(MESAMATHBUILDDIR)m_debug_xform.o \
-- $(MESAMATHBUILDDIR)m_eval.o \
-+ MESA_MATH_OBJS = $(MESAMATHBUILDDIR)m_eval.o \
- $(MESAMATHBUILDDIR)m_matrix.o \
- $(MESAMATHBUILDDIR)m_translate.o \
- $(MESAMATHBUILDDIR)m_vector.o \
- $(MESAMATHBUILDDIR)m_xform.o
-
- #if defined(DoSharedLib) && DoSharedLib
-- MESA_MATH_UOBJS = $(MESAMATHBUILDDIR)unshared/m_debug_clip.o \
-- $(MESAMATHBUILDDIR)unshared/m_debug_norm.o \
-- $(MESAMATHBUILDDIR)unshared/m_debug_xform.o \
-- $(MESAMATHBUILDDIR)unshared/m_eval.o \
-+ MESA_MATH_UOBJS = $(MESAMATHBUILDDIR)unshared/m_eval.o \
- $(MESAMATHBUILDDIR)unshared/m_matrix.o \
- $(MESAMATHBUILDDIR)unshared/m_translate.o \
- $(MESAMATHBUILDDIR)unshared/m_vector.o \
-@@ -48,19 +39,13 @@
- MATH_MESA_UOBJS = $(MESA_MATH_OBJS)
- #endif
-
-- MESA_MATH_DOBJS = $(MESAMATHBUILDDIR)debugger/m_debug_clip.o \
-- $(MESAMATHBUILDDIR)debugger/m_debug_norm.o \
-- $(MESAMATHBUILDDIR)debugger/m_debug_xform.o \
-- $(MESAMATHBUILDDIR)debugger/m_eval.o \
-+ MESA_MATH_DOBJS = $(MESAMATHBUILDDIR)debugger/m_eval.o \
- $(MESAMATHBUILDDIR)debugger/m_matrix.o \
- $(MESAMATHBUILDDIR)debugger/m_translate.o \
- $(MESAMATHBUILDDIR)debugger/m_vector.o \
- $(MESAMATHBUILDDIR)debugger/m_xform.o
-
-- MESA_MATH_POBJS = $(MESAMATHBUILDDIR)profiled/m_debug_clip.o \
-- $(MESAMATHBUILDDIR)profiled/m_debug_norm.o \
-- $(MESAMATHBUILDDIR)profiled/m_debug_xform.o \
-- $(MESAMATHBUILDDIR)profiled/m_eval.o \
-+ MESA_MATH_POBJS = $(MESAMATHBUILDDIR)profiled/m_eval.o \
- $(MESAMATHBUILDDIR)profiled/m_matrix.o \
- $(MESAMATHBUILDDIR)profiled/m_translate.o \
- $(MESAMATHBUILDDIR)profiled/m_vector.o \
+++ /dev/null
---- XFree86-4.1.0/xc/config/cf/linux.cf~ Wed Jun 20 18:40:16 2001
-+++ XFree86-4.1.0/xc/config/cf/linux.cf Wed Jun 20 19:56:52 2001
-@@ -790,3 +790,7 @@
- #ifndef HasZlib
- #define HasZlib YES
- #endif
-+
-+#ifndef HasFreetype2
-+#define HasFreetype2 YES
-+#endif
+++ /dev/null
---- XFree86-4.0.1/xc/config/cf/xf86site.def~ Wed Nov 8 18:24:28 2000
-+++ XFree86-4.0.1/xc/config/cf/xf86site.def Wed Nov 8 18:37:12 2000
-@@ -555,8 +555,8 @@
- /*
- * If you want XDMAUTH support (if you have Wraphelp.c), uncomment this.
- *
--#define HasXdmAuth YES
- */
-+#define HasXdmAuth YES
-
- /*
- * If you have Linux DECnet support, and want to build XFree86 with support
---- /dev/null Tue May 27 20:49:58 1997
-+++ XFree86-4.0.1/xc/lib/Xdmcp/Wraphelp.c Sat Feb 26 02:04:11 2000
-@@ -0,0 +1,401 @@
-+/*
-+ * This program implements the
-+ * Proposed Federal Information Processing
-+ * Data Encryption Standard.
-+ * See Federal Register, March 17, 1975 (40FR12134)
-+ */
-+
-+/*
-+ * Initial permutation,
-+ */
-+static char IP[] = {
-+ 58,50,42,34,26,18,10, 2,
-+ 60,52,44,36,28,20,12, 4,
-+ 62,54,46,38,30,22,14, 6,
-+ 64,56,48,40,32,24,16, 8,
-+ 57,49,41,33,25,17, 9, 1,
-+ 59,51,43,35,27,19,11, 3,
-+ 61,53,45,37,29,21,13, 5,
-+ 63,55,47,39,31,23,15, 7,
-+};
-+
-+/*
-+ * Final permutation, FP = IP^(-1)
-+ */
-+static char FP[] = {
-+ 40, 8,48,16,56,24,64,32,
-+ 39, 7,47,15,55,23,63,31,
-+ 38, 6,46,14,54,22,62,30,
-+ 37, 5,45,13,53,21,61,29,
-+ 36, 4,44,12,52,20,60,28,
-+ 35, 3,43,11,51,19,59,27,
-+ 34, 2,42,10,50,18,58,26,
-+ 33, 1,41, 9,49,17,57,25,
-+};
-+
-+/*
-+ * Permuted-choice 1 from the key bits
-+ * to yield C and D.
-+ * Note that bits 8,16... are left out:
-+ * They are intended for a parity check.
-+ */
-+static char PC1_C[] = {
-+ 57,49,41,33,25,17, 9,
-+ 1,58,50,42,34,26,18,
-+ 10, 2,59,51,43,35,27,
-+ 19,11, 3,60,52,44,36,
-+};
-+
-+static char PC1_D[] = {
-+ 63,55,47,39,31,23,15,
-+ 7,62,54,46,38,30,22,
-+ 14, 6,61,53,45,37,29,
-+ 21,13, 5,28,20,12, 4,
-+};
-+
-+/*
-+ * Sequence of shifts used for the key schedule.
-+*/
-+static char shifts[] = {
-+ 1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1,
-+};
-+
-+/*
-+ * Permuted-choice 2, to pick out the bits from
-+ * the CD array that generate the key schedule.
-+ */
-+static char PC2_C[] = {
-+ 14,17,11,24, 1, 5,
-+ 3,28,15, 6,21,10,
-+ 23,19,12, 4,26, 8,
-+ 16, 7,27,20,13, 2,
-+};
-+
-+static char PC2_D[] = {
-+ 41,52,31,37,47,55,
-+ 30,40,51,45,33,48,
-+ 44,49,39,56,34,53,
-+ 46,42,50,36,29,32,
-+};
-+
-+/*
-+ * The C and D arrays used to calculate the key schedule.
-+ */
-+
-+static char C[28];
-+static char D[28];
-+
-+/*
-+ * The key schedule.
-+ * Generated from the key.
-+ */
-+static char KS[16][48];
-+
-+/*
-+ * The E bit-selection table.
-+ */
-+static char E[48];
-+static char e[] = {
-+ 32, 1, 2, 3, 4, 5,
-+ 4, 5, 6, 7, 8, 9,
-+ 8, 9,10,11,12,13,
-+ 12,13,14,15,16,17,
-+ 16,17,18,19,20,21,
-+ 20,21,22,23,24,25,
-+ 24,25,26,27,28,29,
-+ 28,29,30,31,32, 1,
-+};
-+
-+/*
-+ * Set up the key schedule from the key.
-+ */
-+
-+static
-+setkey(key)
-+char *key;
-+{
-+ int i, j, k;
-+ int t;
-+ char *ptr;
-+
-+ /*
-+ * First, generate C and D by permuting
-+ * the key. The low order bit of each
-+ * 8-bit char is not used, so C and D are only 28
-+ * bits apiece.
-+ */
-+ for (i=0; i<28; i++) {
-+ C[i] = key[PC1_C[i]-1];
-+ D[i] = key[PC1_D[i]-1];
-+ }
-+ /*
-+ * To generate Ki, rotate C and D according
-+ * to schedule and pick up a permutation
-+ * using PC2.
-+ */
-+ for (i=0; i<16; i++) {
-+ /*
-+ * rotate.
-+ */
-+ for (k=0; k<shifts[i]; k++) {
-+ t = C[0];
-+ ptr = C;
-+ for (j=0; j<28-1; j++)
-+ {
-+ *ptr = ptr[1];
-+ ptr++;
-+ }
-+ C[27] = t;
-+ t = D[0];
-+ ptr = D;
-+ for (j=0; j<28-1; j++)
-+ {
-+ *ptr = ptr[1];
-+ ptr++;
-+ }
-+ D[27] = t;
-+ }
-+ /*
-+ * get Ki. Note C and D are concatenated.
-+ */
-+ ptr = &KS[i][0];
-+ for (j=0; j<24; j++) {
-+ ptr[j] = C[PC2_C[j]-1];
-+ ptr[j+24] = D[PC2_D[j]-28-1];
-+ }
-+ }
-+
-+ for(i=0;i<48;i++)
-+ E[i] = e[i];
-+}
-+
-+/*
-+ * The 8 selection functions.
-+ * For some reason, they give a 0-origin
-+ * index, unlike everything else.
-+ */
-+static char S[8][64] = {
-+ 14, 4,13, 1, 2,15,11, 8, 3,10, 6,12, 5, 9, 0, 7,
-+ 0,15, 7, 4,14, 2,13, 1,10, 6,12,11, 9, 5, 3, 8,
-+ 4, 1,14, 8,13, 6, 2,11,15,12, 9, 7, 3,10, 5, 0,
-+ 15,12, 8, 2, 4, 9, 1, 7, 5,11, 3,14,10, 0, 6,13,
-+
-+ 15, 1, 8,14, 6,11, 3, 4, 9, 7, 2,13,12, 0, 5,10,
-+ 3,13, 4, 7,15, 2, 8,14,12, 0, 1,10, 6, 9,11, 5,
-+ 0,14, 7,11,10, 4,13, 1, 5, 8,12, 6, 9, 3, 2,15,
-+ 13, 8,10, 1, 3,15, 4, 2,11, 6, 7,12, 0, 5,14, 9,
-+
-+ 10, 0, 9,14, 6, 3,15, 5, 1,13,12, 7,11, 4, 2, 8,
-+ 13, 7, 0, 9, 3, 4, 6,10, 2, 8, 5,14,12,11,15, 1,
-+ 13, 6, 4, 9, 8,15, 3, 0,11, 1, 2,12, 5,10,14, 7,
-+ 1,10,13, 0, 6, 9, 8, 7, 4,15,14, 3,11, 5, 2,12,
-+
-+ 7,13,14, 3, 0, 6, 9,10, 1, 2, 8, 5,11,12, 4,15,
-+ 13, 8,11, 5, 6,15, 0, 3, 4, 7, 2,12, 1,10,14, 9,
-+ 10, 6, 9, 0,12,11, 7,13,15, 1, 3,14, 5, 2, 8, 4,
-+ 3,15, 0, 6,10, 1,13, 8, 9, 4, 5,11,12, 7, 2,14,
-+
-+ 2,12, 4, 1, 7,10,11, 6, 8, 5, 3,15,13, 0,14, 9,
-+ 14,11, 2,12, 4, 7,13, 1, 5, 0,15,10, 3, 9, 8, 6,
-+ 4, 2, 1,11,10,13, 7, 8,15, 9,12, 5, 6, 3, 0,14,
-+ 11, 8,12, 7, 1,14, 2,13, 6,15, 0, 9,10, 4, 5, 3,
-+
-+ 12, 1,10,15, 9, 2, 6, 8, 0,13, 3, 4,14, 7, 5,11,
-+ 10,15, 4, 2, 7,12, 9, 5, 6, 1,13,14, 0,11, 3, 8,
-+ 9,14,15, 5, 2, 8,12, 3, 7, 0, 4,10, 1,13,11, 6,
-+ 4, 3, 2,12, 9, 5,15,10,11,14, 1, 7, 6, 0, 8,13,
-+
-+ 4,11, 2,14,15, 0, 8,13, 3,12, 9, 7, 5,10, 6, 1,
-+ 13, 0,11, 7, 4, 9, 1,10,14, 3, 5,12, 2,15, 8, 6,
-+ 1, 4,11,13,12, 3, 7,14,10,15, 6, 8, 0, 5, 9, 2,
-+ 6,11,13, 8, 1, 4,10, 7, 9, 5, 0,15,14, 2, 3,12,
-+
-+ 13, 2, 8, 4, 6,15,11, 1,10, 9, 3,14, 5, 0,12, 7,
-+ 1,15,13, 8,10, 3, 7, 4,12, 5, 6,11, 0,14, 9, 2,
-+ 7,11, 4, 1, 9,12,14, 2, 0, 6,10,13,15, 3, 5, 8,
-+ 2, 1,14, 7, 4,10, 8,13,15,12, 9, 0, 3, 5, 6,11,
-+};
-+
-+/*
-+ * P is a permutation on the selected combination
-+ * of the current L and key.
-+ */
-+static char P[] = {
-+ 16, 7,20,21,
-+ 29,12,28,17,
-+ 1,15,23,26,
-+ 5,18,31,10,
-+ 2, 8,24,14,
-+ 32,27, 3, 9,
-+ 19,13,30, 6,
-+ 22,11, 4,25,
-+};
-+
-+/*
-+ * The current block, divided into 2 halves.
-+ */
-+
-+static char L[64];
-+#define R (L + 32)
-+static char tempL[32];
-+static char f[32];
-+
-+/*
-+ * The combination of the key and the input, before selection.
-+ */
-+static char preS[48];
-+
-+/*
-+ * The payoff: encrypt a block.
-+ */
-+
-+static
-+encrypt (block, edflag)
-+char *block;
-+{
-+ int i, ii;
-+ register t, j, k;
-+
-+ /*
-+ * First, permute the bits in the input
-+ */
-+ for (j=0; j<64; j++)
-+ L[j] = block[IP[j]-1];
-+ /*
-+ * Perform an encryption operation 16 times.
-+ */
-+ for (ii=0; ii<16; ii++) {
-+/* print_bits ("L R", L); */
-+ /*
-+ * Set direction
-+ */
-+ if (edflag)
-+ i = 15-ii;
-+ else
-+ i = ii;
-+ /*
-+ * Save the R array,
-+ * which will be the new L.
-+ */
-+ for (j=0; j<32; j++)
-+ tempL[j] = R[j];
-+ /*
-+ * Expand R to 48 bits using the E selector;
-+ * exclusive-or with the current key bits.
-+ */
-+ for (j=0; j<48; j++)
-+ preS[j] = R[E[j]-1] ^ KS[i][j];
-+ /*
-+ * The pre-select bits are now considered
-+ * in 8 groups of 6 bits each.
-+ * The 8 selection functions map these
-+ * 6-bit quantities into 4-bit quantities
-+ * and the results permuted
-+ * to make an f(R, K).
-+ * The indexing into the selection functions
-+ * is peculiar; it could be simplified by
-+ * rewriting the tables.
-+ */
-+ for (j=0; j<8; j++) {
-+ t = 6*j;
-+ k = S[j][(preS[t+0]<<5)+
-+ (preS[t+1]<<3)+
-+ (preS[t+2]<<2)+
-+ (preS[t+3]<<1)+
-+ (preS[t+4]<<0)+
-+ (preS[t+5]<<4)];
-+ t = 4*j;
-+ f[t+0] = (k>>3)&01;
-+ f[t+1] = (k>>2)&01;
-+ f[t+2] = (k>>1)&01;
-+ f[t+3] = (k>>0)&01;
-+ }
-+ /*
-+ * The new R is L ^ f(R, K).
-+ * The f here has to be permuted first, though.
-+ */
-+ for (j=0; j<32; j++)
-+ R[j] = L[j] ^ f[P[j]-1];
-+ /*
-+ * Finally, the new L (the original R)
-+ * is copied back.
-+ */
-+ for (j=0; j<32; j++)
-+ L[j] = tempL[j];
-+ }
-+ /*
-+ * The output L and R are reversed.
-+ */
-+ for (j=0; j<32; j++) {
-+ t = L[j];
-+ L[j] = R[j];
-+ R[j] = t;
-+ }
-+ /*
-+ * The final output
-+ * gets the inverse permutation of the very original.
-+ */
-+ for (j=0; j<64; j++)
-+ block[j] = L[FP[j]-1];
-+}
-+
-+static
-+bytes_to_bits (bytes, bits)
-+ unsigned char *bytes;
-+ char *bits;
-+{
-+ int bit, byte, value;
-+
-+ for (byte = 0; byte < 8; byte++)
-+ {
-+ value = *bytes++;
-+ for (bit = 0; bit < 8; bit++)
-+ *bits++ = (value >> (7-bit)) & 1;
-+ }
-+}
-+
-+static
-+bits_to_bytes (bits, bytes)
-+ char *bits;
-+ unsigned char *bytes;
-+{
-+ int bit, byte, value;
-+
-+ for (byte = 0; byte < 8; byte++)
-+ {
-+ value = 0;
-+ for (bit = 0; bit < 8; bit++)
-+ value |= *bits++ << (7-bit);
-+ *bytes++ = value;
-+ }
-+}
-+
-+/*
-+ * Interface compatible with Kerberos DES implementation
-+ */
-+
-+# include "Wrap.h"
-+
-+/*ARGSUSED*/
-+_XdmcpAuthSetup (key, schedule)
-+ auth_cblock key;
-+ auth_wrapper_schedule schedule;
-+{
-+ char expand_key[64];
-+
-+ bytes_to_bits ((unsigned char *) key, expand_key);
-+ setkey (expand_key);
-+}
-+
-+/*ARGSUSED*/
-+_XdmcpAuthDoIt (input, output, schedule, edflag)
-+ auth_cblock input, output;
-+ auth_wrapper_schedule schedule;
-+ int edflag;
-+{
-+ char expand_input[64];
-+
-+ bytes_to_bits ((unsigned char *) input, expand_input);
-+ encrypt (expand_input, !edflag);
-+ bits_to_bytes (expand_input, (unsigned char *) output);
-+}
+++ /dev/null
---- XFree86-3.3.2.3/xc/config/cf/linux.cf~ Sun Aug 30 15:23:40 1998
-+++ XFree86-3.3.2.3/xc/config/cf/linux.cf Sun Aug 30 15:25:09 1998
-@@ -309,3 +309,7 @@
- #ifndef XtermWithI18N
- #define XtermWithI18N YES
- #endif
-+
-+#ifndef HasZlib
-+#define HasZlib YES
-+#endif
+++ /dev/null
---- XFree86-3.3.3.1/xc/lib/SM/sm_genid.c.ipv6 Sun Oct 4 16:36:38 1998
-+++ XFree86-3.3.3.1/xc/lib/SM/sm_genid.c Thu Jun 24 12:39:44 1999
-@@ -64,6 +64,7 @@
- #define XOS_USE_NO_LOCKING
- #define X_INCLUDE_NETDB_H
- #include <X11/Xos_r.h>
-+#include <resolv.h>
- #endif
-
- #else /* WIN32 */
-@@ -137,6 +138,7 @@
-
- #if defined(TCPCONN) || defined(STREAMSCONN)
- {
-+ u_long options;
- char* inet_addr;
- char temp[4], *ptr1, *ptr2;
- unsigned char decimal[4];
-@@ -144,7 +146,13 @@
- _Xgethostbynameparams hparams;
- struct hostent *hostp;
-
-- if ((hostp = _XGethostbyname (hostname,hparams)) != NULL)
-+ if ((_res.options & RES_INIT) == 0)
-+ (void) res_init ();
-+ options = _res.options;
-+ _res.options &= ~RES_USE_INET6;
-+ hostp = _XGethostbyname (hostname,hparams);
-+ _res.options = options;
-+ if (hostp != NULL)
- inet_addr = inet_ntoa (*(struct in_addr *)(hostp->h_addr));
- else
- return NULL;
---- XFree86-3.3.3.1/xc/lib/X11/ConnDis.c.ipv6 Sat Jan 18 07:51:49 1997
-+++ XFree86-3.3.3.1/xc/lib/X11/ConnDis.c Thu Jun 24 12:39:45 1999
-@@ -163,7 +163,9 @@
-
- if (!lastc) return NULL; /* must have a colon */
-
-- if ((lastp != lastc) && (*(lastc - 1) == ':')) {
-+ /* :: is DECnet, : and ::: are IPv6 */
-+ if ((lastp != lastc) && (*(lastc - 1) == ':') &&
-+ (lastp == lastc-1 || *(lastc - 2) != ':') ) {
- /* DECnet display specified */
-
- #ifndef DNETCONN
-@@ -334,7 +336,7 @@
- _X11TransGetPeerAddr(trans_conn, &family, &saddrlen, &saddr);
-
- /*
-- * The family is given in a socket format (ie AF_INET). This
-+ * The family is given in a socket format (ie AF_INET[6]). This
- * will convert it to the format used by the authorization and
- * X protocol (ie FamilyInternet).
- */
-@@ -1026,6 +1028,21 @@
- for(i=4; i<8; i++) /* do sin_addr */
- xdmcp_data[j++] = ((char *)addr)[i];
- for(i=2; i<4; i++) /* do sin_port */
-+ xdmcp_data[j++] = ((char *)addr)[i];
-+ break;
-+ }
-+#endif /* AF_INET */
-+#ifdef AF_INET6
-+ case AF_INET6:
-+ {
-+ /*
-+ * addr will contain a sockaddr_in6 with all
-+ * of the members already in network byte order.
-+ */
-+
-+ for(i=20; i<24; i++) /* do sin6_addr last 4 bytes */
-+ xdmcp_data[j++] = ((char *)addr)[i];
-+ for(i=2; i<4; i++) /* do sin6_port */
- xdmcp_data[j++] = ((char *)addr)[i];
- break;
- }
---- XFree86-3.3.3.1/xc/lib/X11/Imakefile.ipv6 Fri Nov 6 17:32:30 1998
-+++ XFree86-3.3.3.1/xc/lib/X11/Imakefile Thu Jun 24 12:39:46 1999
-@@ -947,6 +947,7 @@
- InstallLintLibrary(X11,$(LINTLIBDIR))
-
-
-+SpecialCLibObjectRule(AuGetBest,$(ICONFIGFILES),$(CONN_DEFINES))
- LinkSourceFile(AuDispose.c,$(XAUTHSRC))
- LinkSourceFile(AuGetBest.c,$(XAUTHSRC))
- LinkSourceFile(AuFileName.c,$(XAUTHSRC))
---- XFree86-3.3.3.1/xc/lib/Xau/AuGetBest.c.ipv6 Sun Dec 22 04:20:12 1996
-+++ XFree86-3.3.3.1/xc/lib/Xau/AuGetBest.c Thu Jun 24 12:39:46 1999
-@@ -49,6 +49,32 @@
- return 1;
- }
-
-+#if defined(TCPCONN)
-+#include <netinet/in.h>
-+#include <X11/X.h>
-+#define MAPTOIPV4(a) ((char *)(a) + sizeof(struct in6_addr) - \
-+ sizeof(struct in_addr))
-+#define acmp(a1, a2, len) memcmp((char *)(a1), (char *)(a2), len)
-+static int
-+inetMapEqual (a4, l4, a6, l6)
-+ char *a4, *a6;
-+ int l4, l6;
-+{
-+ /* compare IPv4 with special IPv6 : mapped, loopback */
-+ if (l4 == sizeof(struct in6_addr) && l6 == sizeof(struct in_addr)) {
-+ char *a = a4;
-+ a4 = a6;
-+ a6 = a;
-+ } else if (l6 != sizeof(struct in6_addr) || l4 != sizeof(struct in_addr))
-+ return 0;
-+ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)a6))
-+ return !acmp(a4, MAPTOIPV4(a6), sizeof(*a4));
-+ else
-+ return (a4[0] == 127 && a4[1] == 0 && a4[2] == 0 && a4[3] == 1 &&
-+ acmp(a6, &in6addr_loopback, sizeof(*a6)) == 0);
-+}
-+#endif
-+
- #if NeedFunctionPrototypes
- Xauth *
- XauGetBestAuthByAddr (
-@@ -147,6 +173,13 @@
- (entry->family == family &&
- ((address_length == entry->address_length &&
- binaryEqual (entry->address, address, (int)address_length))
-+#if defined(TCPCONN)
-+ || (family == FamilyInternet &&
-+ address_length != entry->address_length &&
-+ inetMapEqual ((char *)entry->address,
-+ (int)entry->address_length,
-+ (char *)address, (int)address_length))
-+#endif
- #ifdef hpux
- || (family == FamilyLocal &&
- fully_qual_address_length == entry->address_length &&
---- XFree86-3.3.3.1/xc/lib/Xau/Imakefile.ipv6 Fri Nov 6 17:32:44 1998
-+++ XFree86-3.3.3.1/xc/lib/Xau/Imakefile Thu Jun 24 12:39:46 1999
-@@ -23,6 +23,9 @@
- INCLUDES =
- #endif
-
-+ CONN_DEFINES = ConnectionFlags
-+ DEPEND_DEFINES = $(CONN_DEFINES)
-+
- HEADERS = \
- Xauth.h
-
-@@ -33,6 +36,8 @@
- AuRead.o AuUnlock.o AuWrite.o $(K5ENCOBJ)
-
- #include <Library.tmpl>
-+
-+SpecialCLibObjectRule(AuGetBest,$(ICONFIGFILES),$(CONN_DEFINES))
-
- InstallLinkKitLibrary(Xau,$(LINKKITDIR)/lib)
-
---- XFree86-3.3.3.1/xc/lib/Xmu/CvtStdSel.c.ipv6 Sat Jan 18 07:52:13 1997
-+++ XFree86-3.3.3.1/xc/lib/Xmu/CvtStdSel.c Thu Jun 24 12:39:47 1999
-@@ -225,7 +225,9 @@
- if ((hostp = _XGethostbyname (hostname,hparams)) == NULL)
- return False;
-
-- if (hostp->h_addrtype != AF_INET) return False;
-+ if ((hostp->h_addrtype != AF_INET) &&
-+ (hostp->h_addrtype != AF_INET6))
-+ return False;
- *length = hostp->h_length;
- *value = XtMalloc(*length);
- (void) memmove (*value, hostp->h_addr, *length);
---- XFree86-3.3.3.1/xc/lib/xtrans/Xtrans.c.ipv6 Thu Jun 24 12:39:35 1999
-+++ XFree86-3.3.3.1/xc/lib/xtrans/Xtrans.c Thu Jun 24 12:39:47 1999
-@@ -218,7 +218,9 @@
- *
- * If the protocol part is missing, then assume INET.
- * If the protocol part and host part are missing, then assume local.
-- * If a "::" is found then assume DNET.
-+ * If a "host::" is found then assume DNET.
-+ * For IPv6, pb with possible : in host --> use rightmost : and test
-+ * x:y->inet, x::y->dnet, x:::y->inet(v6)
- */
-
- char *mybuf, *tmpptr;
-@@ -289,7 +291,23 @@
-
- _host = mybuf;
-
-- if ((mybuf = strchr (mybuf,':')) == NULL)
-+ /* For IPv6, we need the rightmost : in the non-catalog part */
-+ {
-+ char *p;
-+#if defined(FONT_t) || defined(FS_t)
-+ char *f = strchr (mybuf, '/');
-+ if (f) *f = 0;
-+#endif
-+ p = strrchr (mybuf,':');
-+ if (p && p > mybuf && p[-1] == ':')
-+ if (p-1 == mybuf || p[-2] != ':')
-+ p--;
-+ mybuf = p;
-+#if defined(FONT_t) || defined(FS_t)
-+ if (f) *f = '/';
-+#endif
-+ }
-+ if (mybuf == NULL)
- {
- *protocol = NULL;
- *host = NULL;
---- XFree86-3.3.3.1/xc/lib/xtrans/Xtranssock.c.ipv6 Thu Jun 24 12:39:42 1999
-+++ XFree86-3.3.3.1/xc/lib/xtrans/Xtranssock.c Thu Jun 24 12:39:47 1999
-@@ -70,6 +70,7 @@
- #define X_INCLUDE_NETDB_H
- #define XOS_USE_NO_LOCKING
- #include <X11/Xos_r.h>
-+#include <resolv.h>
- #endif
-
- #ifdef UNIXCONN
-@@ -190,8 +191,8 @@
-
- static Sockettrans2dev Sockettrans2devtab[] = {
- #ifdef TCPCONN
-- {"inet",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
-- {"tcp",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
-+ {"inet",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
-+ {"tcp",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
- #endif /* TCPCONN */
- #ifdef UNIXCONN
- {"unix",AF_UNIX,SOCK_STREAM,SOCK_DGRAM,0},
-@@ -294,7 +295,7 @@
- XtransConnInfo ciptr;
-
- {
-- struct sockaddr_in sockname;
-+ struct sockaddr_in6 sockname;
- #if defined(SVR4) || defined(SCO325)
- size_t namelen = sizeof sockname;
- #else
-@@ -322,7 +323,7 @@
- return -1;
- }
-
-- ciptr->family = sockname.sin_family;
-+ ciptr->family = sockname.sin6_family;
- ciptr->addrlen = namelen;
- memcpy (ciptr->addr, &sockname, ciptr->addrlen);
-
-@@ -341,7 +342,7 @@
- XtransConnInfo ciptr;
-
- {
-- struct sockaddr_in sockname;
-+ struct sockaddr_in6 sockname;
- #if defined(SVR4) || defined(SCO325)
- size_t namelen = sizeof sockname;
- #else
-@@ -410,10 +411,11 @@
- }
-
- #ifdef TCP_NODELAY
-- if (Sockettrans2devtab[i].family == AF_INET)
-+ if ((Sockettrans2devtab[i].family == AF_INET) ||
-+ (Sockettrans2devtab[i].family == AF_INET6))
- {
- /*
-- * turn off TCP coalescence for INET sockets
-+ * turn off TCP coalescence for INET[6] sockets
- */
-
- int tmp = 1;
-@@ -546,10 +548,11 @@
- #ifdef SO_REUSEADDR
-
- /*
-- * SO_REUSEADDR only applied to AF_INET
-+ * SO_REUSEADDR only applied to AF_INET6
- */
-
-- if (Sockettrans2devtab[i].family == AF_INET)
-+ if ((Sockettrans2devtab[i].family == AF_INET) ||
-+ (Sockettrans2devtab[i].family == AF_INET6))
- {
- int one = 1;
- setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR,
-@@ -770,7 +773,8 @@
-
- PRMSG (3, "SocketCreateListener(%x,%d)\n", ciptr, fd, 0);
-
-- if (Sockettrans2devtab[ciptr->index].family == AF_INET)
-+ if ((Sockettrans2devtab[ciptr->index].family == AF_INET) ||
-+ (Sockettrans2devtab[ciptr->index].family == AF_INET6))
- retry = 20;
- else
- retry = 0;
-@@ -793,7 +797,8 @@
- #endif /* SO_REUSEDADDR */
- }
-
-- if (Sockettrans2devtab[ciptr->index].family == AF_INET) {
-+ if ((Sockettrans2devtab[ciptr->index].family == AF_INET) ||
-+ (Sockettrans2devtab[ciptr->index].family == AF_INET)) {
- #ifdef SO_DONTLINGER
- setsockopt (fd, SOL_SOCKET, SO_DONTLINGER, (char *) NULL, 0);
- #else
-@@ -830,7 +835,7 @@
- char *port;
-
- {
-- struct sockaddr_in sockname;
-+ struct sockaddr_in6 sockname;
- int namelen = sizeof(sockname);
- int status;
- short tmpport;
-@@ -878,22 +883,23 @@
- port, 0, 0);
- return TRANS_CREATE_LISTENER_FAILED;
- }
-- sockname.sin_port = servp->s_port;
-+ sockname.sin6_port = servp->s_port;
- }
- else
- {
- tmpport = (short) atoi (port);
-- sockname.sin_port = htons (tmpport);
-+ sockname.sin6_port = htons (tmpport);
- }
- }
- else
-- sockname.sin_port = htons (0);
-+ sockname.sin6_port = htons (0);
-
- #ifdef BSD44SOCKETS
-- sockname.sin_len = sizeof (sockname);
-+ sockname.sin6_len = sizeof (sockname);
- #endif
-- sockname.sin_family = AF_INET;
-- sockname.sin_addr.s_addr = htonl (INADDR_ANY);
-+ sockname.sin6_family = AF_INET6;
-+ sockname.sin6_flowinfo = 0;
-+ sockname.sin6_addr = in6addr_any;
-
- if ((status = TRANS(SocketCreateListener) (ciptr,
- (struct sockaddr *) &sockname, namelen)) < 0)
-@@ -1095,7 +1101,7 @@
-
- {
- XtransConnInfo newciptr;
-- struct sockaddr_in sockname;
-+ struct sockaddr_in6 sockname;
- int namelen = sizeof(sockname);
-
- PRMSG (2, "SocketINETAccept(%x,%d)\n", ciptr, ciptr->fd, 0);
-@@ -1258,7 +1264,7 @@
- char *port;
-
- {
-- struct sockaddr_in sockname;
-+ struct sockaddr_in6 sockname;
- #if defined(SVR4) || defined(SCO325)
- size_t namelen = sizeof sockname;
- #else
-@@ -1268,14 +1274,15 @@
- _Xgetservbynameparams sparams;
- struct hostent *hostp;
- struct servent *servp;
-+ u_long options;
-
- #define PORTBUFSIZE 64 /* what is a real size for this? */
- char portbuf[PORTBUFSIZE];
-
- int ret;
- short tmpport;
-- unsigned long tmpaddr;
- char hostnamebuf[256]; /* tmp space */
-+ char v[64]; /* Vixie's tmp space */
-
- PRMSG (2,"SocketINETConnect(%d,%s,%s)\n", ciptr->fd, host, port);
-
-@@ -1311,67 +1318,44 @@
- */
-
- #ifdef BSD44SOCKETS
-- sockname.sin_len = sizeof (struct sockaddr_in);
-+ sockname.sin6_len = sizeof (struct sockaddr_in6);
- #endif
-- sockname.sin_family = AF_INET;
-+ sockname.sin6_family = AF_INET6;
-+ sockname.sin6_flowinfo = 0;
-
- /*
-- * fill in sin_addr
-+ * fill in sin6_addr
- */
-
-- /* check for ww.xx.yy.zz host string */
--
-- if (isascii (host[0]) && isdigit (host[0])) {
-- tmpaddr = inet_addr (host); /* returns network byte order */
-- } else {
-- tmpaddr = -1;
-- }
--
-- PRMSG (4,"SocketINETConnect: inet_addr(%s) = %x\n",
-- host, tmpaddr, 0);
-+ /* ww.xx.yy.zz host string done by _XGethostbyname() */
-
-- if (tmpaddr == -1)
-- {
-- if ((hostp = _XGethostbyname(host,hparams)) == NULL)
-- {
-- PRMSG (1,"SocketINETConnect: Can't get address for %s\n",
-- host, 0, 0);
-- ESET(EINVAL);
-- return TRANS_CONNECT_FAILED;
-- }
-- if (hostp->h_addrtype != AF_INET) /* is IP host? */
-- {
-- PRMSG (1,"SocketINETConnect: not INET host%s\n",
-- host, 0, 0);
-- ESET(EPROTOTYPE);
-- return TRANS_CONNECT_FAILED;
-- }
--
--#if defined(CRAY) && defined(OLDTCP)
-- /* Only Cray UNICOS3 and UNICOS4 will define this */
-- {
-- long t;
-- memcpy ((char *)&t, (char *) hostp->h_addr, sizeof (t));
-- sockname.sin_addr = t;
-- }
--#else
-- memcpy ((char *) &sockname.sin_addr, (char *) hostp->h_addr,
-- sizeof (sockname.sin_addr));
--#endif /* CRAY and OLDTCP */
--
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ options = _res.options;
-+ _res.options |= RES_USE_INET6;
-+
-+ hostp = _XGethostbyname(host,hparams);
-+ _res.options = options;
-+ if (hostp == NULL)
-+ {
-+ PRMSG (1,"SocketINETConnect: Can't get address for %s\n",
-+ host, 0, 0);
-+ ESET(EINVAL);
-+ return TRANS_CONNECT_FAILED;
- }
--else
-+ if (hostp->h_addrtype != AF_INET6) /* is IPv6 host? */
- {
--#if defined(CRAY) && defined(OLDTCP)
-- /* Only Cray UNICOS3 and UNICOS4 will define this */
-- sockname.sin_addr = tmpaddr;
--#else
-- sockname.sin_addr.s_addr = tmpaddr;
--#endif /* CRAY and OLDTCP */
-+ PRMSG (1,"SocketINETConnect: not INET host%s\n",
-+ host, 0, 0);
-+ ESET(EPROTOTYPE);
-+ return TRANS_CONNECT_FAILED;
- }
-+
-+ memcpy ((char *) &sockname.sin6_addr, (char *) hostp->h_addr,
-+ sizeof (sockname.sin6_addr));
-
- /*
-- * fill in sin_port
-+ * fill in sin6_port
- */
-
- /* Check for number in the port string */
-@@ -1384,16 +1368,16 @@
- portbuf, 0, 0);
- return TRANS_CONNECT_FAILED;
- }
-- sockname.sin_port = servp->s_port;
-+ sockname.sin6_port = servp->s_port;
- }
- else
- {
- tmpport = (short) atoi (portbuf);
-- sockname.sin_port = htons (tmpport);
-+ sockname.sin6_port = htons (tmpport);
- }
-
-- PRMSG (4,"SocketINETConnect: sockname.sin_port = %d\n",
-- ntohs(sockname.sin_port), 0, 0);
-+ PRMSG (4,"SocketINETConnect: sockname.sin6_port = %d\n",
-+ ntohs(sockname.sin6_port), 0, 0);
-
- /*
- * Do the connect()
-@@ -1481,13 +1465,21 @@
- * by TRANS(GetHostname)), then the two hostnames are equivalent,
- * and we know that 'host' is really a local host.
- */
-- char specified_local_addr_list[10][4];
-+ char specified_local_addr_list[10][16];
- int scount, equiv, i, j;
- _Xgethostbynameparams hparams;
- struct hostent *hostp;
-+ u_long options;
-
-- if ((hostp = _XGethostbyname (host,hparams)) == NULL)
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ options = _res.options;
-+ _res.options |= RES_USE_INET6;
-+
-+ if ((hostp = _XGethostbyname (host,hparams)) == NULL) {
-+ _res.options = options;
- return (0);
-+ }
-
- scount = 0;
- while (hostp->h_addr_list[scount] && scount <= 8)
-@@ -1497,17 +1489,14 @@
- * from the 1st call, so we must save the address list.
- */
-
-- specified_local_addr_list[scount][0] =
-- hostp->h_addr_list[scount][0];
-- specified_local_addr_list[scount][1] =
-- hostp->h_addr_list[scount][1];
-- specified_local_addr_list[scount][2] =
-- hostp->h_addr_list[scount][2];
-- specified_local_addr_list[scount][3] =
-- hostp->h_addr_list[scount][3];
-+ memcpy(specified_local_addr_list[scount],
-+ hostp->h_addr_list[scount],
-+ hostp->h_length);
- scount++;
- }
-- if ((hostp = _XGethostbyname (hostnamebuf,hparams)) == NULL)
-+ hostp = _XGethostbyname (hostnamebuf,hparams);
-+ _res.options = options;
-+ if (hostp == NULL)
- return (0);
-
- equiv = 0;
-@@ -1519,14 +1508,9 @@
-
- while (hostp->h_addr_list[j])
- {
-- if ((specified_local_addr_list[i][0] ==
-- hostp->h_addr_list[j][0]) &&
-- (specified_local_addr_list[i][1] ==
-- hostp->h_addr_list[j][1]) &&
-- (specified_local_addr_list[i][2] ==
-- hostp->h_addr_list[j][2]) &&
-- (specified_local_addr_list[i][3] ==
-- hostp->h_addr_list[j][3]))
-+ if (memcmp(specified_local_addr_list[i],
-+ hostp->h_addr_list[j],
-+ hostp->h_length) == 0)
- {
- /* They're equal, so we're done */
-
---- XFree86-3.3.3.1/xc/lib/xtrans/Xtransutil.c.ipv6 Thu Jun 24 12:39:42 1999
-+++ XFree86-3.3.3.1/xc/lib/xtrans/Xtransutil.c Thu Jun 24 12:39:47 1999
-@@ -84,7 +84,7 @@
- /*
- * TRANS(ConvertAddress) converts a sockaddr based address to an
- * X authorization based address. Some of this is defined as part of
-- * the ChangeHost protocol. The rest is just doen in a consistent manner.
-+ * the ChangeHost protocol. The rest is just done in a consistent manner.
- */
-
- int
-@@ -134,6 +134,32 @@
- }
- break;
- }
-+
-+ case AF_INET6:
-+ {
-+ /*
-+ * Check for the hack localhost address ::1.
-+ * In this case, we are really FamilyLocal.
-+ */
-+
-+ struct sockaddr_in6 saddr;
-+ int len = sizeof(saddr.sin6_addr);
-+ char *cp = (char *) &saddr.sin6_addr;
-+
-+ memcpy (&saddr, *addrp, sizeof (struct sockaddr_in6));
-+
-+ if (memcmp(cp, (char *)&in6addr_loopback, len) == 0)
-+ {
-+ *familyp=FamilyLocal;
-+ }
-+ else
-+ {
-+ *familyp=FamilyInternet;
-+ *addrlenp=len;
-+ memcpy(*addrp,&saddr.sin6_addr,len);
-+ }
-+ break;
-+ }
- #endif /* defined(TCPCONN) || defined(STREAMSCONN) || MNX_TCPCONN */
-
- #if defined(DNETCONN)
-@@ -269,6 +295,18 @@
- sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
- break;
- }
-+
-+ case AF_INET6:
-+ {
-+ struct sockaddr_in6 *saddr = (struct sockaddr_in6 *) addr;
-+ char portnumbuf[10];
-+
-+ sprintf (portnumbuf, "%d", ntohs (saddr->sin6_port));
-+ networkId = (char *) xalloc (3 + strlen (transName) +
-+ strlen (hostnamebuf) + strlen (portnumbuf));
-+ sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
-+ break;
-+ }
- #endif /* defined(TCPCONN) || defined(STREAMSCONN) || MNX_TCPCONN */
-
- #if defined(DNETCONN)
-@@ -377,6 +415,42 @@
- addr = hostp->h_name;
- else
- addr = inet_ntoa (saddr->sin_addr);
-+ break;
-+ }
-+
-+ case AF_INET6:
-+ {
-+ struct sockaddr_in6 *saddr = (struct sockaddr_in6 *) peer_addr;
-+ _Xgethostbynameparams hparams;
-+ struct hostent * hostp;
-+ static char v[64];
-+
-+#ifdef SIGALRM
-+ /*
-+ * gethostbyaddr can take a LONG time if the host does not exist.
-+ * Assume that if it does not respond in NAMESERVER_TIMEOUT seconds
-+ * that something is wrong and do not make the user wait.
-+ * gethostbyaddr will continue after a signal, so we have to
-+ * jump out of it.
-+ */
-+
-+ nameserver_timedout = 0;
-+ signal (SIGALRM, nameserver_lost);
-+ alarm (4);
-+ if (setjmp(env) == 0) {
-+#endif
-+ hostp = _XGethostbyaddr ((char *) &saddr->sin6_addr,
-+ sizeof (saddr->sin6_addr), AF_INET6, hparams);
-+#ifdef SIGALRM
-+ }
-+ alarm (0);
-+#endif
-+ if (hostp != NULL)
-+ addr = hostp->h_name;
-+ else {
-+ inet_ntop (AF_INET6, &saddr->sin6_addr, v, sizeof (v));
-+ addr = addrbuf;
-+ }
- break;
- }
-
---- XFree86-3.3.3.1/xc/programs/Xserver/os/access.c.ipv6 Thu Jun 24 12:39:34 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/access.c Thu Jun 24 12:39:47 1999
-@@ -163,6 +163,7 @@
- #else
- #if !defined(AMOEBA) && !defined(MINIX)
- #include <netdb.h>
-+#include <resolv.h>
- #else
- #ifdef AMOEBA
- #include <server/ip/gen/netdb.h>
-@@ -215,10 +216,12 @@
-
- #define acmp(a1, a2, len) memcmp((char *)(a1), (char *)(a2), len)
- #define acopy(a1, a2, len) memmove((char *)(a2), (char *)(a1), len)
-+#if !defined(TCPCONN)
- #define addrEqual(fam, address, length, host) \
- ((fam) == (host)->family &&\
- (length) == (host)->len &&\
- !acmp (address, (host)->addr, length))
-+#endif
-
- static int ConvertAddr(
- #if NeedFunctionPrototypes
-@@ -260,6 +263,49 @@
- static int LocalHostEnabled = FALSE;
- static int UsingXdmcp = FALSE;
-
-+#if defined(TCPCONN)
-+#define MAPTOIPV4(a) ((char *)(a) + sizeof(struct in6_addr) - \
-+ sizeof(struct in_addr))
-+#define MAPTOIPV6(d,a) { \
-+ bzero(&d.s6_addr[0], \
-+ sizeof(struct in6_addr)-2-sizeof(struct in_addr)); \
-+ d.s6_addr[10] = d.s6_addr[11] = 0xff; \
-+ acopy(a, MAPTOIPV4(&d.s6_addr[0]), sizeof(struct in_addr)); \
-+ }
-+
-+static int
-+addrEqual(fam, addr, len, host)
-+ unsigned char *addr;
-+ register HOST *host;
-+ int fam, len;
-+{
-+ char *a4, *a6;
-+
-+ if (fam != host->family)
-+ return FALSE;
-+ if (len == host->len)
-+ return !acmp (addr, host->addr, len);
-+ if (fam != FamilyInternet)
-+ return FALSE;
-+
-+ /* compare IPv4 with special IPv6 : mapped, loopback */
-+ if (len == sizeof(struct in6_addr) &&
-+ host->len == sizeof(struct in_addr)) {
-+ a4 = host->addr;
-+ a6 = addr;
-+ } else if (len == sizeof(struct in_addr) &&
-+ host->len == sizeof(struct in6_addr)) {
-+ a4 = addr;
-+ a6 = host->addr;
-+ } else
-+ return FALSE;
-+ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)a6))
-+ return !acmp(a4, MAPTOIPV4(a6), sizeof(*a4));
-+ else
-+ return (a4[0] == 127 && a4[1] == 0 && a4[2] == 0 && a4[3] == 1 &&
-+ acmp(a6, &in6addr_loopback, sizeof(*a6)) == 0);
-+}
-+#endif
-
- /*
- * called when authorization is not enabled to add the
-@@ -634,6 +680,7 @@
- int family;
- register HOST *host;
- register struct ifreq *ifr;
-+ struct in6_addr mapped;
-
- #ifdef DNETCONN
- struct dn_naddr *dnaddr = getnodeadd();
-@@ -692,10 +739,32 @@
- if (family == -1 || family == FamilyLocal)
- continue;
- #ifdef DEF_SELF_DEBUG
-- if (family == FamilyInternet)
-- ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %d.%d.%d.%d\n",
-- ifr->ifr_name, addr[0], addr[1], addr[2], addr[3]);
-+ if (family == FamilyInternet) {
-+ char v[64];
-+
-+ ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %s\n",
-+ ifr->ifr_name,
-+ inet_ntop(len == 4 ? AF_INET : AF_INET6, addr, v, 64));
-+ }
- #endif
-+ if (family == FamilyInternet) {
-+ if (len == 4) {
-+ /* Mapped IPv4 to IPv6 with special case for loopback */
-+ if (addr[0] == 127 && addr[1] == 0 &&
-+ addr[2] == 0 && addr[3] == 1)
-+ addr = (unsigned char *)&in6addr_loopback;
-+ else {
-+ MAPTOIPV6(mapped, addr);
-+ addr = (unsigned char *) &mapped;
-+ }
-+ len = sizeof(mapped);
-+ }
-+ /*
-+ * Link local addresses are too weird
-+ */
-+ if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
-+ continue;
-+ }
- for (host = selfhosts;
- host && !addrEqual (family, addr, len, host);
- host = host->next)
-@@ -724,13 +793,15 @@
- /*
- * ignore 'localhost' entries as they're not useful
- * on the other end of the wire
-+ * ignore 'link local' entries
- */
-- if (len == 4 &&
-- addr[0] == 127 && addr[1] == 0 &&
-- addr[2] == 0 && addr[3] == 1)
-+ if (acmp(addr, &in6addr_loopback, len)==0)
- continue;
-
- XdmcpRegisterConnection (family, (char *)addr, len);
-+ /* what to do with INET6 ???? */
-+ if (ifr->ifr_addr.sa_family != AF_INET);
-+ continue;
- broad_addr = ifr->ifr_addr;
- ((struct sockaddr_in *) &broad_addr)->sin_addr.s_addr =
- htonl (INADDR_BROADCAST);
-@@ -794,10 +865,22 @@
- int family;
- pointer addr;
- register HOST *host;
-+ struct in6_addr mapped;
-
- family = ConvertAddr(from, &len, (pointer *)&addr);
- if (family == -1 || family == FamilyLocal)
- return;
-+ if ((family == FamilyInternet) && (len == 4)) {
-+ /* Mapped IPv4 to IPv6 with special case for loopback */
-+ if (((char *)addr)[0] == 127 && ((char *)addr)[1] == 0 &&
-+ ((char *)addr)[2] == 0 && ((char *)addr)[3] == 1)
-+ addr = (pointer)&in6addr_loopback;
-+ else {
-+ MAPTOIPV6(mapped, addr);
-+ addr = (unsigned char *) &mapped;
-+ }
-+ len = sizeof(mapped);
-+ }
- for (host = selfhosts; host; host = host->next)
- {
- if (addrEqual(family, addr, len, host))
-@@ -840,7 +923,7 @@
- union {
- struct sockaddr sa;
- #if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
-- struct sockaddr_in in;
-+ struct sockaddr_in6 in;
- #endif /* TCPCONN || STREAMSCONN */
- #ifdef DNETCONN
- struct sockaddr_dn dn;
-@@ -978,12 +1061,16 @@
- #endif /* SECURE_RPC */
- #if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
- {
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-+
- /* host name */
- if (family == FamilyInternet && (hp = gethostbyname (hostname)) ||
- (hp = gethostbyname (hostname)))
- {
- saddr.sa.sa_family = hp->h_addrtype;
-- len = sizeof(saddr.sa);
-+ len = sizeof(saddr.in);
- if ((family = ConvertAddr (&saddr.sa, &len, (pointer *)&addr)) != -1)
- {
- #ifdef h_addr /* new 4.3bsd version of gethostent */
-@@ -1072,6 +1159,7 @@
- pointer pAddr;
- {
- int len;
-+ struct in6_addr mapped;
-
- if (!AuthorizedClient(client))
- return(BadAccess);
-@@ -1092,6 +1180,11 @@
- break;
- #endif
- case FamilyInternet:
-+ if (length == sizeof (struct in_addr)) {
-+ MAPTOIPV6(mapped, pAddr);
-+ pAddr = (char *)& mapped;
-+ length = sizeof(mapped);
-+ }
- case FamilyDECnet:
- case FamilyChaos:
- if ((len = CheckAddr (family, pAddr, length)) < 0)
-@@ -1174,6 +1267,7 @@
- {
- int len;
- register HOST *host, **prev;
-+ struct in6_addr mapped;
-
- if (!AuthorizedClient(client))
- return(BadAccess);
-@@ -1193,6 +1287,11 @@
- break;
- #endif
- case FamilyInternet:
-+ if (length == sizeof (struct in_addr)) {
-+ MAPTOIPV6(mapped, pAddr);
-+ pAddr = (char *)& mapped;
-+ length = sizeof(mapped);
-+ }
- case FamilyDECnet:
- case FamilyChaos:
- if ((len = CheckAddr (family, pAddr, length)) < 0)
-@@ -1236,7 +1335,12 @@
- for (host = validhosts; host; host = host->next)
- {
- nHosts++;
-- n += (((host->len + 3) >> 2) << 2) + sizeof(xHostEntry);
-+ len = host->len;
-+ if (host->family == FamilyInternet &&
-+ len == sizeof (struct in6_addr) &&
-+ IN6_IS_ADDR_V4MAPPED((struct in6_addr *)host->addr))
-+ len = sizeof (struct in_addr);
-+ n += (((len + 3) >> 2) << 2) + sizeof(xHostEntry);
- }
- if (n)
- {
-@@ -1247,11 +1351,19 @@
- }
- for (host = validhosts; host; host = host->next)
- {
-+ char *ad = host->addr;
-+
- len = host->len;
- ((xHostEntry *)ptr)->family = host->family;
-+ if (host->family == FamilyInternet &&
-+ len == sizeof (struct in6_addr) &&
-+ IN6_IS_ADDR_V4MAPPED((struct in6_addr *)host->addr)) {
-+ len = sizeof (struct in_addr);
-+ ad = MAPTOIPV4(ad);
-+ }
- ((xHostEntry *)ptr)->length = len;
- ptr += sizeof(xHostEntry);
-- acopy (host->addr, ptr, len);
-+ acopy (ad, ptr, len);
- ptr += ((len + 3) >> 2) << 2;
- }
- } else {
-@@ -1277,11 +1389,7 @@
- {
- #if defined(TCPCONN) || defined(STREAMSCONN) || defined(AMTCPCONN) || defined(MNX_TCPCONN)
- case FamilyInternet:
--#if !defined(AMOEBA)
-- if (length == sizeof (struct in_addr))
--#else
-- if (length == sizeof(ipaddr_t))
--#endif
-+ if (length == sizeof (struct in6_addr))
- len = length;
- else
- len = -1;
-@@ -1312,11 +1420,7 @@
- * Returns 1 if host is invalid, 0 if we've found it. */
-
- InvalidHost (saddr, len)
--#ifndef AMOEBA_ORIG
- register struct sockaddr *saddr;
--#else
-- register ipaddr_t *saddr;
--#endif
- int len;
- {
- int family;
-@@ -1359,11 +1463,7 @@
-
- static int
- ConvertAddr (saddr, len, addr)
--#ifndef AMOEBA_ORIG
- register struct sockaddr *saddr;
--#else
-- register ipaddr_t *saddr;
--#endif
- int *len;
- pointer *addr;
- {
-@@ -1381,6 +1481,10 @@
- case AF_INET:
- *len = sizeof (struct in_addr);
- *addr = (pointer) &(((struct sockaddr_in *) saddr)->sin_addr);
-+ return FamilyInternet;
-+ case AF_INET6:
-+ *len = sizeof (struct in6_addr);
-+ *addr = (pointer) &(((struct sockaddr_in6 *) saddr)->sin6_addr);
- return FamilyInternet;
- #endif
- #ifdef DNETCONN
---- XFree86-3.3.3.1/xc/programs/Xserver/os/connection.c.ipv6 Thu Jun 24 12:39:34 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/connection.c Thu Jun 24 12:39:47 1999
-@@ -477,6 +477,7 @@
- int auth_id;
- {
- char addr[128];
-+ char v[64];
- char *out = addr;
-
- if (!((OsCommPtr)client->osPrivate)->trans_conn) {
-@@ -499,6 +500,13 @@
- sprintf(out, "IP %s port %d",
- inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr),
- ntohs(((struct sockaddr_in *) saddr)->sin_port));
-+ break;
-+ case AF_INET6:
-+ sprintf(out, "IPv6 %s port %d",
-+ inet_ntop(AF_INET6,
-+ &((struct sockaddr_in6 *) saddr)->sin6_addr,
-+ v, sizeof (v)),
-+ ntohs(((struct sockaddr_in6 *) saddr)->sin6_port));
- break;
- #endif
- #ifdef DNETCONN
---- XFree86-3.3.3.1/xc/programs/Xserver/os/k5auth.c.ipv6 Fri May 10 09:02:15 1996
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/k5auth.c Thu Jun 24 12:39:47 1999
-@@ -277,7 +277,7 @@
- long addrlen;
- krb5_error_code retval, retval2;
- register char n;
-- struct sockaddr cli_net_addr;
-+ struct sockaddr_in6 cli_net_addr;
- xReq prefix;
- krb5_principal cprinc;
- krb5_data buf;
-@@ -299,15 +299,15 @@
- }
- addrlen = sizeof (cli_net_addr);
- if (getpeername(((OsCommPtr)client->osPrivate)->fd,
-- &cli_net_addr, &addrlen) == -1)
-+ (struct sockaddr *)&cli_net_addr, &addrlen) == -1)
- {
- if (creds)
- krb5_free_creds(creds);
- return(SendConnSetup(client, "Krb5 stage1: getpeername failed"));
- }
-- if (cli_net_addr.sa_family == AF_UNSPEC
-+ if (cli_net_addr.sin6_family == AF_UNSPEC
- #if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
-- || cli_net_addr.sa_family == AF_UNIX
-+ || cli_net_addr.sin6_family == AF_UNIX
- #endif
- ) /* assume local host */
- {
-@@ -324,9 +324,9 @@
- }
- else
- {
-- cli_addr.addrtype = cli_net_addr.sa_family; /* the values
-+ cli_addr.addrtype = cli_net_addr.sin6_family; /* the values
- are compatible */
-- switch (cli_net_addr.sa_family)
-+ switch (cli_net_addr.sin6_family)
- {
- #ifdef TCPCONN
- case AF_INET:
-@@ -334,6 +334,11 @@
- cli_addr.contents =
- (krb5_octet *)&((struct sockaddr_in *)&cli_net_addr)->sin_addr;
- break;
-+ case AF_INET6:
-+ cli_addr.length = sizeof (struct in6_addr);
-+ cli_addr.contents =
-+ (krb5_octet *)&(&cli_net_addr)->sin6_addr;
-+ break;
- #endif
- #ifdef DNETCONN
- case AF_DECnet:
-@@ -348,7 +353,7 @@
- if (creds)
- krb5_free_creds(creds);
- sprintf(kerror, "Krb5 stage1: unknown address family %d from getpeername",
-- cli_net_addr.sa_family);
-+ cli_net_addr.sin6_family);
- return(SendConnSetup(client, kerror));
- }
- }
---- XFree86-3.3.3.1/xc/programs/Xserver/os/utils.c.ipv6 Thu Jun 24 12:39:34 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/utils.c Thu Jun 24 12:39:47 1999
-@@ -1112,7 +1112,9 @@
-
- #if defined(TCPCONN) || defined(STREAMSCONN)
- #ifndef WIN32
-+#include <netinet/in.h>
- #include <netdb.h>
-+#include <resolv.h>
- #endif
- #endif
-
-@@ -1134,6 +1136,10 @@
- char hname[1024], *hnameptr;
- struct hostent *host;
- int len;
-+
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-
- gethostname(hname, 1024);
- host = gethostbyname(hname);
---- XFree86-3.3.3.1/xc/programs/Xserver/os/xdmcp.c.ipv6 Thu Jun 24 12:39:34 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/xdmcp.c Thu Jun 24 12:39:47 1999
-@@ -38,6 +38,8 @@
- #endif
- #include <netinet/in.h>
- #include <netdb.h>
-+#include <resolv.h>
-+#undef QUERY
- #else
- #if defined(MINIX)
- #include <net/hton.h>
-@@ -81,7 +83,7 @@
-
- static int xdmcpSocket, sessionSocket;
- static xdmcp_states state;
--static struct sockaddr_in req_sockaddr;
-+static struct sockaddr_in6 req_sockaddr;
- static int req_socklen;
- static CARD32 SessionID;
- static CARD32 timeOutTime;
-@@ -96,7 +98,7 @@
-
- static XdmcpBuffer buffer;
-
--static struct sockaddr_in ManagerAddress;
-+static struct sockaddr_in6 ManagerAddress;
-
- static void get_xdmcp_sock(
- #if NeedFunctionPrototypes
-@@ -112,7 +114,7 @@
-
- static void recv_willing_msg(
- #if NeedFunctionPrototypes
-- struct sockaddr_in */*from*/,
-+ struct sockaddr_in6 */*from*/,
- int /*fromlen*/,
- unsigned /*length*/
- #endif
-@@ -332,24 +334,27 @@
-
- #define MAX_BROADCAST 10
-
--static struct sockaddr_in BroadcastAddresses[MAX_BROADCAST];
-+static struct sockaddr_in6 BroadcastAddresses[MAX_BROADCAST];
- static int NumBroadcastAddresses;
-
- void
- XdmcpRegisterBroadcastAddress (addr)
- struct sockaddr_in *addr;
- {
-- struct sockaddr_in *bcast;
-+ struct sockaddr_in6 *bcast;
- if (NumBroadcastAddresses >= MAX_BROADCAST)
- return;
- bcast = &BroadcastAddresses[NumBroadcastAddresses++];
-- bzero (bcast, sizeof (struct sockaddr_in));
-+ bzero (bcast, sizeof (struct sockaddr_in6));
-+ /* mapped the IPv4 broadcast address to IPv6 */
- #ifdef BSD44SOCKETS
-- bcast->sin_len = addr->sin_len;
-+ bcast->sin6_len = sizeof(struct sockaddr_in6);
- #endif
-- bcast->sin_family = addr->sin_family;
-- bcast->sin_port = htons (xdm_udp_port);
-- bcast->sin_addr = addr->sin_addr;
-+ bcast->sin6_family = AF_INET6;
-+ bcast->sin6_port = htons (xdm_udp_port);
-+ bcast->sin6_flowinfo = 0;
-+ bcast->sin6_addr.s6_addr[10] = bcast->sin6_addr.s6_addr[11] = 0xff;
-+ memmove(&bcast->sin6_addr.s6_addr[12], &addr->sin_addr, 4);
- }
-
- /*
-@@ -464,6 +469,13 @@
- XdmcpDisposeARRAYofARRAY8 (&ConnectionAddresses);
- xdmcpGeneration = serverGeneration;
- }
-+ /* for INET6, try go back to INET, to help not INET6 managers !! */
-+ if (type == FamilyInternet &&
-+ addrlen == sizeof (struct in6_addr) &&
-+ IN6_IS_ADDR_V4MAPPED((struct in6_addr *)address)) {
-+ addrlen = sizeof (struct in_addr);
-+ address += sizeof (struct in6_addr) - sizeof (struct in_addr);
-+ }
- newAddress = (CARD8 *) xalloc (addrlen * sizeof (CARD8));
- if (!newAddress)
- return;
-@@ -750,7 +762,7 @@
-
- /*ARGSUSED*/
- XdmcpAddHost(from, fromlen, AuthenticationName, hostname, status)
-- struct sockaddr_in *from;
-+ struct sockaddr_in6 *from;
- ARRAY8Ptr AuthenticationName, hostname, status;
- {
- XdmcpSelectHost(from, fromlen, AuthenticationName);
-@@ -766,8 +778,8 @@
- static void
- receive_packet()
- {
-- struct sockaddr_in from;
-- int fromlen = sizeof(struct sockaddr_in);
-+ struct sockaddr_in6 from;
-+ int fromlen = sizeof(struct sockaddr_in6);
- XdmcpHeader header;
-
- /* read message off socket */
-@@ -980,7 +992,7 @@
- #ifndef _MINIX
- int soopts = 1;
-
-- if ((xdmcpSocket = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
-+ if ((xdmcpSocket = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
- #else /* MINIX */
- char *udp_device;
- int r, s_errno;
-@@ -1066,7 +1078,7 @@
-
- for (i = 0; i < NumBroadcastAddresses; i++)
- XdmcpFlush (xdmcpSocket, &buffer, &BroadcastAddresses[i],
-- sizeof (struct sockaddr_in));
-+ sizeof (struct sockaddr_in6));
- }
- else
- {
-@@ -1077,7 +1089,7 @@
-
- static void
- recv_willing_msg(from, fromlen, length)
-- struct sockaddr_in *from;
-+ struct sockaddr_in6 *from;
- int fromlen;
- unsigned length;
- {
-@@ -1380,23 +1392,29 @@
- ErrorF("Xserver: missing host name in command line\n");
- exit(1);
- }
-+
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-+
- if (!(hep = gethostbyname(argv[i])))
- {
- ErrorF("Xserver: unknown host: %s\n", argv[i]);
- exit(1);
- }
- #ifndef _MINIX
-- if (hep->h_length == sizeof (struct in_addr))
-+ if (hep->h_length == sizeof (struct in6_addr))
- #else
- if (hep->h_length == sizeof (ipaddr_t))
- #endif
- {
-- memmove(&ManagerAddress.sin_addr, hep->h_addr, hep->h_length);
-+ memmove(&ManagerAddress.sin6_addr, hep->h_addr, hep->h_length);
- #ifdef BSD44SOCKETS
-- ManagerAddress.sin_len = sizeof(ManagerAddress);
-+ ManagerAddress.sin6_len = sizeof(ManagerAddress);
- #endif
-- ManagerAddress.sin_family = AF_INET;
-- ManagerAddress.sin_port = htons (xdm_udp_port);
-+ ManagerAddress.sin6_family = AF_INET6;
-+ ManagerAddress.sin6_port = htons (xdm_udp_port);
-+ ManagerAddress.sin6_flowinfo = 0;
- }
- else
- {
---- XFree86-3.3.3.1/xc/programs/lbxproxy/os/connection.c.ipv6 Thu Jun 24 12:39:42 1999
-+++ XFree86-3.3.3.1/xc/programs/lbxproxy/os/connection.c Thu Jun 24 12:39:47 1999
-@@ -231,7 +231,7 @@
- int retry; /* boolean - retry if addr busy */
-
- {
-- struct sockaddr_in insock;
-+ struct sockaddr_in6 insock;
- int request;
- int retryCount;
- #ifndef SO_DONTLINGER
-@@ -240,7 +240,7 @@
- #endif /* SO_LINGER */
- #endif /* SO_DONTLINGER */
-
-- if ((request = socket (AF_INET, SOCK_STREAM, 0)) < 0)
-+ if ((request = socket (AF_INET6, SOCK_STREAM, 0)) < 0)
- {
- Error ("Creating TCP socket");
- return -1;
-@@ -255,11 +255,12 @@
- {
- bzero ((char *)&insock, sizeof (insock));
- #ifdef BSD44SOCKETS
-- insock.sin_len = sizeof(insock);
-+ insock.sin6_len = sizeof(insock);
- #endif
-- insock.sin_family = AF_INET;
-- insock.sin_port = htons ((unsigned short)(X_TCP_PORT + atoi (display)));
-- insock.sin_addr.s_addr = htonl(INADDR_ANY);
-+ insock.sin6_family = AF_INET6;
-+ insock.sin6_flowinfo = 0;
-+ insock.sin6_port = htons ((unsigned short)(X_TCP_PORT + atoi (display)));
-+ insock.sin6_addr = in6addr_any;
-
- retryCount = retry ? 19 : 0;
-
-@@ -1776,7 +1777,7 @@
- struct sockaddr_un un;
- #endif /* UNIXCONN */
- #ifdef TCPCONN
-- struct sockaddr_in in;
-+ struct sockaddr_in6 in;
- #endif /* TCPCONN */
- #ifdef DNETCONN
- struct sockaddr_dn dn;
-@@ -1801,7 +1802,9 @@
- fromlen = sizeof (from);
- if (!getpeername (newconn, &from.sa, &fromlen))
- {
-- if (fromlen && (from.sa.sa_family == AF_INET))
-+ if (fromlen &&
-+ ((from.sa.sa_family == AF_INET) ||
-+ (from.sa.sa_family == AF_INET6)))
- {
- int mi = 1;
- setsockopt (newconn, IPPROTO_TCP, TCP_NODELAY,
---- XFree86-3.3.3.1/xc/programs/xauth/gethost.c.ipv6 Sun Sep 13 15:15:53 1998
-+++ XFree86-3.3.3.1/xc/programs/xauth/gethost.c Thu Jun 24 12:39:47 1999
-@@ -144,15 +144,21 @@
- alarm (4);
- if (setjmp(env) == 0) {
- #endif
-- hp = gethostbyaddr (auth->address, auth->address_length, AF_INET);
-+ hp = gethostbyaddr (auth->address, auth->address_length,
-+ auth->address_length == 4 ? AF_INET : AF_INET6);
- #ifdef SIGALRM
- }
- alarm (0);
- #endif
- if (hp)
- return (hp->h_name);
-- else
-- return (inet_ntoa(*((struct in_addr *)(auth->address))));
-+ else {
-+ static char v[64];
-+
-+ inet_ntop (auth->address_length == 4 ? AF_INET : AF_INET6,
-+ auth->address, v, sizeof(v));
-+ return (v);
-+ }
- }
- #endif
- #ifdef DNETCONN
-@@ -172,38 +178,26 @@
- }
-
- #ifdef TCPCONN
--/*
-- * cribbed from lib/X/XConnDis.c
-- */
- static Bool get_inet_address (name, resultp)
- char *name;
-- unsigned int *resultp; /* return */
-+ struct in6_addr *resultp; /* return */
- {
-- unsigned int hostinetaddr = inet_addr (name);
- struct hostent *host_ptr;
-- struct sockaddr_in inaddr; /* dummy variable for size calcs */
-
--#ifndef INADDR_NONE
--#define INADDR_NONE -1
--#endif
--
-- if (hostinetaddr == INADDR_NONE) {
-- if ((host_ptr = gethostbyname (name)) == NULL) {
-- /* No such host! */
-- errno = EINVAL;
-- return False;
-- }
-- /* Check the address type for an internet host. */
-- if (host_ptr->h_addrtype != AF_INET) {
-- /* Not an Internet host! */
-- errno = EPROTOTYPE;
-- return False;
-- }
--
-- memmove( (char *)&hostinetaddr, (char *)host_ptr->h_addr,
-- sizeof(inaddr.sin_addr));
-+ if ((host_ptr = gethostbyname (name)) == NULL) {
-+ /* No such host! */
-+ errno = EINVAL;
-+ return False;
- }
-- *resultp = hostinetaddr;
-+ /* Check the address type for an internet host. */
-+ if (host_ptr->h_addrtype != AF_INET6) {
-+ /* Not an Internet host! */
-+ errno = EPROTOTYPE;
-+ return False;
-+ }
-+
-+ memmove( (char *)resultp, (char *)host_ptr->h_addr,
-+ host_ptr->h_length);
- return True;
- }
- #endif
-@@ -239,8 +233,7 @@
- int len = 0;
- char *src = NULL;
- #ifdef TCPCONN
-- unsigned int hostinetaddr;
-- struct sockaddr_in inaddr; /* dummy variable for size calcs */
-+ struct in6_addr hostinetaddr;
- #endif
- #ifdef DNETCONN
- struct dn_naddr dnaddr;
-@@ -273,7 +266,7 @@
- #ifdef TCPCONN
- if (!get_inet_address (host, &hostinetaddr)) return NULL;
- src = (char *) &hostinetaddr;
-- len = 4; /* sizeof inaddr.sin_addr, would fail on Cray */
-+ len = (sizeof hostinetaddr);
- break;
- #else
- return NULL;
---- XFree86-3.3.3.1/xc/programs/xauth/parsedpy.c.ipv6 Mon Feb 16 01:43:19 1998
-+++ XFree86-3.3.3.1/xc/programs/xauth/parsedpy.c Thu Jun 24 12:39:47 1999
-@@ -115,12 +115,18 @@
- if (!displayname || !displayname[0]) return False;
-
- /* must have at least :number */
-- ptr = strchr(displayname, ':');
-+ /*
-+ * If a "host::" is found then assume DNET.
-+ * For IPv6, pb with possible : in host --> use rightmost : and test
-+ * x:y->inet, x::y->dnet, x:::y->inet(v6)
-+ */
-+ ptr = strrchr(displayname, ':');
- if (!ptr || !ptr[1]) return False;
-- if (ptr[1] == ':') {
-- if (ptr[2] == '\0') return False;
-- dnet = True;
-- }
-+ if (ptr > displayname && ptr[-1] == ':')
-+ if (ptr-1 == displayname || ptr[-2] != ':') {
-+ ptr--;
-+ dnet = True;
-+ }
-
-
- /*
---- XFree86-3.3.3.1/xc/programs/xauth/xauth.c.ipv6 Wed Apr 27 09:19:54 1994
-+++ XFree86-3.3.3.1/xc/programs/xauth/xauth.c Thu Jun 24 12:39:47 1999
-@@ -32,6 +32,8 @@
-
- #include "xauth.h"
-
-+#include <netinet/in.h>
-+#include <resolv.h>
-
- /*
- * global data
-@@ -102,6 +104,10 @@
- int status;
-
- ProgramName = argv[0];
-+
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-
- for (i = 1; i < argc; i++) {
- char *arg = argv[i];
---- XFree86-3.3.3.1/xc/programs/xdm/access.c.ipv6 Sat Jan 18 08:02:17 1997
-+++ XFree86-3.3.3.1/xc/programs/xdm/access.c Thu Jun 24 12:39:47 1999
-@@ -379,6 +379,11 @@
- display->connectionType = FamilyInternet;
- break;
- #endif
-+#ifdef AF_INET6
-+ case AF_INET6:
-+ display->connectionType = FamilyInternet;
-+ break;
-+#endif
- #ifdef AF_DECnet
- case AF_DECnet:
- display->connectionType = FamilyDECnet;
---- XFree86-3.3.3.1/xc/programs/xdm/auth.c.ipv6 Thu Jun 24 12:39:34 1999
-+++ XFree86-3.3.3.1/xc/programs/xdm/auth.c Thu Jun 24 12:39:47 1999
-@@ -86,8 +86,8 @@
- # endif /* ESIX */
- #endif /* i386 */
-
--#ifdef SVR4
- # include <netdb.h>
-+#ifdef SVR4
- # ifndef SCO325
- # include <sys/sockio.h>
- # endif
-@@ -988,6 +988,21 @@
- Debug ("Skipping localhost address\n");
- continue;
- }
-+ if (len == sizeof (struct in6_addr)) {
-+ if (bcmp(addr, &in6addr_loopback, len) == 0)
-+ {
-+ Debug ("Skipping localhost address\n");
-+ continue;
-+ }
-+ /*
-+ * ignore Link local address, the semantic would be weird
-+ */
-+ if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
-+ {
-+ Debug ("Skipping link-local address\n");
-+ continue;
-+ }
-+ }
- family = FamilyInternet;
- }
- Debug ("DefineSelf: write network address, length %d\n", len);
-@@ -1014,10 +1029,10 @@
-
- union {
- struct sockaddr sa;
-- struct sockaddr_in in;
-+ struct sockaddr_in6 in;
- } saddr;
-
-- struct sockaddr_in *inetaddr;
-+ struct sockaddr_in6 *inetaddr;
-
- /* hpux:
- * Why not use gethostname()? Well, at least on my system, I've had to
-@@ -1029,12 +1044,12 @@
- hp = gethostbyname (name.nodename);
- if (hp != NULL) {
- saddr.sa.sa_family = hp->h_addrtype;
-- inetaddr = (struct sockaddr_in *) (&(saddr.sa));
-- memmove( (char *) &(inetaddr->sin_addr), (char *) hp->h_addr, (int) hp->h_length);
-+ inetaddr = (struct sockaddr_in6 *) (&(saddr.sa));
-+ memmove( (char *) &(inetaddr->sin6_addr), (char *) hp->h_addr, (int) hp->h_length);
- family = ConvertAddr ( &(saddr.sa), &len, &addr);
- if ( family >= 0) {
-- writeAddr (FamilyInternet, sizeof (inetaddr->sin_addr),
-- (char *) (&inetaddr->sin_addr), file, auth);
-+ writeAddr (FamilyInternet, sizeof (inetaddr->sin6_addr),
-+ (char *) (&inetaddr->sin6_addr), file, auth);
- }
- }
- }
-@@ -1101,7 +1116,7 @@
- tcp_device= TCP_DEVICE;
- fd = open(tcp_device, O_RDWR);
- #else
-- fd = socket (AF_INET, SOCK_STREAM, 0);
-+ fd = socket (AF_INET6, SOCK_STREAM, 0);
- #endif
- DefineSelf (fd, file, auth);
- close (fd);
-@@ -1133,6 +1148,35 @@
- setAuthNumber (auth, name);
- family = ConvertAddr (peer, &peerlen, &addr);
- Debug ("writeRemoteAuth: family %d\n", family);
-+ /* if remote and name, set all the remote addresses */
-+ if (family == FamilyInternet)
-+ {
-+ struct in6_addr tmp;
-+ struct hostent *hp;
-+ char **ad, *colon;
-+ int af;
-+
-+ if (peerlen == sizeof (struct in6_addr) &&
-+ !IN6_IS_ADDR_V4MAPPED((struct in6_addr *)addr))
-+ af = AF_INET6;
-+ else
-+ af = AF_INET;
-+ colon = strrchr(name, ':');
-+ if (colon) {
-+ *colon = 0;
-+ if (inet_pton(af, name, &tmp) == 0 &&
-+ (hp = gethostbyname2(name, af))) {
-+ for(ad = hp->h_addr_list; *ad; ad++) {
-+ Debug ("writeRemoteAuth: %d, %d, %x\n",
-+ family, hp->h_length, *(int *)*ad);
-+ writeAddr (family, hp->h_length, *ad, file, auth);
-+ }
-+ *colon = ':';
-+ return;
-+ }
-+ *colon = ':';
-+ }
-+ }
- if (family != FamilyLocal)
- {
- Debug ("writeRemoteAuth: %d, %d, %x\n",
---- XFree86-3.3.3.1/xc/programs/xdm/choose.c.ipv6 Sat Jan 18 08:02:19 1997
-+++ XFree86-3.3.3.1/xc/programs/xdm/choose.c Thu Jun 24 12:39:47 1999
-@@ -232,6 +232,22 @@
- result_len = 8;
- }
- break;
-+ case AF_INET6:
-+ {
-+ char *port;
-+ int portlen;
-+ ARRAY8Ptr localAddress, getLocalAddress ();
-+
-+ port = NetaddrPort((XdmcpNetaddr)addr_buf, &portlen);
-+ result_buf[0] = netfamily >> 8;
-+ result_buf[1] = netfamily & 0xFF;
-+ result_buf[2] = port[0];
-+ result_buf[3] = port[1];
-+ localAddress = getLocalAddress ();
-+ memmove( (char *)result_buf+4, (char *)localAddress->data, 16);
-+ result_len = 20;
-+ }
-+ break;
- #ifdef AF_DECnet
- case AF_DECnet:
- break;
---- XFree86-3.3.3.1/xc/programs/xdm/chooser.c.ipv6 Thu Jun 24 12:39:34 1999
-+++ XFree86-3.3.3.1/xc/programs/xdm/chooser.c Thu Jun 24 12:39:47 1999
-@@ -88,6 +88,7 @@
- #endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
-+#include <resolv.h>
- #else /* MINIX */
- #include <net/hton.h>
- #include <net/netlib.h>
-@@ -347,6 +348,11 @@
- hostAddr.length = 4;
- connectionType = FamilyInternet;
- break;
-+ case AF_INET6:
-+ hostAddr.data = (CARD8 *) &((struct sockaddr_in6 *) addr)->sin6_addr;
-+ hostAddr.length = 16;
-+ connectionType = FamilyInternet;
-+ break;
- default:
- hostAddr.data = (CARD8 *) "";
- hostAddr.length = 0;
-@@ -376,11 +382,12 @@
- switch (addr->sa_family)
- {
- case AF_INET:
-+ case AF_INET6:
- {
- struct hostent *hostent;
- char *host;
-
-- hostent = gethostbyaddr ((char *)hostAddr.data, hostAddr.length, AF_INET);
-+ hostent = gethostbyaddr ((char *)hostAddr.data, hostAddr.length, addr->sa_family);
- if (hostent)
- {
- XdmcpDisposeARRAY8 (hostname);
-@@ -493,7 +500,7 @@
- ARRAY8 hostname;
- ARRAY8 status;
- int saveHostname = 0;
-- struct sockaddr addr;
-+ struct sockaddr_in6 addr;
- int addrlen;
- #ifdef MINIX
- int r;
-@@ -750,6 +757,7 @@
- in_addr.sin_family = AF_INET;
- else
- {
-+ /* TODO */
- hostent = gethostbyname (name);
- if (!hostent)
- return;
-@@ -920,7 +928,7 @@
- ref.ref_int= socketFD;
- nbio_setcallback(socketFD, ASIO_READ, read_cb, ref);
- #else /* !MINIX */
-- if ((socketFD = socket (AF_INET, SOCK_DGRAM, 0)) < 0)
-+ if ((socketFD = socket (AF_INET6, SOCK_DGRAM, 0)) < 0)
- return 0;
- #endif /* MINIX */
- #endif
-@@ -950,7 +958,7 @@
- {
- if (app_resources.xdmAddress)
- {
-- struct sockaddr_in in_addr;
-+ struct sockaddr_in6 in_addr;
- struct sockaddr *addr;
- int family;
- int len;
-@@ -970,13 +978,14 @@
- xdm = (char *) app_resources.xdmAddress->data;
- family = (xdm[0] << 8) + xdm[1];
- switch (family) {
-- case AF_INET:
-+ case AF_INET6:
- #ifdef BSD44SOCKETS
-- in_addr.sin_len = sizeof(in_addr);
-+ in_addr.sin6_len = sizeof(in_addr);
- #endif
-- in_addr.sin_family = family;
-- memmove( &in_addr.sin_port, xdm + 2, 2);
-- memmove( &in_addr.sin_addr, xdm + 4, 4);
-+ in_addr.sin6_family = family;
-+ in_addr.sin6_flowinfo = 0;
-+ memmove( &in_addr.sin6_port, xdm + 2, 2);
-+ memmove( &in_addr.sin6_addr, xdm + 4, 16);
- addr = (struct sockaddr *) &in_addr;
- len = sizeof (in_addr);
- break;
-@@ -1172,6 +1181,10 @@
- Arg position[3];
- Dimension width, height;
- Position x, y;
-+
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-
- toplevel = XtInitialize (argv[0], "Chooser", options, XtNumber(options), &argc, argv);
-
---- XFree86-3.3.3.1/xc/programs/xdm/dm.c.ipv6 Sat Oct 31 21:17:43 1998
-+++ XFree86-3.3.3.1/xc/programs/xdm/dm.c Thu Jun 24 12:39:47 1999
-@@ -79,6 +79,8 @@
- extern int errno;
- #endif
-
-+#include <netinet/in.h>
-+#include <resolv.h>
-
- #if defined(SVR4) && !defined(SCO)
- extern FILE *fdopen();
-@@ -118,6 +120,10 @@
- Title = argv[0];
- TitleLen = (argv[argc - 1] + strlen(argv[argc - 1])) - Title;
- #endif
-+
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-
- /*
- * Step 1 - load configuration parameters
---- XFree86-3.3.3.1/xc/programs/xdm/netaddr.c.ipv6 Sat Jan 18 08:02:21 1997
-+++ XFree86-3.3.3.1/xc/programs/xdm/netaddr.c Thu Jun 24 12:39:47 1999
-@@ -65,7 +65,7 @@
- #endif
-
- /* given an XdmcpNetaddr, returns the socket protocol family used,
-- e.g., AF_INET */
-+ e.g., AF_INET[6] */
-
- int NetaddrFamily(netaddrp)
- XdmcpNetaddr netaddrp;
-@@ -96,6 +96,9 @@
- case AF_INET:
- *lenp = 2;
- return (char *)&(((struct sockaddr_in *)netaddrp)->sin_port);
-+ case AF_INET6:
-+ *lenp = 2;
-+ return (char *)&(((struct sockaddr_in6 *)netaddrp)->sin6_port);
- default:
- *lenp = 0;
- return NULL;
-@@ -125,6 +128,9 @@
- case AF_INET:
- *lenp = sizeof (struct in_addr);
- return (char *) &(((struct sockaddr_in *)netaddrp)->sin_addr);
-+ case AF_INET6:
-+ *lenp = sizeof (struct in6_addr);
-+ return (char *) &(((struct sockaddr_in6 *)netaddrp)->sin6_addr);
- #endif
- #ifdef DNETCONN
- case AF_DECnet:
-@@ -177,6 +183,7 @@
- #endif
- #ifdef TCPCONN
- case AF_INET:
-+ case AF_INET6:
- retval = FamilyInternet;
- break;
- #endif
-@@ -248,6 +255,20 @@
-
- Debug ("port %d, host %d.%d.%d.%d\n",
- (p[0] << 8) + p[1], t[0], t[1], t[2], t[3]);
-+ break;
-+ }
-+#endif
-+#ifdef AF_INET6
-+ case AF_INET6:
-+
-+ p = (unsigned char *) &((struct sockaddr_in6 *) a)->sin6_port;
-+ t = (unsigned char *) &((struct sockaddr_in6 *) a)->sin6_addr;
-+
-+ Debug ("port %d, host %2x%02x:%2x%02x:%2x%02x:%2x%02x:%2x%02x:%2x%02x:%2x%02x:%2x%02x\n",
-+ (p[0] << 8) + p[1],
-+ t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7],
-+ t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15]);
-+
- break;
- }
- #endif
---- XFree86-3.3.3.1/xc/programs/xdm/socket.c.ipv6 Sat Jan 18 08:02:24 1997
-+++ XFree86-3.3.3.1/xc/programs/xdm/socket.c Thu Jun 24 12:39:47 1999
-@@ -84,7 +84,7 @@
- CreateWellKnownSockets ()
- {
- #ifndef MINIX
-- struct sockaddr_in sock_addr;
-+ struct sockaddr_in6 sock_addr;
- #else /* MINIX */
- char *tcp_device, *udp_device;
- nwio_udpopt_t udpopt;
-@@ -103,7 +103,7 @@
- udp_device= UDP_DEVICE;
- xdmcpFd = open(udp_device, O_RDWR);
- #else
-- xdmcpFd = socket (AF_INET, SOCK_DGRAM, 0);
-+ xdmcpFd = socket (AF_INET6, SOCK_DGRAM, 0);
- #endif
- if (xdmcpFd == -1) {
- LogError ("XDMCP socket creation failed, errno %d\n", errno);
-@@ -145,11 +145,12 @@
- /* zero out the entire structure; this avoids 4.4 incompatibilities */
- bzero ((char *) &sock_addr, sizeof (sock_addr));
- #ifdef BSD44SOCKETS
-- sock_addr.sin_len = sizeof(sock_addr);
-+ sock_addr.sin6_len = sizeof(sock_addr);
- #endif
-- sock_addr.sin_family = AF_INET;
-- sock_addr.sin_port = htons ((short) request_port);
-- sock_addr.sin_addr.s_addr = htonl (INADDR_ANY);
-+ sock_addr.sin6_family = AF_INET6;
-+ sock_addr.sin6_port = htons ((short) request_port);
-+ sock_addr.sin6_flowinfo = 0;
-+ sock_addr.sin6_addr = in6addr_any;
- if (bind (xdmcpFd, (struct sockaddr *)&sock_addr, sizeof (sock_addr)) == -1)
- {
- LogError ("error %d binding socket address %d\n", errno, request_port);
-@@ -167,7 +168,7 @@
- tcp_device= TCP_DEVICE;
- chooserFd = open(tcp_device, O_RDWR);
- #else
-- chooserFd = socket (AF_INET, SOCK_STREAM, 0);
-+ chooserFd = socket (AF_INET6, SOCK_STREAM, 0);
- #endif
- Debug ("Created chooser socket %d\n", chooserFd);
- if (chooserFd == -1)
-@@ -216,7 +217,7 @@
- char *addr;
- int *lenp;
- {
-- struct sockaddr_in in_addr;
-+ struct sockaddr_in6 in_addr;
- int len;
-
- len = sizeof in_addr;
---- XFree86-3.3.3.1/xc/programs/xdm/xdmcp.c.ipv6 Sun Feb 1 22:44:04 1998
-+++ XFree86-3.3.3.1/xc/programs/xdm/xdmcp.c Thu Jun 24 12:39:47 1999
-@@ -66,6 +66,8 @@
- #include <net/gen/netdb.h>
- #endif /* !MINIX */
-
-+# include <arpa/inet.h>
-+
- #ifdef X_NOT_STDC_ENV
- #define Time_t long
- extern Time_t time ();
-@@ -133,8 +135,8 @@
- ARRAY8Ptr address;
- char *closure;
- {
--#ifdef AF_INET
-- struct sockaddr_in in_addr;
-+#ifdef AF_INET6
-+ struct sockaddr_in6 in_addr;
- #endif
- #ifdef AF_DECnet
- #endif
-@@ -143,19 +145,20 @@
-
- switch (connectionType)
- {
--#ifdef AF_INET
-+#ifdef AF_INET6
- case FamilyInternet:
- addr = (struct sockaddr *) &in_addr;
- bzero ((char *) &in_addr, sizeof (in_addr));
- #ifdef BSD44SOCKETS
-- in_addr.sin_len = sizeof(in_addr);
-+ in_addr.sin6_len = sizeof(in_addr);
- #endif
-- in_addr.sin_family = AF_INET;
-- in_addr.sin_port = htons ((short) XDM_UDP_PORT);
-- if (address->length != 4)
-+ in_addr.sin6_family = AF_INET6;
-+ in_addr.sin6_flowinfo = 0;
-+ in_addr.sin6_port = htons ((short) XDM_UDP_PORT);
-+ if (address->length != 16)
- return;
-- memmove( (char *) &in_addr.sin_addr, address->data, address->length);
-- addrlen = sizeof (struct sockaddr_in);
-+ memmove( (char *) &in_addr.sin6_addr, address->data, address->length);
-+ addrlen = sizeof (struct sockaddr_in6);
- break;
- #endif
- #ifdef AF_DECnet
-@@ -287,7 +290,7 @@
- ProcessRequestSocket ()
- {
- XdmcpHeader header;
-- struct sockaddr_in addr;
-+ struct sockaddr_in6 addr;
- int addrlen = sizeof addr;
- #ifdef MINIX
- int r;
-@@ -486,7 +489,8 @@
-
- data = connectionAddress->data;
- hostent = gethostbyaddr ((char *)data,
-- connectionAddress->length, AF_INET);
-+ connectionAddress->length,
-+ connectionAddress->length == 4 ? AF_INET : AF_INET6);
- if (sourceAddress && hostent) {
- #if defined(__SVR4) && defined(__sun)
- /*
-@@ -546,11 +550,34 @@
- }
- else
- {
-+ if (multiHomed) {
-+ if (((struct sockaddr_in *)
-+ originalAddress)->sin_family == AF_INET) {
-+ data = (CARD8 *) &((struct sockaddr_in *)
-+ originalAddress)->sin_addr.s_addr;
-+ goto v4;
-+ }
-+ data = (CARD8 *) &((struct sockaddr_in6 *)
-+ originalAddress)->sin6_addr;
-+ goto v6;
-+ }
-+ if (connectionAddress->length == sizeof (struct in6_addr)) {
-+ v6:
-+ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)data)) {
-+ data += sizeof(struct in6_addr)-sizeof(struct in_addr);
-+ goto v4;
-+ }
-+ if (!getString (name, INET6_ADDRSTRLEN+6))
-+ return 0;
-+ (void) inet_ntop(AF_INET6, data, name, INET6_ADDRSTRLEN);
-+ sprintf(name+strlen(name), ":%d", displayNumber);
-+ return name;
-+ }
-+ if (connectionAddress->length != 4)
-+ return 0;
-+ v4:
- if (!getString (name, 25))
- return 0;
-- if (multiHomed)
-- data = (CARD8 *) &((struct sockaddr_in *)originalAddress)->
-- sin_addr.s_addr;
- sprintf(name, "%d.%d.%d.%d:%d",
- data[0], data[1], data[2], data[3], displayNumber);
- }
-@@ -631,6 +658,29 @@
- }
- break;
- #endif
-+#ifdef AF_INET6
-+ case AF_INET6:
-+ {
-+ struct sockaddr_in6 in_addr;
-+
-+ if (clientAddress.length != 16 ||
-+ clientPort.length != 2)
-+ {
-+ goto badAddress;
-+ }
-+ bzero ((char *) &in_addr, sizeof (in_addr));
-+#ifdef BSD44SOCKETS
-+ in_addr.sin6_len = sizeof(in_addr);
-+#endif
-+ in_addr.sin6_family = AF_INET6;
-+ in_addr.sin6_flowinfo = 0;
-+ memmove( &in_addr.sin6_addr, clientAddress.data, 16);
-+ memmove( (char *) &in_addr.sin6_port, clientPort.data, 2);
-+ client = (struct sockaddr *) &in_addr;
-+ clientlen = sizeof (in_addr);
-+ }
-+ break;
-+#endif
- #ifdef AF_UNIX
- case AF_UNIX:
- {
-@@ -1199,11 +1249,14 @@
- char *local_name;
-
- hostent = gethostbyaddr ((char *)connectionAddress->data,
-- connectionAddress->length, AF_INET);
-+ connectionAddress->length,
-+ connectionAddress->length == 4 ? AF_INET : AF_INET6);
-
- if (hostent)
- local_name = hostent->h_name;
- else {
-+ if (connectionAddress->length != 4)
-+ break;
- /* can't get name, so use emergency fallback */
- sprintf(dotted, "%d.%d.%d.%d",
- connectionAddress->data[0],
---- XFree86-3.3.3.1/xc/programs/xfs/difs/main.c.ipv6 Thu Jun 24 12:39:41 1999
-+++ XFree86-3.3.3.1/xc/programs/xfs/difs/main.c Thu Jun 24 12:39:47 1999
-@@ -60,6 +60,10 @@
- #include "site.h"
- #include <unistd.h>
-
-+#include <sys/types.h>
-+#include <netinet/in.h>
-+#include <resolv.h>
-+
- char *ConnectionInfo;
- int ConnInfoLen;
-
-@@ -94,6 +98,10 @@
-
- argcGlobal = argc;
- argvGlobal = argv;
-+
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-
- configfilename = DEFAULT_CONFIG_FILE;
-
---- XFree86-3.3.3.1/xc/programs/xfs/os/access.c.ipv6 Sat Jan 18 08:02:45 1997
-+++ XFree86-3.3.3.1/xc/programs/xfs/os/access.c Thu Jun 24 12:39:47 1999
-@@ -93,7 +93,7 @@
- char hname[64];
- struct hostent *hp;
-
-- addr->addr_len = sizeof(struct in_addr);
-+ addr->addr_len = sizeof(struct in6_addr);
- addr->address = (pointer) fsalloc(addr->addr_len);
- if (!addr->address)
- return FSBadAlloc;
---- XFree86-3.3.3.1/xc/programs/xfwp/xfwp.c.ipv6 Fri Jan 23 00:53:25 1998
-+++ XFree86-3.3.3.1/xc/programs/xfwp/xfwp.c Thu Jun 24 14:22:13 1999
-@@ -57,6 +57,7 @@
- #endif
- #include <sys/wait.h>
- #include <netdb.h>
-+#include <resolv.h>
- #if defined(_ANSI_SOURCE) && defined(__bsdi__)
- #undef _ANSI_SOURCE
- #include <signal.h>
-@@ -163,13 +164,13 @@
- main (int argc, char * argv[])
- {
- struct clientDataStruct client_data;
-- struct sockaddr_in dest_server;
-+ struct sockaddr_in6 dest_server;
- struct pm_policy policy;
- int pm_listen_array[MAX_TRANSPORTS];
- int pm_conn_counter;
-- struct sockaddr_in pm_sockaddr_in;
-+ struct sockaddr_in6 pm_sockaddr_in6;
- int rem_listen_counter;
-- struct sockaddr_in rem_sockaddr_in;
-+ struct sockaddr_in6 rem_sockaddr_in6;
- fd_set readable, writable, rinit, winit;
- int nfds = 0;
- int nready = 0;
-@@ -196,6 +197,10 @@
- /*
- // now do the rest of the setup
- */
-+ if ((_res.options & RES_INIT) == 0)
-+ (void) res_init();
-+ _res.options |= RES_USE_INET6;
-+
- doProcessInputArgs(config_info, argc, argv);
- if ((config_status = doHandleConfigFile(config_info)) == FAILURE)
- exit(1);
-@@ -515,7 +520,7 @@
- {
- int this_server;
- int one = 1;
-- struct sockaddr_in rem_sockaddr_in;
-+ struct sockaddr_in6 rem_sockaddr_in6;
- int port_counter;
- int listen_port;
- char port_buff[10];
-@@ -578,7 +583,7 @@
- return FAILURE;
- }
- if ((server_array[this_server]->client_listen_fd =
-- socket(AF_INET, SOCK_STREAM, 0)) < 0)
-+ socket(AF_INET6, SOCK_STREAM, 0)) < 0)
- {
- #ifdef DEBUG
- fprintf(stderr,"doRemClientSetup: socket() call failed!");
-@@ -599,8 +604,10 @@
- /*
- // set up the rest of the remote client listener
- */
-- bzero((char * ) &rem_sockaddr_in, sizeof(rem_sockaddr_in));
-- rem_sockaddr_in.sin_family = AF_INET;
-+ bzero((char * ) &rem_sockaddr_in6, sizeof(rem_sockaddr_in6));
-+ rem_sockaddr_in6.sin6_family = AF_INET6;
-+ rem_sockaddr_in6.sin6_flowinfo = 0;
-+ rem_sockaddr_in6.sin6_addr = in6addr_any;
- if (setsockopt(server_array[this_server]->client_listen_fd,
- SOL_SOCKET, SO_REUSEADDR,
- &one, sizeof(one)) < 0)
-@@ -617,10 +624,10 @@
- }
-
- while (True) {
-- rem_sockaddr_in.sin_port = htons(listen_port);
-+ rem_sockaddr_in6.sin6_port = htons(listen_port);
- if (bind(server_array[this_server]->client_listen_fd,
-- (struct sockaddr *)&rem_sockaddr_in,
-- sizeof(rem_sockaddr_in)) == 0)
-+ (struct sockaddr *)&rem_sockaddr_in6,
-+ sizeof(rem_sockaddr_in6)) == 0)
- break;
- if (errno != EADDRINUSE)
- {
-@@ -1003,7 +1010,7 @@
- int server_reason_len;
- int conn_auth_namelen, conn_auth_datalen;
- char throw_away[RWBUFFER_SIZE];
-- struct sockaddr_in server_sockaddr_in;
-+ struct sockaddr_in6 server_sockaddr_in6;
- enum CONFIG_CHECK server_status;
- xConnClientPrefix client;
- xConnSetupPrefix prefix;
-@@ -1039,10 +1046,10 @@
- int check_sock_fd;
- struct timeval time_val;
- struct timezone time_zone;
-- struct sockaddr_in temp_sockaddr_in;
-+ struct sockaddr_in6 temp_sockaddr_in6;
- int retval;
- int config_check;
-- int addrlen = sizeof(temp_sockaddr_in);
-+ int addrlen = sizeof(temp_sockaddr_in6);
- /*
- // start by accepting the connection if you can, use pm_listen_array
- // index to index into ICE listen_object list (this is because the
-@@ -1061,17 +1068,17 @@
- // connection; start by using getpeername() to get endpoint info
- */
- retval = getpeername(temp_sock_fd,
-- (struct sockaddr*)&temp_sockaddr_in,
-+ (struct sockaddr*)&temp_sockaddr_in6,
- &addrlen);
-
-- assert(temp_sockaddr_in.sin_family == AF_INET);
-+ assert(temp_sockaddr_in6.sin6_family == AF_INET6);
-
- /*
- // then do the configuration check; NOTE: we're not doing anything
-- // with the server_sockaddr_in argument
-+ // with the server_sockaddr_in6 argument
- */
-- if ((config_check = doConfigCheck(&temp_sockaddr_in,
-- &server_sockaddr_in,
-+ if ((config_check = doConfigCheck(&temp_sockaddr_in6,
-+ &server_sockaddr_in6,
- config_info,
- PMGR,
- &log_data)) == FAILURE)
-@@ -1302,17 +1309,18 @@
- // configuration, if connection allowed, allocate
- // the read/write buffer for this connection;
- */
-- struct sockaddr_in temp_sockaddr_in;
-- int temp_sock_fd;
-- int temp_sock_len;
-- int host_count;
-- int config_check;
-- struct timeval time_val;
-- struct timezone time_zone;
-+ struct sockaddr_in6 temp_sockaddr_in6;
-+ int temp_sock_fd;
-+ int temp_sock_len;
-+ int host_count;
-+ int config_check;
-+ struct timeval time_val;
-+ struct timezone time_zone;
-+ char v1[64], v2[64];
-
-- temp_sock_len = sizeof(temp_sockaddr_in);
-+ temp_sock_len = sizeof(temp_sockaddr_in6);
- if ((temp_sock_fd = accept(fd_counter,
-- (struct sockaddr *) &temp_sockaddr_in,
-+ (struct sockaddr *) &temp_sockaddr_in6,
- &temp_sock_len)) < 0)
- {
- /*
-@@ -1336,7 +1344,7 @@
- if ((server_status =
- doServerConnectSetup(server_array[listen_counter]->x_server_hostport,
- &server_array[listen_counter]->server_fd,
-- &server_sockaddr_in)) == FAILURE)
-+ &server_sockaddr_in6)) == FAILURE)
- {
- #ifdef DEBUG
- fprintf(stderr,
-@@ -1346,7 +1354,7 @@
- }
- if ((server_status =
- doServerConnect(&server_array[listen_counter]->server_fd,
-- &server_sockaddr_in)) == FAILURE)
-+ &server_sockaddr_in6)) == FAILURE)
- {
- #ifdef DEBUG
- fprintf(stderr,
-@@ -1355,15 +1363,18 @@
- return;
- }
- /*
-- // derive and save the client IP source and destination address strings
-- // for logging purposes (have to do it here while we have them; even if
-- // this client connection passes the config check, it might fail the
-- // server security checks later); also, init the config_rule_num field
-- */
-- log_data.source = Malloc(strlen(inet_ntoa(temp_sockaddr_in.sin_addr)));
-- log_data.destination = Malloc(strlen(inet_ntoa(server_sockaddr_in.sin_addr)));
-- strcpy(log_data.source, inet_ntoa(temp_sockaddr_in.sin_addr));
-- strcpy(log_data.destination, inet_ntoa(server_sockaddr_in.sin_addr));
-+ // derive and save the client IPv6 source and destination
-+ // address strings for logging purposes (have to do it here
-+ // while we have them; even if this client connection passes
-+ // the config check, it might fail the server security checks later);
-+ // also, init the config_rule_num field
-+ */
-+ log_data.source = Malloc(strlen(inet_ntop(AF_INET6,
-+ &temp_sockaddr_in6.sin6_addr, v1, sizeof(v1))));
-+ log_data.destination = Malloc(strlen(inet_ntop(AF_INET6,
-+ &server_sockaddr_in6.sin6_addr, v2, sizeof(v2))));
-+ strcpy(log_data.source, v1);
-+ strcpy(log_data.destination, v2);
- log_data.config_rule_num = -1;
- /*
- // do config check on client source and destination (must do
-@@ -1371,8 +1382,8 @@
- // to query and we may not be able to resolve server name
- // alone from xfindproxy()
- */
-- if ((config_check = doConfigCheck(&temp_sockaddr_in,
-- &server_sockaddr_in,
-+ if ((config_check = doConfigCheck(&temp_sockaddr_in6,
-+ &server_sockaddr_in6,
- config_info,
- CLIENT,
- &log_data)) == FAILURE)
-@@ -1454,13 +1465,13 @@
- // server security extension or other loggable events)
- */
- client_conn_array[temp_sock_fd]->source =
-- Malloc(strlen(inet_ntoa(temp_sockaddr_in.sin_addr)));
-+ Malloc(strlen(inet_ntop(AF_INET6,
-+ &temp_sockaddr_in6.sin6_addr, v1, sizeof(v1))));
- client_conn_array[temp_sock_fd]->destination =
-- Malloc(strlen(inet_ntoa(server_sockaddr_in.sin_addr)));
-- strcpy(client_conn_array[temp_sock_fd]->source,
-- inet_ntoa(temp_sockaddr_in.sin_addr));
-- strcpy(client_conn_array[temp_sock_fd]->destination,
-- inet_ntoa(server_sockaddr_in.sin_addr));
-+ Malloc(strlen(inet_ntop(AF_INET6,
-+ &server_sockaddr_in6.sin6_addr, v2, sizeof(v2))));
-+ strcpy(client_conn_array[temp_sock_fd]->source, v1);
-+ strcpy(client_conn_array[temp_sock_fd]->destination, v2);
- /*
- // allocate a buffer for the X server connection
- // and create the association between client and server
-@@ -1959,7 +1970,7 @@
- fprintf(stderr, "Server replied AUTHENTICATE!\n");
- #endif
- /*
-- // retrieve the client IP source and destination address strings
-+ // retrieve the client IPv6 source and destination address strings
- */
- log_data.source =
- Malloc(strlen
-@@ -2030,13 +2041,22 @@
- }/* end if client_conn_array != NULL */
- }
-
--int doConfigCheck(struct sockaddr_in * source_sockaddr_in,
-- struct sockaddr_in * dest_sockaddr_in,
-+#define IN6ADDR_MATCH(x,m,y) \
-+ match = 1; \
-+ for (i = 0; i < sizeof(struct in6_addr) && (m).s6_addr[i] != 0; i++) \
-+ if (((x).s6_addr[i] & (m).s6_addr[i]) != (y).s6_addr[i]) { \
-+ match = 0; \
-+ break; \
-+ }
-+
-+int doConfigCheck(struct sockaddr_in6 * source_sockaddr_in6,
-+ struct sockaddr_in6 * dest_sockaddr_in6,
- struct config * config_info,
- int context,
- struct log_struct * log_data)
- {
- int line_counter;
-+ int i, match;
- /*
- // look through the config file parse tree for a source IP address
- // that matches this request
-@@ -2045,12 +2065,13 @@
- {
- if (config_info->config_file_data[line_counter] != NULL)
- {
-- if ((source_sockaddr_in->sin_addr.s_addr &
-- (~(config_info->config_file_data[line_counter]->source_net))) ==
-- config_info->config_file_data[line_counter]->source_host)
-+ IN6ADDR_MATCH(source_sockaddr_in6->sin6_addr,
-+ config_info->config_file_data[line_counter]->source_net,
-+ config_info->config_file_data[line_counter]->source_host);
-+ if (match)
- {
- /*
-- // okay, the source host and netmask fields pass, see if the
-+ // okay, the source host and prefix length fields pass, see if the
- // config file specifies "permit" or "deny" for this host
- */
- if (!strcmp(config_info->config_file_data[line_counter]->permit_deny,
-@@ -2065,9 +2086,10 @@
- /*
- // compute destination info restrictions
- */
-- if ((dest_sockaddr_in->sin_addr.s_addr &
-- (~(config_info->config_file_data[line_counter]->dest_net))) ==
-- config_info->config_file_data[line_counter]->dest_host)
-+ IN6ADDR_MATCH(dest_sockaddr_in6->sin6_addr,
-+ config_info->config_file_data[line_counter]->dest_net,
-+ config_info->config_file_data[line_counter]->dest_host);
-+ if (match)
- {
- /*
- // you got a match on the destination, so look at
-@@ -2171,9 +2193,10 @@
- /*
- // compute destination info restrictions
- */
-- if ((dest_sockaddr_in->sin_addr.s_addr &
-- (~(config_info->config_file_data[line_counter]->dest_net))) ==
-- config_info->config_file_data[line_counter]->dest_host)
-+ IN6ADDR_MATCH(dest_sockaddr_in6->sin6_addr,
-+ config_info->config_file_data[line_counter]->dest_net,
-+ config_info->config_file_data[line_counter]->dest_host);
-+ if (match)
- {
- /*
- // you got a match on the destination, so look at
-@@ -2292,7 +2315,7 @@
- if (config_info->config_file_path == NULL)
- {
- if (printConfigVerify)
-- fputs("matched default permit 0.0.0.0 255.255.255.255\n", stderr);
-+ fputs("matched default permit :: 0\n", stderr);
- /*
- // there's no rule match to save
- */
-@@ -2301,7 +2324,7 @@
- }
-
- if (printConfigVerify)
-- fputs("matched default deny 0.0.0.0 255.255.255.255\n", stderr);
-+ fputs("matched default deny :: 0\n", stderr);
- /*
- // not in this case either
- */
-@@ -2395,8 +2418,8 @@
- pmGetProxyAddrReplyMsg * pReply;
- char * pReplyData;
- struct hostent * hostptr;
-- struct sockaddr_in server_sockaddr_in;
-- struct sockaddr_in dummy_sockaddr_in;
-+ struct sockaddr_in6 server_sockaddr_in6;
-+ struct sockaddr_in6 dummy_sockaddr_in6;
- char * server_name_base;
- int config_check;
- char * config_failure = "unrecognized server or permission denied";
-@@ -2497,9 +2520,9 @@
- #endif
- goto sendFailure;
- }
-- memset(&server_sockaddr_in, 0, sizeof(server_sockaddr_in));
-- memset(&dummy_sockaddr_in, 0, sizeof(dummy_sockaddr_in));
-- memcpy((char *) &server_sockaddr_in.sin_addr,
-+ memset(&server_sockaddr_in6, 0, sizeof(server_sockaddr_in6));
-+ memset(&dummy_sockaddr_in6, 0, sizeof(dummy_sockaddr_in6));
-+ memcpy((char *) &server_sockaddr_in6.sin6_addr,
- hostptr->h_addr,
- hostptr->h_length);
-
-@@ -2509,11 +2532,11 @@
- // NOTE: source configuration will always match (see XFWP man
- // page) unless sysadmin explicitly chooses to deny
- */
-- memcpy((char *) &dummy_sockaddr_in.sin_addr,
-+ memcpy((char *) &dummy_sockaddr_in6.sin6_addr,
- hostptr->h_addr,
- hostptr->h_length);
-- if ((config_check = doConfigCheck(&dummy_sockaddr_in,
-- &server_sockaddr_in,
-+ if ((config_check = doConfigCheck(&dummy_sockaddr_in6,
-+ &server_sockaddr_in6,
- global_data.config_info,
- FINDPROXY,
- &log_data)) == FAILURE)
-@@ -2759,7 +2782,7 @@
-
- int doServerConnectSetup(char * x_server_hostport,
- int * server_connect_fd,
-- struct sockaddr_in * server_sockaddr_in)
-+ struct sockaddr_in6 * server_sockaddr_in6)
- {
- struct hostent * hostptr;
- char * server_name_base;
-@@ -2796,7 +2819,7 @@
- #endif
- return;
- }
-- if ((*server_connect_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
-+ if ((*server_connect_fd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
- {
- #ifdef DEBUG
- fprintf(stderr,
-@@ -2805,20 +2828,20 @@
- #endif
- return FAILURE;
- }
-- memset(server_sockaddr_in, 0, sizeof(*server_sockaddr_in));
-- server_sockaddr_in->sin_family = hostptr->h_addrtype;
-- memcpy((char *) &server_sockaddr_in->sin_addr,
-+ memset(server_sockaddr_in6, 0, sizeof(*server_sockaddr_in6));
-+ server_sockaddr_in6->sin6_family = hostptr->h_addrtype;
-+ memcpy((char *) &server_sockaddr_in6->sin6_addr,
- hostptr->h_addr,
- hostptr->h_length);
-- server_sockaddr_in->sin_port = htons(server_port);
-+ server_sockaddr_in6->sin6_port = htons(server_port);
- return SUCCESS;
- }
-
- int doServerConnect(int * server_connect_fd,
-- struct sockaddr_in * server_sockaddr_in)
-+ struct sockaddr_in6 * server_sockaddr_in6)
- {
-- if(connect(*server_connect_fd, (struct sockaddr * )server_sockaddr_in,
-- sizeof(*server_sockaddr_in)) < 0)
-+ if(connect(*server_connect_fd, (struct sockaddr * )server_sockaddr_in6,
-+ sizeof(*server_sockaddr_in6)) < 0)
- {
- #ifdef DEBUG
- fprintf(stderr,
-@@ -3122,13 +3145,13 @@
-
- config_lineP->permit_deny = NULL;
- config_lineP->source_hostname = NULL;
-- config_lineP->source_host = 0;
-- config_lineP->source_netmask = NULL;
-- config_lineP->source_net = 0;
-+ bzero((char *)&config_lineP->source_host, sizeof(struct in6_addr));
-+ config_lineP->source_preflen = NULL;
-+ bzero((char *)&config_lineP->source_net, sizeof(struct in6_addr));
- config_lineP->dest_hostname = NULL;
-- config_lineP->dest_host = 0;
-- config_lineP->dest_netmask = NULL;
-- config_lineP->dest_net = 0;
-+ bzero((char *)&config_lineP->dest_host, sizeof(struct in6_addr));
-+ config_lineP->dest_preflen = NULL;
-+ bzero((char *)&config_lineP->dest_net, sizeof(struct in6_addr));
- config_lineP->operator = NULL;
- config_lineP->service = NULL;
-
-@@ -3200,7 +3223,7 @@
- {
- char token[64];
- strcpy(token, result);
-- if (doVerifyHostMaskToken(token))
-+ if (doVerifyHostToken(token))
- {
- if ((config_file_data[line_number]->source_hostname =
- (char *) malloc (strlen(result) + 1)) == NULL)
-@@ -3219,22 +3242,24 @@
- /*
- // generate network address format
- */
-- config_file_data[line_number]->source_host =
-- inet_addr(config_file_data[line_number]->source_hostname);
-+ inet_pton(AF_INET6,
-+ config_file_data[line_number]->source_hostname,
-+ &config_file_data[line_number]->source_host);
- } else
- bad_token = 1;
- }
-
- /*
-- // now the source netmask field
-+ // now the source prefix length field
- */
- if ((result = strtok(NULL, SEPARATOR1)) != NULL)
- {
- char token[64];
-+ int plen, j;
- strcpy(token, result);
-- if (doVerifyHostMaskToken(token))
-+ if (doVerifyMaskToken(token))
- {
-- if ((config_file_data[line_number]->source_netmask =
-+ if ((config_file_data[line_number]->source_preflen =
- (char *) malloc (strlen(result) + 1)) == NULL)
- {
- #ifdef DEBUG
-@@ -3242,14 +3267,18 @@
- #endif
- return 0;
- }
-- strcpy(config_file_data[line_number]->source_netmask, result);
-+ strcpy(config_file_data[line_number]->source_preflen, result);
- #ifdef DEBUG
- fprintf(stderr,
- "third token = %s\n",
-- config_file_data[line_number]->source_netmask);
-+ config_file_data[line_number]->source_preflen);
- #endif
-- config_file_data[line_number]->source_net =
-- inet_addr(config_file_data[line_number]->source_netmask);
-+ plen = atoi(config_file_data[line_number]->source_preflen);
-+ for (j = 0; plen >= 8; plen -= 8, j++)
-+ config_file_data[line_number]->source_net.s6_addr[j] = 0xff;
-+ if (plen != 0)
-+ config_file_data[line_number]->source_net.s6_addr[j] =
-+ 0xff << (8 - plen);
- } else
- bad_token = 1;
- }
-@@ -3260,7 +3289,7 @@
- {
- char token[64];
- strcpy(token, result);
-- if (doVerifyHostMaskToken(token))
-+ if (doVerifyHostToken(token))
- {
- if ((config_file_data[line_number]->dest_hostname =
- (char *) malloc (strlen(result) + 1)) == NULL)
-@@ -3276,21 +3305,23 @@
- "fourth token = %s\n",
- config_file_data[line_number]->dest_hostname);
- #endif
-- config_file_data[line_number]->dest_host =
-- inet_addr(config_file_data[line_number]->dest_hostname);
-+ inet_pton(AF_INET6,
-+ config_file_data[line_number]->dest_hostname,
-+ &config_file_data[line_number]->dest_host);
- } else
- bad_token = 1;
- }
- /*
-- // now the destination netmask field
-+ // now the destination prefix length field
- */
- if ((result = strtok(NULL, SEPARATOR1)) != NULL)
- {
- char token[64];
-+ int plen, j;
- strcpy(token, result);
-- if (doVerifyHostMaskToken(token))
-+ if (doVerifyMaskToken(token))
- {
-- if ((config_file_data[line_number]->dest_netmask =
-+ if ((config_file_data[line_number]->dest_preflen =
- (char *) malloc (strlen(result) + 1)) == NULL)
- {
- #ifdef DEBUG
-@@ -3298,14 +3329,18 @@
- #endif
- return 0;
- }
-- strcpy(config_file_data[line_number]->dest_netmask, result);
-+ strcpy(config_file_data[line_number]->dest_preflen, result);
- #ifdef DEBUG
- fprintf(stderr,
- "fifth token = %s\n",
-- config_file_data[line_number]->dest_netmask);
-+ config_file_data[line_number]->dest_preflen);
- #endif
-- config_file_data[line_number]->dest_net =
-- inet_addr(config_file_data[line_number]->dest_netmask);
-+ plen = atoi(config_file_data[line_number]->dest_preflen);
-+ for (j = 0; plen >= 8; plen -= 8, j++)
-+ config_file_data[line_number]->dest_net.s6_addr[j] = 0xff;
-+ if (plen != 0)
-+ config_file_data[line_number]->dest_net.s6_addr[j] =
-+ 0xff << (8 - plen);
- } else
- bad_token = 1;
- }
-@@ -3377,9 +3412,9 @@
- ((config_file_data[line_number]->permit_deny != NULL) &&
- (config_file_data[line_number]->source_hostname == NULL)) ||
- ((config_file_data[line_number]->source_hostname != NULL) &&
-- (config_file_data[line_number]->source_netmask == NULL)) ||
-+ (config_file_data[line_number]->source_preflen == NULL)) ||
- ((config_file_data[line_number]->dest_hostname != NULL) &&
-- (config_file_data[line_number]->dest_netmask == NULL)) ||
-+ (config_file_data[line_number]->dest_preflen == NULL)) ||
- ((config_file_data[line_number]->operator != NULL) &&
- (config_file_data[line_number]->service == NULL)))
- return 1;
-@@ -3388,27 +3423,23 @@
- return 0;
- }
-
--int doVerifyHostMaskToken(char token[])
-+int doVerifyHostToken(char token[])
- {
-- char * result;
-- int delimiter_count = 0;
-+ struct in6_addr addr;
- /*
-- // verify there are 3 "." delimiters in the token
-+ // verify it is a real IPv6 address
- */
-- while (token)
-- {
-- if ((result = strchr(token, SEPARATOR2)) != NULL)
-- {
-- token = result;
-- delimiter_count++;
-- token ++;
-- } else
-- token = result;
-- }
-- if ((delimiter_count < 3) || (delimiter_count > 3))
-- return 0;
-- else
-- return 1;
-+ return (inet_pton(AF_INET6, token, &addr) > 0);
-+}
-+
-+int doVerifyMaskToken(char token[])
-+{
-+ int plen;
-+ /*
-+ // verify it is a legal prefix length
-+ */
-+ plen = atoi(token);
-+ return ((plen >= 0) && (plen <= 128));
- }
-
- void BadSyntax(char *msg, int line)
-@@ -3483,8 +3514,8 @@
- struct config_line *ruleP = config_info->config_file_data[line_counter];
- fprintf(stderr,"matched: %s %s %s %s %s %s %s\n",
- ruleP->permit_deny,
-- ruleP->source_hostname, ruleP->source_netmask,
-- ruleP->dest_hostname, ruleP->dest_netmask,
-+ ruleP->source_hostname, ruleP->source_preflen,
-+ ruleP->dest_hostname, ruleP->dest_preflen,
- ruleP->operator,
- ruleP->service);
- }
---- XFree86-3.3.3.1/xc/programs/xfwp/xfwp.h.ipv6 Wed Jun 11 14:09:00 1997
-+++ XFree86-3.3.3.1/xc/programs/xfwp/xfwp.h Thu Jun 24 12:39:47 1999
-@@ -61,7 +61,7 @@
- /* allocate ADD_LINES entries at a time when loading the configuration */
- #define ADD_LINES 20
- #define SEPARATOR1 " \t\n"
--#define SEPARATOR2 '.'
-+#define SEPARATOR2 ':'
-
- #define min(a,b) ((a) < (b) ? (a) : (b))
- #define max(a,b) ((a) > (b) ? (a) : (b))
-@@ -194,13 +194,13 @@
- {
- char * permit_deny;
- char * source_hostname;
-- unsigned int source_host;
-- char * source_netmask;
-- unsigned int source_net;
-+ struct in6_addr source_host;
-+ char * source_preflen;
-+ struct in6_addr source_net;
- char * dest_hostname;
-- unsigned int dest_host;
-- char * dest_netmask;
-- unsigned int dest_net;
-+ struct in6_addr dest_host;
-+ char * dest_preflen;
-+ struct in6_addr dest_net;
- char * operator;
- char * service;
- int service_id;
-@@ -303,8 +303,8 @@
- struct client_conn_buf * client_conn_array[],
- struct ice_data * ice_data);
-
--int doConfigCheck(struct sockaddr_in * temp_sockaddr_in,
-- struct sockaddr_in * server_sockaddr_in,
-+int doConfigCheck(struct sockaddr_in6 * temp_sockaddr_in6,
-+ struct sockaddr_in6 * server_sockaddr_in6,
- struct config * config_info,
- int context,
- struct log_struct * log_data);
-@@ -337,10 +337,10 @@
-
- int doServerConnectSetup(char * x_server_hostport,
- int * server_connect_fd,
-- struct sockaddr_in * server_addr_in);
-+ struct sockaddr_in6 * server_addr_in6);
-
- int doServerConnect(int * server_connect_fd,
-- struct sockaddr_in * server_addr_in);
-+ struct sockaddr_in6 * server_addr_in6);
-
- int doProcessLine(char *line,
- struct config * config_info,
-@@ -352,7 +352,9 @@
-
- Bool doConfigRequireDisallow(int, char*);
-
--int doVerifyHostMaskToken(char token[]);
-+int doVerifyHostToken(char token[]);
-+
-+int doVerifyMaskToken(char token[]);
-
- void doInstallIOErrorHandler();
-
---- XFree86-3.3.3.1/xc/programs/xfwp/xfwp.man.ipv6 Tue Dec 24 11:04:47 1996
-+++ XFree86-3.3.3.1/xc/programs/xfwp/xfwp.man Thu Jun 24 12:39:47 1999
-@@ -206,7 +206,7 @@
- packet-filtering routers. It contains zero or more source-destination
- rules of the following form:
- .PP
--[#]{permit | deny} <src> <src mask> [<dest> <dest mask> [<operator> <service>]]
-+[#]{permit | deny} <src> <src len> [<dest> <dest len> [<operator> <service>]]
- .sp
- .IP # 12
- comment delimiter; evaluator will skip these lines
-@@ -214,21 +214,21 @@
- the keywords ``permit'' or ``deny'' indicate whether the
- rule will enable or disable access, respectively
- .IP src 12
--the IP address against the host who originated the
--connection request will be matched, expressed in IP
--format (x.x.x.x)
--.IP "src mask" 12
--a subnet mask, also in IP format, for further qualifying
--the source mask. Bits set in the mask indicate bits of the
-+the IPv6 address against the host who originated the
-+connection request will be matched, expressed in IPv6
-+format (x:x:x:x:x:x:x:x)
-+.IP "src len" 12
-+a prefix length, a number between 0 and 128, for further qualifying
-+the source prefix. Bits after the prefix indicate bits of the
- incoming address to be \fIignored\fP when comparing to the specified src
- .IP dest 12
--the IP address against which the destination of the
--incoming connection request (i.e. the host IP of the
-+the IPv6 address against which the destination of the
-+incoming connection request (i.e. the host IPv6 of the
- X server to which the incoming client is attempting to
- connect) will be matched
--.IP "dest mask" 12
--a subnet mask, also in IP format, for further qualifying
--the destination mask. Bits set in the mask indicate bits of the
-+.IP "dest len" 12
-+a prefix length, a number between 0 and 128, for further qualifying
-+the destination prefix. Bits after the prefix indicate bits of the
- destination address to be \fIignored\fP when comparing to the specified dest
- .IP operator 12
- always ``eq'' (if the service field is not NULL)
-@@ -267,8 +267,8 @@
- .RS 3
- while (more entries to check)
- {
-- if ((<originator IP> AND (NOT <src mask>)) == src)
-- [if ((<dest X server IP> AND (NOT <dest mask>)) == dest)]
-+ if ((<originator IPv6> AND (<src prefix>)) == src)
-+ [if ((<dest X server IPv6> AND (<dest prefix>)) == dest)]
- [if (service fields present and matching)]
- do either permit or deny connection depending on keyword
- else
-@@ -312,22 +312,22 @@
- require policy1
- require policy2
- #
--# deny pm connections originating on 8.7.6.5 [NOTE: If pm service
-+# deny pm connections originating on 8:7:6:5:4:3:2:1 [NOTE: If pm service
- # is explicitly qualified, line must include destination fields as
- # shown.]
- #
--deny 8.7.6.5 0.0.0.0 0.0.0.0 255.255.255.255 eq pm
-+deny 8:7:6:5:4:3:2:1 128 :: 0 eq pm
- #
- # permit xfindproxy X server connects to anywhere [NOTE: If
- # fp service is explicitly qualified, line must include source fields
- # as shown.]
- #
--permit 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 eq fp
-+permit :: 0 :: 0 eq fp
- #
--# permit all connection types originating from the 192.0.0.0
--# IP domain only
-+# permit all connection types originating from the fec0::/10
-+# IPv6 domain only
- #
--permit 192.0.0.0 0.255.255.255
-+permit fec0:: 10
- .fi
- \fP
- .PP
---- XFree86-3.3.3.1/xc/programs/xhost/xhost.c.ipv6 Sun Sep 13 15:15:59 1998
-+++ XFree86-3.3.3.1/xc/programs/xhost/xhost.c Thu Jun 24 12:39:47 1999
-@@ -75,6 +75,7 @@
- #endif
- #include <netdb.h>
- #include <netinet/in.h>
-+#include <resolv.h>
- #else
- #include <server/ip/gen/socket.h>
- #include <server/ip/types.h>
-@@ -153,6 +154,9 @@
- #ifdef AF_INET
- { AF_INET, FamilyInternet },
- #endif
-+#ifdef AF_INET6
-+ { AF_INET6, FamilyInternet },
-+#endif
- };
-
- #define FAMILIES ((sizeof familyMap)/(sizeof familyMap[0]))
-@@ -184,6 +188,12 @@
-
- ProgramName = argv[0];
-
-+#ifdef NEEDSOCKETS
-+ if ((_res.options & RES_INIT) == 0)
-+ (void)res_init();
-+ _res.options |= RES_USE_INET6;
-+#endif
-+
- if ((dpy = XOpenDisplay(NULL)) == NULL) {
- fprintf(stderr, "%s: unable to open display \"%s\"\n",
- ProgramName, XDisplayName (NULL));
-@@ -308,7 +318,7 @@
- #endif
- #ifdef NEEDSOCKETS
- #ifndef AMTCPCONN
-- static struct in_addr addr; /* so we can point at it */
-+ static struct in6_addr addr; /* so we can point at it */
- #else
- static ipaddr_t addr;
- #endif
-@@ -484,41 +494,30 @@
- }
- #ifdef NEEDSOCKETS
- /*
-- * First see if inet_addr() can grok the name; if so, then use it.
-- */
--#ifndef AMTCPCONN
-- if ((addr.s_addr = inet_addr(name)) != -1) {
--#else
-- if ((addr = inet_addr(name)) != -1) {
--#endif
-- ha.family = FamilyInternet;
-- ha.length = 4; /* but for Cray would be sizeof(addr.s_addr) */
-- ha.address = (char *)&addr; /* but for Cray would be &addr.s_addr */
-- if (add) {
-- XAddHost (dpy, &ha);
-- printf ("%s %s\n", name, add_msg);
-- } else {
-- XRemoveHost (dpy, &ha);
-- printf ("%s %s\n", name, remove_msg);
-- }
-- return 1;
-- }
-- /*
-+ * (gethostbyname knows how to handle litterals...)
- * Is it in the namespace?
- */
-- else if (((hp = gethostbyname(name)) == (struct hostent *)NULL)
-- || hp->h_addrtype != AF_INET) {
-+ if (((hp = gethostbyname(name)) == (struct hostent *)NULL)
-+ || hp->h_addrtype != AF_INET6) {
- return 0;
- } else {
- ha.family = XFamily(hp->h_addrtype);
-- ha.length = hp->h_length;
- #ifdef h_addr /* new 4.3bsd version of gethostent */
- {
- char **list;
-
- /* iterate over the hosts */
- for (list = hp->h_addr_list; *list; list++) {
-+ ha.length = hp->h_length;
- ha.address = *list;
-+#ifdef UNMAPPED_IPV4
-+ if ((ha.family == FamilyInternet) &&
-+ (ha.length == sizeof(struct in6_addr)) &&
-+ IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ha.address)) {
-+ ha.length = sizeof(struct in_addr);
-+ ha.address += sizeof(struct in6_addr) - sizeof(struct in_addr);
-+ }
-+#endif
- if (add) {
- XAddHost (dpy, &ha);
- } else {
-@@ -527,7 +526,16 @@
- }
- }
- #else
-+ ha.length = hp->h_length;
- ha.address = hp->h_addr;
-+#ifdef UNMAPPED_IPV4
-+ if ((ha.family == FamilyInternet) &&
-+ (ha.length == sizeof(struct in6_addr)) &&
-+ IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ha.address)) {
-+ ha.length = sizeof(struct in_addr);
-+ ha.address += sizeof(struct in6_addr) - sizeof(struct in_addr);
-+ }
-+#endif
- if (add) {
- XAddHost (dpy, &ha);
- } else {
-@@ -545,7 +553,7 @@
-
- /*
- * get_hostname - Given an internet address, return a name (CHARON.MIT.EDU)
-- * or a string representing the address (18.58.0.13) if the name cannot
-+ * or a string representing the address (::ffff:18.58.0.13) if the name cannot
- * be found.
- */
-
-@@ -556,7 +564,7 @@
- {
- #if defined(TCPCONN) || defined(STREAMSCONN) || defined(AMTCPCONN)
- struct hostent *hp = NULL;
-- char *inet_ntoa();
-+ static char v[64];
- #endif
- #ifdef DNETCONN
- struct nodeent *np;
-@@ -571,12 +579,6 @@
-
- #if defined(TCPCONN) || defined(STREAMSCONN) || defined(AMTCPCONN)
- if (ha->family == FamilyInternet) {
--#ifdef CRAY
-- struct in_addr t_addr;
-- bzero((char *)&t_addr, sizeof(t_addr));
-- bcopy(ha->address, (char *)&t_addr, 4);
-- ha->address = (char *)&t_addr;
--#endif
- /* gethostbyaddr can take a LONG time if the host does not exist.
- Assume that if it does not respond in NAMESERVER_TIMEOUT seconds
- that something is wrong and do not make the user wait.
-@@ -586,16 +588,17 @@
- signal(SIGALRM, nameserver_lost);
- alarm(4);
- if (setjmp(env) == 0) {
-- hp = gethostbyaddr (ha->address, ha->length, AF_INET);
-+ hp = gethostbyaddr (ha->address, ha->length,
-+ ha->length == 4 ? AF_INET : AF_INET6);
- }
- alarm(0);
- if (hp)
- return (hp->h_name);
--#ifndef AMTCPCONN
-- else return (inet_ntoa(*((struct in_addr *)(ha->address))));
--#else
-- else return (inet_ntoa(*((ipaddr_t *)(ha->address))));
--#endif
-+ else {
-+ inet_ntop(ha->length == 4 ? AF_INET : AF_INET6,
-+ ha->address, v, sizeof(v));
-+ return (v);
-+ }
- }
- #endif
- if (ha->family == FamilyNetname) {
+++ /dev/null
-diff -urN xc.orig/config/cf/xfree86.cf xc/config/cf/xfree86.cf
---- xc.orig/config/cf/xfree86.cf Mon Dec 30 15:52:31 2002
-+++ xc/config/cf/xfree86.cf Mon Dec 30 20:44:34 2002
-@@ -1122,7 +1122,7 @@
- && !defined(ia64Architecture) \
- && !defined(s390xArchitecture) \
- && !defined (x86_64Architecture)
--# define BuildPexExt NO /* But we turn off PEX anyway now */
-+# define BuildPexExt YES /* But we turn off PEX anyway now */
- # else
- # define BuildPexExt NO
- # endif
-@@ -1363,7 +1363,7 @@
- */
- #ifndef BuildXIE
- # if XF86Server
--# define BuildXIE NO
-+# define BuildXIE YES
- # else
- # define BuildXIE NO
- # endif
-diff -urN xc.orig/programs/xdpyinfo/Imakefile xc/programs/xdpyinfo/Imakefile
---- xc.orig/programs/xdpyinfo/Imakefile Mon Dec 30 15:54:07 2002
-+++ xc/programs/xdpyinfo/Imakefile Mon Dec 30 20:40:08 2002
-@@ -10,11 +10,6 @@
- SHMDEFINES = -DMITSHM
- #endif
-
--#if BuildXIElib
-- XIEDEFINES = -DXIE
-- XIEDEPLIBS = $(DEPXIELIB)
-- XIELIBS = $(XIELIB)
--#endif
-
- #if BuildXF86VidModeLibrary
- VIDMODEDEFINES = -DXF86VIDMODE
+++ /dev/null
-diff -urN xc.org/config/cf/Imake.cf xc/config/cf/Imake.cf
---- xc.org/config/cf/Imake.cf 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/Imake.cf 2003-11-21 15:20:56.000000000 +0100
-@@ -766,6 +766,10 @@
- # define s390Architecture
- # undef __s390__
- # endif /* s390 */
-+# ifdef alpha
-+# define AlphaArchitecture
-+# undef alpha
-+# endif /* alpha */
- # ifdef __alpha
- # define AlphaArchitecture
- # undef __alpha
-diff -urN xc.org/config/cf/Imake.tmpl xc/config/cf/Imake.tmpl
---- xc.org/config/cf/Imake.tmpl 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/Imake.tmpl 2003-11-21 15:20:56.000000000 +0100
-@@ -261,7 +261,7 @@
-
- #ifndef BuildHtmlManPages
- #ifdef RmanCmd
--#define BuildHtmlManPages YES
-+#define BuildHtmlManPages NO
- #else
- #define BuildHtmlManPages NO
- #endif
-@@ -854,11 +854,7 @@
- #define LintlibDir $(USRLIBDIR)/lint
- #endif
- #ifndef SystemManDirectory
--#if SystemV4
- #define SystemManDirectory /usr/share/man
--#else
--#define SystemManDirectory /usr/man
--#endif
- #endif
- #ifndef ManDirectoryRoot
- #ifdef ProjectRoot
-@@ -998,7 +994,7 @@
- #define NoRConst NO /* YES if const for structs of funcs is bad */
- #endif
- #ifndef InstPgmFlags
--#define InstPgmFlags -s
-+#define InstPgmFlags
- #endif
- #ifndef InstBinFlags
- #define InstBinFlags -m 0755
-@@ -1140,7 +1136,7 @@
- #define CppCmd /LibDirName/cpp
- #endif
- #ifndef RawCppCmd
--#define RawCppCmd CppCmd -undef
-+#define RawCppCmd CppCmd
- #endif
- #ifndef CppNoLineInfoOption
- #define CppNoLineInfoOption /**/
-diff -urN xc.org/config/cf/linux.cf xc/config/cf/linux.cf
---- xc.org/config/cf/linux.cf 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/linux.cf 2003-11-21 15:20:56.000000000 +0100
-@@ -325,7 +325,7 @@
- */
- #if BuildXF86DRI
- # if defined(i386Architecture)
--# define BuildLibGlxWithoutPIC YES
-+# define BuildLibGlxWithoutPIC NO
- # endif
- #endif
-
-@@ -740,7 +740,7 @@
-
- #define HasVarRun YES
- #ifndef VarDbDirectory
--# define VarDbDirectory $(VARDIR)/lib
-+# define VarDbDirectory /var/lib
- #endif
-
- #ifndef XF86OSCardDrivers
-diff -urN xc.org/config/cf/site.def xc/config/cf/site.def
---- xc.org/config/cf/site.def 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/site.def 2003-11-21 15:20:56.000000000 +0100
-@@ -119,10 +119,14 @@
- #define HasSentinel YES
- */
-
--/*
- #undef DefaultUserPath
--#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
--*/
-+#define DefaultUserPath /usr/local/bin:/bin:/usr/bin:$(BINDIR)
-+#undef DefaultSystemPath
-+#define DefaultSystemPath /sbin:/bin:/usr/sbin:/usr/bin:$(BINDIR)
-+
-+
-+#define HasPam YES
-+#define HasPamMisc YES
-
-
- /* You do NOT need SetUID if you only run the server under xdm */
-diff -urN xc.org/config/cf/X11.tmpl xc/config/cf/X11.tmpl
---- xc.org/config/cf/X11.tmpl 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/X11.tmpl 2003-11-21 15:20:56.000000000 +0100
-@@ -1261,8 +1261,12 @@
- # define UsbMouseSupport NO
- #endif
-
-+#ifndef EtcX11Directory
-+#define EtcX11Directory /etc/X11
-+#endif
-+
- #ifndef DefaultFSConfigFile
--#define DefaultFSConfigFile $(LIBDIR)/fs/config
-+#define DefaultFSConfigFile $(ETCX11DIR)/fs/config
- #endif
-
- /* X-TrueType settings */
-@@ -1385,7 +1389,7 @@
- #define ConfigDir $(LIBDIR)/config
- #endif
- #ifndef DocDir
--#define DocDir $(LIBDIR)/doc
-+#define DocDir $(LIBDIR)/share/doc
- #endif
- #ifndef DocHtmlDir
- #define DocHtmlDir $(DOCDIR)/html
-@@ -1397,31 +1401,31 @@
- #define DocPdfDir $(DOCDIR)/PDF
- #endif
- #ifndef FontDir
--#define FontDir $(LIBDIR)/fonts
-+#define FontDir /usr/share/fonts
- #endif
- #ifndef AdmDir
--#define AdmDir /usr/adm
-+#define AdmDir /var/log
- #endif
- #ifndef XinitDir
--#define XinitDir $(LIBDIR)/xinit
-+#define XinitDir $(ETCX11DIR)/xinit
- #endif
- #ifndef XdmDir
--#define XdmDir $(LIBDIR)/xdm
-+#define XdmDir $(ETCX11DIR)/xdm
- #endif
- #ifndef XdmVarDir
- #define XdmVarDir $(VARLIBDIR)/xdm
- #endif
- #ifndef XdmAuthDir
--#define XdmAuthDir $(LIBDIR)/xdm
-+#define XdmAuthDir $(ETCX11DIR)/xdm
- #endif
- #ifndef XdmConfigurationSubdirectory /* under xdm sources */
- #define XdmConfigurationSubdirectory config
- #endif
- #ifndef TwmDir
--#define TwmDir $(LIBDIR)/twm
-+#define TwmDir $(ETCX11DIR)/twm
- #endif
- #ifndef XsmDir
--#define XsmDir $(LIBDIR)/xsm
-+#define XsmDir $(ETCX11DIR)/xsm
- #endif
- #ifndef NlsDir
- #define NlsDir $(LIBDIR)/nls
-@@ -1430,23 +1434,20 @@
- #define XLocaleDir $(LIBDIR)/locale
- #endif
- #ifndef LbxproxyDir
--#define LbxproxyDir $(LIBDIR)/lbxproxy
-+#define LbxproxyDir $(ETCX11DIR)/lbxproxy
- #endif
- #ifndef LbxproxyConfigSubdir /* under lbxproxy sources */
- #define LbxproxyConfigSubdir config
- #endif
- #ifndef ProxyManagerDir
--#define ProxyManagerDir $(LIBDIR)/proxymngr
-+#define ProxyManagerDir $(ETCX11DIR)/proxymngr
- #endif
- #ifndef ServerConfigDir
--#define ServerConfigDir $(LIBDIR)/xserver
-+#define ServerConfigDir $(ETCX11DIR)/xserver
- #endif
- #ifndef XPrintDir
- #define XPrintDir ServerConfigDir
- #endif
--#ifndef EtcX11Directory
--#define EtcX11Directory /etc/X11
--#endif
- #ifndef InstallSecurityConfig
- #define InstallSecurityConfig YES /* Install sample security policy */
- #endif
-@@ -1478,10 +1479,10 @@
- #define OsNameDefines /* as nothing */
- #endif
- #ifndef DefaultUserPath /* for xdm */
--#define DefaultUserPath :/bin:/usr/bin:$(BINDIR):/usr/ucb
-+#define DefaultUserPath /usr/local/bin:/bin:/usr/bin:$(BINDIR)
- #endif
- #ifndef DefaultSystemPath /* for xdm */
--#define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR):/usr/ucb
-+#define DefaultSystemPath /sbin:/bin:/usr/sbin:/usr/bin:$(BINDIR)
- #endif
- #ifndef DefaultSystemShell /* for xdm to set in SHELL */
- #define DefaultSystemShell BourneShell
-@@ -1608,7 +1609,7 @@
-
- HTMLINDEXCMD = HtmlIndexCmd
-
-- DOCUTILSRC = $(XTOP)/doc/util
-+ DOCUTILSRC = $(XTOP)/share/doc/util
- CLIENTSRC = $(TOP)/clients
- DEMOSRC = $(TOP)/demos
- XDOCMACROS = $(DOCUTILSRC)/macros.t
-@@ -1622,7 +1623,7 @@
- SERVERSRC = $(XTOP)/programs/Xserver
- CONTRIBSRC = ContribDir
- UNSUPPORTEDSRC = UnsupportedDir
-- DOCSRC = $(XTOP)/doc
-+ DOCSRC = $(XTOP)/share/doc
- RGBSRC = $(XTOP)/programs/rgb
- BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
- MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
-diff -urN xc.org/config/cf/xf86site.def xc/config/cf/xf86site.def
---- xc.org/config/cf/xf86site.def 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/xf86site.def 2003-11-21 15:20:56.000000000 +0100
-@@ -260,8 +260,8 @@
- /*
- * To not build/install the Cyrillic fonts, uncomment the following
- *
--#define BuildCyrillicFonts NO
- */
-+#define BuildCyrillicFonts YES
-
- /*
- * To not install the local font directory, uncomment the following
-@@ -307,27 +307,26 @@
- * HasGlide2 to YES and set the Glide2IncDir variable.
- * HasGlide2 is per default NO.
- *
--#define HasGlide2 YES
- */
-+#define HasGlide2 YES
-
- /*
- * Set the path to your Glide include files.
- *
--#define Glide2IncDir /usr/include/glide
- */
-+#define Glide2IncDir /usr/include/glide
-
- /*
- * Have glide 3?
- *
--#define HasGlide3 YES
- */
-+#define HasGlide3 YES
-
- /*
- * Set the path to your Glide 3 include files.
- *
--#define Glide3IncDir /usr/include/glide3
- */
--
-+#define Glide3IncDir /usr/include/glide3
-
-
- /*
-@@ -429,8 +428,8 @@
- * Some Linux releases don't have a libtermcap. In this case you may need
- * to uncomment the following
- *
--#define TermcapLibrary -lncurses
- */
-+#define TermcapLibrary -lncurses
-
- /*
- * Build a server that dynamically loads the modules by setting
-@@ -605,8 +604,8 @@
- * To forceably build static libraries in addition to shared libraries,
- * uncomment this.
- *
--#define ForceNormalLib YES
- */
-+#define ForceNormalLib YES
-
- /*
- * Uncomment this if your default tools (eg, gcc, ld, as, etc) are
-diff -urN xc.org/config/cf/xfree86.cf xc/config/cf/xfree86.cf
---- xc.org/config/cf/xfree86.cf 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/cf/xfree86.cf 2003-11-21 15:20:56.000000000 +0100
-@@ -128,7 +128,7 @@
- #define XConfigFile XF86Config
- #endif
- #ifndef XConfigDir
--#define XConfigDir $(LIBDIR)
-+#define XConfigDir $(ETCX11DIR)
- #endif
- #ifndef XLogFile
- #define XLogFile XFree86
-@@ -760,7 +760,7 @@
-
- # ifndef XF86CardDrivers
- # define XF86CardDrivers mga glint nv s3 s3virge sis savage \
-- trident chips tdfx fbdev ati \
-+ trident chips fbdev ati \
- DevelDrivers newport \
- XF86OSCardDrivers XF86ExtraCardDrivers
- # endif
-diff -urN xc.org/config/imake/imake.c xc/config/imake/imake.c
---- xc.org/config/imake/imake.c 2003-11-21 15:13:57.000000000 +0100
-+++ xc/config/imake/imake.c 2003-11-21 15:20:56.000000000 +0100
-@@ -1057,6 +1057,7 @@
- static char* suse = "/etc/SuSE-release";
- static char* redhat = "/etc/redhat-release";
- static char* debian = "/etc/debian_version";
-+ static char* pld = "/etc/pld-release";
-
- fprintf (inFile, "%s\n", "#define LinuxUnknown 0");
- fprintf (inFile, "%s\n", "#define LinuxSuSE 1");
-@@ -1071,6 +1072,7 @@
- fprintf (inFile, "%s\n", "#define LinuxTurbo 10");
- fprintf (inFile, "%s\n", "#define LinuxWare 11");
- fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12");
-+ fprintf (inFile, "%s\n", "#define LinuxPLD 13");
-
- #ifdef CROSSCOMPILE
- if (CrossCompiling) {
-@@ -1097,6 +1099,11 @@
- * at the content of /etc/debian_version */
- return;
- }
-+ if (lstat (pld, &sb) == 0) {
-+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxPLD");
-+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistName PLD");
-+ return;
-+ }
- /* what's the definitive way to tell what any particular distribution is? */
-
- fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown");
-diff -urN xc.org/Makefile xc/Makefile
---- xc.org/Makefile 2003-11-21 15:13:57.000000000 +0100
-+++ xc/Makefile 2003-11-21 15:20:56.000000000 +0100
-@@ -8,7 +8,7 @@
- # or add "MAKE = make" to this file.
-
- RELEASE = "Release 6.6"
--SHELL = /bin/sh
-+SHELL = /bin/sh -e
- RM = rm -f
- MV = mv
- WORLDOPTS =
-diff -urN xc.org/programs/xdm/config/Xres.cpp xc/programs/xdm/config/Xres.cpp
---- xc.org/programs/xdm/config/Xres.cpp 2003-11-21 15:18:39.000000000 +0100
-+++ xc/programs/xdm/config/Xres.cpp 2003-11-21 15:21:45.000000000 +0100
-@@ -71,9 +71,9 @@
- XHASHendif
- #ifdef XPM
- XHASHif PLANES >= 8
--xlogin*logoFileName: BITMAPDIR/**//XDM_PIXMAP
-+xlogin*logoFileName: BITMAPDIR/**//xdm-pld-logo.xpm
- XHASHelse
--xlogin*logoFileName: BITMAPDIR/**//XDM_BWPIXMAP
-+xlogin*logoFileName: BITMAPDIR/**//xdm-pld-logo-bw.xpm
- XHASHendif
- xlogin*useShape: true
- xlogin*logoPadding: 10
-diff -urN xc.org/programs/xdm/resource.c xc/programs/xdm/resource.c
---- xc.org/programs/xdm/resource.c 2003-11-21 15:18:38.000000000 +0100
-+++ xc/programs/xdm/resource.c 2003-11-21 15:20:56.000000000 +0100
-@@ -84,31 +84,31 @@
- */
- #ifndef __EMX__
- #ifndef DEF_SERVER_LINE
--#define DEF_SERVER_LINE ":0 local /usr/bin/X11/X :0"
-+#define DEF_SERVER_LINE ":0 local /usr/X11R6/bin/X :0"
- #endif
- #ifndef XRDB_PROGRAM
--#define XRDB_PROGRAM "/usr/bin/X11/xrdb"
-+#define XRDB_PROGRAM "/usr/X11R6/X11/xrdb"
- #endif
- #ifndef DEF_SESSION
--#define DEF_SESSION "/usr/bin/X11/xterm -ls"
-+#define DEF_SESSION "/usr/X11R6/bin/xterm -ls"
- #endif
- #ifndef DEF_USER_PATH
--#define DEF_USER_PATH ":/bin:/usr/bin:/usr/bin/X11:/usr/ucb"
-+#define DEF_USER_PATH "/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin"
- #endif
- #ifndef DEF_SYSTEM_PATH
--#define DEF_SYSTEM_PATH "/etc:/bin:/usr/bin:/usr/bin/X11:/usr/ucb"
-+#define DEF_SYSTEM_PATH "/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"
- #endif
- #ifndef DEF_SYSTEM_SHELL
- #define DEF_SYSTEM_SHELL "/bin/sh"
- #endif
- #ifndef DEF_FAILSAFE_CLIENT
--#define DEF_FAILSAFE_CLIENT "/usr/bin/X11/xterm"
-+#define DEF_FAILSAFE_CLIENT "/usr/X11R6/bin/xterm"
- #endif
- #ifndef DEF_XDM_CONFIG
--#define DEF_XDM_CONFIG "/usr/lib/X11/xdm/xdm-config"
-+#define DEF_XDM_CONFIG "/etc/X11/xdm/xdm-config"
- #endif
- #ifndef DEF_CHOOSER
--#define DEF_CHOOSER "/usr/lib/X11/xdm/chooser"
-+#define DEF_CHOOSER "/etc/X11/xdm/chooser"
- #endif
- #ifndef DEF_AUTH_NAME
- #ifdef HASXDMAUTH
-@@ -118,7 +118,7 @@
- #endif
- #endif
- #ifndef DEF_AUTH_DIR
--#define DEF_AUTH_DIR "/usr/lib/X11/xdm"
-+#define DEF_AUTH_DIR "/etc/X11/xdm"
- #endif
- #ifndef DEF_USER_AUTH_DIR
- #define DEF_USER_AUTH_DIR "/tmp"
-diff -urN xc.org/programs/xinit/Imakefile xc/programs/xinit/Imakefile
---- xc.org/programs/xinit/Imakefile 2003-11-21 15:18:47.000000000 +0100
-+++ xc/programs/xinit/Imakefile 2003-11-21 15:20:56.000000000 +0100
-@@ -46,11 +46,12 @@
- #endif
- InstallManPage(startx,$(MANDIR))
-
--#if InstallXinitConfig
--InstallNonExecFile($(SAMPLECONFIG),$(XINITDIR))
--#else
--InstallNonExecFileNoClobber($(SAMPLECONFIG),$(XINITDIR))
--#endif
-+XCOMM Red Hat gets this from a different package
-+XCOMM #if InstallXinitConfig
-+XCOMM InstallNonExecFile($(SAMPLECONFIG),$(XINITDIR))
-+XCOMM #else
-+XCOMM InstallNonExecFileNoClobber($(SAMPLECONFIG),$(XINITDIR))
-+XCOMM #endif
-
- LinkConfDirectory(xinit,.,xinit,.)
-
-diff -urN xc.org/programs/Xserver/hw/xfree86/xf86cfg/Imakefile xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile
---- xc.org/programs/Xserver/hw/xfree86/xf86cfg/Imakefile 2003-11-21 15:17:43.000000000 +0100
-+++ xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile 2003-11-21 15:20:56.000000000 +0100
-@@ -100,7 +100,7 @@
-
- #if HasNCurses
- CURSESLIB = NCursesLibName
--CURSESDEFINES = -DHAS_NCURSES
-+CURSESDEFINES = -DHAS_NCURSES -I/usr/include/ncurses
- #endif
-
- XF86CONFIGFILE = XConfigFile
-diff -urN xc.org/programs/xterm/Imakefile xc/programs/xterm/Imakefile
---- xc.org/programs/xterm/Imakefile 2003-11-21 15:19:09.000000000 +0100
-+++ xc/programs/xterm/Imakefile 2003-11-21 15:20:56.000000000 +0100
-@@ -36,6 +36,10 @@
- #define XkbClientLibs /**/
- #endif
-
-+#if InstallXtermSetUID
-+#undef InstallXtermSetUID
-+#endif
-+
- #ifndef SpecialCObjectRule
- #define SpecialCObjectRule(module,ignore,defines) \
- module.o: ; $(CC) -c defines $(CFLAGS) module.c
-@@ -57,6 +61,8 @@
- PTYLIB = -lpucc
- #endif
-
-+ PTYLIB = -lutil
-+
- #if defined(NetBSDArchitecture) || defined(OpenBSDArchitecture) || \
- (defined(LinuxArchitecture) && \
- (LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion < 1))
-@@ -115,7 +121,7 @@
- MISC_DEFINES = /* -DALLOWLOGGING -DALLOWLOGFILEEXEC */
- XKB_DEFINES = XkbClientDefines
- PATH_DEFINES = -DPROJECTROOT=$(PROJECTROOT)
-- DEFINES = -I. $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(TRACEDEF)
-+ DEFINES = -I. -I/usr/include/ncurses $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(TRACEDEF)
- INCLUDES = $(XRFINCLUDES)
-
- #ifdef OS2Architecture
-diff -urN xc.org/programs/xterm/xterm.h xc/programs/xterm/xterm.h
---- xc.org/programs/xterm/xterm.h 2003-11-21 15:19:12.000000000 +0100
-+++ xc/programs/xterm/xterm.h 2003-11-21 15:20:56.000000000 +0100
-@@ -73,7 +73,7 @@
- #endif
-
- #ifndef DFT_TERMTYPE
--#define DFT_TERMTYPE "xterm"
-+#define DFT_TERMTYPE "xterm-color"
- #endif
-
- #ifndef X_NOT_POSIX
+++ /dev/null
-X server used to crash after XF86VidModeSwitchToMode() failure,
-because of unconditional currentMode info destruction.
-
-E.g. (the case I investigated) when screen resolution set by RandR was
-lower than requested by XF86VidModeSwitchToMode(), xf86SwitchMode is
-unsuccessful; due to currentMode == NULL (in some way) DRIAdjustFrame()
-called itself recursively again and again, leading to stack overflow.
-
-This patch seems to avoid the crash.
-
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/common/xf86VidMode.c.orig Tue Jan 28 21:52:28 2003
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/common/xf86VidMode.c Sat Mar 8 01:05:00 2003
-@@ -330,6 +330,8 @@
- VidModeSwitchMode(int scrnIndex, pointer mode)
- {
- ScrnInfoPtr pScrn;
-+ DisplayModePtr pTmpMode;
-+ Bool retval;
-
- DEBUG_P("VidModeSwitchMode");
-
-@@ -338,8 +340,12 @@
-
- pScrn = xf86Screens[scrnIndex];
- /* Force a mode switch */
-+ pTmpMode = pScrn->currentMode;
- pScrn->currentMode = NULL;
-- return xf86SwitchMode(pScrn->pScreen, mode);
-+ retval = xf86SwitchMode(pScrn->pScreen, mode);
-+ if (retval == FALSE)
-+ pScrn->currentMode = pTmpMode;
-+ return retval;
- }
-
- Bool
+++ /dev/null
-Binary files XFree86-3.3.5.orig/xc/doc/specs/XIE/XIEProto/ch8_xie.doc and XFree86-3.3.5/xc/doc/specs/XIE/XIEProto/ch8_xie.doc differ
-diff -urN XFree86-3.3.5.orig/xc/programs/Xserver/hw/xfree86/common/xf86Config.c XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/common/xf86Config.c
---- XFree86-3.3.5.orig/xc/programs/Xserver/hw/xfree86/common/xf86Config.c Thu Jul 29 11:22:44 1999
-+++ XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/common/xf86Config.c Thu Sep 2 19:42:40 1999
-@@ -774,11 +774,11 @@
- }
-
- /*
-- * /etc/XF86Config
-+ * /etc/X11/XF86Config
- */
- configPaths[++pcount] = (char *)xalloc(PATH_MAX);
- #if !defined(__QNX__) || defined(__QNXNTO__)
-- strcpy(configPaths[pcount], "/etc/XF86Config");
-+ strcpy(configPaths[pcount], "/etc/X11/XF86Config");
- #else
- /* On QNX, we default to /etc/config/XF86Config.nid to
- * keep config files separate for network setups
+++ /dev/null
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/XF86Setup/filelist.tcl~ Mon Nov 16 14:13:41 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/XF86Setup/filelist.tcl Sat Jun 19 16:19:34 1999
-@@ -48,8 +48,8 @@
- lib/X11/fonts/misc/fonts.dir 444
- lib/X11/fonts/misc/fonts.alias 444
- lib/X11/fonts/misc/6x13.pc* 444
-- lib/X11/fonts/75dpi/fonts.dir 444
-- lib/X11/fonts/75dpi/symb10.pc* 444
-+ lib/X11/fonts/*dpi/fonts.dir 444
-+ lib/X11/fonts/*dpi/symb10.pc* 444
- }
-
- array set FilePermsDB {
+++ /dev/null
-diff -Nru xc.orig/programs/Xserver/hw/xfree86/xf86Version.h xc/programs/Xserver/hw/xfree86/xf86Version.h
---- xc.orig/programs/Xserver/hw/xfree86/xf86Version.h 2003-06-25 13:07:21.000000000 +0200
-+++ xc/programs/Xserver/hw/xfree86/xf86Version.h 2003-06-27 14:04:29.000000000 +0200
-@@ -19,7 +19,7 @@
- /* Define these for compatibility. They'll be removed at some point. */
- #define XF86_VERSION_SUBMINOR XF86_VERSION_PATCH
- #define XF86_VERSION_BETA 0
--#define XF87_VERSION_ALPHA XF86_VERSION_SNAP
-+#define XF86_VERSION_ALPHA XF86_VERSION_SNAP
-
- #define XF86_VERSION_CURRENT \
- XF86_VERSION_NUMERIC(XF86_VERSION_MAJOR, \
+++ /dev/null
---- xc/programs/xterm/XTerm-col.ad.orig 2003-09-25 13:06:59.000000000 +0200
-+++ xc/programs/xterm/XTerm-col.ad 2003-10-01 20:48:30.453913496 +0200
-@@ -11,8 +11,8 @@
- !*VT100*background: black
-
- ! Uncomment this to use color for underline attribute
--!*VT100*colorULMode: on
--!*VT100*underLine: off
-+*VT100*colorULMode: on
-+*VT100*underLine: on
-
- ! Uncomment this to use color for the bold attribute
- !*VT100*colorBDMode: on
---- xc/programs/xterm/XTerm.ad.orig 2003-09-25 13:06:59.000000000 +0200
-+++ xc/programs/xterm/XTerm.ad 2003-10-01 20:49:35.565015104 +0200
-@@ -107,3 +107,176 @@
- *tek4014*font2: 8x13
- *tek4014*font3: 6x13
- *tek4014*fontSmall: 6x10
-+
-+! This file causes when loaded using xrdb correct behaviour of xterm
-+! if you are using enclosed xterm.tcap and xterm.ti.
-+! Some keys would never normally work if they weren't here (like Alt
-+! something), some key definitions differ from one termcap/terminfo
-+! to the other. You may delete any line if you find out that mc
-+! sends exactly that string which is mentioned here.
-+! See xterm(1).
-+! Either put this into your ~/.Xdefaults, or to app-defaults/XTerm
-+! or wherever it will be loaded into xrm from.
-+! To know, why this works, see Xt documentation (appendix B).
-+! On some systems you may want to replace the a (alt) modifiers with
-+! m (meta) modifier in front of some <Key> events.
-+*vt100.translations: #override \
-+ Alt Ctrl<Btn4Down>: string(0x1b) string("OA")\n\
-+ Alt Ctrl<Btn5Down>: string(0x1b) string("OB")\n\
-+ Alt<Btn4Down>: string(0x1b) string("OA") string(0x1b) string("OA") string(0x1b) string("OA") string(0x1b) string("OA") string(0x1b) string("OA")\n\
-+ Alt<Btn5Down>: string(0x1b) string("OB") string(0x1b) string("OB") string(0x1b) string("OB") string(0x1b) string("OB") string(0x1b) string("OB")\n\
-+ Shift<Btn4Down>: scroll-back(1,page)\n\
-+ Shift<Btn5Down>: scroll-forw(1,page)\n\
-+ Ctrl<Btn4Down>: scroll-back(1,line)\n\
-+ Ctrl<Btn5Down>:scroll-forw(1,line)\n\
-+ <Btn4Down>: scroll-back(5,line)\n\
-+ <Btn5Down>: scroll-forw(5,line)\n\
-+ @Num_Lock<Key>KP_0: string(0)\n\
-+ @Num_Lock<Key>KP_1: string(1)\n\
-+ @Num_Lock<Key>KP_2: string(2)\n\
-+ @Num_Lock<Key>KP_3: string(3)\n\
-+ @Num_Lock<Key>KP_4: string(4)\n\
-+ @Num_Lock<Key>KP_5: string(5)\n\
-+ @Num_Lock<Key>KP_6: string(6)\n\
-+ @Num_Lock<Key>KP_7: string(7)\n\
-+ @Num_Lock<Key>KP_8: string(8)\n\
-+ @Num_Lock<Key>KP_9: string(9)\n\
-+ @Num_Lock<Key>KP_Add: string(+)\n\
-+ @Num_Lock<Key>KP_Decimal: string(.)\n\
-+ @Num_Lock<Key>KP_Divide: string(/)\n\
-+ @Num_Lock<Key>KP_Enter: string(\015)\n\
-+ @Num_Lock<Key>KP_Equal: string(=)\n\
-+ @Num_Lock<Key>KP_Multiply: string(*)\n\
-+ @Num_Lock<Key>KP_Subtract: string(-)\n\
-+ <Key>KP_Add: string(+)\n\
-+ <Key>KP_Divide: string(/)\n\
-+ <Key>KP_Enter: string(\015)\n\
-+ <Key>KP_Equal: string(=)\n\
-+ <Key>KP_Multiply: string(*)\n\
-+ <Key>KP_Subtract: string(-)\n\
-+ Shift<Key>KP_Home: scroll-back(100,page)\n\
-+ Shift<Key>KP_End: scroll-forw(100,page)\n\
-+ <Key>KP_Home: string(0x1b) string("[1~")\n\
-+ <Key>KP_End: string(0x1b) string("[4~")\n\
-+ Shift<Key>Prior:scroll-back(1,page)\n\
-+ Shift<Key>Next:scroll-forw(1,page)\n\
-+ <Key>F16: start-extend() select-end(PRIMARY, CUT_BUFFER0, CLIPBOARD)\n\
-+ <Key>F18: insert-selection(PRIMARY, CLIPBOARD)\n\
-+ <Key>F27: scroll-back(100,page)\n\
-+ <Key>R13: scroll-forw(100,page)\n\
-+ Ctrl<Key>Home: string(0x1b) string("[1;5H")\n\
-+ Shift<Key>Home: string(0x1b) string("[1;2H")\n\
-+ ~Meta<Key>Home: string(0x1b) string("[1~")\n\
-+ Meta<Key>Home: string(0x1b) string(0x1b) string("[1~")\n\
-+ Ctrl<Key>End: string(0x1b) string("[1;5F")\n\
-+ Shift<Key>End: string(0x1b) string("[1;2F")\n\
-+ ~Meta<Key>End: string(0x1b) string("[4~")\n\
-+ Meta<Key>End: string(0x1b) string(0x1b) string("[4~")\n\
-+ Ctrl<Key>Insert: string(0x1b) string("[2;5~")\n\
-+ Shift<Key>Insert: string(0x1b) string("[2;2~")\n\
-+ ~Meta<Key>Insert: string(0x1b) string("[2~")\n\
-+ Meta<Key>Insert: string(0x1b) string(0x1b) string("[2~")\n\
-+ Ctrl<Key>Delete: string(0x1b) string("[3;5~")\n\
-+ Shift<Key>Delete: string(0x1b) string("[3;2~")\n\
-+ ~Meta<Key>Delete: string(0x1b) string("[3~")\n\
-+ Meta<Key>Delete: string(0x1b) string(0x1b) string("[3~")\n\
-+ Ctrl<Key>Page_Up: string(0x1b) string("[5;5~")\n\
-+ ~Meta<Key>Page_Up: string(0x1b) string("[5~")\n\
-+ Meta<Key>Page_Up: string(0x1b) string(0x1b) string("[5~")\n\
-+ Ctrl<Key>Page_Down: string(0x1b) string("[6;5~")\n\
-+ ~Meta<Key>Page_Down: string(0x1b) string("[6~")\n\
-+ Meta<Key>Page_Down: string(0x1b) string(0x1b) string("[6~")\n\
-+ ~Meta<Key>BackSpace: string(0x08)\n\
-+ Meta<Key>BackSpace: string(0x1b) string(0x08)\n\
-+ Ctrl<Key>Up: string(0x1b) string("[1;5A")\n\
-+ Shift<Key>Up: string(0x1b) string("O2A")\n\
-+ ~Meta<Key>Up: string(0x1b) string("OA")\n\
-+ Meta<Key>Up: string(0x1b) string(0x1b) string("OA")\n\
-+ Ctrl<Key>Down: string(0x1b) string("[1;5B")\n\
-+ Shift<Key>Down: string(0x1b) string("O2B")\n\
-+ ~Meta<Key>Down: string(0x1b) string("OB")\n\
-+ Meta<Key>Down: string(0x1b) string(0x1b) string("OB")\n\
-+ Ctrl<Key>Left: string(0x1b) string("[1;5D")\n\
-+ Shift<Key>Left: string(0x1b) string("O2D")\n\
-+ ~Meta<Key>Left: string(0x1b) string("OD")\n\
-+ Meta<Key>Left: string(0x1b) string(0x1b) string("OD")\n\
-+ Ctrl<Key>Right: string(0x1b) string("[1;5C")\n\
-+ Shift<Key>Right: string(0x1b) string("O2C")\n\
-+ ~Meta<Key>Right: string(0x1b) string("OC")\n\
-+ Meta<Key>Right: string(0x1b) string(0x1b) string("OC")\n\
-+ ~Meta<Key>Return: string(0x0d)\n\
-+ Meta<Key>Return: string(0x1b) string(0x0d)\n\
-+ ~Meta<Key>Tab: string(0x09)\n\
-+ Meta<Key>Tab: string(0x1b) string(0x09)\n\
-+ ~s<Key>F1: string(0x1b) string("[11~")\n\
-+ ~s<Key>F2: string(0x1b) string("[12~")\n\
-+ ~s<Key>F3: string(0x1b) string("[13~")\n\
-+ ~s<Key>F4: string(0x1b) string("[14~")\n\
-+ ~s<Key>F5: string(0x1b) string("[15~")\n\
-+ ~s<Key>F6: string(0x1b) string("[17~")\n\
-+ ~s<Key>F7: string(0x1b) string("[18~")\n\
-+ ~s<Key>F8: string(0x1b) string("[19~")\n\
-+ ~s<Key>F9: string(0x1b) string("[20~")\n\
-+ ~s<Key>F10: string(0x1b) string("[21~")\n\
-+ <Key>F11: string(0x1b) string("[23~")\n\
-+ <Key>F12: string(0x1b) string("[24~")\n\
-+ <Key>F13: string(0x1b) string("[25~")\n\
-+ <Key>F14: string(0x1b) string("[26~")\n\
-+ <Key>F15: string(0x1b) string("[28~")\n\
-+ <Key>F16: string(0x1b) string("[29~")\n\
-+ <Key>F17: string(0x1b) string("[31~")\n\
-+ <Key>F18: string(0x1b) string("[32~")\n\
-+ <Key>F19: string(0x1b) string("[33~")\n\
-+ <Key>F20: string(0x1b) string("[34~")\n\
-+ s<Key>F1: string(0x1b) string("[23~")\n\
-+ s<Key>F2: string(0x1b) string("[24~")\n\
-+ s<Key>F3: string(0x1b) string("[25~")\n\
-+ s<Key>F4: string(0x1b) string("[26~")\n\
-+ s<Key>F5: string(0x1b) string("[28~")\n\
-+ s<Key>F6: string(0x1b) string("[29~")\n\
-+ s<Key>F7: string(0x1b) string("[31~")\n\
-+ s<Key>F8: string(0x1b) string("[32~")\n\
-+ s<Key>F9: string(0x1b) string("[33~")\n\
-+ s<Key>F10: string(0x1b) string("[34~")\n\
-+ a<Key>Return: string(0x1b) string(0x0d)\n\
-+ a<Key>Tab: string(0x1b) string(0x09)\n\
-+ a<Key>space: string(0x1b) string(" ")\n\
-+ a s<Key>question: string(0x1b) string("?")\n\
-+ a s<Key>exclam: string(0x1b) string("!")\n\
-+ a<Key>1: string(0x1b) string("1")\n\
-+ a<Key>2: string(0x1b) string("2")\n\
-+ a<Key>3: string(0x1b) string("3")\n\
-+ a<Key>4: string(0x1b) string("4")\n\
-+ a<Key>5: string(0x1b) string("5")\n\
-+ a<Key>6: string(0x1b) string("6")\n\
-+ a<Key>7: string(0x1b) string("7")\n\
-+ a<Key>8: string(0x1b) string("8")\n\
-+ a<Key>9: string(0x1b) string("9")\n\
-+ a<Key>0: string(0x1b) string("0")\n\
-+ a<Key>a: string(0x1b) string("a")\n\
-+ a<Key>b: string(0x1b) string("b")\n\
-+ a<Key>c: string(0x1b) string("c")\n\
-+ a<Key>d: string(0x1b) string("d")\n\
-+ a<Key>e: string(0x1b) string("e")\n\
-+ a<Key>f: string(0x1b) string("f")\n\
-+ a<Key>g: string(0x1b) string("g")\n\
-+ a s<Key>h: string(0x1b) string("H")\n\
-+ a<Key>h: string(0x1b) string("h")\n\
-+ a<Key>i: string(0x1b) string("i")\n\
-+ a<Key>j: string(0x1b) string("j")\n\
-+ a<Key>k: string(0x1b) string("k")\n\
-+ a<Key>l: string(0x1b) string("l")\n\
-+ a<Key>m: string(0x1b) string("m")\n\
-+ a<Key>n: string(0x1b) string("n")\n\
-+ a<Key>o: string(0x1b) string("o")\n\
-+ a<Key>p: string(0x1b) string("p")\n\
-+ a<Key>q: string(0x1b) string("q")\n\
-+ a<Key>r: string(0x1b) string("r")\n\
-+ a<Key>s: string(0x1b) string("s")\n\
-+ a<Key>t: string(0x1b) string("t")\n\
-+ a<Key>u: string(0x1b) string("u")\n\
-+ a<Key>v: string(0x1b) string("v")\n\
-+ a<Key>w: string(0x1b) string("w")\n\
-+ a<Key>x: string(0x1b) string("x")\n\
-+ a<Key>y: string(0x1b) string("y")\n\
-+ a<Key>z: string(0x1b) string("z")
+++ /dev/null
---- XFree86-4.0/xc/lib/Xaw/Scrollbar.c.foo Mon May 15 17:04:02 2000
-+++ XFree86-4.0/xc/lib/Xaw/Scrollbar.c Mon May 15 17:07:30 2000
-@@ -831,6 +831,10 @@
- NotifyThumb(Widget gw, XEvent *event, String *params, Cardinal *num_params)
- {
- ScrollbarWidget w = (ScrollbarWidget)gw;
-+ union {
-+ XtPointer xt_pt;
-+ float xt_top;
-+ } foo;
-
- if (w->scrollbar.direction == 0) /* if no StartScroll */
- return;
-@@ -841,7 +845,10 @@
- /* thumbProc is not pretty, but is necessary for backwards
- compatibility on those architectures for which it work{s,ed};
- the intent is to pass a (truncated) float by value. */
-- XtCallCallbacks(gw, XtNthumbProc, *(XtPointer*)&w->scrollbar.top);
-+
-+ foo.xt_top = w->scrollbar.top;
-+
-+ XtCallCallbacks(gw, XtNthumbProc, foo.xt_pt);
- XtCallCallbacks(gw, XtNjumpProc, (XtPointer)&w->scrollbar.top);
-
- PaintThumb(w);
+++ /dev/null
---- XFree86-4.2.1/xc/lib/font/Type1/t1funcs.c.orig Fri Dec 14 20:56:44 2001
-+++ XFree86-4.2.1/xc/lib/font/Type1/t1funcs.c Wed Sep 18 16:04:20 2002
-@@ -523,7 +523,9 @@
- if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 ||
- hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0)
- return BadFontName;
--
-+ /* Reject large sizes too - may cause DoS in xfs or X-server due to abort() */
-+ if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[3]) > 5000.0)
-+ return BadFontName;
- /* set up default values */
- FontDefaultFormat(&bit, &byte, &glyph, &scan);
- /* get any changes made from above */
+++ /dev/null
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/Imakefile xc/lib/Xft/Imakefile
---- XFree86-4.0.2.orig/xc/lib/Xft/Imakefile Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/Imakefile Fri Jan 19 20:25:58 2001
-@@ -1,4 +1,4 @@
--XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.8 2000/12/15 17:12:52 keithp Exp $
-+XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.9 2001/01/02 02:46:50 keithp Exp $
-
- #define DoNormalLib NormalLibXft
- #define DoSharedLib SharedLibXft
-@@ -33,8 +33,8 @@
-
- #ifdef Freetype2Dir
- FT_HEADERS = XftFreetype.h
-- FT_SRCS = xftdir.c xftfreetype.c xftglyphs.c xftrender.c
-- FT_OBJS = xftdir.o xftfreetype.o xftglyphs.o xftrender.o
-+ FT_SRCS = xftcache.c xftdir.c xftfreetype.c xftglyphs.c xftrender.c
-+ FT_OBJS = xftcache.o xftdir.o xftfreetype.o xftglyphs.o xftrender.o
- #endif
-
- HEADERS = Xft.h $(FT_HEADERS)
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/Xft.h xc/lib/Xft/Xft.h
---- XFree86-4.0.2.orig/xc/lib/Xft/Xft.h Fri Dec 8 02:51:26 2000
-+++ XFree86-4.0.2/xc/lib/Xft/Xft.h Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/Xft.h,v 1.13 2000/12/08 07:51:26 keithp Exp $
-+ * $XFree86: xc/lib/Xft/Xft.h,v 1.16 2001/01/02 02:46:50 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -57,6 +57,7 @@
- /* defaults from resources */
- #define XFT_SCALE "scale" /* double */
- #define XFT_RENDER "render" /* Bool */
-+#define XFT_MINSPACE "minspace" /* Bool use minimum line spacing */
-
- /* specific to FreeType rasterizer */
- #define XFT_CHAR_WIDTH "charwidth" /* Int */
-@@ -254,6 +255,16 @@
- int y,
- XftChar32 *string,
- int len);
-+
-+void
-+XftDrawStringUtf8 (XftDraw *d,
-+ XftColor *color,
-+ XftFont *font,
-+ int x,
-+ int y,
-+ XftChar8 *string,
-+ int len);
-+
- void
- XftDrawRect (XftDraw *d,
- XftColor *color,
-@@ -290,6 +301,13 @@
- int len,
- XGlyphInfo *extents);
-
-+void
-+XftTextExtentsUtf8 (Display *dpy,
-+ XftFont *font,
-+ XftChar8 *string,
-+ int len,
-+ XGlyphInfo *extents);
-+
- /* xftfont.c */
- XftPattern *
- XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result);
-@@ -379,6 +397,9 @@
- XftPattern *
- XftNameParse (const char *name);
-
-+Bool
-+XftNameUnparse (XftPattern *pat, char *dest, int len);
-+
- /* xftpat.c */
- XftPattern *
- XftPatternCreate (void);
-@@ -442,12 +463,26 @@
-
- /* xftstr.c */
-
-+int
-+XftUtf8ToUcs4 (XftChar8 *src_orig,
-+ XftChar32 *dst,
-+ int len);
-+
-+Bool
-+XftUtf8Len (XftChar8 *string,
-+ int len,
-+ int *nchar,
-+ int *wchar);
-+
- /* xftxlfd.c */
- XftPattern *
- XftXlfdParse (const char *xlfd_orig, Bool ignore_scalable, Bool complete);
-
- XFontStruct *
- XftCoreOpen (Display *dpy, XftPattern *pattern);
-+
-+void
-+XftCoreClose (Display *dpy, XFontStruct *font);
-
- _XFUNCPROTOEND
-
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/XftFreetype.h xc/lib/Xft/XftFreetype.h
---- XFree86-4.0.2.orig/xc/lib/Xft/XftFreetype.h Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/XftFreetype.h Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/XftFreetype.h,v 1.7 2000/12/15 17:12:52 keithp Exp $
-+ * $XFree86: xc/lib/Xft/XftFreetype.h,v 1.12 2001/01/02 02:46:50 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -38,15 +38,15 @@
- GlyphSet glyphset;
- int min_char;
- int max_char;
-- int size;
-+ FT_F26Dot6 size;
- int ascent;
- int descent;
- int height;
- int max_advance_width;
-- Bool monospace;
-+ int spacing;
- int rgba;
- Bool antialias;
-- Bool encoded; /* use charmap */
-+ int charmap; /* -1 for unencoded */
- XRenderPictFormat *format;
- XGlyphInfo **realized;
- int nrealized;
-@@ -54,13 +54,32 @@
-
- _XFUNCPROTOBEGIN
-
-+/* xftdir.c */
-+Bool
-+XftDirScan (XftFontSet *set, const char *dir, Bool force);
-+
-+Bool
-+XftDirSave (XftFontSet *set, const char *dir);
-+
- /* xftfreetype.c */
-+XftPattern *
-+XftFreeTypeQuery (const char *file, int id, int *count);
-+
-+Bool
-+XftFreeTypeSetFace (FT_Face face, FT_F26Dot6 size, int charmap);
-+
- XftFontStruct *
- XftFreeTypeOpen (Display *dpy, XftPattern *pattern);
-
- void
- XftFreeTypeClose (Display *dpy, XftFontStruct *font);
-
-+XftFontStruct *
-+XftFreeTypeGet (XftFont *font);
-+
-+Bool
-+XftInitFtLibrary(void);
-+
- /* xftglyphs.c */
- void
- XftGlyphLoad (Display *dpy,
-@@ -104,6 +123,13 @@
- XftChar32 *string, int len);
-
- void
-+XftRenderStringUtf8 (Display *dpy, Picture src,
-+ XftFontStruct *font, Picture dst,
-+ int srcx, int srcy,
-+ int x, int y,
-+ XftChar8 *string, int len);
-+
-+void
- XftRenderExtents8 (Display *dpy,
- XftFontStruct *font,
- XftChar8 *string,
-@@ -123,6 +149,13 @@
- XftChar32 *string,
- int len,
- XGlyphInfo *extents);
-+
-+void
-+XftRenderExtentsUtf8 (Display *dpy,
-+ XftFontStruct *font,
-+ XftChar8 *string,
-+ int len,
-+ XGlyphInfo *extents);
-
- XftFontStruct *
- XftFreeTypeGet (XftFont *font);
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftcache.c xc/lib/Xft/xftcache.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftcache.c Wed Dec 31 19:00:00 1969
-+++ XFree86-4.0.2/xc/lib/Xft/xftcache.c Fri Jan 19 20:25:58 2001
-@@ -0,0 +1,608 @@
-+/*
-+ * $XFree86: xc/lib/Xft/xftcache.c,v 1.1 2001/01/02 02:46:51 keithp Exp $
-+ *
-+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and its
-+ * documentation for any purpose is hereby granted without fee, provided that
-+ * the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of Keith Packard not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Keith Packard makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-+ * PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <unistd.h>
-+#include <string.h>
-+#include <ctype.h>
-+#include <errno.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include "xftint.h"
-+
-+typedef struct _XftFileCacheEnt {
-+ struct _XftFileCacheEnt *next;
-+ unsigned int hash;
-+ char *file;
-+ int id;
-+ time_t time;
-+ char *name;
-+ Bool referenced;
-+} XftFileCacheEnt;
-+
-+#define HASH_SIZE 509
-+
-+typedef struct _XftFileCache {
-+ XftFileCacheEnt *ents[HASH_SIZE];
-+ Bool updated;
-+ int entries;
-+ int referenced;
-+} XftFileCache;
-+
-+static XftFileCache _XftFileCache;
-+
-+static unsigned int
-+_XftFileCacheHash (char *string)
-+{
-+ unsigned int h = 0;
-+ char c;
-+
-+ while ((c = *string++))
-+ h = (h << 1) ^ c;
-+ return h;
-+}
-+
-+char *
-+XftFileCacheFind (char *file, int id, int *count)
-+{
-+ XftFileCache *cache;
-+ unsigned int hash;
-+ char *match;
-+ XftFileCacheEnt *c, *name;
-+ int maxid;
-+ struct stat statb;
-+
-+ cache = &_XftFileCache;
-+ match = file;
-+
-+ hash = _XftFileCacheHash (match);
-+ name = 0;
-+ maxid = -1;
-+ for (c = cache->ents[hash % HASH_SIZE]; c; c = c->next)
-+ {
-+ if (c->hash == hash && !strcmp (match, c->file))
-+ {
-+ if (c->id > maxid)
-+ maxid = c->id;
-+ if (c->id == id)
-+ {
-+ if (stat (file, &statb) < 0)
-+ {
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ printf (" file missing\n");
-+ return 0;
-+ }
-+ if (statb.st_mtime != c->time)
-+ {
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ printf (" timestamp mismatch (was %d is %d)\n",
-+ (int) c->time, (int) statb.st_mtime);
-+ return 0;
-+ }
-+ if (!c->referenced)
-+ {
-+ cache->referenced++;
-+ c->referenced = True;
-+ }
-+ name = c;
-+ }
-+ }
-+ }
-+ if (!name)
-+ return 0;
-+ *count = maxid;
-+ return name->name;
-+}
-+
-+/*
-+ * Cache file syntax is quite simple:
-+ *
-+ * "file_name" id time "font_name" \n
-+ */
-+
-+static Bool
-+_XftFileCacheReadString (FILE *f, char *dest, int len)
-+{
-+ int c;
-+ Bool escape;
-+
-+ while ((c = getc (f)) != EOF)
-+ if (c == '"')
-+ break;
-+ if (c == EOF)
-+ return False;
-+ if (len == 0)
-+ return False;
-+
-+ escape = False;
-+ while ((c = getc (f)) != EOF)
-+ {
-+ if (!escape)
-+ {
-+ switch (c) {
-+ case '"':
-+ *dest++ = '\0';
-+ return True;
-+ case '\\':
-+ escape = True;
-+ continue;
-+ }
-+ }
-+ if (--len <= 1)
-+ return False;
-+ *dest++ = c;
-+ escape = False;
-+ }
-+ return False;
-+}
-+
-+static Bool
-+_XftFileCacheReadUlong (FILE *f, unsigned long *dest)
-+{
-+ unsigned long t;
-+ int c;
-+
-+ while ((c = getc (f)) != EOF)
-+ {
-+ if (!isspace (c))
-+ break;
-+ }
-+ if (c == EOF)
-+ return False;
-+ t = 0;
-+ for (;;)
-+ {
-+ if (c == EOF || isspace (c))
-+ break;
-+ if (!isdigit (c))
-+ return False;
-+ t = t * 10 + (c - '0');
-+ c = getc (f);
-+ }
-+ *dest = t;
-+ return True;
-+}
-+
-+static Bool
-+_XftFileCacheReadInt (FILE *f, int *dest)
-+{
-+ unsigned long t;
-+ Bool ret;
-+
-+ ret = _XftFileCacheReadUlong (f, &t);
-+ if (ret)
-+ *dest = (int) t;
-+ return ret;
-+}
-+
-+static Bool
-+_XftFileCacheReadTime (FILE *f, time_t *dest)
-+{
-+ unsigned long t;
-+ Bool ret;
-+
-+ ret = _XftFileCacheReadUlong (f, &t);
-+ if (ret)
-+ *dest = (time_t) t;
-+ return ret;
-+}
-+
-+static Bool
-+_XftFileCacheAdd (XftFileCache *cache,
-+ char *file,
-+ int id,
-+ time_t time,
-+ char *name,
-+ Bool replace)
-+{
-+ XftFileCacheEnt *c;
-+ XftFileCacheEnt **prev, *old;
-+ unsigned int hash;
-+
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ {
-+ printf ("%s face %s/%d as %s\n", replace ? "Replace" : "Add",
-+ file, id, name);
-+ }
-+ hash = _XftFileCacheHash (file);
-+ for (prev = &cache->ents[hash % HASH_SIZE];
-+ (old = *prev);
-+ prev = &(*prev)->next)
-+ {
-+ if (old->hash == hash && old->id == id && !strcmp (old->file, file))
-+ break;
-+ }
-+ if (*prev)
-+ {
-+ if (!replace)
-+ return False;
-+
-+ old = *prev;
-+ if (old->referenced)
-+ cache->referenced--;
-+ *prev = old->next;
-+ free (old);
-+ cache->entries--;
-+ }
-+
-+ c = malloc (sizeof (XftFileCacheEnt) +
-+ strlen (file) + 1 +
-+ strlen (name) + 1);
-+ if (!c)
-+ return False;
-+ c->next = *prev;
-+ *prev = c;
-+ c->hash = hash;
-+ c->file = (char *) (c + 1);
-+ c->id = id;
-+ c->name = c->file + strlen (file) + 1;
-+ strcpy (c->file, file);
-+ c->time = time;
-+ c->referenced = replace;
-+ strcpy (c->name, name);
-+ cache->entries++;
-+ return True;
-+}
-+
-+void
-+XftFileCacheDispose (void)
-+{
-+ XftFileCache *cache;
-+ XftFileCacheEnt *c, *next;
-+ int h;
-+
-+ cache = &_XftFileCache;
-+
-+ for (h = 0; h < HASH_SIZE; h++)
-+ {
-+ for (c = cache->ents[h]; c; c = next)
-+ {
-+ next = c->next;
-+ free (c);
-+ }
-+ cache->ents[h] = 0;
-+ }
-+ cache->entries = 0;
-+ cache->referenced = 0;
-+ cache->updated = False;
-+}
-+
-+void
-+XftFileCacheLoad (char *cache_file)
-+{
-+ XftFileCache *cache;
-+ FILE *f;
-+ char file[8192];
-+ int id;
-+ time_t time;
-+ char name[8192];
-+
-+ f = fopen (cache_file, "r");
-+ if (!f)
-+ return;
-+
-+ cache = &_XftFileCache;
-+
-+ cache->updated = False;
-+ while (_XftFileCacheReadString (f, file, sizeof (file)) &&
-+ _XftFileCacheReadInt (f, &id) &&
-+ _XftFileCacheReadTime (f, &time) &&
-+ _XftFileCacheReadString (f, name, sizeof (name)))
-+ {
-+ (void) _XftFileCacheAdd (cache, file, id, time, name, False);
-+ }
-+ fclose (f);
-+}
-+
-+Bool
-+XftFileCacheUpdate (char *file, int id, char *name)
-+{
-+ XftFileCache *cache;
-+ char *match;
-+ struct stat statb;
-+ Bool ret;
-+
-+ cache = &_XftFileCache;
-+ match = file;
-+
-+ if (stat (file, &statb) < 0)
-+ return False;
-+ ret = _XftFileCacheAdd (cache, match, id,
-+ statb.st_mtime, name, True);
-+ if (ret)
-+ cache->updated = True;
-+ return ret;
-+}
-+
-+static Bool
-+_XftFileCacheWriteString (FILE *f, char *string)
-+{
-+ char c;
-+
-+ if (putc ('"', f) == EOF)
-+ return False;
-+ while ((c = *string++))
-+ {
-+ switch (c) {
-+ case '"':
-+ case '\\':
-+ if (putc ('\\', f) == EOF)
-+ return False;
-+ /* fall through */
-+ default:
-+ if (putc (c, f) == EOF)
-+ return False;
-+ }
-+ }
-+ if (putc ('"', f) == EOF)
-+ return False;
-+ return True;
-+}
-+
-+static Bool
-+_XftFileCacheWriteUlong (FILE *f, unsigned long t)
-+{
-+ int pow;
-+ unsigned long temp, digit;
-+
-+ temp = t;
-+ pow = 1;
-+ while (temp >= 10)
-+ {
-+ temp /= 10;
-+ pow *= 10;
-+ }
-+ temp = t;
-+ while (pow)
-+ {
-+ digit = temp / pow;
-+ if (putc ((char) digit + '0', f) == EOF)
-+ return False;
-+ temp = temp - pow * digit;
-+ pow = pow / 10;
-+ }
-+ return True;
-+}
-+
-+static Bool
-+_XftFileCacheWriteInt (FILE *f, int i)
-+{
-+ return _XftFileCacheWriteUlong (f, (unsigned long) i);
-+}
-+
-+static Bool
-+_XftFileCacheWriteTime (FILE *f, time_t t)
-+{
-+ return _XftFileCacheWriteUlong (f, (unsigned long) t);
-+}
-+
-+Bool
-+XftFileCacheSave (char *cache_file)
-+{
-+ XftFileCache *cache;
-+ char *lck;
-+ char *tmp;
-+ FILE *f;
-+ int h;
-+ XftFileCacheEnt *c;
-+
-+ cache = &_XftFileCache;
-+
-+ if (!cache->updated && cache->referenced == cache->entries)
-+ return True;
-+
-+ lck = malloc (strlen (cache_file)*2 + 4);
-+ if (!lck)
-+ goto bail0;
-+ tmp = lck + strlen (cache_file) + 2;
-+ strcpy (lck, cache_file);
-+ strcat (lck, "L");
-+ strcpy (tmp, cache_file);
-+ strcat (tmp, "T");
-+ if (link (lck, cache_file) < 0 && errno != ENOENT)
-+ goto bail1;
-+ if (access (tmp, F_OK) == 0)
-+ goto bail2;
-+ f = fopen (tmp, "w");
-+ if (!f)
-+ goto bail2;
-+
-+ for (h = 0; h < HASH_SIZE; h++)
-+ {
-+ for (c = cache->ents[h]; c; c = c->next)
-+ {
-+ if (!c->referenced)
-+ continue;
-+ if (!_XftFileCacheWriteString (f, c->file))
-+ goto bail4;
-+ if (putc (' ', f) == EOF)
-+ goto bail4;
-+ if (!_XftFileCacheWriteInt (f, c->id))
-+ goto bail4;
-+ if (putc (' ', f) == EOF)
-+ goto bail4;
-+ if (!_XftFileCacheWriteTime (f, c->time))
-+ goto bail4;
-+ if (putc (' ', f) == EOF)
-+ goto bail4;
-+ if (!_XftFileCacheWriteString (f, c->name))
-+ goto bail4;
-+ if (putc ('\n', f) == EOF)
-+ goto bail4;
-+ }
-+ }
-+
-+ if (fclose (f) == EOF)
-+ goto bail3;
-+
-+ if (rename (tmp, cache_file) < 0)
-+ goto bail3;
-+
-+ unlink (lck);
-+ cache->updated = False;
-+ return True;
-+
-+bail4:
-+ fclose (f);
-+bail3:
-+ unlink (tmp);
-+bail2:
-+ unlink (lck);
-+bail1:
-+ free (lck);
-+bail0:
-+ return False;
-+}
-+
-+Bool
-+XftFileCacheReadDir (XftFontSet *set, const char *cache_file)
-+{
-+ XftPattern *font;
-+ FILE *f;
-+ char *path;
-+ char *base;
-+ char file[8192];
-+ int id;
-+ char name[8192];
-+ Bool ret = False;
-+
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ {
-+ printf ("XftFileCacheReadDir cache_file \"%s\"\n", cache_file);
-+ }
-+
-+ f = fopen (cache_file, "r");
-+ if (!f)
-+ {
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ {
-+ printf (" no cache file\n");
-+ }
-+ goto bail0;
-+ }
-+
-+ base = strrchr (cache_file, '/');
-+ if (!base)
-+ goto bail1;
-+ base++;
-+ path = malloc (base - cache_file + 8192 + 1);
-+ if (!path)
-+ goto bail1;
-+ memcpy (path, cache_file, base - cache_file);
-+ base = path + (base - cache_file);
-+
-+ while (_XftFileCacheReadString (f, file, sizeof (file)) &&
-+ _XftFileCacheReadInt (f, &id) &&
-+ _XftFileCacheReadString (f, name, sizeof (name)))
-+ {
-+ font = XftNameParse (name);
-+ if (font)
-+ {
-+ strcpy (base, file);
-+ if (_XftFontDebug () & XFT_DBG_CACHEV)
-+ {
-+ printf (" dir cache file \"%s\"\n", file);
-+ }
-+ XftPatternAddString (font, XFT_FILE, path);
-+ if (!XftFontSetAdd (set, font))
-+ goto bail2;
-+ }
-+ }
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ {
-+ printf (" cache loaded\n");
-+ }
-+
-+ ret = True;
-+bail2:
-+ free (path);
-+bail1:
-+ fclose (f);
-+bail0:
-+ return ret;
-+}
-+
-+Bool
-+XftFileCacheWriteDir (XftFontSet *set, const char *cache_file)
-+{
-+ XftPattern *font;
-+ FILE *f;
-+ char name[8192];
-+ char *file, *base;
-+ int n;
-+ int id;
-+
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ printf ("XftFileCacheWriteDir cache_file \"%s\"\n", cache_file);
-+
-+ f = fopen (cache_file, "w");
-+ if (!f)
-+ {
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ printf (" can't create \"%s\"\n", cache_file);
-+ goto bail0;
-+ }
-+ for (n = 0; n < set->nfont; n++)
-+ {
-+ font = set->fonts[n];
-+ if (XftPatternGetString (font, XFT_FILE, 0, &file) != XftResultMatch)
-+ goto bail1;
-+ base = strrchr (file, '/');
-+ if (base)
-+ base = base + 1;
-+ else
-+ base = file;
-+ if (XftPatternGetInteger (font, XFT_INDEX, 0, &id) != XftResultMatch)
-+ goto bail1;
-+ if (!XftNameUnparse (font, name, sizeof (name)))
-+ goto bail1;
-+ if (_XftFontDebug () & XFT_DBG_CACHEV)
-+ printf (" write file \"%s\"\n", base);
-+ if (!_XftFileCacheWriteString (f, base))
-+ goto bail1;
-+ if (putc (' ', f) == EOF)
-+ goto bail1;
-+ if (!_XftFileCacheWriteInt (f, id))
-+ goto bail1;
-+ if (putc (' ', f) == EOF)
-+ goto bail1;
-+ if (!_XftFileCacheWriteString (f, name))
-+ goto bail1;
-+ if (putc ('\n', f) == EOF)
-+ goto bail1;
-+ }
-+ if (fclose (f) == EOF)
-+ goto bail0;
-+
-+ if (_XftFontDebug () & XFT_DBG_CACHE)
-+ printf (" cache written\n");
-+ return True;
-+
-+bail1:
-+ fclose (f);
-+bail0:
-+ unlink (cache_file);
-+ return False;
-+}
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftcfg.c xc/lib/Xft/xftcfg.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftcfg.c Tue Dec 19 08:12:29 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftcfg.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftcfg.c,v 1.7 2000/12/17 09:11:37 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftcfg.c,v 1.8 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -35,6 +35,9 @@
- char **XftConfigDirs = XftConfigDefaultDirs;
- static int XftConfigNdirs;
-
-+char XftConfigDefaultCache[] = "~/.xftcache";
-+char *XftConfigCache = 0;
-+
- static XftSubst *XftSubsts;
- /* #define XFT_DEBUG_EDIT */
-
-@@ -51,6 +54,8 @@
- if (!h)
- return False;
- dir = (char *) malloc (strlen (h) + strlen (d));
-+ if (!dir)
-+ return False;
- strcpy (dir, h);
- strcat (dir, d+1);
- }
-@@ -78,6 +83,41 @@
- free (XftConfigDirs);
- XftConfigDirs = dirs;
- return True;
-+}
-+
-+Bool
-+XftConfigSetCache (char *c)
-+{
-+ char *new;
-+ char *h;
-+
-+ if (*c == '~')
-+ {
-+ h = getenv ("HOME");
-+ if (!h)
-+ return False;
-+ new = (char *) malloc (strlen (h) + strlen (c));
-+ if (!new)
-+ return False;
-+ strcpy (new, h);
-+ strcat (new, c+1);
-+ }
-+ else
-+ {
-+ new = _XftSaveString (c);
-+ }
-+ if (XftConfigCache)
-+ free (XftConfigCache);
-+ XftConfigCache = new;
-+ return True;
-+}
-+
-+char *
-+XftConfigGetCache (void)
-+{
-+ if (!XftConfigCache)
-+ XftConfigSetCache (XftConfigDefaultCache);
-+ return XftConfigCache;
- }
-
- static int XftSubstsMaxObjects;
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftcore.c xc/lib/Xft/xftcore.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftcore.c Fri Dec 8 02:51:27 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftcore.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftcore.c,v 1.4 2000/12/08 07:51:27 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftcore.c,v 1.5 2000/12/20 00:28:44 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -65,6 +65,37 @@
- return xc;
- }
-
-+XChar2b *
-+XftCoreConvertUtf8 (XftChar8 *string,
-+ int len,
-+ XChar2b xcloc[XFT_CORE_N16LOCAL],
-+ int *nchar)
-+{
-+ XChar2b *xc;
-+ XftChar32 c;
-+ int i;
-+ int n, width;
-+ int clen;
-+
-+ if (!XftUtf8Len (string, len, &n, &width))
-+ return 0;
-+
-+ if (n < XFT_CORE_N16LOCAL)
-+ xc = xcloc;
-+ else
-+ xc = (XChar2b *) malloc (n * sizeof (XChar2b));
-+ for (i = 0; i < n; i++)
-+ {
-+ clen = XftUtf8ToUcs4 (string, &c, len);
-+ xc[i].byte1 = c & 0xff;
-+ xc[i].byte2 = (c >> 8) & 0xff;
-+ string += clen;
-+ len -= clen;
-+ }
-+ *nchar = n;
-+ return xc;
-+}
-+
- void
- XftCoreExtents8 (Display *dpy,
- XFontStruct *fs,
-@@ -109,6 +140,8 @@
- xc = XftCoreConvert16 (string, len, xcloc);
- XTextExtents16 (fs, xc, len, &direction,
- &ascent, &descent, &overall);
-+ if (xc != xcloc)
-+ free (xc);
- if (overall.lbearing < overall.rbearing)
- {
- extents->x = overall.lbearing;
-@@ -140,6 +173,42 @@
- xc = XftCoreConvert32 (string, len, xcloc);
- XTextExtents16 (fs, xc, len, &direction,
- &ascent, &descent, &overall);
-+ if (xc != xcloc)
-+ free (xc);
-+ if (overall.lbearing < overall.rbearing)
-+ {
-+ extents->x = overall.lbearing;
-+ extents->width = overall.rbearing - overall.lbearing;
-+ }
-+ else
-+ {
-+ extents->x = overall.rbearing;
-+ extents->width = overall.lbearing - overall.rbearing;
-+ }
-+ extents->y = -overall.ascent;
-+ extents->height = overall.ascent + overall.descent;
-+ extents->xOff = overall.width;
-+ extents->yOff = 0;
-+}
-+
-+void
-+XftCoreExtentsUtf8 (Display *dpy,
-+ XFontStruct *fs,
-+ XftChar8 *string,
-+ int len,
-+ XGlyphInfo *extents)
-+{
-+ int direction;
-+ int ascent, descent;
-+ XCharStruct overall;
-+ XChar2b *xc, xcloc[XFT_CORE_N16LOCAL];
-+ int n;
-+
-+ xc = XftCoreConvertUtf8 (string, len, xcloc, &n);
-+ XTextExtents16 (fs, xc, n, &direction,
-+ &ascent, &descent, &overall);
-+ if (xc != xcloc)
-+ free (xc);
- if (overall.lbearing < overall.rbearing)
- {
- extents->x = overall.lbearing;
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftdir.c xc/lib/Xft/xftdir.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftdir.c Wed Nov 29 03:39:21 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftdir.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftdir.c,v 1.1 2000/11/29 08:39:21 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftdir.c,v 1.2 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -29,38 +29,73 @@
- #include "xftint.h"
-
- Bool
--XftDirScan (XftFontSet *set, const char *dir)
-+XftDirScan (XftFontSet *set, const char *dir, Bool force)
- {
- DIR *d;
- struct dirent *e;
- char *file;
- char *base;
- XftPattern *font;
-+ char *name;
- int count;
- Bool ret = True;
- int id;
-
-- d = opendir (dir);
-- if (!d)
-- return False;
- file = (char *) malloc (strlen (dir) + 1 + 256 + 1);
- if (!file)
-- {
-- closedir (d);
- return False;
-- }
-+
- strcpy (file, dir);
- strcat (file, "/");
- base = file + strlen (file);
-+ if (!force)
-+ {
-+ strcpy (base, "XftCache");
-+
-+ if (XftFileCacheReadDir (set, file))
-+ {
-+ free (file);
-+ return True;
-+ }
-+ }
-+
-+ d = opendir (dir);
-+ if (!d)
-+ {
-+ free (file);
-+ return False;
-+ }
- while (ret && (e = readdir (d)))
- {
- if (e->d_name[0] != '.')
- {
-- strcpy (base, e->d_name);
- id = 0;
-+ strcpy (base, e->d_name);
- do
- {
-- font = XftFreeTypeQuery (file, id, &count);
-+ if (!force)
-+ name = XftFileCacheFind (file, id, &count);
-+ else
-+ name = 0;
-+ if (name)
-+ {
-+ font = XftNameParse (name);
-+ if (font)
-+ XftPatternAddString (font, XFT_FILE, file);
-+ }
-+ else
-+ {
-+ font = XftFreeTypeQuery (file, id, &count);
-+ if (font && !force)
-+ {
-+ char unparse[8192];
-+
-+ if (XftNameUnparse (font, unparse, sizeof (unparse)))
-+ {
-+ (void) XftFileCacheUpdate (file, id, unparse);
-+ }
-+ }
-+ }
- if (font)
- {
- if (!XftFontSetAdd (set, font))
-@@ -75,4 +110,23 @@
- return ret;
- }
-
--
-+Bool
-+XftDirSave (XftFontSet *set, const char *dir)
-+{
-+ char *file;
-+ char *base;
-+ Bool ret;
-+
-+ file = (char *) malloc (strlen (dir) + 1 + 256 + 1);
-+ if (!file)
-+ return False;
-+
-+ strcpy (file, dir);
-+ strcat (file, "/");
-+ base = file + strlen (file);
-+ strcpy (base, "XftCache");
-+ ret = XftFileCacheWriteDir (set, file);
-+ free (file);
-+ return ret;
-+}
-+
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftdpy.c xc/lib/Xft/xftdpy.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftdpy.c Tue Dec 19 08:12:29 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftdpy.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftdpy.c,v 1.4 2000/12/17 08:30:45 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftdpy.c,v 1.5 2000/12/20 00:20:48 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -22,6 +22,7 @@
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include <X11/Xlibint.h>
-@@ -81,6 +82,34 @@
- info->defaults = 0;
- info->coreFonts = 0;
- info->hasRender = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0;
-+ if (_XftFontDebug () & XFT_DBG_RENDER)
-+ {
-+ Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy));
-+ XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
-+
-+ printf ("XftDisplayInfoGet Default visual 0x%x ",
-+ (int) visual->visualid);
-+ if (format)
-+ {
-+ if (format->type == PictTypeDirect)
-+ {
-+ printf ("format %d,%d,%d,%d\n",
-+ format->direct.alpha,
-+ format->direct.red,
-+ format->direct.green,
-+ format->direct.blue);
-+ }
-+ else
-+ {
-+ printf ("format indexed\n");
-+ }
-+ }
-+ else
-+ printf ("No Render format for default visual\n");
-+
-+ printf ("XftDisplayInfoGet initialized, hasRender set to \"%s\"\n",
-+ info->hasRender ? "True" : "False");
-+ }
-
- info->next = _XftDisplayInfo;
- _XftDisplayInfo = info;
-@@ -89,6 +118,10 @@
- bail1:
- free (info);
- bail0:
-+ if (_XftFontDebug () & XFT_DBG_RENDER)
-+ {
-+ printf ("XftDisplayInfoGet failed to initialize, Xft unhappy\n");
-+ }
- return 0;
- }
-
-@@ -209,6 +242,8 @@
- goto bail1;
- if (!_XftDefaultInitBool (dpy, pat, XFT_ANTIALIAS))
- goto bail1;
-+ if (!_XftDefaultInitBool (dpy, pat, XFT_MINSPACE))
-+ goto bail1;
-
- return pat;
-
-@@ -343,6 +378,12 @@
- XftPatternAddInteger (pattern, XFT_RGBA,
- XftDefaultGetInteger (dpy, XFT_RGBA, screen,
- XFT_RGBA_NONE));
-+ }
-+ if (XftPatternGet (pattern, XFT_MINSPACE, 0, &v) == XftResultNoMatch)
-+ {
-+ XftPatternAddBool (pattern, XFT_MINSPACE,
-+ XftDefaultGetBool (dpy, XFT_MINSPACE, screen,
-+ False));
- }
- if (XftPatternGet (pattern, XFT_PIXEL_SIZE, 0, &v) == XftResultNoMatch)
- {
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftdraw.c xc/lib/Xft/xftdraw.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftdraw.c Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftdraw.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftdraw.c,v 1.10 2000/12/15 17:12:52 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftdraw.c,v 1.12 2000/12/20 00:28:44 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -22,6 +22,7 @@
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdio.h>
- #include <stdlib.h>
- #include "xftint.h"
- #include <X11/Xutil.h>
-@@ -200,6 +201,14 @@
- return False;
- if (memcmp (&color->color, &draw->render.fg_color, sizeof (XRenderColor)))
- {
-+ if (_XftFontDebug () & XFT_DBG_DRAW)
-+ {
-+ printf ("Switching to color %04x,%04x,%04x,%04x\n",
-+ color->color.alpha,
-+ color->color.red,
-+ color->color.green,
-+ color->color.blue);
-+ }
- XRenderFillRectangle (draw->dpy, PictOpSrc, draw->render.fg_pict,
- &color->color, 0, 0, 1, 1);
- draw->render.fg_color = color->color;
-@@ -255,6 +264,10 @@
- XftChar8 *string,
- int len)
- {
-+ if (_XftFontDebug () & XFT_DBG_DRAW)
-+ {
-+ printf ("DrawString \"%*.*s\"\n", len, len, string);
-+ }
- if (font->core)
- {
- XftDrawCorePrepare (draw, color, font);
-@@ -331,6 +344,41 @@
- }
- #endif
- }
-+
-+void
-+XftDrawStringUtf8 (XftDraw *draw,
-+ XftColor *color,
-+ XftFont *font,
-+ int x,
-+ int y,
-+ XftChar8 *string,
-+ int len)
-+{
-+ if (font->core)
-+ {
-+ XChar2b *xc;
-+ XChar2b xcloc[XFT_CORE_N16LOCAL];
-+ int n;
-+
-+ XftDrawCorePrepare (draw, color, font);
-+ xc = XftCoreConvertUtf8 (string, len, xcloc, &n);
-+ if (xc)
-+ {
-+ XDrawString16 (draw->dpy, draw->drawable, draw->core.draw_gc, x, y,
-+ xc, n);
-+ }
-+ if (xc != xcloc)
-+ free (xc);
-+ }
-+#ifdef FREETYPE2
-+ else if (XftDrawRenderPrepare (draw, color, font))
-+ {
-+ XftRenderStringUtf8 (draw->dpy, draw->render.fg_pict, font->u.ft.font,
-+ draw->render.pict, 0, 0, x, y, string, len);
-+ }
-+#endif
-+}
-+
-
- void
- XftDrawRect (XftDraw *draw,
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftextent.c xc/lib/Xft/xftextent.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftextent.c Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftextent.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftextent.c,v 1.4 2000/12/15 17:12:52 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftextent.c,v 1.5 2000/12/20 00:28:44 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -22,6 +22,7 @@
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdlib.h>
- #include "xftint.h"
-
- void
-@@ -79,4 +80,110 @@
- XftRenderExtents32 (dpy, font->u.ft.font, string, len, extents);
- }
- #endif
-+}
-+
-+void
-+XftTextExtentsUtf8 (Display *dpy,
-+ XftFont *font,
-+ XftChar8 *string,
-+ int len,
-+ XGlyphInfo *extents)
-+{
-+ XftChar8 *src;
-+ XftChar32 c;
-+ XftChar32 lbuf[4096];
-+ XftChar32 *dst;
-+ XftChar8 *dst8;
-+ XftChar16 *dst16;
-+ XftChar32 *dst32;
-+ int rlen, clen;
-+ int width = 1;
-+ int n;
-+
-+ /* compute needed width */
-+ src = string;
-+ rlen = len;
-+ n = 0;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (src, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ {
-+ memset (extents, 0, sizeof (XGlyphInfo));
-+ return;
-+ }
-+ if (c >= 0x10000)
-+ width = 4;
-+ else if (c >= 0x100)
-+ {
-+ if (width == 1)
-+ width = 2;
-+ }
-+ src += clen;
-+ rlen -= clen;
-+ n++;
-+ }
-+ dst = lbuf;
-+ if (n * width > sizeof (lbuf))
-+ {
-+ dst = (XftChar32 *) malloc (n * width);
-+ if (!dst)
-+ {
-+ memset (extents, 0, sizeof (XGlyphInfo));
-+ return;
-+ }
-+ }
-+
-+ switch (width) {
-+ case 4:
-+ src = string;
-+ rlen = len;
-+ dst32 = dst;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (src, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return;
-+ *dst32++ = c;
-+ src += clen;
-+ rlen -= clen;
-+ }
-+ dst32 = dst;
-+ XftTextExtents32 (dpy, font, dst32, n, extents);
-+ break;
-+ case 2:
-+ src = string;
-+ rlen = len;
-+ dst16 = (XftChar16 *) dst;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (src, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return;
-+ *dst16++ = c;
-+ src += clen;
-+ rlen -= clen;
-+ }
-+ dst16 = (XftChar16 *) dst;
-+ XftTextExtents16 (dpy, font, dst16, n, extents);
-+ break;
-+ case 1:
-+ src = string;
-+ rlen = len;
-+ dst8 = (XftChar8 *) dst;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (src, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return;
-+ *dst8++ = c;
-+ src += clen;
-+ rlen -= clen;
-+ }
-+ dst8 = (XftChar8 *) dst;
-+ XftTextExtents8 (dpy, font, dst8, n, extents);
-+ break;
-+ }
-+ if (dst != lbuf)
-+ free (dst);
- }
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftfont.c xc/lib/Xft/xftfont.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftfont.c Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftfont.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftfont.c,v 1.7 2000/12/15 17:12:53 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftfont.c,v 1.8 2000/12/20 00:20:48 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -22,9 +22,9 @@
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdio.h>
- #include <stdlib.h>
- #include "xftint.h"
--#include <stdio.h>
-
- XftPattern *
- XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result)
-@@ -43,8 +43,24 @@
- new = XftPatternDuplicate (pattern);
- if (!new)
- return 0;
-+
-+ if (_XftFontDebug () & XFT_DBG_OPENV)
-+ {
-+ printf ("XftFontMatch pattern ");
-+ XftPatternPrint (new);
-+ }
- XftConfigSubstitute (new);
-+ if (_XftFontDebug () & XFT_DBG_OPENV)
-+ {
-+ printf ("XftFontMatch after XftConfig substitutions ");
-+ XftPatternPrint (new);
-+ }
- XftDefaultSubstitute (dpy, screen, new);
-+ if (_XftFontDebug () & XFT_DBG_OPENV)
-+ {
-+ printf ("XftFontMatch after X resource substitutions ");
-+ XftPatternPrint (new);
-+ }
- nsets = 0;
-
- #ifdef FREETYPE2
-@@ -52,6 +68,11 @@
- core = True;
- (void) XftPatternGetBool (new, XFT_RENDER, 0, &render);
- (void) XftPatternGetBool (new, XFT_CORE, 0, &core);
-+ if (_XftFontDebug () & XFT_DBG_OPENV)
-+ {
-+ printf ("XftFontMatch: use core fonts \"%s\", use render fonts \"%s\"\n",
-+ core ? "True" : "False", render ? "True" : "False");
-+ }
-
- if (render)
- {
-@@ -133,10 +154,17 @@
-
- if (!initialized)
- {
-+ char *e;
-+
- initialized = 1;
-- debug = getenv ("XFT_DEBUG") != 0;
-- if (debug)
-- printf ("XFT_DEBUG found\n");
-+ e = getenv ("XFT_DEBUG");
-+ if (e)
-+ {
-+ printf ("XFT_DEBUG=%s\n", e);
-+ debug = atoi (e);
-+ if (debug <= 0)
-+ debug = 1;
-+ }
- }
- return debug;
- }
-@@ -155,12 +183,12 @@
- va_end (va);
- if (!pat)
- {
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- printf ("XftFontOpen: Invalid pattern argument\n");
- return 0;
- }
- match = XftFontMatch (dpy, screen, pat, &result);
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- {
- printf ("Pattern ");
- XftPatternPrint (pat);
-@@ -179,7 +207,7 @@
- font = XftFontOpenPattern (dpy, match);
- if (!font)
- {
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- printf ("No Font\n");
- XftPatternDestroy (match);
- }
-@@ -196,7 +224,7 @@
- XftFont *font;
-
- pat = XftNameParse (name);
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- {
- printf ("XftFontOpenName \"%s\": ", name);
- if (pat)
-@@ -208,7 +236,7 @@
- if (!pat)
- return 0;
- match = XftFontMatch (dpy, screen, pat, &result);
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- {
- if (match)
- {
-@@ -238,7 +266,7 @@
- XftFont *font;
-
- pat = XftXlfdParse (xlfd, False, False);
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- {
- printf ("XftFontOpenXlfd \"%s\": ", xlfd);
- if (pat)
-@@ -250,7 +278,7 @@
- if (!pat)
- return 0;
- match = XftFontMatch (dpy, screen, pat, &result);
-- if (_XftFontDebug ())
-+ if (_XftFontDebug () & XFT_DBG_OPEN)
- {
- if (match)
- {
-@@ -275,7 +303,7 @@
- XftFontClose (Display *dpy, XftFont *font)
- {
- if (font->core)
-- XFreeFont (dpy, font->u.core.font);
-+ XftCoreClose (dpy, font->u.core.font);
- #ifdef FREETYPE2
- else
- XftFreeTypeClose (dpy, font->u.ft.font);
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftfreetype.c xc/lib/Xft/xftfreetype.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftfreetype.c Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftfreetype.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.5 2000/12/15 17:12:53 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.9 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -23,6 +23,7 @@
- */
-
- #include <stdlib.h>
-+#include <stdio.h>
- #include "xftint.h"
-
- FT_Library _XftFTlibrary;
-@@ -32,9 +33,10 @@
- FT_Encoding encoding;
- } XftFtEncoding;
-
--XftFtEncoding xftFtEncoding[] = {
-+static XftFtEncoding xftFtEncoding[] = {
- { "iso10646-1", ft_encoding_unicode, },
- { "iso8859-1", ft_encoding_unicode, },
-+ { "apple-roman", ft_encoding_apple_roman },
- { "adobe-fontspecific", ft_encoding_symbol, },
- { "glyphs-fontspecific",ft_encoding_none, },
- };
-@@ -74,7 +76,7 @@
-
- slant = XFT_SLANT_ROMAN;
- if (face->style_flags & FT_STYLE_FLAG_ITALIC)
-- slant = (XFT_SLANT_ITALIC + XFT_SLANT_OBLIQUE) / 2;
-+ slant = XFT_SLANT_ITALIC;
-
- if (!XftPatternAddInteger (pat, XFT_SLANT, slant))
- goto bail1;
-@@ -98,6 +100,10 @@
- if (!XftPatternAddInteger (pat, XFT_INDEX, id))
- goto bail1;
-
-+ if ((face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0)
-+ if (!XftPatternAddInteger (pat, XFT_SPACING, XFT_MONO))
-+ goto bail1;
-+
- if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
- {
- for (i = 0; i < face->num_fixed_sizes; i++)
-@@ -142,41 +148,185 @@
- return 0;
- }
-
-+/*
-+ * List of all open files (each face in a file is managed separately)
-+ */
-+typedef struct _XftFtFile {
-+ struct _XftFtFile *next;
-+ int ref;
-+
-+ char *file;
-+ int id;
-+
-+ FT_Face face;
-+ FT_F26Dot6 size;
-+ int charmap;
-+} XftFtFile;
-+
-+static XftFtFile *_XftFtFiles;
-+
-+static XftFtFile *
-+_XftFreeTypeOpenFile (char *file, int id)
-+{
-+ XftFtFile *f;
-+ FT_Face face;
-+
-+ for (f = _XftFtFiles; f; f = f->next)
-+ {
-+ if (!strcmp (f->file, file) && f->id == id)
-+ {
-+ ++f->ref;
-+ if (_XftFontDebug () & XFT_DBG_REF)
-+ printf ("FontFile %s/%d matches existing (%d)\n",
-+ file, id, f->ref);
-+ return f;
-+ }
-+ }
-+ if (FT_New_Face (_XftFTlibrary, file, id, &face))
-+ return 0;
-+
-+ f = malloc (sizeof (XftFtFile) + strlen (file) + 1);
-+ if (!f)
-+ return 0;
-+
-+ if (_XftFontDebug () & XFT_DBG_REF)
-+ printf ("FontFile %s/%d matches new\n",
-+ file, id);
-+ f->next = _XftFtFiles;
-+ _XftFtFiles = f;
-+ f->ref = 1;
-+
-+ f->file = (char *) (f+1);
-+ strcpy (f->file, file);
-+ f->id = id;
-+
-+ f->face = face;
-+ f->size = 0;
-+ f->charmap = -1;
-+ return f;
-+}
-+
-+Bool
-+XftFreeTypeSetFace (FT_Face face, FT_F26Dot6 size, int charmap)
-+{
-+ XftFtFile *f, **prev;
-+
-+ for (prev = &_XftFtFiles; (f = *prev); prev = &f->next)
-+ {
-+ if (f->face == face)
-+ {
-+ /* LRU */
-+ if (prev != &_XftFtFiles)
-+ {
-+ *prev = f->next;
-+ f->next = _XftFtFiles;
-+ _XftFtFiles = f;
-+ }
-+ if (f->size != size)
-+ {
-+ if (_XftFontDebug() & XFT_DBG_GLYPH)
-+ printf ("Set face size to %d (%d)\n",
-+ (int) (size >> 6), (int) size);
-+ if (FT_Set_Char_Size (face, size, size, 0, 0))
-+ return False;
-+ f->size = size;
-+ }
-+ if (f->charmap != charmap && charmap != -1)
-+ {
-+ if (_XftFontDebug() & XFT_DBG_GLYPH)
-+ printf ("Set face charmap to %d\n", charmap);
-+ if (FT_Set_Charmap (face, face->charmaps[charmap]))
-+ return False;
-+ f->charmap = charmap;
-+ }
-+ break;
-+ }
-+ }
-+ return True;
-+}
-+
-+static void
-+_XftFreeTypeCloseFile (XftFtFile *f)
-+{
-+ XftFtFile **prev;
-+
-+ if (--f->ref != 0)
-+ return;
-+ for (prev = &_XftFtFiles; *prev; prev = &(*prev)->next)
-+ {
-+ if (*prev == f)
-+ {
-+ *prev = f->next;
-+ break;
-+ }
-+ }
-+ FT_Done_Face (f->face);
-+ free (f);
-+}
-+
-+/*
-+ * Cache of all glyphsets
-+ */
-+typedef struct _XftFtGlyphSet {
-+ struct _XftFtGlyphSet *next;
-+ int ref;
-+
-+ XftFtFile *file;
-+ Bool minspace;
-+ int char_width;
-+
-+ XftFontStruct font;
-+} XftFtGlyphSet;
-+
-+static XftFtGlyphSet *_XftFtGlyphSets;
-+
- XftFontStruct *
- XftFreeTypeOpen (Display *dpy, XftPattern *pattern)
- {
-- char *file;
-+ XftFtFile *file;
-+ FT_Face face;
-+ XftFtGlyphSet *gs;
-+ char *filename;
- int id;
-- double size;
-+ double dsize;
-+ FT_F26Dot6 size;
- int rgba;
- int spacing;
- int char_width;
- Bool antialias;
-- Bool encoded;
-+ Bool minspace;
- char *encoding_name;
-- FT_Face face;
- XftFontStruct *font;
- int j;
- FT_Encoding encoding;
- int charmap;
-- int error;
-
-- int height, ascent, descent;
- int extra;
-- int div;
--
-+ int height, ascent, descent;
- XRenderPictFormat pf, *format;
-
-- if (XftPatternGetString (pattern, XFT_FILE, 0, &file) != XftResultMatch)
-+ /*
-+ * Open the file
-+ */
-+ if (XftPatternGetString (pattern, XFT_FILE, 0, &filename) != XftResultMatch)
- goto bail0;
-
- if (XftPatternGetInteger (pattern, XFT_INDEX, 0, &id) != XftResultMatch)
- goto bail0;
-
-+ file = _XftFreeTypeOpenFile (filename, id);
-+ if (!file)
-+ goto bail0;
-+
-+ face = file->face;
-+
-+ /*
-+ * Extract the glyphset information from the pattern
-+ */
- if (XftPatternGetString (pattern, XFT_ENCODING, 0, &encoding_name) != XftResultMatch)
- goto bail0;
-
-- if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &size) != XftResultMatch)
-+ if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &dsize) != XftResultMatch)
- goto bail0;
-
- switch (XftPatternGetInteger (pattern, XFT_RGBA, 0, &rgba)) {
-@@ -199,11 +349,101 @@
- goto bail0;
- }
-
-+ switch (XftPatternGetBool (pattern, XFT_MINSPACE, 0, &minspace)) {
-+ case XftResultNoMatch:
-+ minspace = False;
-+ break;
-+ case XftResultMatch:
-+ break;
-+ default:
-+ goto bail0;
-+ }
-+
-+ switch (XftPatternGetInteger (pattern, XFT_SPACING, 0, &spacing)) {
-+ case XftResultNoMatch:
-+ spacing = XFT_PROPORTIONAL;
-+ break;
-+ case XftResultMatch:
-+ break;
-+ default:
-+ goto bail1;
-+ }
-+
- if (XftPatternGetInteger (pattern, XFT_CHAR_WIDTH,
- 0, &char_width) != XftResultMatch)
- {
- char_width = 0;
- }
-+ else if (char_width)
-+ spacing = XFT_MONO;
-+
-+ encoding = face->charmaps[0]->encoding;
-+
-+ for (j = 0; j < NUM_FT_ENCODINGS; j++)
-+ if (!strcmp (encoding_name, xftFtEncoding[j].name))
-+ {
-+ encoding = xftFtEncoding[j].encoding;
-+ break;
-+ }
-+
-+ size = (FT_F26Dot6) (dsize * 64.0);
-+
-+ if (encoding == ft_encoding_none)
-+ charmap = -1;
-+ else
-+ {
-+ for (charmap = 0; charmap < face->num_charmaps; charmap++)
-+ if (face->charmaps[charmap]->encoding == encoding)
-+ break;
-+
-+ if (charmap == face->num_charmaps)
-+ goto bail1;
-+ }
-+
-+
-+ /*
-+ * Match an existing glyphset
-+ */
-+ for (gs = _XftFtGlyphSets; gs; gs = gs->next)
-+ {
-+ if (gs->file == file &&
-+ gs->minspace == minspace &&
-+ gs->char_width == char_width &&
-+ gs->font.size == size &&
-+ gs->font.spacing == spacing &&
-+ gs->font.charmap == charmap &&
-+ gs->font.rgba == rgba &&
-+ gs->font.antialias == antialias)
-+ {
-+ ++gs->ref;
-+ if (_XftFontDebug () & XFT_DBG_REF)
-+ {
-+ printf ("Face size %g matches existing (%d)\n",
-+ dsize, gs->ref);
-+ }
-+ return &gs->font;
-+ }
-+ }
-+
-+ if (_XftFontDebug () & XFT_DBG_REF)
-+ {
-+ printf ("Face size %g matches new\n",
-+ dsize);
-+ }
-+ /*
-+ * No existing glyphset, create another
-+ */
-+ gs = malloc (sizeof (XftFtGlyphSet));
-+ if (!gs)
-+ goto bail1;
-+
-+ gs->ref = 1;
-+
-+ gs->file = file;
-+ gs->minspace = minspace;
-+ gs->char_width = char_width;
-+
-+ font = &gs->font;
-
- if (antialias)
- {
-@@ -261,106 +501,60 @@
- }
-
- if (!format)
-- goto bail0;
-+ goto bail2;
-
-- if (FT_New_Face (_XftFTlibrary, file, id, &face))
-- goto bail0;
-+ font->size = size;
-
-- font = (XftFontStruct *) malloc (sizeof (XftFontStruct));
-- if (!font)
-- goto bail1;
--
-- font->size = (FT_F26Dot6) (size * 64.0);
--
-- if ( FT_Set_Char_Size (face, font->size, font->size, 0, 0) )
-+ if (!XftFreeTypeSetFace (face, size, charmap))
- goto bail2;
-
-- encoding = face->charmaps[0]->encoding;
--
-- for (j = 0; j < NUM_FT_ENCODINGS; j++)
-- if (!strcmp (encoding_name, xftFtEncoding[j].name))
-- {
-- encoding = xftFtEncoding[j].encoding;
-- break;
-- }
--
-- if (encoding == ft_encoding_none)
-- encoded = False;
-- else
-+ descent = -(face->size->metrics.descender >> 6);
-+ ascent = face->size->metrics.ascender >> 6;
-+ if (minspace)
- {
-- encoded = True;
-- for (charmap = 0; charmap < face->num_charmaps; charmap++)
-- if (face->charmaps[charmap]->encoding == encoding)
-- break;
--
-- if (charmap == face->num_charmaps)
-- goto bail2;
--
-- error = FT_Set_Charmap(face,
-- face->charmaps[charmap]);
--
-- if (error)
-- goto bail2;
-+ height = ascent + descent;
- }
--
-- height = face->height;
-- ascent = face->ascender;
-- descent = face->descender;
-- if (descent < 0) descent = - descent;
-- extra = (height - (ascent + descent));
-- if (extra > 0)
-+ else
- {
-- ascent = ascent + extra / 2;
-- descent = height - ascent;
-+ height = face->size->metrics.height >> 6;
-+ extra = (height - (ascent + descent));
-+ if (extra > 0)
-+ {
-+ ascent = ascent + extra / 2;
-+ descent = height - ascent;
-+ }
-+ else if (extra < 0)
-+ height = ascent + descent;
- }
-- else if (extra < 0)
-- height = ascent + descent;
-- div = face->units_per_EM;
-- if (height > div * 5)
-- div *= 10;
--
-- div = face->units_per_EM;
-- if (height > div * 5)
-- div *= 10;
--
-- font->descent = descent * font->size / (64 * div);
-- font->ascent = ascent * font->size / (64 * div);
-- font->height = height * font->size / (64 * div);
-- font->max_advance_width = face->max_advance_width * font->size / (64 * div);
-+ font->ascent = ascent;
-+ font->descent = descent;
-+ font->height = height;
-
-- font->monospace = (face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0;
- if (char_width)
-- {
- font->max_advance_width = char_width;
-- font->monospace = True;
-- }
-- switch (XftPatternGetInteger (pattern, XFT_SPACING, 0, &spacing)) {
-- case XftResultNoMatch:
-- break;
-- case XftResultMatch:
-- if (spacing != XFT_PROPORTIONAL)
-- font->monospace = True;
-- break;
-- default:
-- goto bail2;
-- }
-+ else
-+ font->max_advance_width = face->size->metrics.max_advance >> 6;
-+
-+ gs->next = _XftFtGlyphSets;
-+ _XftFtGlyphSets = gs;
-
- font->glyphset = XRenderCreateGlyphSet (dpy, format);
-
-+ font->spacing = spacing;
- font->format = format;
- font->realized =0;
- font->nrealized = 0;
- font->rgba = rgba;
- font->antialias = antialias;
-- font->encoded = encoded;
-+ font->charmap = charmap;
- font->face = face;
-
- return font;
-
- bail2:
-- free (font);
-+ free (gs);
- bail1:
-- FT_Done_Face (font->face);
-+ _XftFreeTypeCloseFile (file);
- bail0:
- return 0;
- }
-@@ -368,10 +562,26 @@
- void
- XftFreeTypeClose (Display *dpy, XftFontStruct *font)
- {
-- XRenderFreeGlyphSet (dpy, font->glyphset);
-- if (font->realized)
-- free (font->realized);
-- FT_Done_Face (font->face);
-+ XftFtGlyphSet *gs, **prev;
-+
-+ for (prev = &_XftFtGlyphSets; (gs = *prev); prev = &gs->next)
-+ {
-+ if (&gs->font == font)
-+ {
-+ if (--gs->ref == 0)
-+ {
-+ XRenderFreeGlyphSet (dpy, font->glyphset);
-+ if (font->realized)
-+ free (font->realized);
-+
-+ _XftFreeTypeCloseFile (gs->file);
-+
-+ *prev = gs->next;
-+ free (gs);
-+ }
-+ break;
-+ }
-+ }
- }
-
- XftFontStruct *
-@@ -388,6 +598,7 @@
- XftInitFtLibrary (void)
- {
- char **d;
-+ char *cache;
-
- if (_XftFTlibrary)
- return True;
-@@ -396,16 +607,21 @@
- _XftFontSet = XftFontSetCreate ();
- if (!_XftFontSet)
- return False;
-+ cache = XftConfigGetCache ();
-+ if (cache)
-+ XftFileCacheLoad (cache);
- for (d = XftConfigDirs; d && *d; d++)
- {
- #ifdef XFT_DEBUG_FONTSET
- printf ("scan dir %s\n", *d);
- #endif
-- XftDirScan (_XftFontSet, *d);
-+ XftDirScan (_XftFontSet, *d, False);
- }
- #ifdef XFT_DEBUG_FONTSET
- XftPrintFontSet (_XftFontSet);
- #endif
-+ if (cache)
-+ XftFileCacheSave (cache);
-+ XftFileCacheDispose ();
- return True;
- }
--
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftglyphs.c xc/lib/Xft/xftglyphs.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftglyphs.c Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftglyphs.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.6 2000/12/15 17:12:53 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.8 2000/12/22 02:25:41 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -22,6 +22,7 @@
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdio.h>
- #include <stdlib.h>
- #include "xftint.h"
- #include <freetype/ftoutln.h>
-@@ -73,6 +74,9 @@
- FT_Bitmap ftbit;
- FT_Matrix matrix;
-
-+ if (!XftFreeTypeSetFace (font->face, font->size, font->charmap))
-+ return ;
-+
- if (font->antialias && font->rgba)
- {
- matrix.xx = 0x30000L;
-@@ -87,11 +91,16 @@
- if (!gi)
- continue;
-
-- if (font->encoded)
-+ if (font->charmap != -1)
- {
- glyphindex = FT_Get_Char_Index (font->face, charcode);
- if (!glyphindex)
-+ {
-+ if (_XftFontDebug() & XFT_DBG_GLYPH)
-+ printf ("glyph (%c) %d missing\n",
-+ (int) charcode, (int) charcode);
- continue;
-+ }
- }
- else
- glyphindex = (FT_UInt) charcode;
-@@ -112,7 +121,7 @@
- /*
- * Try to keep monospace fonts ink-inside
- */
-- if (font->monospace)
-+ if (font->spacing != XFT_PROPORTIONAL)
- {
- if (TRUNC(right) > font->max_advance_width)
- {
-@@ -192,39 +201,42 @@
- }
- }
- }
--#if 0
-+ if (_XftFontDebug() & XFT_DBG_GLYPH)
- {
-- int x, y;
-- unsigned char *line;
--
-- line = bufBitmap;
-- printf ("\nchar 0x%x (%c):\n", (int) charcode, (char) charcode);
-- for (y = 0; y < height; y++)
-+ printf ("char 0x%x (%c):\n", (int) charcode, (char) charcode);
-+ if (_XftFontDebug() & XFT_DBG_GLYPHV)
- {
-- if (font->antialias)
-- {
-- static char den[] = { " .:;=+*#" };
-- for (x = 0; x < pitch; x++)
-- printf ("%c", den[line[x] >> 5]);
-- }
-- else
-+ int x, y;
-+ unsigned char *line;
-+
-+ line = bufBitmap;
-+ for (y = 0; y < height; y++)
- {
-- for (x = 0; x < pitch * 8; x++)
-+ if (font->antialias)
- {
-- printf ("%c", line[x>>3] & (1 << (x & 7)) ? '#' : ' ');
-+ static char den[] = { " .:;=+*#" };
-+ for (x = 0; x < pitch; x++)
-+ printf ("%c", den[line[x] >> 5]);
- }
-+ else
-+ {
-+ for (x = 0; x < pitch * 8; x++)
-+ {
-+ printf ("%c", line[x>>3] & (1 << (x & 7)) ? '#' : ' ');
-+ }
-+ }
-+ printf ("\n");
-+ line += pitch;
- }
- printf ("\n");
-- line += pitch;
- }
- }
--#endif
- }
- else
- {
--#if 0
-- printf ("glyph (%c) %d missing\n", (int) charcode, (int) charcode);
--#endif
-+ if (_XftFontDebug() & XFT_DBG_GLYPH)
-+ printf ("glyph (%c) %d no outline\n",
-+ (int) charcode, (int) charcode);
- continue;
- }
-
-@@ -232,7 +244,7 @@
- gi->height = height;
- gi->x = -TRUNC(left);
- gi->y = TRUNC(top);
-- if (font->monospace)
-+ if (font->spacing != XFT_PROPORTIONAL)
- gi->xOff = font->max_advance_width;
- else
- gi->xOff = TRUNC(ROUND(glyph->metrics.horiAdvance));
-@@ -368,7 +380,10 @@
- XftFontStruct *font,
- XftChar32 glyph)
- {
-- if (font->encoded)
-+ if (font->charmap != -1)
-+ {
-+ FT_Set_Charmap (font->face, font->face->charmaps[font->charmap]);
- glyph = (XftChar32) FT_Get_Char_Index (font->face, (FT_ULong) glyph);
-+ }
- return glyph && glyph <= font->face->num_glyphs;
- }
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftgram.y xc/lib/Xft/xftgram.y
---- XFree86-4.0.2.orig/xc/lib/Xft/xftgram.y Thu Nov 30 18:30:00 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftgram.y Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftgram.y,v 1.2 2000/11/30 23:30:00 dawes Exp $
-+ * $XFree86: xc/lib/Xft/xftgram.y,v 1.3 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -47,7 +47,8 @@
- %token <dval> DOUBLE
- %token <sval> STRING NAME
- %token <ival> ANY ALL
--%token <ival> DIR INCLUDE INCLUDEIF MATCH EDIT TOK_TRUE TOK_FALSE TOK_NIL
-+%token <ival> DIR CACHE INCLUDE INCLUDEIF MATCH EDIT
-+%token <ival> TOK_TRUE TOK_FALSE TOK_NIL
- %token <ival> EQUAL SEMI
-
- %type <eval> expr
-@@ -75,6 +76,8 @@
- ;
- config : DIR STRING
- { XftConfigAddDir ($2); }
-+ | CACHE STRING
-+ { XftConfigSetCache ($2); }
- | INCLUDE STRING
- { XftConfigPushInput ($2, True); }
- | INCLUDEIF STRING
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftint.h xc/lib/Xft/xftint.h
---- XFree86-4.0.2.orig/xc/lib/Xft/xftint.h Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftint.h Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftint.h,v 1.15 2000/12/15 17:12:53 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftint.h,v 1.20 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -84,6 +84,16 @@
- #define XFT_DEFAULT_PATH "/usr/X11R6/lib/X11/XftConfig"
- #endif
-
-+#define XFT_DBG_OPEN 1
-+#define XFT_DBG_OPENV 2
-+#define XFT_DBG_RENDER 4
-+#define XFT_DBG_DRAW 8
-+#define XFT_DBG_REF 16
-+#define XFT_DBG_GLYPH 32
-+#define XFT_DBG_GLYPHV 64
-+#define XFT_DBG_CACHE 128
-+#define XFT_DBG_CACHEV 256
-+
- typedef enum _XftOp {
- XftOpInteger, XftOpDouble, XftOpString, XftOpBool, XftOpNil,
- XftOpField,
-@@ -191,11 +201,40 @@
- }
-
-
-+/* xftcache.c */
-+
-+char *
-+XftFileCacheFind (char *file, int id, int *count);
-+
-+void
-+XftFileCacheDispose (void);
-+
-+void
-+XftFileCacheLoad (char *cache);
-+
-+Bool
-+XftFileCacheUpdate (char *file, int id, char *name);
-+
-+Bool
-+XftFileCacheSave (char *cache);
-+
-+Bool
-+XftFileCacheReadDir (XftFontSet *set, const char *cache_file);
-+
-+Bool
-+XftFileCacheWriteDir (XftFontSet *set, const char *cache_file);
-+
- /* xftcfg.c */
- Bool
- XftConfigAddDir (char *d);
-
- Bool
-+XftConfigSetCache (char *c);
-+
-+char *
-+XftConfigGetCache (void);
-+
-+Bool
- XftConfigAddEdit (XftTest *test, XftEdit *edit);
-
- Bool
-@@ -217,6 +256,12 @@
- int len,
- XChar2b xcloc[XFT_CORE_N16LOCAL]);
-
-+XChar2b *
-+XftCoreConvertUtf8 (XftChar8 *string,
-+ int len,
-+ XChar2b xcloc[XFT_CORE_N16LOCAL],
-+ int *nchar);
-+
- void
- XftCoreExtents8 (Display *dpy,
- XFontStruct *fs,
-@@ -238,6 +283,13 @@
- int len,
- XGlyphInfo *extents);
-
-+void
-+XftCoreExtentsUtf8 (Display *dpy,
-+ XFontStruct *fs,
-+ XftChar8 *string,
-+ int len,
-+ XGlyphInfo *extents);
-+
- Bool
- XftCoreGlyphExists (Display *dpy,
- XFontStruct *fs,
-@@ -259,10 +311,6 @@
- void
- XftSubstPrint (XftSubst *subst);
-
--/* xftdir.c */
--Bool
--XftDirScan (XftFontSet *set, const char *dir);
--
- /* xftdpy.c */
- int
- XftDefaultParseBool (char *v);
-@@ -295,12 +343,7 @@
- int
- _XftFontDebug (void);
-
--/* xftfreetype.c */
--XftPattern *
--XftFreeTypeQuery (const char *file, int id, int *count);
--
- /* xftfs.c */
--/* xftglyphs.c */
- /* xftgram.y */
- int
- XftConfigparse (void);
-@@ -349,7 +392,7 @@
-
- /* xftinit.c */
- Bool
--XftInitFtLibrary (void);
-+XftInit (char *config);
-
- /* xftlex.l */
- extern int XftConfigLineno;
-@@ -365,9 +408,6 @@
- XftConfigPushInput (char *s, Bool complain);
-
- /* xftlist.c */
--XftObjectSet *
--_XftObjectSetVapBuild (const char *first, va_list *vap);
--
- Bool
- XftListValueCompare (XftValue v1,
- XftValue v2);
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftlex.l xc/lib/Xft/xftlex.l
---- XFree86-4.0.2.orig/xc/lib/Xft/xftlex.l Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftlex.l Fri Jan 19 20:25:58 2001
-@@ -1,6 +1,6 @@
- %{
- /*
-- * $XFree86: xc/lib/Xft/xftlex.l,v 1.3 2000/12/15 22:48:39 dawes Exp $
-+ * $XFree86: xc/lib/Xft/xftlex.l,v 1.4 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright (c) 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -97,6 +97,7 @@
- "/\052" _XftConfigSkipComment();
- ^# _XftConfigSkipLine();
- dir return DIR;
-+cache return CACHE;
- include return INCLUDE;
- includeif return INCLUDEIF;
- match return MATCH;
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftname.c xc/lib/Xft/xftname.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftname.c Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftname.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftname.c,v 1.5 2000/12/14 23:03:56 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftname.c,v 1.8 2001/01/02 02:46:51 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -26,13 +26,14 @@
- #include <ctype.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <stdio.h>
-
- typedef struct _XftObjectType {
- const char *object;
- XftType type;
- } XftObjectType;
-
--const XftObjectType _XftObjectTypes[] = {
-+static const XftObjectType _XftObjectTypes[] = {
- { XFT_FAMILY, XftTypeString, },
- { XFT_STYLE, XftTypeString, },
- { XFT_SLANT, XftTypeInteger, },
-@@ -53,6 +54,9 @@
- { XFT_RGBA, XftTypeInteger, },
- { XFT_SCALE, XftTypeDouble, },
- { XFT_RENDER, XftTypeBool, },
-+ { XFT_MINSPACE, XftTypeBool, },
-+ { XFT_CHAR_WIDTH, XftTypeInteger },
-+ { XFT_CHAR_HEIGHT, XftTypeInteger },
- };
-
- #define NUM_OBJECT_TYPES (sizeof _XftObjectTypes / sizeof _XftObjectTypes[0])
-@@ -152,9 +156,17 @@
- {
- char c;
-
-- while (*cur && !strchr (delim, *cur))
-+ while ((c = *cur))
- {
-- c = *cur++;
-+ if (c == '\\')
-+ {
-+ ++cur;
-+ if (!(c = *cur))
-+ break;
-+ }
-+ else if (strchr (delim, c))
-+ break;
-+ ++cur;
- *save++ = c;
- }
- *save = 0;
-@@ -211,10 +223,10 @@
- }
- while (delim == ':')
- {
-- name = _XftNameFindNext (name, "=-:", save, &delim);
-+ name = _XftNameFindNext (name, "=_:", save, &delim);
- if (save[0])
- {
-- if (delim == '=' || delim == '-')
-+ if (delim == '=' || delim == '_')
- {
- t = XftNameGetType (save);
- for (;;)
-@@ -250,4 +262,118 @@
- free (save);
- bail0:
- return 0;
-+}
-+
-+static Bool
-+_XftNameUnparseString (const char *string, char *escape, char **destp, int *lenp)
-+{
-+ int len = *lenp;
-+ char *dest = *destp;
-+ char c;
-+
-+ while ((c = *string++))
-+ {
-+ if (escape && strchr (escape, c))
-+ {
-+ if (len-- == 0)
-+ return False;
-+ *dest++ = escape[0];
-+ }
-+ if (len-- == 0)
-+ return False;
-+ *dest++ = c;
-+ }
-+ *destp = dest;
-+ *lenp = len;
-+ return True;
-+}
-+
-+static Bool
-+_XftNameUnparseValue (XftValue v, char *escape, char **destp, int *lenp)
-+{
-+ char temp[1024];
-+
-+ switch (v.type) {
-+ case XftTypeVoid:
-+ return True;
-+ case XftTypeInteger:
-+ sprintf (temp, "%d", v.u.i);
-+ return _XftNameUnparseString (temp, 0, destp, lenp);
-+ case XftTypeDouble:
-+ sprintf (temp, "%g", v.u.d);
-+ return _XftNameUnparseString (temp, 0, destp, lenp);
-+ case XftTypeString:
-+ return _XftNameUnparseString (v.u.s, escape, destp, lenp);
-+ case XftTypeBool:
-+ return _XftNameUnparseString (v.u.b ? "True" : "False", 0, destp, lenp);
-+ }
-+ return False;
-+}
-+
-+static Bool
-+_XftNameUnparseValueList (XftValueList *v, char *escape, char **destp, int *lenp)
-+{
-+ while (v)
-+ {
-+ if (!_XftNameUnparseValue (v->value, escape, destp, lenp))
-+ return False;
-+ if ((v = v->next))
-+ if (!_XftNameUnparseString (",", 0, destp, lenp))
-+ return False;
-+ }
-+ return True;
-+}
-+
-+#define XFT_ESCAPE_FIXED "\\-:,"
-+#define XFT_ESCAPE_VARIABLE "\\=_:,"
-+
-+Bool
-+XftNameUnparse (XftPattern *pat, char *dest, int len)
-+{
-+ int i;
-+ XftPatternElt *e;
-+ const XftObjectType *o;
-+
-+ e = XftPatternFind (pat, XFT_FAMILY, False);
-+ if (e)
-+ {
-+ if (!_XftNameUnparseValueList (e->values, XFT_ESCAPE_FIXED,
-+ &dest, &len))
-+ return False;
-+ }
-+ e = XftPatternFind (pat, XFT_SIZE, False);
-+ if (e)
-+ {
-+ if (!_XftNameUnparseString ("-", 0, &dest, &len))
-+ return False;
-+ if (!_XftNameUnparseValueList (e->values, XFT_ESCAPE_FIXED, &dest, &len))
-+ return False;
-+ }
-+ for (i = 0; i < NUM_OBJECT_TYPES; i++)
-+ {
-+ o = &_XftObjectTypes[i];
-+ if (!strcmp (o->object, XFT_FAMILY) ||
-+ !strcmp (o->object, XFT_SIZE) ||
-+ !strcmp (o->object, XFT_FILE))
-+ continue;
-+
-+ e = XftPatternFind (pat, o->object, False);
-+ if (e)
-+ {
-+ if (!_XftNameUnparseString (":", 0, &dest, &len))
-+ return False;
-+ if (!_XftNameUnparseString (o->object, XFT_ESCAPE_VARIABLE,
-+ &dest, &len))
-+ return False;
-+ if (!_XftNameUnparseString ("=", 0, &dest, &len))
-+ return False;
-+ if (!_XftNameUnparseValueList (e->values, XFT_ESCAPE_VARIABLE,
-+ &dest, &len))
-+ return False;
-+ }
-+ }
-+ if (len == 0)
-+ return False;
-+ *dest = '\0';
-+ return True;
- }
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftrender.c xc/lib/Xft/xftrender.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftrender.c Fri Dec 8 02:51:28 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftrender.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftrender.c,v 1.5 2000/12/08 07:51:28 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftrender.c,v 1.6 2000/12/20 00:28:45 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -22,6 +22,7 @@
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdlib.h>
- #include "xftint.h"
-
- void
-@@ -97,6 +98,93 @@
- }
-
- void
-+XftRenderStringUtf8 (Display *dpy, Picture src,
-+ XftFontStruct *font, Picture dst,
-+ int srcx, int srcy,
-+ int x, int y,
-+ XftChar8 *string, int len)
-+{
-+ XftChar8 *s;
-+ XftChar32 c;
-+ XftChar32 lbuf[4096];
-+ XftChar32 *d;
-+ XftChar8 *dst8;
-+ XftChar16 *dst16;
-+ XftChar32 *dst32;
-+ int rlen, clen;
-+ int width = 1;
-+ int n;
-+
-+ /* compute needed width */
-+ if (!XftUtf8Len (string, len, &n, &width))
-+ return;
-+
-+ d = lbuf;
-+ if (n * width > sizeof (lbuf))
-+ {
-+ d = (XftChar32 *) malloc (n * width);
-+ if (!d)
-+ return;
-+ }
-+
-+ switch (width) {
-+ case 4:
-+ s = string;
-+ rlen = len;
-+ dst32 = d;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (s, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return;
-+ *dst32++ = c;
-+ s += clen;
-+ rlen -= clen;
-+ }
-+ dst32 = d;
-+ XftRenderString32 (dpy, src, font, dst, srcx, srcy, x, y,
-+ dst32, n);
-+ break;
-+ case 2:
-+ s = string;
-+ rlen = len;
-+ dst16 = (XftChar16 *) d;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (s, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return;
-+ *dst16++ = c;
-+ s += clen;
-+ rlen -= clen;
-+ }
-+ dst16 = (XftChar16 *) d;
-+ XftRenderString16 (dpy, src, font, dst, srcx, srcy, x, y,
-+ dst16, n);
-+ break;
-+ case 1:
-+ s = string;
-+ rlen = len;
-+ dst8 = (XftChar8 *) d;
-+ while (rlen)
-+ {
-+ clen = XftUtf8ToUcs4 (s, &c, rlen);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return;
-+ *dst8++ = c;
-+ s += clen;
-+ rlen -= clen;
-+ }
-+ dst8 = (XftChar8 *) d;
-+ XftRenderString8 (dpy, src, font, dst, srcx, srcy, x, y,
-+ dst8, n);
-+ break;
-+ }
-+ if (d != lbuf)
-+ free (d);
-+}
-+
-+void
- XftRenderExtents8 (Display *dpy,
- XftFontStruct *font,
- XftChar8 *string,
-@@ -273,6 +361,89 @@
- while (len--)
- {
- c = *string++;
-+ gi = c < font->nrealized ? font->realized[c] : 0;
-+ if (!gi)
-+ continue;
-+ if (gi->x + x < extents->x)
-+ extents->x = gi->x + x;
-+ if (gi->y + y < extents->y)
-+ extents->y = gi->y + y;
-+ if (gi->width + x > extents->width)
-+ extents->width = gi->width + x;
-+ if (gi->height + y > extents->height)
-+ extents->height = gi->height + y;
-+ x += gi->xOff;
-+ y += gi->yOff;
-+ }
-+ extents->xOff = x;
-+ extents->yOff = y;
-+}
-+
-+void
-+XftRenderExtentsUtf8 (Display *dpy,
-+ XftFontStruct *font,
-+ XftChar8 *string,
-+ int len,
-+ XGlyphInfo *extents)
-+{
-+ unsigned int missing[XFT_NMISSING];
-+ int nmissing;
-+ XftChar8 *s;
-+ XftChar32 c;
-+ int l, clen;
-+ XGlyphInfo *gi;
-+ int x, y;
-+
-+ s = string;
-+ l = len;
-+ nmissing = 0;
-+ while (l)
-+ {
-+ clen = XftUtf8ToUcs4 (s, &c, l);
-+ if (clen < 0)
-+ break;
-+ XftGlyphCheck (dpy, font, c, missing, &nmissing);
-+ s += clen;
-+ l -= clen;
-+ }
-+ if (nmissing)
-+ XftGlyphLoad (dpy, font, missing, nmissing);
-+
-+ gi = 0;
-+ while (len)
-+ {
-+ clen = XftUtf8ToUcs4 (string, &c, len);
-+ if (clen < 0)
-+ {
-+ len = 0;
-+ break;
-+ }
-+ len -= clen;
-+ string += clen;
-+ gi = c < font->nrealized ? font->realized[c] : 0;
-+ if (gi)
-+ break;
-+ }
-+ if (len == 0 && !gi)
-+ {
-+ extents->width = 0;
-+ extents->height = 0;
-+ extents->x = 0;
-+ extents->y = 0;
-+ extents->yOff = 0;
-+ extents->xOff = 0;
-+ return;
-+ }
-+ *extents = *gi;
-+ x = gi->xOff;
-+ y = gi->yOff;
-+ while (len)
-+ {
-+ clen = XftUtf8ToUcs4 (string, &c, len);
-+ if (clen < 0)
-+ break;
-+ len -= clen;
-+ string += clen;
- gi = c < font->nrealized ? font->realized[c] : 0;
- if (!gi)
- continue;
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftstr.c xc/lib/Xft/xftstr.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftstr.c Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftstr.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftstr.c,v 1.2 2000/12/14 23:03:57 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftstr.c,v 1.4 2000/12/20 10:24:27 keithp Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -149,4 +149,108 @@
- break;
- }
- return (int) c2 - (int) c1;
-+}
-+
-+int
-+XftUtf8ToUcs4 (XftChar8 *src_orig,
-+ XftChar32 *dst,
-+ int len)
-+{
-+ XftChar8 *src = src_orig;
-+ XftChar8 s;
-+ int extra;
-+ XftChar32 result;
-+
-+ if (len == 0)
-+ return 0;
-+
-+ s = *src++;
-+ len--;
-+
-+ if (!(s & 0x80))
-+ {
-+ result = s;
-+ extra = 0;
-+ }
-+ else if (!(s & 0x40))
-+ {
-+ return -1;
-+ }
-+ else if (!(s & 0x20))
-+ {
-+ result = s & 0x1f;
-+ extra = 1;
-+ }
-+ else if (!(s & 0x10))
-+ {
-+ result = s & 0xf;
-+ extra = 2;
-+ }
-+ else if (!(s & 0x08))
-+ {
-+ result = s & 0x07;
-+ extra = 3;
-+ }
-+ else if (!(s & 0x04))
-+ {
-+ result = s & 0x03;
-+ extra = 4;
-+ }
-+ else if ( ! (s & 0x02))
-+ {
-+ result = s & 0x01;
-+ extra = 5;
-+ }
-+ else
-+ {
-+ return -1;
-+ }
-+ if (extra > len)
-+ return -1;
-+
-+ while (extra--)
-+ {
-+ result <<= 6;
-+ s = *src++;
-+
-+ if ((s & 0xc0) != 0x80)
-+ return -1;
-+
-+ result |= s & 0x3f;
-+ }
-+ *dst = result;
-+ return src - src_orig;
-+}
-+
-+Bool
-+XftUtf8Len (XftChar8 *string,
-+ int len,
-+ int *nchar,
-+ int *wchar)
-+{
-+ int n;
-+ int clen;
-+ int width = 1;
-+ XftChar32 c;
-+
-+ n = 0;
-+ while (len)
-+ {
-+ clen = XftUtf8ToUcs4 (string, &c, len);
-+ if (clen <= 0) /* malformed UTF8 string */
-+ return False;
-+ if (c >= 0x10000)
-+ width = 4;
-+ else if (c >= 0x100)
-+ {
-+ if (width == 1)
-+ width = 2;
-+ }
-+ string += clen;
-+ len -= clen;
-+ n++;
-+ }
-+ *nchar = n;
-+ *wchar = width;
-+ return True;
- }
-diff -urN -x CVS xc-4.0.2.orig/lib/Xft/xftxlfd.c xc/lib/Xft/xftxlfd.c
---- XFree86-4.0.2.orig/xc/lib/Xft/xftxlfd.c Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/lib/Xft/xftxlfd.c Fri Jan 19 20:25:58 2001
-@@ -1,5 +1,5 @@
- /*
-- * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.5 2000/12/14 23:03:57 keithp Exp $
-+ * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.7 2000/12/22 05:05:16 tsi Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *
-@@ -208,9 +208,21 @@
- return ret;
- }
-
--XFontStruct *
-+typedef struct _XftCoreFont {
-+ struct _XftCoreFont *next;
-+ int ref;
-+
-+ XFontStruct *font;
-+ Display *display;
-+ char *xlfd;
-+} XftCoreFont;
-+
-+static XftCoreFont *_XftCoreFonts;
-+
-+XFontStruct*
- XftCoreOpen (Display *dpy, XftPattern *pattern)
- {
-+ XftCoreFont *cf;
- char *xlfd;
- char *xlfd_pixel = 0;
- char *i, *o;
-@@ -258,9 +270,66 @@
- xlfd = xlfd_pixel;
- }
- }
-- ret = XLoadQueryFont (dpy, xlfd);
-+ for (cf = _XftCoreFonts; cf; cf = cf->next)
-+ {
-+ if (cf->display == dpy &&
-+ !_XftStrCmpIgnoreCase (cf->xlfd, xlfd))
-+ {
-+ cf->ref++;
-+ if (_XftFontDebug () & XFT_DBG_REF)
-+ {
-+ printf ("Xlfd \"%s\" matches existing font (%d)\n",
-+ xlfd, cf->ref);
-+ }
-+ break;
-+ }
-+ }
-+ if (!cf)
-+ {
-+ ret = XLoadQueryFont (dpy, xlfd);
-+ if (!ret)
-+ return 0;
-+
-+ cf = (XftCoreFont *) malloc (sizeof (XftCoreFont) +
-+ strlen (xlfd) + 1);
-+ if (!cf)
-+ {
-+ XFreeFont (dpy, ret);
-+ return 0;
-+ }
-+
-+ if (_XftFontDebug () & XFT_DBG_REF)
-+ printf ("Xlfd \"%s\" matches new font\n", xlfd);
-+
-+ cf->next = _XftCoreFonts;
-+ _XftCoreFonts = cf;
-+ cf->ref = 1;
-+
-+ cf->font = ret;
-+ cf->xlfd = (char *) (cf + 1);
-+ strcpy (cf->xlfd, xlfd);
-+ }
- if (xlfd_pixel)
- free (xlfd_pixel);
-- return ret;
-+ return cf->font;
- }
-
-+void
-+XftCoreClose (Display *dpy, XFontStruct *font)
-+{
-+ XftCoreFont *cf, **prev;
-+
-+ for (prev = &_XftCoreFonts; (cf = *prev); prev = &cf->next)
-+ {
-+ if (cf->display == dpy && cf->font == font)
-+ {
-+ if (--cf->ref == 0)
-+ {
-+ XFreeFont (dpy, cf->font);
-+ *prev = cf->next;
-+ free (cf);
-+ }
-+ break;
-+ }
-+ }
-+}
+++ /dev/null
---- xc/programs/Xserver/dix/main.c~ Sat Jun 17 13:42:40 2000
-+++ xc/programs/Xserver/dix/main.c Mon Oct 30 18:02:23 2000
-@@ -256,6 +256,7 @@
- char *envp[];
- {
- int i, j, k, error;
-+ char *xauthfile;
- HWEventQueueType alwaysCheckForInput[2];
-
- /* Notice if we're restarted. Probably this is because we jumped through
-@@ -279,6 +280,10 @@
- argcGlobal = argc;
- argvGlobal = argv;
- display = "0";
-+ /* prep X authority file from environment; this can be overriden by a
-+ * command line option */
-+ xauthfile = getenv("XAUTHORITY");
-+ if (xauthfile) InitAuthorization (xauthfile);
- ProcessCommandLine(argc, argv);
-
- alwaysCheckForInput[0] = 0;
-@@ -286,7 +291,7 @@
- while(1)
- {
- serverGeneration++;
-- ScreenSaverTime = defaultScreenSaverTime;
-+ ScreenSaverTime = defaultScreenSaverTime;
- ScreenSaverInterval = defaultScreenSaverInterval;
- ScreenSaverBlanking = defaultScreenSaverBlanking;
- ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
+++ /dev/null
-diff -urN xc.orig/config/cf/Server.tmpl xc/config/cf/Server.tmpl
---- xc.orig/config/cf/Server.tmpl Mon Dec 30 15:52:30 2002
-+++ xc/config/cf/Server.tmpl Mon Dec 30 17:31:51 2002
-@@ -25,8 +25,14 @@
- #ifndef DoThreadedServer
- #define DoThreadedServer NO
- #endif
-+#ifndef XserverNeedsSetUID
-+#define XserverNeedsSetUID NO
-+#endif
-+#ifndef UseXserverWrapper
-+#define UseXserverWrapper XserverNeedsSetUID
-+#endif
- #ifndef InstallServerSetUID
--#define InstallServerSetUID NO
-+#define InstallServerSetUID (XserverNeedsSetUID && !UseXserverWrapper)
- #endif
-
- #ifdef CrossCompileDir
-diff -urN xc.orig/config/cf/xf86site.def xc/config/cf/xf86site.def
---- xc.orig/config/cf/xf86site.def Mon Dec 30 15:52:31 2002
-+++ xc/config/cf/xf86site.def Mon Dec 30 17:37:06 2002
-@@ -69,14 +69,15 @@
- */
-
- /*
-- * If you only run the X server under xdm the X servers don't need to be
-- * installed SetUID, and you may comment out the lines below. If you run
-- * the servers by hand (with xinit or startx), then they do need to be
-- * installed SetUID on most platforms.
-+ * The X servers need to run as root on most OSs. We're now using a
-+ * wrapper in that case, but we still need to make it known that the
-+ * servers need SetUID. When only using xdm, this (and the wrapper)
-+ * are not required. Disabling this automatically disables use of the
-+ * wrapper.
- *
-- * Consult your system administrator before making the X server setuid.
-+ * If you're only starting the Xservers with xdm set this to NO
- *
--#define InstallXserverSetUID NO
-+#define XserverNeedsSetUID NO
- */
-
-
-diff -urN xc.orig/config/cf/xfree86.cf xc/config/cf/xfree86.cf
---- xc.orig/config/cf/xfree86.cf Mon Dec 30 15:52:31 2002
-+++ xc/config/cf/xfree86.cf Mon Dec 30 17:31:51 2002
-@@ -1104,12 +1104,15 @@
- #endif
-
- /*
-- * The default is to install the X servers setuid-root on most OSs.
-- * It the servers are only started by xdm, they should not be setuid-root.
-+ * The X servers need to run as root on most OSs. We're now using a
-+ * wrapper in that case, but we still need to make it known that the
-+ * servers need SetUID. When only using xdm, this (and the wrapper)
-+ * are not required. Disabling this automatically disables use of the
-+ * wrapper.
- */
- #if !defined(i386MachArchitecture) && !defined(OS2Architecture)
--# ifndef InstallXserverSetUID
--# define InstallXserverSetUID YES
-+# ifndef XserverNeedsSetUID
-+# define XserverNeedsSetUID YES
- # endif
- #endif
-
-diff -urN xc.orig/programs/Xserver/Imakefile xc/programs/Xserver/Imakefile
---- xc.orig/programs/Xserver/Imakefile Mon Dec 30 15:53:22 2002
-+++ xc/programs/Xserver/Imakefile Mon Dec 30 17:31:51 2002
-@@ -4,11 +4,6 @@
- */
- XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.275 2002/12/21 00:19:11 torrey Exp $
-
--#ifndef InstallXserverSetUID
--#define InstallXserverSetUID NO
--#endif
--#define InstallServerSetUID InstallXserverSetUID
--
- #include <Server.tmpl>
-
- #ifdef XFree86Version
-@@ -1146,6 +1141,11 @@
- #endif /* XnestServer */
-
-
-+#if UseXserverWrapper
-+SetUIDProgramTarget(Xwrapper,os/wrapper.o,NullParameter,$(PAMLIBS),NullParameter)
-+InstallProgramWithFlags(Xwrapper,$(BINDIR),$(INSTUIDFLAGS))
-+#endif
-+
- #if defined(XnonServer) && XnonServer
- XCOMM
- XCOMM non server, just compile sources for build test
-diff -urN xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c
---- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c Mon Dec 30 15:53:52 2002
-+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c Mon Dec 30 17:31:51 2002
-@@ -66,7 +66,10 @@
- /* check if we're run with euid==0 */
- if (geteuid() != 0)
- {
-- FatalError("xf86OpenConsole: Server must be suid root\n");
-+ FatalError("xf86OpenConsole: Server must be running with root "
-+ "permissions\n"
-+ "You should be using Xwrapper to start the server or xdm.\n"
-+ "We strongly advise against making the server SUID root!\n");
- }
-
- /*
-diff -urN xc.orig/programs/Xserver/os/Imakefile xc/programs/Xserver/os/Imakefile
---- xc.orig/programs/Xserver/os/Imakefile Mon Dec 30 15:53:58 2002
-+++ xc/programs/Xserver/os/Imakefile Mon Dec 30 17:31:52 2002
-@@ -120,6 +120,7 @@
- INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
- -I$(SERVERSRC)/Xext -I$(FONTINCSRC) -I$(SERVERSRC)/render \
- -I$(TOP)/lib/Xau -I../lbx Krb5Includes
-+ EXTRA_DEFINES = -DUSE_PAM
- DEPEND_DEFINES = $(DBM_DEFINES) $(XDMCP_DEFINES) $(EXT_DEFINES) \
- $(TRANS_INCLUDES) $(CONNECTION_FLAGS) DependDefines
- LINTLIBS = ../dix/llib-ldix.ln
-@@ -166,6 +167,14 @@
- SpecialCObjectRule(oscolor,$(ICONFIGFILES),$(DBM_DEFINES))
- #endif
-
-+#if UseXserverWrapper
-+AllTarget(wrapper.o)
-+
-+ WRAPPER_DEFINES = -DXSERVER_PATH=\"/etc/X11/X\"
-+
-+SpecialCObjectRule(wrapper,NullParameter,$(WRAPPER_DEFINES))
-+#endif
-+
- #if HasKrb5
- LinkSourceFile(k5encode.c,$(XAUTHSRC))
- #endif
-diff -urN xc.orig/programs/Xserver/os/wrapper.c xc/programs/Xserver/os/wrapper.c
---- xc.orig/programs/Xserver/os/wrapper.c Thu Jan 1 01:00:00 1970
-+++ xc/programs/Xserver/os/wrapper.c Mon Dec 30 17:31:52 2002
-@@ -0,0 +1,304 @@
-+/*
-+ * X server wrapper.
-+ *
-+ * This wrapper makes some sanity checks on the command line arguments
-+ * and environment variables when run with euid == 0 && euid != uid.
-+ * If the checks fail, the wrapper exits with a message.
-+ * If they succeed, it exec's the Xserver.
-+ */
-+
-+/*
-+ * Copyright (c) 1998 by 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.
-+ */
-+
-+/* $XFree86: xc/programs/Xserver/os/wrapper.c,v 1.1.2.5 1998/02/27 15:28:59 dawes Exp $ */
-+
-+/* This is normally set in the Imakefile */
-+#ifndef XSERVER_PATH
-+#define XSERVER_PATH "/etc/X11/X"
-+#endif
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#ifdef USE_PAM
-+#include <security/pam_appl.h>
-+#include <security/pam_misc.h>
-+#include <pwd.h>
-+#endif /* USE_PAM */
-+
-+/* Neither of these should be required for XFree86 3.3.2 */
-+#ifndef REJECT_CONFIG
-+#define REJECT_CONFIG 0
-+#endif
-+#ifndef REJECT_XKBDIR
-+#define REJECT_XKBDIR 0
-+#endif
-+
-+/* Consider LD* variables insecure ? */
-+#ifndef REMOVE_ENV_LD
-+#define REMOVE_ENV_LD 1
-+#endif
-+
-+/* Remove long environment variables? */
-+#ifndef REMOVE_LONG_ENV
-+#define REMOVE_LONG_ENV 1
-+#endif
-+
-+/* Check args and env only if running setuid (euid == 0 && euid != uid) ? */
-+#ifndef CHECK_EUID
-+#define CHECK_EUID 1
-+#endif
-+
-+/*
-+ * Maybe the locale can be faked to make isprint(3) report that everything
-+ * is printable? Avoid it by default.
-+ */
-+#ifndef USE_ISPRINT
-+#define USE_ISPRINT 0
-+#endif
-+
-+#define MAX_ARG_LENGTH 128
-+#define MAX_ENV_LENGTH 256
-+#define MAX_ENV_PATH_LENGTH 2048
-+
-+#if USE_ISPRINT
-+#include <ctype.h>
-+#define checkPrintable(c) isprint(c)
-+#else
-+#define checkPrintable(c) (((c) & 0x7f) >= 0x20 && ((c) & 0x7f) != 0x7f)
-+#endif
-+
-+enum BadCode {
-+ NotBad = 0,
-+ UnsafeArg,
-+ ArgTooLong,
-+ UnprintableArg,
-+ EnvTooLong,
-+ InternalError,
-+#ifdef USE_PAM
-+ PamFailed,
-+ PamAuthFailed,
-+#endif /* USE_PAM */
-+};
-+
-+#define ARGMSG \
-+ "\nIf the arguments used are valid, and have been rejected incorrectly\n" \
-+ "please send details of the arguments and why they are valid to\n" \
-+ "XFree86@XFree86.org. In the meantime, you can start the Xserver as\n" \
-+ "the \"super user\" (root).\n"
-+
-+#define ENVMSG \
-+ "\nIf the environment is valid, and have been rejected incorrectly\n" \
-+ "please send details of the environment and why it is valid to\n" \
-+ "XFree86@XFree86.org. In the meantime, you can start the Xserver as\n" \
-+ "the \"super user\" (root).\n"
-+
-+#ifdef USE_PAM
-+static struct pam_conv conv = {
-+ misc_conv,
-+ NULL
-+};
-+#endif /* USE_PAM */
-+
-+
-+int
-+main(int argc, char **argv, char **envp)
-+{
-+ enum BadCode bad = NotBad;
-+ int i, j;
-+ char *a, *e;
-+#ifdef USE_PAM
-+ pam_handle_t *pamh = NULL;
-+ struct passwd *pw;
-+ int retval;
-+
-+ pw = getpwuid(getuid());
-+ if (pw == NULL) {
-+ bad = InternalError;
-+ }
-+
-+ if (!bad) {
-+ retval = pam_start("xserver", pw->pw_name, &conv, &pamh);
-+ if (retval != PAM_SUCCESS)
-+ bad = PamFailed;
-+ }
-+
-+ if (!bad) {
-+ retval = pam_authenticate(pamh, 0);
-+ if (retval != PAM_SUCCESS) {
-+ pam_end(pamh, retval);
-+ bad = PamAuthFailed;
-+ }
-+ }
-+
-+ if (!bad) {
-+ retval = pam_acct_mgmt(pamh, 0);
-+ if (retval != PAM_SUCCESS) {
-+ pam_end(pamh, retval);
-+ bad = PamAuthFailed;
-+ }
-+ }
-+
-+ /* this is not a session, so do not do session management */
-+
-+ if (!bad) pam_end(pamh, PAM_SUCCESS);
-+#endif /* USE_PAM */
-+
-+#if CHECK_EUID
-+ if (!bad && geteuid() == 0 && getuid() != geteuid()) {
-+#else
-+ if (!bad) {
-+#endif
-+ /* Check each argv[] */
-+ for (i = 1; i < argc; i++) {
-+
-+ /* Check for known bad arguments */
-+#if REJECT_CONFIG
-+ if (strcmp(argv[i], "-config") == 0) {
-+ bad = UnsafeArg;
-+ break;
-+ }
-+#endif
-+#if REJECT_XKBDIR
-+ if (strcmp(argv[i], "-xkbdir") == 0) {
-+ bad = UnsafeArg;
-+ break;
-+ }
-+#endif
-+ if (strlen(argv[i]) > MAX_ARG_LENGTH) {
-+ bad = ArgTooLong;
-+ break;
-+ }
-+ a = argv[i];
-+ while (*a) {
-+ if (checkPrintable(*a) == 0) {
-+ bad = UnprintableArg;
-+ break;
-+ }
-+ a++;
-+ }
-+ if (bad)
-+ break;
-+ }
-+ /* Check each envp[] */
-+ if (!bad)
-+ for (i = 0; envp[i]; i++) {
-+
-+ /* Check for bad environment variables and values */
-+#if REMOVE_ENV_LD
-+ while (envp[i] && (strncmp(envp[i], "LD", 2) == 0)) {
-+ for (j = i; envp[j]; j++) {
-+ envp[j] = envp[j+1];
-+ }
-+ }
-+#endif
-+ if (envp[i] && (strlen(envp[i]) > MAX_ENV_LENGTH)) {
-+#if REMOVE_LONG_ENV
-+ for (j = i; envp[j]; j++) {
-+ envp[j] = envp[j+1];
-+ }
-+ i--;
-+#else
-+ char *eq;
-+ int len;
-+
-+ eq = strchr(envp[i], '=');
-+ if (!eq)
-+ continue;
-+ len = eq - envp[i];
-+ e = malloc(len + 1);
-+ if (!e) {
-+ bad = InternalError;
-+ break;
-+ }
-+ strncpy(e, envp[i], len);
-+ e[len] = 0;
-+ if (len >= 4 &&
-+ (strcmp(e + len - 4, "PATH") == 0 ||
-+ strcmp(e, "TERMCAP") == 0)) {
-+ if (strlen(envp[i]) > MAX_ENV_PATH_LENGTH) {
-+ bad = EnvTooLong;
-+ break;
-+ } else {
-+ free(e);
-+ }
-+ } else {
-+ bad = EnvTooLong;
-+ break;
-+ }
-+#endif
-+ }
-+ }
-+ }
-+ switch (bad) {
-+ case NotBad:
-+ execve(XSERVER_PATH, argv, envp);
-+ fprintf(stderr, "execve failed for %s (errno %d)\n", XSERVER_PATH,
-+ errno);
-+ break;
-+ case UnsafeArg:
-+ fprintf(stderr, "Command line argument number %d is unsafe\n", i);
-+ fprintf(stderr, ARGMSG);
-+ break;
-+ case ArgTooLong:
-+ fprintf(stderr, "Command line argument number %d is too long\n", i);
-+ fprintf(stderr, ARGMSG);
-+ break;
-+ case UnprintableArg:
-+ fprintf(stderr, "Command line argument number %d contains unprintable"
-+ " characters\n", i);
-+ fprintf(stderr, ARGMSG);
-+ break;
-+ case EnvTooLong:
-+ fprintf(stderr, "Environment variable `%s' is too long\n", e);
-+ fprintf(stderr, ENVMSG);
-+ break;
-+ case InternalError:
-+ fprintf(stderr, "Internal Error\n");
-+ break;
-+#ifdef USE_PAM
-+ case PamFailed:
-+ fprintf(stderr, "Authentication System Failure, "
-+ "missing or mangled PAM configuration file or module?\n");
-+ break;
-+ case PamAuthFailed:
-+ fprintf(stderr, "PAM authentication failed\n");
-+ break;
-+#endif
-+ default:
-+ fprintf(stderr, "Unknown error\n");
-+ fprintf(stderr, ARGMSG);
-+ fprintf(stderr, ENVMSG);
-+ break;
-+ }
-+ exit(1);
-+}
-+
-diff -urN xc.orig/programs/xinit/startx.cpp xc/programs/xinit/startx.cpp
---- xc.orig/programs/xinit/startx.cpp Mon Dec 30 15:54:10 2002
-+++ xc/programs/xinit/startx.cpp Mon Dec 30 17:31:52 2002
-@@ -53,7 +53,7 @@
- sysclientrc=XINITDIR/xinitrc
- sysserverrc=XINITDIR/xserverrc
- defaultclient=BINDIR/xterm
--defaultserver=BINDIR/X
-+defaultserver=BINDIR/Xwrapper
- defaultclientargs=""
- defaultserverargs=""
- clientargs=""
-diff -urN xc.orig/programs/xinit/xinit.c xc/programs/xinit/xinit.c
---- xc.orig/programs/xinit/xinit.c Mon Dec 30 15:54:10 2002
-+++ xc/programs/xinit/xinit.c Mon Dec 30 17:31:52 2002
-@@ -146,6 +146,7 @@
- #define OK_EXIT 0
- #define ERR_EXIT 1
-
-+char *default_wrapper = BINDIR "/Xwrapper";
- char *default_server = "X";
- char *default_display = ":0"; /* choose most efficient */
- char *default_client[] = {"xterm", "-geometry", "+1+1", "-n", "login", NULL};
-@@ -332,7 +333,10 @@
- if (argc == 0 ||
- #ifndef __UNIXOS2__
- (**argv != '/' && **argv != '.')) {
-- *sptr++ = default_server;
-+ if (access(default_wrapper, X_OK) == 0)
-+ *sptr++ = default_wrapper;
-+ else
-+ *sptr++ = default_server;
- #else
- (**argv != '/' && **argv != '\\' && **argv != '.' &&
- !(isalpha(**argv) && (*argv)[1]==':'))) {
+++ /dev/null
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c~ Sat May 19 02:26:45 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c Sun Jun 17 23:05:42 2001
-@@ -285,6 +285,9 @@
- #if !defined(XFree86Server)
- return -1;
- #else
-+ if (!xf86LoadKernelModule("agpgart")) {
-+ ErrorF("[drm] failed to load kernel module \"agpgart\"\n");
-+ }
- /* try to load the kernel module now */
- if (!xf86LoadKernelModule(name)) {
- ErrorF("[drm] failed to load kernel module \"%s\"\n",
+++ /dev/null
---- xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c.lemming Mon Jul 3 02:10:01 2000
-+++ xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c Mon Jul 3 02:10:29 2000
-@@ -289,7 +289,7 @@
- if (!pciInitialized)
- pciInit();
-
-- if ((bus < pciNumBuses || inProbe) && pciBusInfo[bus] &&
-+ if ((bus < pciNumBuses) && pciBusInfo[bus] &&
- pciBusInfo[bus]->funcs.pciReadLong) {
- CARD32 rv = (*pciBusInfo[bus]->funcs.pciReadLong)(tag, offset);
-
+++ /dev/null
---- XFree86-3.3.3.1/xc/include/Xpoll.h.alpha-sockets Mon Jan 11 12:28:21 1999
-+++ XFree86-3.3.3.1/xc/include/Xpoll.h Mon Jan 11 12:30:05 1999
-@@ -40,7 +40,7 @@
-
- #include <X11/Xos.h>
- #if !defined(DGUX)
--#if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE)
-+#if (defined(SVR4) || defined(CRAY) || defined(AIXV3) || defined(linux)) && !defined(FD_SETSIZE)
- #include <sys/select.h>
- #ifdef luna
- #include <sysent.h>
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/compiler.h.alpha-sockets Mon Oct 19 16:39:32 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/compiler.h Mon Jan 11 12:28:22 1999
-@@ -161,53 +161,93 @@
- * from linux/include/asm-alpha/unaligned.h
- */
-
--static __inline__ unsigned long ldq_u(unsigned long * r11)
--{
-+/*
-+ * This is a silly but good way to make sure that
-+ * the get/put functions are indeed always optimized,
-+ * and that we use the correct sizes.
-+ */
-+extern void bad_unaligned_access_length(void);
-+
-+/*
-+ * EGCS 1.1 knows about arbitrary unaligned loads. Define some
-+ * packed structures to talk about such things with.
-+ */
-+
-+struct __una_u64 { unsigned long x __attribute__((packed)); };
-+struct __una_u32 { unsigned int x __attribute__((packed)); };
-+struct __una_u16 { unsigned short x __attribute__((packed)); };
-+
-+/*
-+ * Elemental unaligned loads
-+ */
-+
-+extern __inline__ unsigned long ldq_u(const unsigned long * r11)
-+{
-+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
-+ const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
-+ return ptr->x;
-+#else
- unsigned long r1,r2;
- __asm__("ldq_u %0,%3\n\t"
- "ldq_u %1,%4\n\t"
- "extql %0,%2,%0\n\t"
-- "extqh %1,%2,%1\n\t"
-- "bis %1,%0,%0"
-+ "extqh %1,%2,%1"
- :"=&r" (r1), "=&r" (r2)
- :"r" (r11),
- "m" (*r11),
-- "m" (*(unsigned long *)(7+(char *) r11)));
-- return r1;
-+ "m" (*(const unsigned long *)(7+(char *) r11)));
-+ return r1 | r2;
-+#endif
- }
-
--static __inline__ unsigned long ldl_u(unsigned int * r11)
-+extern __inline__ unsigned long ldl_u(const unsigned int * r11)
- {
-+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
-+ const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
-+ return ptr->x;
-+#else
- unsigned long r1,r2;
- __asm__("ldq_u %0,%3\n\t"
- "ldq_u %1,%4\n\t"
- "extll %0,%2,%0\n\t"
-- "extlh %1,%2,%1\n\t"
-- "bis %1,%0,%0"
-+ "extlh %1,%2,%1"
- :"=&r" (r1), "=&r" (r2)
- :"r" (r11),
- "m" (*r11),
-- "m" (*(unsigned long *)(3+(char *) r11)));
-- return r1;
-+ "m" (*(const unsigned long *)(3+(char *) r11)));
-+ return r1 | r2;
-+#endif
- }
-
--static __inline__ unsigned long ldw_u(unsigned short * r11)
-+extern __inline__ unsigned long ldw_u(const unsigned short * r11)
- {
-+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
-+ const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
-+ return ptr->x;
-+#else
- unsigned long r1,r2;
- __asm__("ldq_u %0,%3\n\t"
- "ldq_u %1,%4\n\t"
- "extwl %0,%2,%0\n\t"
-- "extwh %1,%2,%1\n\t"
-- "bis %1,%0,%0"
-+ "extwh %1,%2,%1"
- :"=&r" (r1), "=&r" (r2)
- :"r" (r11),
- "m" (*r11),
-- "m" (*(unsigned long *)(1+(char *) r11)));
-- return r1;
-+ "m" (*(const unsigned long *)(1+(char *) r11)));
-+ return r1 | r2;
-+#endif
- }
-
--static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
--{
-+/*
-+ * Elemental unaligned stores
-+ */
-+
-+extern __inline__ void stq_u(unsigned long r5, unsigned long * r11)
-+{
-+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
-+ struct __una_u64 *ptr = (struct __una_u64 *) r11;
-+ ptr->x = r5;
-+#else
- unsigned long r1,r2,r3,r4;
-
- __asm__("ldq_u %3,%1\n\t"
-@@ -224,10 +264,15 @@
- "=m" (*(unsigned long *)(7+(char *) r11)),
- "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
- :"r" (r5), "r" (r11));
-+#endif
- }
-
--static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
-+extern __inline__ void stl_u(unsigned long r5, unsigned int * r11)
- {
-+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
-+ struct __una_u32 *ptr = (struct __una_u32 *) r11;
-+ ptr->x = r5;
-+#else
- unsigned long r1,r2,r3,r4;
-
- __asm__("ldq_u %3,%1\n\t"
-@@ -244,10 +289,15 @@
- "=m" (*(unsigned long *)(3+(char *) r11)),
- "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
- :"r" (r5), "r" (r11));
-+#endif
- }
-
--static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
-+extern __inline__ void stw_u(unsigned long r5, unsigned short * r11)
- {
-+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
-+ struct __una_u16 *ptr = (struct __una_u16 *) r11;
-+ ptr->x = r5;
-+#else
- unsigned long r1,r2,r3,r4;
-
- __asm__("ldq_u %3,%1\n\t"
-@@ -264,6 +314,7 @@
- "=m" (*(unsigned long *)(1+(char *) r11)),
- "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
- :"r" (r5), "r" (r11));
-+#endif
- }
-
- #define mem_barrier() __asm__ __volatile__("mb" : : : "memory")
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86Summa.c.alpha-sockets Mon Jan 11 12:28:16 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86Summa.c Mon Jan 11 12:28:22 1999
-@@ -600,7 +600,7 @@
- timeout.tv_sec = 0;
- timeout.tv_usec = 200000;
-
-- SYSCALL(err = select(FD_SETSIZE, &readfds, NULL, NULL, &timeout));
-+ SYSCALL(err = select(fd+1, &readfds, NULL, NULL, &timeout));
- if (err == -1) {
- Error("SummaSketch select");
- return NULL;
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86Wacom.c.alpha-sockets Mon Jan 11 12:28:16 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86Wacom.c Mon Jan 11 12:28:23 1999
-@@ -692,7 +692,7 @@
-
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
-- SYSCALL(err = select(FD_SETSIZE, &readfds, NULL, NULL, &timeout));
-+ SYSCALL(err = select(fd+1, &readfds, NULL, NULL, &timeout));
-
- return err;
- }
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86_Mouse.c.alpha-sockets Mon Jan 11 12:28:16 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86_Mouse.c Mon Jan 11 12:28:23 1999
-@@ -437,7 +437,7 @@
- write(mouse->mseFd, s, 1);
- FD_ZERO(&fds);
- FD_SET(mouse->mseFd, &fds);
-- if (select(FD_SETSIZE, &fds, NULL, NULL, NULL) <= 0)
-+ if (select(mouse->mseFd+1, &fds, NULL, NULL, NULL) <= 0)
- break;
- read(mouse->mseFd, &c, 1);
- if (c != *s)
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86_PnPMouse.c.alpha-sockets Mon Mar 2 05:23:21 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/common/xf86_PnPMouse.c Mon Jan 11 12:28:23 1999
-@@ -235,7 +235,7 @@
- FD_SET(mouse->mseFd, &fds);
- timeout.tv_sec = 0;
- timeout.tv_usec = 200000;
-- if (select(FD_SETSIZE, &fds, NULL, NULL, &timeout) <= 0) {
-+ if (select(mouse->mseFd+1, &fds, NULL, NULL, &timeout) <= 0) {
-
- /* port setup, 2nd phase (2.1.5) */
- i = TIOCM_DTR | TIOCM_RTS; /* DTR = 0, RTS = 0 */
-@@ -252,7 +252,7 @@
- FD_SET(mouse->mseFd, &fds);
- timeout.tv_sec = 0;
- timeout.tv_usec = 200000;
-- if (select(FD_SETSIZE, &fds, NULL, NULL, &timeout) <= 0)
-+ if (select(mouse->mseFd+1, &fds, NULL, NULL, &timeout) <= 0)
- goto connect_idle;
- }
- #else
-@@ -277,7 +277,7 @@
- FD_SET(mouse->mseFd, &fds);
- timeout.tv_sec = 0;
- timeout.tv_usec = 200000;
-- if (select(FD_SETSIZE, &fds, NULL, NULL, &timeout) <= 0)
-+ if (select(mouse->mseFd+1, &fds, NULL, NULL, &timeout) <= 0)
- goto connect_idle;
- #endif
-
-@@ -302,7 +302,7 @@
- FD_SET(mouse->mseFd, &fds);
- timeout.tv_sec = 0;
- timeout.tv_usec = 200000;
-- if (select(FD_SETSIZE, &fds, NULL, NULL, &timeout) <= 0)
-+ if (select(mouse->mseFd+1, &fds, NULL, NULL, &timeout) <= 0)
- break;
-
- read(mouse->mseFd, &buf[i], 1);
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/mga/mga_driver.c.alpha-sockets Mon Jan 11 12:28:17 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/mga/mga_driver.c Mon Jan 11 12:28:23 1999
-@@ -1256,6 +1256,16 @@
- MGASave(save)
- vgaHWPtr save;
- {
-+#if NeedFunctionPrototypes
-+ extern void *MGA3026Save(void*);
-+ extern void *MGA1064Save(void*);
-+ extern void *MGA200Save(void*);
-+#else
-+ extern void *MGA3026Save();
-+ extern void *MGA1064Save();
-+ extern void *MGA200Save();
-+#endif
-+
- switch (MGAchipset)
- {
- case PCI_CHIP_MGA2064:
---- XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/xaa/xf86bench.c.alpha-sockets Mon Jan 11 12:28:19 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/xaa/xf86bench.c Mon Jan 11 12:28:23 1999
-@@ -96,7 +96,7 @@
- unsigned char *end;
- #ifdef __alpha__
- unsigned long data64;
-- data64 = data | (data << 32);
-+ data64 = (unsigned long)data | ((unsigned long)data << 32);
- #endif
- end = dest + nbytes;
- while (dest <= end - 128) {
---- XFree86-3.3.3.1/xc/programs/Xserver/include/os.h.alpha-sockets Thu Jan 22 05:47:13 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/include/os.h Mon Jan 11 12:28:23 1999
-@@ -773,4 +773,20 @@
- /* stuff for FlushCallback */
- extern CallbackListPtr FlushCallback;
-
-+#ifdef LONG64
-+
-+/* Systems with 64-bit 'long' have their own quirks, like
-+ select()'s fd_mask components are 64-bit long, but the
-+ ffs() function works only on 'int', which at least at
-+ an Alpha are 32-bit wide... */
-+
-+# define ffs mffs
-+
-+extern int mffs (
-+#if NeedFunctionPrototypes
-+ unsigned long
-+#endif
-+);
-+#endif /* LONG64 */
-+
- #endif /* OS_H */
---- XFree86-3.3.3.1/xc/programs/Xserver/os/WaitFor.c.alpha-sockets Sat Oct 24 03:56:28 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/WaitFor.c Mon Jan 11 12:28:23 1999
-@@ -83,9 +83,10 @@
- #include "dixstruct.h"
- #include "opaque.h"
-
--/* modifications by raphael */
--#define ffs mffs
--int mffs(fd_mask mask) {
-+/* modifications by raphael, and [mea];
-+ system uses this if LONG64 is defined.
-+ See at the end of the "os.h" */
-+int mffs(unsigned long mask) {
- register i;
- if ( ! mask ) return 0;
- i = 1;
-@@ -423,17 +424,18 @@
- if (XFD_ANYSET (&clientsReadable))
- {
- #ifndef WIN32
-- for (i=0; i<howmany(XFD_SETSIZE, NFDBITS); i++)
-+ for (i=0;
-+ i < (sizeof(clientsReadable)/sizeof(clientsReadable.fds_bits[0]));
-+ i++)
- {
- int highest_priority;
-
- while (clientsReadable.fds_bits[i])
- {
- int client_priority, client_index;
--
- curclient = ffs (clientsReadable.fds_bits[i]) - 1;
-- client_index = /* raphael: modified */
-- ConnectionTranslation[curclient + (i * (sizeof(fd_mask) * 8))];
-+ curclient += i * (8 * sizeof(fd_mask));
-+ client_index = ConnectionTranslation[curclient];
- #else
- int highest_priority;
- fd_set savedClientsReadable;
-@@ -476,11 +478,10 @@
- {
- pClientsReady[nready++] = client_index;
- }
-+
-+ FD_CLR(curclient, &clientsReadable);
- #ifndef WIN32
-- clientsReadable.fds_bits[i] &= ~(((fd_mask)1) << curclient);
- }
--#else
-- FD_CLR(curclient, &clientsReadable);
- #endif
- }
- }
-@@ -541,12 +542,13 @@
- COPYBITS(ClientsWithInput, clientsReadable);
- dbprintf(("WaitFor: "));
- nready = 0;
-- for (i=0; i < mskcnt; i++) {
-+ for (i=0; i < mskcnt;i++) {
- while (clientsReadable[i]) {
- int client_priority, curclient, client_index;
-
- curclient = ffs (clientsReadable[i]) - 1;
-- client_index = ConnectionTranslation[curclient + (i << 5)];
-+ curclient += i * (8 * sizeof(clientsReadable[i]));
-+ client_index = ConnectionTranslation[curclient];
- dbprintf(("%d has input\n", curclient));
- #ifdef XSYNC
- client_priority = clients[client_index]->priority;
-@@ -794,7 +796,7 @@
- {
- OsTimerPtr timer;
-
-- while (timer = timers)
-+ while ((timer = timers))
- {
- timers = timer->next;
- xfree(timer);
---- XFree86-3.3.3.1/xc/programs/Xserver/os/connection.c.alpha-sockets Mon Jan 11 12:28:20 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/connection.c Mon Jan 11 12:28:23 1999
-@@ -178,10 +178,6 @@
- #include <netdnet/dn.h>
- #endif /* DNETCONN */
-
--/* added by raphael */
--#define ffs mffs
--extern int mffs(long);
--
- extern char *display; /* The display number */
- int lastfdesc; /* maximum file descriptor */
-
-@@ -785,6 +781,8 @@
- {
- #ifndef WIN32
- fd_mask readyconnections; /* mask of listeners that are ready */
-+ /* In UNIX environments we assume that all listeners fit into
-+ the first 32 file descriptor ids. */
- #else
- fd_set readyconnections; /* set of listeners that are ready */
- #endif
-@@ -981,9 +979,6 @@
- void
- CheckConnections()
- {
--#ifndef WIN32
-- fd_mask mask;
--#endif
- fd_set tmask;
- register int curclient, curoff;
- int i;
-@@ -994,23 +989,24 @@
- #endif
-
- #ifndef AMOEBA
-- notime.tv_sec = 0;
-- notime.tv_usec = 0;
--
- #ifndef WIN32
-- for (i=0; i<howmany(XFD_SETSIZE, NFDBITS); i++)
-+ for (i=0; i < (sizeof(AllClients)/sizeof(fd_mask)); i++)
- {
-- mask = AllClients.fds_bits[i];
-+ fd_mask mask = AllClients.fds_bits[i];
- while (mask)
- {
- curoff = ffs (mask) - 1;
-- curclient = curoff + (i << 5);
-+ curclient = curoff + (i * 8 * sizeof(mask));
- FD_ZERO(&tmask);
- FD_SET(curclient, &tmask);
-+ /* there are operating systems which *do* alter the timeout
-+ variables -- it is good practice to initialize them always */
-+ notime.tv_sec = 0;
-+ notime.tv_usec = 0;
- r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime);
- if (r < 0)
- CloseDownClient(clients[ConnectionTranslation[curclient]]);
-- mask &= ~(1 << curoff);
-+ mask &= ~(((fd_mask)1) << curoff);
- }
- }
- #else
---- XFree86-3.3.3.1/xc/programs/Xserver/os/io.c.alpha-sockets Sat Oct 24 03:56:29 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/os/io.c Mon Jan 11 12:28:23 1999
-@@ -85,10 +85,6 @@
- #include "lbxserve.h"
- #endif
-
--/* added by raphael */
--#define ffs mffs
--extern int mffs(long);
--
- CallbackListPtr ReplyCallback;
- CallbackListPtr FlushCallback;
-
-@@ -995,7 +991,7 @@
- NewOutputPending = FALSE;
-
- #ifndef WIN32
-- for (base = 0; base < howmany(XFD_SETSIZE, NFDBITS); base++)
-+ for (base = 0; base < (sizeof(OutputPending)/sizeof(fd_mask)); base++)
- {
- mask = OutputPending.fds_bits[ base ];
- OutputPending.fds_bits[ base ] = 0;
-@@ -1003,7 +999,8 @@
- {
- index = ffs(mask) - 1;
- mask &= ~lowbit(mask);
-- if ((index = ConnectionTranslation[(base << 5) + index]) == 0)
-+ index = ConnectionTranslation[ base * (8 * sizeof(mask)) + index ];
-+ if (index == 0)
- continue;
- client = clients[index];
- if (client->clientGone)
---- XFree86-3.3.3.1/xc/programs/lbxproxy/include/os.h.alpha-sockets Sat Dec 21 23:16:36 1996
-+++ XFree86-3.3.3.1/xc/programs/lbxproxy/include/os.h Mon Jan 11 12:28:23 1999
-@@ -243,4 +243,20 @@
- #endif
- );
-
-+#ifdef LONG64
-+
-+/* Systems with 64-bit 'long' have their own quirks, like
-+ select()'s fd_mask components are 64-bit long, but the
-+ ffs() function works only on 'int', which at least at
-+ an Alpha are 32-bit wide... */
-+
-+# define ffs mffs
-+
-+extern int mffs (
-+#if NeedFunctionPrototypes
-+ unsigned long
-+#endif
-+);
-+#endif /* LONG64 */
-+
- #endif
---- XFree86-3.3.3.1/xc/programs/lbxproxy/os/WaitFor.c.alpha-sockets Sat Dec 21 23:16:30 1996
-+++ XFree86-3.3.3.1/xc/programs/lbxproxy/os/WaitFor.c Mon Jan 11 12:28:23 1999
-@@ -71,6 +71,20 @@
- #include "osdep.h"
- #include "os.h"
-
-+/* modifications by raphael, and [mea];
-+ system uses this if LONG64 is defined.
-+ See at the end of the "os.h" */
-+int mffs(unsigned long mask) {
-+ register i;
-+ if ( ! mask ) return 0;
-+ i = 1;
-+ while (! (mask & 1)) {
-+ i++;
-+ mask = mask >> 1;
-+ }
-+ return i;
-+}
-+
- extern fd_set AllSockets;
- extern fd_set AllClients;
- extern fd_set LastSelectMask;
-@@ -192,17 +206,18 @@
- nready = 0;
- if (XFD_ANYSET(&clientsReadable))
- {
-- for (i=0; i<howmany(XFD_SETSIZE, NFDBITS); i++)
-+ for (i=0; i < (sizeof(clientsReadable)/sizeof(fd_mask)); i++)
- {
- while (clientsReadable.fds_bits[i])
- {
- int client_index;
-
- curclient = ffs (clientsReadable.fds_bits[i]) - 1;
-- client_index = ConnectionTranslation[curclient + (i << 5)];
-- {
-- pClientsReady[nready++] = client_index;
-- }
-+ curclient += i * (8 * sizeof(fd_mask));
-+ client_index = ConnectionTranslation[curclient];
-+
-+ pClientsReady[nready++] = client_index;
-+
- clientsReadable.fds_bits[i] &= ~(((fd_mask)1) << curclient);
- }
- }
---- XFree86-3.3.3.1/xc/programs/lbxproxy/os/connection.c.alpha-sockets Thu Nov 5 14:27:57 1998
-+++ XFree86-3.3.3.1/xc/programs/lbxproxy/os/connection.c Mon Jan 11 12:28:23 1999
-@@ -1746,7 +1746,7 @@
- while (readyconnections)
- {
- curconn = ffs (readyconnections) - 1;
-- readyconnections &= ~(1 << curconn);
-+ readyconnections &= ~(((fd_mask)1) << curconn);
- if ((newconn = accept (curconn,
- (struct sockaddr *) NULL,
- (int *)NULL)) < 0)
-@@ -1905,19 +1905,19 @@
- notime.tv_sec = 0;
- notime.tv_usec = 0;
-
-- for (i=0; i<howmany(XFD_SETSIZE, NFDBITS); i++)
-+ for (i=0; i < (sizeof(AllClients)/sizeof(fd_mask)); i++)
- {
- mask = AllClients.fds_bits[i];
- while (mask)
- {
- curoff = ffs (mask) - 1;
-- curclient = curoff + (i << 5);
-+ curclient = curoff + i * (8 * sizeof(mask));
- FD_ZERO(&tmask);
- FD_SET(curclient, &tmask);
- r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime);
- if (r < 0)
- CloseDownClient(clients[ConnectionTranslation[curclient]]);
-- mask &= ~(1 << curoff);
-+ mask &= ~(((fd_mask)1) << curoff);
- }
- }
- }
---- XFree86-3.3.3.1/xc/programs/lbxproxy/os/io.c.alpha-sockets Wed Jan 1 22:02:48 1997
-+++ XFree86-3.3.3.1/xc/programs/lbxproxy/os/io.c Mon Jan 11 12:28:23 1999
-@@ -913,7 +913,8 @@
- void
- FlushAllOutput()
- {
-- register int index, base, mask;
-+ register int index, base;
-+ register fd_mask mask;
- OsCommPtr oc;
- register ClientPtr client;
-
-@@ -927,7 +928,7 @@
- */
- NewOutputPending = FALSE;
-
-- for (base = 0; base < howmany(XFD_SETSIZE, NFDBITS); base++)
-+ for (base = 0; base < (sizeof(OutputPending)/sizeof(mask)); base++)
- {
- mask = OutputPending.fds_bits[ base ];
- OutputPending.fds_bits[ base ] = 0;
-@@ -935,7 +936,9 @@
- {
- index = ffs(mask) - 1;
- mask &= ~lowbit(mask);
-- if ((index = ConnectionOutputTranslation[(base << 5) + index]) == 0)
-+ index += base * (8 * sizeof(mask));
-+ index = ConnectionOutputTranslation[index];
-+ if (index == 0)
- continue;
- client = clients[index];
- if (client->clientGone)
---- XFree86-3.3.3.1/xc/programs/xfs/include/os.h.alpha-sockets Fri Jan 5 08:21:30 1996
-+++ XFree86-3.3.3.1/xc/programs/xfs/include/os.h Mon Jan 11 12:28:23 1999
-@@ -94,4 +94,19 @@
- extern int ListCatalogues();
- extern int ListAlternateServers();
-
-+#ifdef LONG64
-+
-+/* Systems with 64-bit 'long' have their own quirks, like
-+ select()'s fd_mask components are 64-bit long, but the
-+ ffs() function works only on 'int', which at least at
-+ an Alpha are 32-bit wide... */
-+
-+# define ffs mffs
-+
-+extern int mffs (
-+#if NeedFunctionPrototypes
-+ unsigned long
-+#endif
-+);
-+#endif /* LONG64 */
- #endif /* _OS_H_ */
---- XFree86-3.3.3.1/xc/programs/xfs/os/connection.c.alpha-sockets Thu Nov 5 14:28:31 1998
-+++ XFree86-3.3.3.1/xc/programs/xfs/os/connection.c Mon Jan 11 12:28:23 1999
-@@ -325,6 +325,9 @@
-
- /*
- * accepts new connections
-+ *
-+ * This assumes that all sockets in *listen* mode are numbered
-+ * something below 32! (likely true..)
- */
- void
- MakeNewConnections()
-@@ -495,15 +498,15 @@
- struct timeval notime;
- int r;
-
-- notime.tv_sec = 0;
-- notime.tv_usec = 0;
--
- XFD_COPYSET(&AllClients, &mask);
- for (i = 0; i < howmany(XFD_SETSIZE, NFDBITS); i++) {
- while (mask.fds_bits[i]) {
-- curclient = ffs(mask.fds_bits[i]) - 1 + (i << 5);
-+ curclient = ffs(mask.fds_bits[i]) - 1;
-+ curclient += i * (8 * sizeof(mask.fds_bits[i]));
- FD_ZERO(&tmask);
- FD_SET(curclient, &tmask);
-+ notime.tv_sec = 0;
-+ notime.tv_usec = 0;
- r = Select(curclient + 1, &tmask, NULL, NULL, ¬ime);
- if (r < 0)
- CloseDownClient(clients[ConnectionTranslation[curclient]]);
---- XFree86-3.3.3.1/xc/programs/xfs/os/io.c.alpha-sockets Thu May 29 10:01:08 1997
-+++ XFree86-3.3.3.1/xc/programs/xfs/os/io.c Mon Jan 11 12:28:23 1999
-@@ -69,6 +69,7 @@
- #include "X11/Xpoll.h"
- #include "osdep.h"
- #include "globals.h"
-+#include "os.h"
-
- #ifdef X_NOT_STDC_ENV
- extern int errno;
-@@ -530,13 +531,14 @@
-
- NewOutputPending = FALSE;
-
-- for (base = 0; base < howmany(XFD_SETSIZE, NFDBITS); base++) {
-+ for (base = 0; base < (sizeof(OutputPending)/sizeof(mask)); base++) {
- mask = OutputPending.fds_bits[base];
- OutputPending.fds_bits[base] = 0;
- while (mask) {
- index = ffs(mask) - 1;
- mask &= ~lowbit(mask);
-- if ((index = ConnectionTranslation[(base << 5) + index]) == 0)
-+ index += base * (8 * sizeof(mask));
-+ if ((index = ConnectionTranslation[index]) == 0)
- continue;
- client = clients[index];
- if (client->clientGone == CLIENT_GONE)
---- XFree86-3.3.3.1/xc/programs/xfs/os/waitfor.c.alpha-sockets Sat Jan 18 02:02:48 1997
-+++ XFree86-3.3.3.1/xc/programs/xfs/os/waitfor.c Mon Jan 11 12:28:23 1999
-@@ -65,6 +65,21 @@
- #include "globals.h"
- #include "X11/Xpoll.h"
- #include "osdep.h"
-+#include "os.h"
-+
-+/* modifications by raphael, and [mea];
-+ system uses this if LONG64 is defined.
-+ See at the end of the "os.h" */
-+int mffs(unsigned long mask) {
-+ register i;
-+ if ( ! mask ) return 0;
-+ i = 1;
-+ while (! (mask & 1)) {
-+ i++;
-+ mask = mask >> 1;
-+ }
-+ return i;
-+}
-
- #ifdef MINIX
- #include <sys/nbio.h>
-@@ -208,10 +223,11 @@
-
- if (current_time) /* may not have been set */
- current_time = GetTimeInMillis();
-- for (i = 0; i < howmany(XFD_SETSIZE, NFDBITS); i++) {
-+ for (i = 0; i < (sizeof(clientsReadable)/sizeof(fd_mask)); i++) {
- while (clientsReadable.fds_bits[i]) {
- curclient = ffs(clientsReadable.fds_bits[i]) - 1;
-- conn = ConnectionTranslation[curclient + (i << 5)];
-+ curclient += i * (8 * sizeof(fd_mask));
-+ conn = ConnectionTranslation[curclient];
- FD_CLR (curclient, &clientsReadable);
- client = clients[conn];
- if (!client)
+++ /dev/null
-This patch by Brian Paul.
-
---- XFree86-4.1.0/xc/lib/GL/glx/Imakefile~ Wed Jun 20 16:32:13 2001
-+++ XFree86-4.1.0/xc/lib/GL/glx/Imakefile Wed Jun 20 16:33:55 2001
-@@ -87,7 +87,11 @@
- vertarr.o \
- xfont.o
-
-+#if defined(AlphaArchitecture)
-+ GLX_DEFS = GlxDefines VidModeExtensionDefines -D__GLX_ALIGN64
-+#else
- GLX_DEFS = GlxDefines VidModeExtensionDefines
-+#endif
-
- #if BuildXF86DRI
- DRI_INCS = -I$(GLXLIBSRC)/dri
+++ /dev/null
---- XFree86-4.0/xc/config/cf/X11.tmpl Wed Jun 7 07:29:47 2000
-+++ XFree86-4.0/xc/config/cf/X11.tmpl Wed Jun 7 07:35:17 2000
-@@ -1016,7 +1016,7 @@
- #endif
- #ifndef XFileSearchPathBase
- /* avoid SCCS keyword */
--#define XFileSearchPathBase Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S)
-+#define XFileSearchPathBase $(LIBDIR)/%T/%L/%N%C%S:$(LIBDIR)/%T/%l/%N%C%S:$(LIBDIR)/%T/C/%N%C%S:$(LIBDIR)/%T/POSIX/%N%C%S:$(LIBDIR)/%T/%N%C%S:$(LIBDIR)/%T/%L/%N%S:$(LIBDIR)/%T/%l/%N%S:$(LIBDIR)/%T/C/%N%S:$(LIBDIR)/%T/POSIX/%N%S:$(LIBDIR)/%T/%N%S:$(LIBDIR)/%L/%T/%N%C%S:$(LIBDIR)/%l/%T/%N%C%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S
- #endif
- #ifndef XFileSearchPathDefault
- #ifdef XAppLoadDir
-@@ -2199,11 +2199,9 @@
- #ifndef InstallAppDefaultsLong
- #if InstallAppDefFiles
- #define InstallAppDefaultsLong(file,class) @@\
--LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
- InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
- #else
- #define InstallAppDefaultsLong(file,class) @@\
--LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
- InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
- #endif /* InstallAppDefFiles */
- #endif /* InstallAppDefaultsLong */
+++ /dev/null
-diff -urN ati.old.org/ati.c ati.old/ati.c
---- ati.old.org/ati.c Wed Mar 13 11:18:18 2002
-+++ ati.old/ati.c Wed Mar 13 21:05:26 2002
-@@ -90,7 +90,7 @@
- DriverRec ATI =
- {
- ATI_VERSION_CURRENT,
-- "ati",
-+ "ati_old",
- ATIIdentify,
- ATIProbe,
- ATIAvailableOptions,
-diff -urN ati.old.org/atimisc.c ati.old/atimisc.c
---- ati.old.org/atimisc.c Wed Mar 13 11:18:18 2002
-+++ ati.old/atimisc.c Wed Mar 13 11:19:27 2002
-@@ -71,7 +71,7 @@
- }
-
- /* The following record must be called atimiscModuleData */
--XF86ModuleData atimiscModuleData =
-+XF86ModuleData atimisc_oldModuleData =
- {
- &ATIVersionRec,
- ATISetup,
-diff -urN ati.old.org/atimodule.c ati.old/atimodule.c
---- ati.old.org/atimodule.c Wed Mar 13 11:18:18 2002
-+++ ati.old/atimodule.c Wed Mar 13 11:19:40 2002
-@@ -116,7 +116,7 @@
- }
-
- /* The following record must be called atiModuleData */
--XF86ModuleData atiModuleData =
-+XF86ModuleData ati_oldModuleData =
- {
- &ATIVersionRec,
- ATISetup,
-diff -urN ati.old.org/atiprobe.c ati.old/atiprobe.c
---- ati.old.org/atiprobe.c Wed Mar 13 11:18:44 2002
-+++ ati.old/atiprobe.c Mon Mar 11 13:14:51 2002
-@@ -2275,10 +2275,10 @@
-
- #ifdef XFree86LOADER
-
-- if (!xf86LoadSubModule(pScreenInfo, "atimisc"))
-+ if (!xf86LoadSubModule(pScreenInfo, "atimisc_old"))
- {
- xf86Msg(X_ERROR,
-- ATI_NAME ": Failed to load \"atimisc\" module.\n");
-+ ATI_NAME ": Failed to load \"atimisc_old\" module.\n");
- xf86DeleteScreen(pScreenInfo->scrnIndex, 0);
- continue;
- }
-diff -urN ati.old.org/ativersion.h ati.old/ativersion.h
---- ati.old.org/ativersion.h Wed Mar 13 11:18:44 2002
-+++ ati.old/ativersion.h Mon Mar 11 13:14:51 2002
-@@ -25,7 +25,7 @@
- #define ___ATIVERSION_H___ 1
-
- #define ATI_NAME "ATI"
--#define ATI_DRIVER_NAME "ati"
-+#define ATI_DRIVER_NAME "ati_old"
-
- #define ATI_VERSION_NAME "6.4.8"
-
-diff -urN ati.old.org/r128_misc.c ati.old/r128_misc.c
---- ati.old.org/r128_misc.c Wed Mar 13 11:18:18 2002
-+++ ati.old/r128_misc.c Wed Mar 13 11:20:02 2002
-@@ -74,7 +74,7 @@
- }
-
- /* The following record must be called r128ModuleData */
--XF86ModuleData r128ModuleData =
-+XF86ModuleData r128_oldModuleData =
- {
- &R128VersionRec,
- R128Setup,
-diff -urN ati.old.org/r128_probe.c ati.old/r128_probe.c
---- ati.old.org/r128_probe.c Wed Mar 13 11:18:44 2002
-+++ ati.old/r128_probe.c Mon Mar 11 13:14:51 2002
-@@ -205,9 +205,9 @@
-
- #ifdef XFree86LOADER
-
-- if (!xf86LoadSubModule(pScrn, "r128")) {
-+ if (!xf86LoadSubModule(pScrn, "r128_old")) {
- xf86Msg(X_ERROR,
-- R128_NAME ": Failed to load \"r128\" module.\n");
-+ R128_NAME ": Failed to load \"r128_old\" module.\n");
- xf86DeleteScreen(pScrn->scrnIndex, 0);
- continue;
- }
-diff -urN ati.old.org/r128_version.h ati.old/r128_version.h
---- ati.old.org/r128_version.h Wed Mar 13 11:18:18 2002
-+++ ati.old/r128_version.h Wed Mar 13 21:07:17 2002
-@@ -25,7 +25,7 @@
- #define _R128_VERSION_H_ 1
-
- #define R128_NAME "R128"
--#define R128_DRIVER_NAME "r128"
-+#define R128_DRIVER_NAME "r128_old"
-
- #define R128_VERSION_NAME "4.0.1"
-
-diff -urN ati.old.org/radeon_misc.c ati.old/radeon_misc.c
---- ati.old.org/radeon_misc.c Wed Mar 13 11:18:18 2002
-+++ ati.old/radeon_misc.c Wed Mar 13 11:20:20 2002
-@@ -74,7 +74,7 @@
- }
-
- /* The following record must be called radeonModuleData */
--XF86ModuleData radeonModuleData =
-+XF86ModuleData radeon_oldModuleData =
- {
- &RADEONVersionRec,
- RADEONSetup,
-diff -urN ati.old.org/radeon_probe.c ati.old/radeon_probe.c
---- ati.old.org/radeon_probe.c Wed Mar 13 11:18:44 2002
-+++ ati.old/radeon_probe.c Mon Mar 11 13:14:51 2002
-@@ -203,9 +203,9 @@
- {
- #ifdef XFree86LOADER
-
-- if (!xf86LoadSubModule(pScrn, "radeon")) {
-+ if (!xf86LoadSubModule(pScrn, "radeon_old")) {
- xf86Msg(X_ERROR,
-- RADEON_NAME ": Failed to load \"radeon\" module.\n");
-+ RADEON_NAME ": Failed to load \"radeon_old\" module.\n");
- xf86DeleteScreen(pScrn->scrnIndex, 0);
- continue;
- }
-diff -urN ati.old.org/radeon_version.h ati.old/radeon_version.h
---- ati.old.org/radeon_version.h Wed Mar 13 11:18:18 2002
-+++ ati.old/radeon_version.h Wed Mar 13 21:07:52 2002
-@@ -25,7 +25,7 @@
- #define _RADEON_VERSION_H_ 1
-
- #define RADEON_NAME "RADEON"
--#define RADEON_DRIVER_NAME "radeon"
-+#define RADEON_DRIVER_NAME "radeon_old"
-
- #define RADEON_VERSION_NAME "4.0.1"
-
+++ /dev/null
---- xc/include/Xarch.h.orig Tue Jun 10 13:03:11 2003
-+++ xc/include/Xarch.h Thu Jun 12 20:20:05 2003
-@@ -40,7 +40,7 @@
-
- #else
-
--#ifdef SVR4
-+#if defined(SVR4) && !defined(linux)
- #if defined(NCR) || defined(Mips) || defined(__sgi)
- #include <sys/endian.h>
- #else
+++ /dev/null
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h.old Sat Jun 24 20:20:42 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h Sat Sep 30 23:36:30 2000
-@@ -379,6 +379,7 @@
- # define LDNMAP LDSMAP
-
- # define CLEARDTR_SUPPORT
-+# define CLEARRTS_SUPPORT
- # define USE_VT_SYSREQ
-
- # define POSIX_TTY
+++ /dev/null
-diff -urN aaa/xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c
---- aaa/xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c 2003-07-25 13:04:20.000000000 +0200
-+++ xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c 2003-07-29 22:09:08.000000000 +0200
-@@ -333,7 +333,7 @@
-
- xf86LoaderReqSymLists(i2cSymbols, NULL);
-
-- if (!dev = xf86I2CFindDev(pBus, 0x00A0)) {
-+ if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) {
- dev = xf86CreateI2CDevRec();
- dev->DevName = "ddc2";
- dev->SlaveAddr = 0xA0;
+++ /dev/null
---- XFree86-4.1.0/xc/config/cf/xf86site.def.orig Tue Jul 3 08:44:25 2001
-+++ XFree86-4.1.0/xc/config/cf/xf86site.def Tue Jul 3 08:44:36 2001
-@@ -251,7 +251,7 @@
- * will be included in it. When building the loadable server each of these
- * modules will be built.
- *
--#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
-+#define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
- neomagic i740 tdfx savage \
- cirrus vmware tseng trident chips apm \
- GlideDriver fbdev i128 \
+++ /dev/null
---- XFree86-4.0.1/xc/config/cf/linux.cf.cpp Sun Aug 6 18:33:24 2000
-+++ XFree86-4.0.1/xc/config/cf/linux.cf Sun Aug 6 18:33:31 2000
-@@ -408,7 +408,7 @@
- #define YaccCmd bison -y
- #define LexCmd flex -l
- #define LexLib -lfl
--#define PreProcessCmd CcCmd -E
-+#define PreProcessCmd cpp
- #define PostIncDir DefaultGccIncludeDir
- #define LdCombineFlags -r
- #ifndef LdPostLib
+++ /dev/null
-diff -ruN XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/Imakefile XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/Imakefile
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/Imakefile Wed Jun 23 08:37:21 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/Imakefile Sat Oct 24 03:54:44 1998
-@@ -1,4 +1,4 @@
--XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/Imakefile,v 1.1.2.9 1999/06/23 12:37:21 hohndel Exp $
-+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/Imakefile,v 1.1.2.8 1998/10/22 04:31:05 hohndel Exp $
- XCOMM
- XCOMM This is an Imakefile for the cyrix driver.
- XCOMM
-@@ -6,10 +6,10 @@
- #include <Server.tmpl>
-
- SRCS = cyrix_driver.c cyrix_accel.c cyrix_cursor.c cyrix_cmap.c cyrix_bank.s \
-- cyrix_asm.s gxrender.c
-+ cyrix_asm.s
-
- OBJS = cyrix_driver.o cyrix_accel.o cyrix_cursor.o cyrix_cmap.o cyrix_bank.o \
-- cyrix_asm.o gxrender.o
-+ cyrix_asm.o
-
- DEFINES = -DPSZ=8
-
-@@ -61,7 +61,6 @@
- InstallLinkKitNonExecFile(cyrix_driver.c,$(LINKKITDIR)/drivers/vga256/cyrix)
- InstallLinkKitNonExecFile(cyrix_bank.s,$(LINKKITDIR)/drivers/vga256/cyrix)
- InstallLinkKitNonExecFile(cyrix_asm.s,$(LINKKITDIR)/drivers/vga256/cyrix)
--InstallLinkKitNonExecFile(gxrender.c,$(LINKKITDIR)/drivers/vga256/cyrix)
- InstallLinkKitNonExecFile(Imakefile,$(LINKKITDIR)/drivers/vga256/cyrix)
-
- XCOMM
-@@ -82,4 +81,3 @@
- XCOMM Install Link Kit Non Exec File(Imakefile,$(LINKKITDIR)/drivers/vga16/cyrix)
-
- DependTarget()
--
-diff -ruN XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h Tue Dec 22 02:49:58 1998
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h Fri Nov 6 11:41:51 1998
-@@ -1,5 +1,5 @@
-
--/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h,v 1.1.2.6 1998/12/22 07:49:58 hohndel Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h,v 1.1.2.5 1998/11/06 09:47:02 hohndel Exp $ */
-
- /* this code is partly based on the MediaGX sources from the GGI project
- based on CYRIX example code (gxvideo.c) and included with CYRIX and
-@@ -88,10 +88,9 @@
- #define CYRIXsetVectorMode() \
- GX_REG(GP_VECTOR_MODE) = (vectorMode)
-
--#define IfDest(rop, planemask, val) \
-- (( (((rop) & 0x5) ^ (((rop) & 0xA) >> 1)) \
-- || (~((planemask) & 0xFF)) \
-- ) ? (val) : 0)
-+#define IfDest(xrop, val) ((((xrop) & 0x5) ^ (((xrop) & 0xA) >> 1)) ? (val) : 0)
-+
-+
-
- /* Generic MediaGX hardware register and value definitions */
-
-diff -ruN XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c Wed Jun 23 08:37:21 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c Fri Nov 6 11:41:51 1998
-@@ -1,7 +1,6 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c,v 1.1.2.6 1999/06/23 12:37:21 hohndel Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c,v 1.1.2.3 1998/11/06 09:47:04 hohndel Exp $ */
-
- /*
-- * Copyright 1999 by Brian Falardeau.
- * Copyright 1998 by Annius Groenink, Amsterdam.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
-@@ -33,6 +32,7 @@
- #include "cyrix.h"
- #include "miline.h"
-
-+
- /* size of color expand source area (embedded in frame buffer) */
- #define CYRIXexpandSize 32768
-
-@@ -41,64 +41,17 @@
- upper nybble inverted X raster operation (bits 0 - 3 correspond to
- bits 3 - 0 and 7 - 4 in Windows style ROP). In some routines,
- the role of source and pattern is inverted. */
--
--/* The following ROPs only use pattern and destination data. */
--/* They are used when the planemask specifies all planes (no mask). */
--
--static const int windowsROPpat[16] = {
-- 0x00, /* GXclear = 0 */
-- 0xA0, /* GXand = pat AND dst */
-- 0x50, /* GXandReverse = pat AND NOT dst */
-- 0xF0, /* GXcopy = pat */
-- 0x0A, /* GXandInverted = NOT pat AND dst */
-- 0xAA, /* GXnoop = dst */
-- 0x5A, /* GXxor = pat XOR dst */
-- 0xFA, /* GXor = pat OR dst */
-- 0x05, /* GXnor = NOT pat AND NOT dst */
-- 0xA5, /* GXequiv = NOT pat XOR dst */
-- 0x55, /* GXinvert = NOT dst */
-- 0xF5, /* GXorReverse = pat OR NOT dst */
-- 0x0F, /* GXcopyInverted = NOT pat */
-- 0xAF, /* GXorInverted = NOT pat OR dst */
-- 0x5F, /* GXnand = NOT pat OR NOT dst */
-- 0xFF, /* GXset = 1 */
--};
--
--/* The following ROPs use source data to specify a planemask. */
--/* If the planemask (src) is one, then the result is the appropriate */
--/* combination of pattern and destination data. If the planemask (src) */
--/* is zero, then the result is always just destination data. */
--
--static const int windowsROPsrcMask[16] = {
-- 0x22, /* GXclear => 0 if src = 1, dst if src = 0 */
-- 0xA2, /* GXand = pat AND dst if src = 1, dst if src = 0 */
-- 0x62, /* GXandReverse = pat AND NOT dst if src = 1, dst if src = 0 */
-- 0xE2, /* GXcopy = pat if src = 1, dst if src = 0 */
-- 0x2A, /* GXandInverted = NOT pat AND dst if src = 1, dst if src = 0 */
-- 0xAA, /* GXnoop = dst if src = 1, dst if src = 0 */
-- 0x6A, /* GXxor = pat XOR dst if src = 1, dst if src = 0 */
-- 0xEA, /* GXor = pat OR dst if src = 1, dst if src = 0 */
-- 0x26, /* GXnor = NOT pat AND NOT dst if src = 1, dst if src = 0 */
-- 0xA6, /* GXequiv = NOT pat XOR dst if src = 1, dst if src = 0 */
-- 0x66, /* GXinvert = NOT dst if src = 1, dst if src = 0 */
-- 0xE6, /* GXorReverse = pat OR NOT dst if src = 1, dst if src = 0 */
-- 0x2E, /* GXcopyInverted = NOT pat if src = 1, dst if src = 0 */
-- 0xAE, /* GXorInverted = NOT pat OR dst if src = 1, dst if src = 0 */
-- 0x6E, /* GXnand = NOT pat OR NOT dst if src = 1, dst if src = 0 */
-- 0xEE, /* GXset = 1 if src = 1, dst if src = 0 */
--};
--
--/* The following ROPs use pattern data to specify a planemask. */
--/* If the planemask (pat) is one, then the result is the appropriate */
--/* combination of source and destination data. If the planemask (pat) */
--/* is zero, then the result is always just destination data. */
--
- static const int windowsROPpatMask[16] = { 0x0A, 0x8A, 0x4A, 0xCA,
- 0x2A, 0xAA, 0x6A, 0xEA,
- 0x1A, 0x9A, 0x5A, 0xDA,
- 0x3A, 0xBA, 0x7A, 0xFA };
-
-+static const int windowsROPsrcMask[16] = { 0x22, 0xA2, 0x62, 0xE2,
-+ 0x2A, 0xAA, 0x6A, 0xEA,
-+ 0x26, 0xA6, 0x66, 0xE6,
-+ 0x2E, 0xAE, 0x6E, 0xEE };
-
-+static int bltBufWidth;
-
- static int blitMode;
- static int vectorMode;
-@@ -106,85 +59,25 @@
- static int copyXdir;
- static int setBlitModeOnSync = 0;
-
--/* STATIC VARIABLES FOR THIS FILE */
--/* Used to maintain state between setup and rendering calls. */
--
--static int CYRIXsavedROP;
--static int CYRIXtransparent;
--static int CYRIXtransColor;
--static int CYRIXstartMonoExpand = 0;
--
--static unsigned short CYRIXsaveX, CYRIXsaveY, CYRIXsaveW, CYRIXsaveH;
-
- /* Forward declaration of functions used in the driver */
--
- void CYRIXAccelSync();
- void CYRIXAccelInit();
- void CYRIXSetupForFillRectSolid();
- void CYRIXSubsequentFillRectSolid();
--void CYRIXSetupFor8x8PatternColorExpand();
--void CYRIXSubsequent8x8PatternColorExpand();
- void CYRIXSetupForScreenToScreenCopy();
- void CYRIXSubsequentScreenToScreenCopy();
--
- void CYRIXSubsequentBresenhamLine();
-+void CYRIXSetupFor8x8PatternColorExpand();
-+void CYRIXSubsequent8x8PatternColorExpand();
- void CYRIXSetupForCPUToScreenColorExpand();
- void CYRIXSubsequentCPUToScreenColorExpand();
-
--/* Routines in GXRENDER.C */
--
--void gxr_initialize(unsigned char *regptr, unsigned short bpp,
-- unsigned short BB0base, unsigned short BB1base,
-- unsigned short BBwidthPixels);
--
--void gxr_wait_until_idle(void);
--
--void gxr_load_solid_source(unsigned short color);
--
--void gxr_load_mono_source(unsigned short bgcolor, unsigned short fgcolor,
-- unsigned short transparent);
--
--void gxr_load_solid_pattern(unsigned short color);
--
--void gxr_load_mono_pattern(unsigned short bgcolor, unsigned short fgcolor,
-- unsigned long data0, unsigned long data1, unsigned char transparency);
--
--void gxr_load_raster_operation(unsigned char rop);
--
--void gxr_pattern_fill(unsigned short x, unsigned short y,
-- unsigned short width, unsigned short height);
--
--void gxr_screen_to_screen_blt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height);
--
--void gxr_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned short color);
--
--void gxr_text_glyph(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned char *data, unsigned short pitch);
--
--void gxr_bresenham_line(unsigned short x, unsigned short y,
-- unsigned short length, unsigned short initerr,
-- unsigned short axialerr, unsigned short diagerr,
-- unsigned short flags);
--
--/*
--//---------------------------------------------------------------------------
--// CYRIXAccelInit
--//
--// This routine hooks the acceleration routines and sets appropriate flags.
--//---------------------------------------------------------------------------
--*/
-
-+/* Acceleration init function, sets up pointers to our accelerated functions */
- void
- CYRIXAccelInit()
--{
-- int bltBufWidth;
--
-- /* General acceleration flags */
-+{ /* General acceleration flags */
- xf86AccelInfoRec.Flags = PIXMAP_CACHE
- | BACKGROUND_OPERATIONS
- | HARDWARE_PATTERN_SCREEN_ORIGIN
-@@ -245,344 +138,232 @@
-
- /* calculate the pixel width of a blit buffer for convenience */
- bltBufWidth = CYRIXbltBufSize / (vgaBitsPerPixel / 8);
-+}
-
-- /* pass parameters to GXRENDER.C file */
-
-- gxr_initialize((unsigned char *) GXregisters,
-- (unsigned short) vgaBitsPerPixel,
-- (unsigned short) CYRIXbltBuf0Address,
-- (unsigned short) CYRIXbltBuf1Address,
-- (unsigned short) bltBufWidth);
--}
-+/* set colors - called through access macros in cyrix.h */
-+static __inline__ void CYRIXsetColors01(reg, col0, col1)
-+int reg;
-+int col0;
-+int col1;
-+{ if (vgaBitsPerPixel == 16)
-+ GX_REG(reg) = ((col1 & 0xFFFF) << 16) | (col0 & 0xFFFF);
-+ else
-+ { col0 &= 0xFF;
-+ col1 &= 0xFF;
-+ GX_REG(reg) = (col1 << 24) | (col1 << 16) | (col0 << 8) | col0;
-+} }
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXAccelSync
--//
--// This routine is called before accessing the frame buffer directly to
--// make sure that the graphics pipeline is idle. It is also called after
--// loading the monochrome data into BB0 for bitmap to screen BLTs.
--//---------------------------------------------------------------------------
--*/
-
-+/* The generic Sync() function that waits for everything to
-+ be completed (e.g. before writing to the frame buffer
-+ directly). */
- void
- CYRIXAccelSync()
--{
-- /* CHECK IF END TO CPU TO SCREEN EXPAND BLT */
--
-- if (CYRIXstartMonoExpand)
-- {
-- /* START CPU TO SCREEN EXPAND BLT */
-- /* Data has already been loaded into BB0, so use NULL pointer. */
--
-- /* this is formally incorrect: XAA may use both BB0 and BB1
-- for the text source bitmap, so READ_DST_FB1 should not be
-- used. So far, this problem has not manifested itself in
-- practice. */
--
-- CYRIXstartMonoExpand = 0;
-- gxr_text_glyph(0, 0, CYRIXsaveX, CYRIXsaveY, CYRIXsaveW,
-- CYRIXsaveH, 0, 0);
-+{ if (setBlitModeOnSync)
-+ { setBlitModeOnSync = 0;
-+ CYRIXsetupSync();
-+ CYRIXsetBlitMode();
- }
--
-- /* WAIT UNTIL IDLE */
--
-- gxr_wait_until_idle();
-+ while (GX_REG(GP_BLIT_STATUS) &
-+ (BS_BLIT_BUSY|BS_PIPELINE_BUSY|BS_BLIT_PENDING));
- }
-
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSetupForFillRectSolid
--//
--// This routine is called to setup the solid pattern color for future
--// rectangular fills or vectors.
--//---------------------------------------------------------------------------
--*/
--
-+/* Solid rectangles */
- void
- CYRIXSetupForFillRectSolid(color, rop, planemask)
- int color, rop;
- unsigned int planemask;
--{
-- /* LOAD THE SOLID PATTERN COLOR */
--
-- gxr_load_solid_pattern((unsigned short) color);
--
-- /* CHECK IF PLANEMASK IS NOT USED (ALL PLANES ENABLED) */
--
-- if (planemask == (unsigned int) -1)
-- {
-- /* use normal pattern ROPs if all planes are enabled */
--
-- gxr_load_raster_operation(windowsROPpat[rop & 0x0F]);
-- }
-- else
-- {
-- /* select ROP that uses planemask in src data */
--
-- gxr_load_solid_source((unsigned short) planemask);
-- gxr_load_raster_operation(windowsROPsrcMask[rop & 0x0F]);
-- }
-+{ CYRIXsetupSync();
-+ CYRIXsetSourceColors01(color, color);
-+ CYRIXsetPatColors01(planemask, 0);
-+ CYRIXsetPatMode(rop, RM_PAT_DISABLE);
-+ blitMode = BM_READ_SRC_NONE | BM_WRITE_FB | BM_SOURCE_EXPAND
-+ | IfDest(rop, BM_READ_DST_FB0);
-+ vectorMode = IfDest(rop, VM_READ_DST_FB);
- }
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSubsequentFillRectSolid
--//
--// This routine is called to fill a rectangular region using the previously
--// specified solid pattern and raster operation.
--//
--// Sample application uses:
--// - Window backgrounds.
--// - x11perf: rectangle tests (-rect500).
--// - x11perf: fill trapezoid tests (-trap100).
--// - x11perf: horizontal line segments (-hseg500).
--//---------------------------------------------------------------------------
--*/
-
- void
- CYRIXSubsequentFillRectSolid(x, y, w, h)
- int x, y, w, h;
--{
-- /* call routine to fill rectangular region */
--
-- gxr_pattern_fill((unsigned short) x, (unsigned short) y,
-- (unsigned short) w, (unsigned short) h);
--}
--
--/*
--//---------------------------------------------------------------------------
--// CYRIXSetupFor8x8PatternColorExpand
--//
--// This routine is called to setup the monochrome pattern (8x8) and raster
--// operation for future rectangular fills.
--//---------------------------------------------------------------------------
--*/
--
--void CYRIXSetupFor8x8PatternColorExpand(patternx, patterny, bg, fg, rop, planemask)
--int patternx, patterny;
--int bg, fg, rop;
--unsigned int planemask;
--{ int trans = (bg == -1);
--
-- /* LOAD PATTERN COLORS AND DATA */
--
-- gxr_load_mono_pattern((unsigned short) bg, (unsigned short) fg,
-- (unsigned long) patternx, (unsigned long) patterny,
-- (unsigned char) trans);
--
-- /* CHECK IF PLANEMASK IS NOT USED (ALL PLANES ENABLED) */
--
-- if (planemask == (unsigned int) -1)
-- {
-- /* use normal pattern ROPs if all planes are enabled */
--
-- gxr_load_raster_operation(windowsROPpat[rop & 0x0F]);
-- }
-- else
-- {
-- /* select ROP that uses planemask in src data */
--
-- gxr_load_solid_source((unsigned short) planemask);
-- gxr_load_raster_operation(windowsROPsrcMask[rop & 0x0F]);
-+{ /* divide the operation into columns if required; use twice the
-+ blit buffer width because buffer 0 will overflow into buffer 1 */
-+ while (w > 2 * bltBufWidth)
-+ { CYRIXSubsequentFillRectSolid(x, y, 2 * bltBufWidth, h);
-+ x += 2 * bltBufWidth;
-+ w -= 2 * bltBufWidth;
- }
-+ CYRIXsetupSync();
-+ CYRIXsetDstXY(x, y);
-+ CYRIXsetWH(w, h);
-+ CYRIXsetBlitMode();
- }
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSubsequent8x8PatternColorExpand
--//
--// This routine is called to fill a rectangular region using the previously
--// specified monochrome pattern (8x8) and raster operation.
--//
--// Sample application uses:
--// - Patterned desktops
--// - x11perf: stippled rectangle tests (-srect500).
--// - x11perf: opaque stippled rectangle tests (-osrect500).
--//---------------------------------------------------------------------------
--*/
--
--void CYRIXSubsequent8x8PatternColorExpand(patternx, patterny, x, y, w, h)
--int patternx, patterny;
--int x, y, w, h;
--{
-- /* call routine to fill rectangular region */
--
-- gxr_pattern_fill((unsigned short) x, (unsigned short) y,
-- (unsigned short) w, (unsigned short) h);
--}
--
--/*
--//---------------------------------------------------------------------------
--// CYRIXSetupForScreenToScreenCopy
--//
--// This routine is called to setup the planemask and raster operation
--// for future screen to screen BLTs.
--//---------------------------------------------------------------------------
--*/
-
-+/* Screen to screen copies */
- void
- CYRIXSetupForScreenToScreenCopy(xdir, ydir, rop, planemask, transparency_color)
- int xdir, ydir;
- int rop;
- unsigned int planemask;
- int transparency_color;
--{
-- /* LOAD PLANEMASK INTO PATTERN DATA */
-+{ CYRIXsetupSync();
-+ CYRIXsetPatColors01(planemask, 0);
-
-- gxr_load_solid_pattern((unsigned short) planemask);
--
-- /* SET RASTER OPERATION FOR USING PATTERN AS PLANE MASK */
-+ if (transparency_color == -1)
-+ { CYRIXsetPatMode(rop, RM_PAT_DISABLE);
-+ transMode = 0;
-+ }
-+ else
-+ { CYRIXsetPatModeTrans(RM_PAT_DISABLE);
-+ transMode = 1;
-
-- gxr_load_raster_operation(windowsROPpatMask[rop & 0x0F]);
-+ /* fill blit buffer 1 with the transparency color */
-+ if (vgaBitsPerPixel == 16)
-+ { int k = CYRIXbltBufSize / 4;
-+ CARD32 val = (transparency_color << 16) |
-+ transparency_color;
-+ volatile CARD32* buf = &(GX_REG(CYRIXbltBuf1Address));
-+
-+ while (--k >= 0) buf[k] = val;
-+ }
-+ else
-+ memset(GXregisters + CYRIXbltBuf1Address,
-+ transparency_color, CYRIXbltBufSize);
-+ }
-
-- /* SAVE TRANSPARENCY FLAG */
-+ blitMode = BM_READ_SRC_FB | BM_WRITE_FB | BM_SOURCE_COLOR
-+ | (transMode ? IfDest(rop, BM_READ_DST_FB1) : BM_READ_DST_NONE)
-+ | (ydir < 0 ? BM_REVERSE_Y : 0);
-
-- CYRIXtransparent = (transparency_color == -1) ? 0 : 1;
-- CYRIXtransColor = transparency_color;
-+ copyXdir = xdir;
- }
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSubsequentScreenToScreenCopy
--//
--// This routine is called to perform a screen to screen BLT using the
--// previously specified planemask, raster operation, and transparency flag.
--//
--// Sample application uses (non-transparent):
--// - Moving windows.
--// - x11perf: scroll tests (-scroll500).
--// - x11perf: copy from window to window (-copywinwin500).
--//
--// No application found using transparency.
--//---------------------------------------------------------------------------
--*/
--
- void
- CYRIXSubsequentScreenToScreenCopy(x1, y1, x2, y2, w, h)
- int x1, y1, x2, y2, w, h;
--{
-- if (CYRIXtransparent)
-- {
-- /* CALL ROUTINE FOR TRANSPARENT SCREEN TO SCREEN BLT */
-- /* Should only be called for the "copy" raster operation. */
--
-- gxr_screen_to_screen_xblt(
-- (unsigned short) x1, (unsigned short) y1,
-- (unsigned short) x2, (unsigned short) y2,
-- (unsigned short) w, (unsigned short) h,
-- (unsigned short) CYRIXtransColor);
-+{ int up = (blitMode & BM_REVERSE_Y);
-+
-+ /* divide the operation into columns when necessary */
-+ if (copyXdir < 0)
-+ { int x_offset = w - bltBufWidth;
-+
-+ while (x_offset > 0)
-+ { CYRIXSubsequentScreenToScreenCopy(x1 + x_offset, y1,
-+ x2 + x_offset, y2,
-+ bltBufWidth, h);
-+ x_offset -= bltBufWidth;
-+ w -= bltBufWidth;
-+ } }
-+ else while (w > bltBufWidth)
-+ { CYRIXSubsequentScreenToScreenCopy(x1, y1, x2, y2,
-+ bltBufWidth, h);
-+ x1 += bltBufWidth;
-+ x2 += bltBufWidth;
-+ w -= bltBufWidth;
- }
-- else
-- {
-- /* CALL ROUTINE FOR NORMAL SCREEN TO SCREEN BLT */
-
-- gxr_screen_to_screen_blt(
-- (unsigned short) x1, (unsigned short) y1,
-- (unsigned short) x2, (unsigned short) y2,
-- (unsigned short) w, (unsigned short) h);
-+ CYRIXsetupSync();
-+ CYRIXsetSrcXY(x1, (up ? (y1 + h - 1) : y1));
-+ CYRIXsetDstXY(x2, (up ? (y2 + h - 1) : y2));
-+
-+ /* in transparent mode, one line reads the transparency color
-+ into a processor-internal register, and the remaining lines
-+ can be done in a single second pass */
-+ if (transMode)
-+ { blitMode |= BM_READ_DST_BB1;
-+ CYRIXsetWH(w, 1);
-+ CYRIXsetBlitMode();
-+ h--;
-+ if (!h) return;
-+ if (up) { y1--; y2--; }
-+ else { y1++; y2++; }
-+ CYRIXsetupSync();
-+ blitMode &= ~(BM_READ_DST_BB1);
- }
-+ CYRIXsetWH(w, h);
-+ CYRIXsetBlitMode();
- }
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSubsequentBresenhamLine
--//
--// This routine is called to render a vector using the specified Bresenham
--// parameters.
--//
--// Sample application uses:
--// - Window outlines on window move.
--// - x11perf: line segments (-seg500).
--//---------------------------------------------------------------------------
--*/
-
-+/* Bresenham lines */
- void
- CYRIXSubsequentBresenhamLine(x1, y1, octant, err, e1, e2, length)
- int x1, y1, octant, err, e1, e2, length;
--{
-- unsigned short flags;
--
-- /* DETERMINE YMAJOR AND DIRECTION FLAGS */
--
-- if (octant & YMAJOR)
-- { flags = VM_Y_MAJOR;
-- if (!(octant & XDECREASING)) flags |= VM_MINOR_INC;
-- if (!(octant & YDECREASING)) flags |= VM_MAJOR_INC;
-+{ if (octant & YMAJOR)
-+ { vectorMode = (vectorMode & VM_READ_DST_FB) | VM_Y_MAJOR;
-+ if (!(octant & XDECREASING)) vectorMode |= VM_MINOR_INC;
-+ if (!(octant & YDECREASING)) vectorMode |= VM_MAJOR_INC;
- }
- else
-- { flags = VM_X_MAJOR;
-- if (!(octant & XDECREASING)) flags |= VM_MAJOR_INC;
-- if (!(octant & YDECREASING)) flags |= VM_MINOR_INC;
-+ { vectorMode = (vectorMode & VM_READ_DST_FB) | VM_X_MAJOR;
-+ if (!(octant & XDECREASING)) vectorMode |= VM_MAJOR_INC;
-+ if (!(octant & YDECREASING)) vectorMode |= VM_MINOR_INC;
- }
-
-- /* CALL ROUTINE TO DRAW VECTOR */
--
-- gxr_bresenham_line((unsigned short) x1, (unsigned short) y1,
-- (unsigned short) length, (unsigned short) err,
-- (unsigned short) e1, (unsigned short) e2, (unsigned short) flags);
-+ CYRIXsetupSync();
-+ CYRIXsetDstXY(x1, y1);
-+ CYRIXsetWH(length, (err & 0xFFFF));
-+ CYRIXsetSrcXY((e1 & 0xFFFF), (e2 & 0xFFFF));
-+ CYRIXsetVectorMode();
- }
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSetupForCPUToScreenColorExpand
--//
--// This routine is called to setup the planemask, colors, and raster
--// operation for future monocrome bitmap to screen BLTs.
--//---------------------------------------------------------------------------
--*/
-
--void CYRIXSetupForCPUToScreenColorExpand(bg, fg, rop, planemask)
-+/* 8x8 pattern color expand */
-+void CYRIXSetupFor8x8PatternColorExpand(patternx, patterny, bg, fg, rop, planemask)
-+int patternx, patterny;
- int bg, fg, rop;
- unsigned int planemask;
- { int trans = (bg == -1);
-
-- /* LOAD SOURCE COLORS */
-+ CYRIXsetupSync();
-+ CYRIXsetSourceColors01(planemask, planemask);
-+ CYRIXsetPatColors01(trans ? 0 : bg, fg);
-+ CYRIXsetPatData(patternx, patterny);
-+ CYRIXsetPatModeX(rop, RM_PAT_MONO | (trans ? RM_PAT_TRANSPARENT : 0));
-
-- gxr_load_mono_source((unsigned short) bg, (unsigned short) fg,
-- (unsigned short) trans);
-+ blitMode = BM_READ_SRC_NONE | BM_WRITE_FB | BM_SOURCE_EXPAND
-+ | (trans ? IfDest(rop, BM_READ_DST_FB0) : BM_READ_DST_NONE);
-+}
-
-- /* LOAD PLANEMASK INTO PATTERN DATA */
-+void CYRIXSubsequent8x8PatternColorExpand(patternx, patterny, x, y, w, h)
-+int patternx, patterny;
-+int x, y, w, h;
-+{ CYRIXSubsequentFillRectSolid(x, y, w, h);
-+}
-
-- gxr_load_solid_pattern((unsigned short) planemask);
--
-- /* SET RASTER OPERATION FOR USING PATTERN AS PLANE MASK */
-
-- gxr_load_raster_operation(windowsROPpatMask[rop & 0x0F]);
--}
-+/* CPU-to-screen color expansion */
-+void CYRIXSetupForCPUToScreenColorExpand(bg, fg, rop, planemask)
-+int bg, fg, rop;
-+unsigned int planemask;
-+{ int trans = (bg == -1);
-
--/*
--//---------------------------------------------------------------------------
--// CYRIXSubsequentCPUToScreenColorExpand
--//
--// This routine is called to render expanded monocrome bitmap data to the
--// screen using the previously specified colors and raster operation. Since
--// the server loads the monochrome data into BB0, not the driver, this
--// routine just sets a flag and saves the parameters to use when the server
--// is done loading the data and calls the CYRIXAccelSync function.
--//
--// Sample application uses:
--// - Text in windows.
--// - x11perf: text (-ftext, -f8text, -f9text, ...).
--//---------------------------------------------------------------------------
--*/
-+ CYRIXsetupSync();
-+ CYRIXsetSourceColors01(trans ? 0 : bg, fg);
-+ CYRIXsetPatColors01(planemask, 0);
-+
-+ CYRIXsetPatMode(rop, RM_PAT_DISABLE | (trans ? RM_SRC_TRANSPARENT : 0));
-+
-+ /* this is formally incorrect: XAA may use both BB0 and BB1
-+ for the text source bitmap, so READ_DST_FB1 should not be
-+ used. So far, this problem has not manifested itself in
-+ practice. */
-+ blitMode = BM_READ_SRC_BB0 | BM_WRITE_FB | BM_SOURCE_EXPAND
-+ | (trans ? IfDest(rop, BM_READ_DST_FB1) : BM_READ_DST_NONE);
-+}
-
- void CYRIXSubsequentCPUToScreenColorExpand(x, y, w, h, skipleft)
- int x, y, w, h;
- int skipleft;
--{
-- CYRIXstartMonoExpand = 1;
-- CYRIXsaveX = x;
-- CYRIXsaveY = y;
-- CYRIXsaveW = w;
-- CYRIXsaveH = h;
--
-- /* WAIT UNTIL IDLE BEFORE ALLOWING WRITES TO BLT BUFFERS */
-- /* Server will load the monochrome data into BB0 after this. */
-+{ CYRIXsetupSync();
-+ CYRIXsetSrcXY(0, 0);
-+ CYRIXsetDstXY(x, y);
-+ CYRIXsetWH(w, h);
-
-- gxr_wait_until_idle();
-+ CYRIXAccelSync();
-+ setBlitModeOnSync = 1;
- }
--
--/* END OF FILE */
-
-diff -ruN XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_driver.c XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_driver.c
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_driver.c Wed Jun 23 08:37:22 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_driver.c Fri Nov 6 11:41:51 1998
-@@ -1,12 +1,9 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_driver.c,v 1.1.2.7 1999/06/23 12:37:22 hohndel Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_driver.c,v 1.1.2.6 1998/11/06 09:47:08 hohndel Exp $ */
- /*
-- * Copyright 1999 by Brian Falardeau
- * Copyright 1998 by Annius V. Groenink (A.V.Groenink@zfc.nl, avg@cwi.nl),
- * Dirk H. Hohndel (hohndel@suse.de),
- * Portions: the GGI project & confidential CYRIX databooks.
- *
-- * Substitute Brian Falardeau into a copy of the following legal jargon...
-- *
- * 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
-@@ -25,17 +22,13 @@
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-+/* $XConsortium: $ */
-
- /*************************************************************************/
-
- /*
- Log for the cyrix driver source as a whole
-
-- May 1999, Brian Falardeau:
-- - Fixed interaction with SoftVGA for setting 2K pitch at 1280x1024.
-- - Added CRTC tables for 60 Hz and 75 Hz modes.
-- - Removed enabling display compression directly for VSA1.
--
- 5th Nov 1998 avg - Fixed blit buffer organization using CPU_WRITE
- instruction. Support for older chipsets (color
- treatment and different CPU_WRITE opcode).
-@@ -115,35 +108,50 @@
- #include "extensions/xf86dgastr.h"
- #endif
-
-+#ifdef XF86VGA16
-+#define MONOVGA
-+#endif
-
-+#if !defined(MONOVGA) && !defined(XF86VGA16)
- #include "vga256.h"
-+#endif
-+
- #include "cyrix.h"
-
- pciTagRec CyrixPciTag;
- extern vgaHWCursorRec vgaHWCursor;
-
--#define NUM_STD_CRTC_REGS 25
--#define NUM_EXT_CRTC_REGS 16
--
- typedef struct {
- vgaHWRec std; /* IBM VGA */
- struct vgaCYRIXext
-- {
-- /* override of miscellaneous output register value */
--
-- unsigned char miscOutput;
--
-- /* override of standard CRTC register values */
--
-- unsigned char stdCRTCregs[NUM_STD_CRTC_REGS];
--
-- /* extended CRTC register values (specific to MediaGX) */
--
-- unsigned char extCRTCregs[NUM_EXT_CRTC_REGS];
-+ { /* extended SoftVGA registers */
-+ unsigned char VerticalTimingExtension;
-+ unsigned char ExtendedAddressControl;
-+ unsigned char ExtendedOffset;
-+ unsigned char ExtendedColorControl;
-+ unsigned char DisplayCompression;
-+ unsigned char DriverControl;
-+ unsigned char DACControl;
-+ unsigned char ClockControl;
-+ unsigned char CrtClockFrequency;
-+ unsigned char CrtClockFrequencyFraction;
-+ unsigned char RefreshRate;
-+
-+ /* display controller hardware registers */
-+ CARD32 DcGeneralCfg;
-+ CARD32 DcCursStOffset;
-+ CARD32 DcCbStOffset;
-+ CARD32 DcLineDelta;
-+ CARD32 DcBufSize;
-+ CARD32 DcCursorX;
-+ CARD32 DcCursorY;
-+ CARD32 DcCursorColor;
-
- /* graphics pipeline registers */
--
- CARD32 GpBlitStatus;
-+
-+ /* save area for cursor image */
-+ char cursorPattern[256];
- } ext;
- } vgaCYRIXRec, *vgaCYRIXPtr;
-
-@@ -158,9 +166,11 @@
- static void CYRIXRestore();
- static void CYRIXAdjust();
-
-+#ifndef MONOVGA
- static void CYRIXFbInit();
- static Bool CYRIXScreenInit();
- static Bool CYRIXPitchAdjust();
-+#endif
-
- void CYRIXSetRead();
- void CYRIXSetWrite();
-@@ -177,7 +187,11 @@
- CYRIXAdjust,
- vgaHWSaveScreen,
- (void (*)())NoopDDA, /* CYRIXGetMode */
-+#ifndef MONOVGA
- CYRIXFbInit,
-+#else
-+ (void (*)())NoopDDA, /* CYRIXFbInit */
-+#endif
- CYRIXSetRead,
- CYRIXSetWrite,
- CYRIXSetReadWrite,
-@@ -191,9 +205,9 @@
- VGA_NO_DIVIDE_VERT, /* ChipInterlaceType */
- {0,}, /* ChipOptionFlags */
- 8, /* ChipRounding */
-- TRUE, /* ChipUseLinearAddressing */
-- 0x40800000, /* ChipLinearBase */
-- 0x001FFFFF, /* ChipLinearSize */
-+ FALSE, /* ChipUseLinearAddressing */
-+ 0, /* ChipLinearBase */
-+ 0, /* ChipLinearSize */
- TRUE, /* ChipHas16bpp */
- FALSE, /* ChipHas24bpp */
- FALSE, /* ChipHas32bpp */
-@@ -207,10 +221,6 @@
-
- char* GXregisters;
-
--int CYRIXvsaversion; /* VSA version */
--#define CYRIX_VSA1 1
--#define CYRIX_VSA2 2
--
- int CYRIXcbufferAddress; /* relative to video base */
- int CYRIXoffscreenAddress;
- int CYRIXcursorAddress;
-@@ -225,94 +235,6 @@
-
- #define newstate ((vgaCYRIXPtr)vgaNewVideoState)
-
--typedef struct {
-- int xsize;
-- int ysize;
-- int clock;
-- unsigned char miscOutput;
-- unsigned char stdCRTCregs[NUM_STD_CRTC_REGS];
-- unsigned char extCRTCregs[NUM_EXT_CRTC_REGS];
--} vgaCYRIXmode;
--
--vgaCYRIXmode CYRIXmodes[] =
--{
--/*------------------------------------------------------------------------------*/
-- { 640, 480, /* 640x480 */
-- 25, /* 25 MHz clock = 60 Hz refresh rate */
-- 0xE3, /* miscOutput register */
-- { 0x5F, 0x4F, 0x50, 0x82, 0x54, 0x80, 0x0B, 0x3E, /* standard CRTC */
-- 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0xEA, 0x0C, 0xDF, 0x50, 0x00, 0xE7, 0x04, 0xE3, 0xFF },
-- { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 800, 600, /* 800x600 */
-- 40, /* 40 MHz clock = 60 Hz refresh rate */
-- 0x23, /* miscOutput register */
-- { 0x7F, 0x63, 0x64, 0x82, 0x6B, 0x1B, 0x72, 0xF0, /* standard CRTC */
-- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0x59, 0x0D, 0x57, 0x64, 0x00, 0x57, 0x73, 0xE3, 0xFF },
-- { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0xA0, 0x50, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 1024, 768, /* 1024x768 */
-- 65, /* 65 MHz clock = 60 Hz refresh rate */
-- 0xE3, /* miscOutput register */
-- { 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96, 0x24, 0xF5, /* standard CRTC */
-- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0x04, 0x0A, 0xFF, 0x80, 0x00, 0xFF, 0x25, 0xE3, 0xFF },
-- { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0x80, 0x41, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 1280, 1024, /* 1280x1024 */
-- 108, /* 108 MHz clock = 60 Hz refresh rate */
-- 0x23, /* miscOutput register */
-- { 0xCF, 0x9F, 0xA0, 0x92, 0xAA, 0x19, 0x28, 0x52, /* standard CRTC */
-- 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0x01, 0x04, 0xFF, 0xA0, 0x00, 0x00, 0x29, 0xE3, 0xFF },
-- { 0x00, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0x80, 0x6C, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 640, 480, /* 640x480 */
-- 31, /* 31.5 MHz clock = 75 Hz refresh rate */
-- 0xE3, /* miscOutput register */
-- { 0x64, 0x4F, 0x4F, 0x88, 0x54, 0x9B, 0xF2, 0x1F, /* standard CRTC */
-- 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0xE1, 0x04, 0xDF, 0x50, 0x00, 0xDF, 0xF3, 0xE3, 0xFF },
-- { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0xA0, 0x3F, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 800, 600, /* 800x600 */
-- 99, /* 99 MHz clock = 75 Hz refresh rate */
-- 0x23, /* miscOutput register */
-- { 0x7F, 0x63, 0x63, 0x83, 0x68, 0x11, 0x6F, 0xF0, /* standard CRTC */
-- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0x59, 0x1C, 0x57, 0x64, 0x00, 0x57, 0x70, 0xE3, 0xFF },
-- { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0xA0, 0x63, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 1024, 768, /* 1024x768 */
-- 79, /* 79 MHz clock = 75 Hz refresh rate */
-- 0xE3, /* miscOutput register */
-- { 0x9F, 0x7F, 0x7F, 0x83, 0x84, 0x8F, 0x1E, 0xF5, /* standard CRTC */
-- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0x01, 0x04, 0xFF, 0x80, 0x00, 0xFF, 0x1F, 0xE3, 0xFF },
-- { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0x80, 0x4F, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
-- { 1280, 1024, /* 1280x1024 */
-- 135, /* 135 MHz clock = 75 Hz refresh rate */
-- 0x23, /* miscOutput register */
-- { 0xCE, 0x9F, 0x9F, 0x92, 0xA4, 0x15, 0x28, 0x52, /* standard CRTC */
-- 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-- 0x01, 0x04, 0xFF, 0xA0, 0x00, 0x00, 0x29, 0xE3, 0xFF },
-- { 0x00, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* extended CRTC */
-- 0x00, 0x00, 0x01, 0x03, 0x80, 0x87, 0x00, 0x00 } },
--/*------------------------------------------------------------------------------*/
--};
--
--#define NUM_CYRIX_MODES sizeof(CYRIXmodes)/sizeof(vgaCYRIXmode)
--
- static char *
- CYRIXIdent(n)
- int n;
-@@ -478,6 +400,7 @@
- vga256InfoRec.bankedMono = TRUE;
- OFLG_SET(CLOCK_OPTION_PROGRAMABLE, &vga256InfoRec.clockOptions);
-
-+#ifndef MONOVGA
- /* define option set valid for the driver */
- OFLG_SET(OPTION_SW_CURSOR, &CYRIX.ChipOptionFlags);
- OFLG_SET(OPTION_HW_CURSOR, &CYRIX.ChipOptionFlags);
-@@ -496,12 +419,13 @@
- CYRIX.ChipLinearSize = (1024 * vga256InfoRec.videoRam);
-
- CYRIX.ChipUseLinearAddressing = TRUE;
-+#endif
-
- /* map the entire area from GX_BASE (scratchpad area)
- up to the end of the control registers */
- GXregisters = (char*)xf86MapVidMem(vga256InfoRec.scrnIndex,
- EXTENDED_REGION,
-- (void*)physbase, 0x20000);
-+ (void*)physbase, 0x9000);
-
- if (!GXregisters)
- { ErrorF("%s %s: Cannot map hardware registers\n",
-@@ -509,80 +433,27 @@
- goto probeFailed;
- }
-
-- /* check VSA version */
-- /* VSA2 contains a "CX" signature at registers 0x35 and 0x36. */
-- /* The SoftVGA interface changed slightly for VSA2. Originally, */
-- /* VSA2 was intended for MXi only, but it may someday be */
-- /* provided for MediaGX systems as well. */
--
-- CYRIXvsaversion = CYRIX_VSA2;
-- outb(vgaIOBase + 4, 0x35);
-- if (inb(vgaIOBase + 5) != 'C') CYRIXvsaversion = CYRIX_VSA1;
-- outb(vgaIOBase + 4, 0x36);
-- if (inb(vgaIOBase + 5) != 'X') CYRIXvsaversion = CYRIX_VSA1;
-- if (CYRIXvsaversion == CYRIX_VSA1)
-- {
-- ErrorF("%s %s: VSA1 detected\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-- }
-- else
-- {
-- ErrorF("%s %s: VSA2 detected\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-- }
- return(TRUE);
- }
-
--/*------------------------------------------------------------------------*\
--** FbInit()
--**
--** From README file: "The FbInit() function is required for drivers with
--** accelerated graphics support. It is used to replace default cfb.banked
--** functions with accelerated chip-specific versions.
--**
--** For the Cyrix driver, this routine is also used to allocate video
--** memory. This is more complicated than it needs to be...
--**
--** For VSA1, SoftVGA manages all of graphics memory, including the
--** compression buffer, cursor buffer, and offscreen memory. The driver
--** should not allocate memory itself. For offscreen memory it reads
--** registers 0x3C and 0x3D. For the cursor buffer it reads the hardware
--** register after validating a mode. For compression, it just sets bit 0
--** of register 0x49 if it wants to use compression, and SoftVGA will
--** enable it if memory has been allocated.
--**
--** This model, however, breaks down for this driver. There is a bug in
--** SoftVGA that keeps the 0x3C register from working properly. This bug
--** also prevents compression from being enabled when using a virtual
--** desktop. This driver also cannot use the memory past 2 Meg, which
--** effects the memory calculation.
--**
--** Therefore, this driver does what it is not supposed to and allocates
--** video memory itself. But, this is required due to bugs in SoftVGA and,
--** as it turns out, works out fine (with limiting compression use).
--**
--** For VSA2, the driver is supposed to do this allocation itself.
--\*------------------------------------------------------------------------*/
-
-+#ifndef MONOVGA
- static void
- CYRIXFbInit()
- { int lineDelta = vga256InfoRec.displayWidth * (vgaBitsPerPixel / 8);
- int virtualDelta = vga256InfoRec.virtualX * (vgaBitsPerPixel / 8);
-- int base;
-
- vgaSetScreenInitHook(CYRIXScreenInit);
-
-- /* always put the cursor at the end of video memory. */
--
-- CYRIXcursorAddress = CYRIX.ChipLinearSize - 256;
--
- /* offscreen memory is, normally, right after the frame buffer;
-+ always put the cursor at the end of video memory.
-+
- (It would be nice to use the ignored 64KB block at the end of
- the video memory (2112 - 2048) for the hardware cursor, but
- it is not mapped. This will not be a problem in Xfree 3.9 */
--
- CYRIXoffscreenAddress = (lineDelta * vga256InfoRec.virtualY);
-- CYRIXoffscreenSize = CYRIXcursorAddress - CYRIXoffscreenAddress;
-+ CYRIXcursorAddress = CYRIX.ChipLinearSize - 256;
-+ CYRIXoffscreenSize = CYRIXcursorAddress - CYRIXoffscreenAddress;
-
- /* if there is enough room between lines, put the compression
- buffer there */
-@@ -591,7 +462,7 @@
- CYRIXcbLineDelta = (lineDelta >> 2);
- if (xf86Verbose > 1)
- ErrorF("%s %s: Interleaving frame buffer and compression buffer\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-+ XCONFIG_PROBED, vga256InfoRec.name);
- }
- /* otherwise, put it directly after the virtual frame */
- else
-@@ -600,7 +471,7 @@
- if (cbuffer_size > CYRIXoffscreenSize)
- { CYRIXcbLineDelta = 0;
- ErrorF("%s %s: No room for the compression buffer\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-+ XCONFIG_PROBED, vga256InfoRec.name);
- }
- else
- { CYRIXcbufferAddress = CYRIXoffscreenAddress;
-@@ -609,43 +480,25 @@
- CYRIXoffscreenSize -= cbuffer_size;
- } }
-
-- /* print results of offscreen memory configuration */
--
-- if (CYRIXoffscreenSize <= 0)
-- {
-- ErrorF("%s %s: No offscreen memory available.\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-- }
-- else
-- {
-- ErrorF("%s %s: Offscreen memory from 0x%8.8X-0x%8.8X\n",
-- XCONFIG_PROBED, vga256InfoRec.name,
-- CYRIXoffscreenAddress,
-- CYRIXoffscreenAddress+CYRIXoffscreenSize-1);
-- }
--
-- /* call CYRIXAccelInit to setup the XAA accelerated functions */
--
-+ /* call CYRIXAccelInit to setup the XAA accelerated functions */
- if (!OFLG_ISSET(OPTION_NOACCEL, &vga256InfoRec.options))
- CYRIXAccelInit();
-
- /* install hardware cursor routines */
--
- if (OFLG_ISSET(OPTION_HW_CURSOR, &vga256InfoRec.options))
-- { if (CYRIXoffscreenSize > 0)
-+ { if (CYRIXoffscreenSize >= 0)
- { vgaHWCursor.Initialized = TRUE;
- vgaHWCursor.Init = CYRIXCursorInit;
- vgaHWCursor.Restore = CYRIXRestoreCursor;
- vgaHWCursor.Warp = CYRIXWarpCursor;
- vgaHWCursor.QueryBestSize = CYRIXQueryBestSize;
-- ErrorF("%s %s: Using hardware cursor at %8.8X\n",
-- XCONFIG_PROBED, vga256InfoRec.name, CYRIXcursorAddress);
-+ if (xf86Verbose)
-+ ErrorF("%s %s: Using hardware cursor\n",
-+ XCONFIG_PROBED, vga256InfoRec.name);
- }
- else
-- {
- ErrorF("%s %s: No room for hardware cursor\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-- }
-+ XCONFIG_PROBED, vga256InfoRec.name);
- }
- }
-
-@@ -696,6 +549,7 @@
-
- return pitch;
- }
-+#endif /* not MONOVGA */
-
-
- static void
-@@ -747,121 +601,210 @@
-
- static void
- CYRIXresetVGA()
--{
-- int i;
-+{ unsigned char temp;
-+ /* switch off compression and cursor the hard way */
-+ GX_REG(DC_UNLOCK) = DC_UNLOCK_VALUE;
-+ GX_REG(DC_GENERAL_CFG) &= ~(DC_GCFG_CMPE | DC_GCFG_DECE | DC_GCFG_FDTY | DC_GCFG_CURE);
-+ GX_REG(DC_UNLOCK) = 0;
-+ CYRIXmarkLinesDirty();
-
- /* reset SoftVGA extensions to standard VGA behaviour */
--
-- for (i = 0; i < NUM_EXT_CRTC_REGS; i++)
-- {
-- outb(vgaIOBase + 4, 0x40 + i);
-- outb(vgaIOBase + 5, 0x00);
-- }
-+ outb(vgaIOBase + 4, CrtcExtendedAddressControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, temp & 0xf8);
-+ outb(vgaIOBase + 4, CrtcExtendedStartAddress);
-+ outb(vgaIOBase + 5, 0x00);
-+ outb(vgaIOBase + 4, CrtcWriteMemoryAperture);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, temp & 0xe0);
-+ outb(vgaIOBase + 4, CrtcReadMemoryAperture);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, temp & 0xe0);
-+ outb(vgaIOBase + 4, CrtcDriverControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, temp & 0xfe);
-+ outb(vgaIOBase + 4, CrtcDisplayCompression);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, temp & 0xf0);
- }
-
- static void
- CYRIXRestore(restore)
- vgaCYRIXPtr restore;
--{ unsigned char i, temp, temp2;
-- unsigned long value;
--
-- /* unlock extended CRTC registers */
--
-- outb(vgaIOBase + 4, 0x30);
-- outb(vgaIOBase + 5, 0x57);
-- outb(vgaIOBase + 5, 0x4C);
-+{ unsigned char temp;
-+ vgaProtect(TRUE); /* Blank the screen */
-
-- /* SIGNAL THE BEGINNING OF THE MODE SWITCH
-- SoftVGA will hold off validating the back end hardware. */
--
-- outb(vgaIOBase + 4, CrtcModeSwitchControl);
-- outb(vgaIOBase + 5, 0x01);
-+ /* it would be ideal to be able to use the ModeSwitchControl
-+ register to protect SoftVGA from reading the configuration
-+ before all registers have been written. But that bit must be
-+ set somewhere in the middle of vgaHWRestore (after restoring
-+ the font). Luckily things seem to work without it. */
-
- /* restore standard VGA portion */
--
- CYRIXresetVGA();
- vgaHWRestore((vgaHWPtr)restore);
-+ CYRIXmarkLinesDirty();
-
-- /* override restored miscellaneous output regiter value */
--
-- outb(0x3C2, restore->ext.miscOutput);
--
-- /* override restored standard CRTC register values */
--
-- outb(vgaIOBase + 4, 0x11);
-- outb(vgaIOBase + 5, 0x00);
-- for (i = 0; i < NUM_STD_CRTC_REGS; i++)
-- {
-- outb(vgaIOBase + 4, i);
-- outb(vgaIOBase + 5, restore->ext.stdCRTCregs[i]);
-- }
--
- /* restore SoftVGA extended registers */
-+ outb(vgaIOBase + 4, CrtcDriverControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.DriverControl & 0x01)
-+ | (temp & 0xfe));
-+
-+ outb(vgaIOBase + 4, CrtcVerticalTimingExtension);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.VerticalTimingExtension & 0x55)
-+ | (temp & 0xaa));
-+
-+ outb(vgaIOBase + 4, CrtcExtendedAddressControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.ExtendedAddressControl & 0x07)
-+ | (temp & 0xf8));
-+
-+ outb(vgaIOBase + 4, CrtcExtendedOffset);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.ExtendedOffset & 0x03)
-+ | (temp & 0xfc));
-+
-+ outb(vgaIOBase + 4, CrtcExtendedColorControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.ExtendedColorControl & 0x07)
-+ | (temp & 0xf8));
-+
-+ outb(vgaIOBase + 4, CrtcDisplayCompression);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.DisplayCompression & 0x0f)
-+ | (temp & 0xf0));
-+
-+ outb(vgaIOBase + 4, CrtcDACControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.DACControl & 0x0e)
-+ | (temp & 0xf1));
-+
-+ if (restore->std.NoClock >= 0)
-+ { outb(vgaIOBase + 4, CrtcClockControl);
-+ temp = inb(vgaIOBase + 5);
-+ outb(vgaIOBase + 5, (restore->ext.ClockControl & 0xb0)
-+ | (temp & 0x4f));
-+
-+ outb(vgaIOBase + 4, CrtcClockFrequency);
-+ outb(vgaIOBase + 5, restore->ext.CrtClockFrequency);
-+
-+ outb(vgaIOBase + 4, CrtcClockFrequencyFraction);
-+ outb(vgaIOBase + 5, restore->ext.CrtClockFrequencyFraction);
-+
-+ outb(vgaIOBase + 4, CrtcRefreshRate);
-+ outb(vgaIOBase + 5, restore->ext.RefreshRate);
-+ }
-+
-+ /* let SoftVGA programming settle before we access DC registers,
-+ but don't wait too long */
-+ usleep(1000);
-+ CYRIXmarkLinesDirty();
-+
-+ /* restore display controller hardware registers */
-+#ifndef MONOVGA
-+#define DCFG_MASK (DC_GCFG_FDTY | DC_GCFG_DECE | DC_GCFG_CMPE)
-+#define GPBS_MASK (BC_16BPP | BC_FB_WIDTH_2048)
-
-- for (i = 0; i < NUM_EXT_CRTC_REGS; i++)
-- {
-- outb(vgaIOBase + 4, 0x40+i);
-- outb(vgaIOBase + 5, restore->ext.extCRTCregs[i]);
-- }
-+ GX_REG(DC_UNLOCK) = DC_UNLOCK_VALUE;
-
-- /* signal the end of the mode switch */
-+ GX_REG(DC_CURS_ST_OFFSET) = restore->ext.DcCursStOffset;
-+ GX_REG(DC_CB_ST_OFFSET) = restore->ext.DcCbStOffset;
-+ GX_REG(DC_LINE_DELTA) = (GX_REG(DC_LINE_DELTA) & 0xFFC00FFF)
-+ | (restore->ext.DcLineDelta & 0x003FF000);
-+ GX_REG(DC_BUF_SIZE) = (GX_REG(DC_BUF_SIZE) & 0xFFFF01FF)
-+ | (restore->ext.DcBufSize & 0x0000FE00);
-+ GX_REG(DC_CURSOR_X) = restore->ext.DcCursorX;
-+ GX_REG(DC_CURSOR_Y) = restore->ext.DcCursorY;
-+ GX_REG(DC_CURSOR_COLOR) = restore->ext.DcCursorColor;
-
-- outb(vgaIOBase + 4, CrtcModeSwitchControl);
-- outb(vgaIOBase + 5, 0x00);
-+ GX_REG(DC_GENERAL_CFG) = (GX_REG(DC_GENERAL_CFG) & (~DCFG_MASK))
-+ | (restore->ext.DcGeneralCfg & DCFG_MASK);
-
-- /* wait until SoftVGA has validated the mode.
-- This is for VSA1 only, where SoftVGA waits until the next
-- vertical blank to recalculate the hardware state. For VSA2
-- the hardware us updated immediately, so this is not needed.
-- THIS MUST BE DONE FOR VSA1 before loading the GP_BLT_STATUS
-- register, otherwise SoftVGA will override the value. */
-+ GX_REG(DC_UNLOCK) = 0;
-
-- if (CYRIXvsaversion == CYRIX_VSA1)
-- {
-- outb(vgaIOBase + 4, 0x33);
-- while(inb(vgaIOBase + 5) & 0x80);
-- }
-+ GX_REG(GP_BLIT_STATUS) = (GX_REG(GP_BLIT_STATUS) & (~GPBS_MASK))
-+ | (restore->ext.GpBlitStatus & GPBS_MASK);
-
-- /* overrite what SoftVGA may have stored into GP_BLIT_STATUS */
-+ /* restore cursor pattern */
-+ if (restore->ext.DcCursStOffset < 1024 * vga256InfoRec.videoRam)
-+ memcpy((char*)vgaLinearBase + restore->ext.DcCursStOffset,
-+ restore->ext.cursorPattern, 256);
-+#endif
-
-- GX_REG(GP_BLIT_STATUS) = restore->ext.GpBlitStatus;
-+ vgaProtect(FALSE); /* Turn on screen */
- }
-
- static void *
- CYRIXSave(save)
- vgaCYRIXPtr save;
--{ unsigned char i;
-- struct vgaCYRIXext ext;
-+{ struct vgaCYRIXext ext;
-
-- /* save miscellaneous output register */
-+#ifndef MONOVGA
-+ /* save graphics pipeline registers */
-+ ext.GpBlitStatus = GX_REG(GP_BLIT_STATUS);
-
-- ext.miscOutput = inb(0x3CC);
-+ /* save display controller hardware registers */
-+ GX_REG(DC_UNLOCK) = DC_UNLOCK_VALUE;
-+ ext.DcGeneralCfg = GX_REG(DC_GENERAL_CFG);
-+ ext.DcCursStOffset = GX_REG(DC_CURS_ST_OFFSET);
-+ ext.DcCbStOffset = GX_REG(DC_CB_ST_OFFSET);
-+ ext.DcLineDelta = GX_REG(DC_LINE_DELTA);
-+ ext.DcBufSize = GX_REG(DC_BUF_SIZE);
-+ ext.DcCursorX = GX_REG(DC_CURSOR_X);
-+ ext.DcCursorY = GX_REG(DC_CURSOR_Y);
-+ ext.DcCursorColor = GX_REG(DC_CURSOR_COLOR);
-+ GX_REG(DC_UNLOCK) = 0;
-+
-+ /* save cursor pattern.
-+ In the 3.3.1 solution, we don't need to do this
-+ if it is in the extra 64KB block of frame buffer memory
-+ that we ignore (and is not mapped anyway) */
-+ if (ext.DcCursStOffset < 1024 * vga256InfoRec.videoRam)
-+ memcpy(ext.cursorPattern,
-+ (char*)vgaLinearBase + ext.DcCursStOffset, 256);
-+#endif
-
-- /* save standard CRTC registers */
-+ /* save SoftVGA extended registers */
-+ outb(vgaIOBase + 4, CrtcVerticalTimingExtension);
-+ ext.VerticalTimingExtension = inb(vgaIOBase + 5);
-
-- for (i = 0; i < NUM_STD_CRTC_REGS; i++)
-- {
-- outb(vgaIOBase + 4, i);
-- ext.stdCRTCregs[i] = inb(vgaIOBase + 5);
-- }
-+ outb(vgaIOBase + 4, CrtcExtendedAddressControl);
-+ ext.ExtendedAddressControl = inb(vgaIOBase + 5);
-
-- /* save extended CRTC registers */
-+ outb(vgaIOBase + 4, CrtcExtendedOffset);
-+ ext.ExtendedOffset = inb(vgaIOBase + 5);
-
-- for (i = 0; i < NUM_EXT_CRTC_REGS; i++)
-- {
-- outb(vgaIOBase + 4, 0x40+i);
-- ext.extCRTCregs[i] = inb(vgaIOBase + 5);
-- }
-+ outb(vgaIOBase + 4, CrtcExtendedColorControl);
-+ ext.ExtendedColorControl = inb(vgaIOBase + 5);
-
-- /* save graphics pipeline registers */
-+ outb(vgaIOBase + 4, CrtcDisplayCompression);
-+ ext.DisplayCompression = inb(vgaIOBase + 5);
-
-- ext.GpBlitStatus = GX_REG(GP_BLIT_STATUS);
-+ outb(vgaIOBase + 4, CrtcDriverControl);
-+ ext.DriverControl = inb(vgaIOBase + 5);
-
-- /* save standard VGA portion */
-+ outb(vgaIOBase + 4, CrtcDACControl);
-+ ext.DACControl = inb(vgaIOBase + 5);
-+
-+ outb(vgaIOBase + 4, CrtcClockControl);
-+ ext.ClockControl = inb(vgaIOBase + 5);
-+
-+ outb(vgaIOBase + 4, CrtcClockFrequency);
-+ ext.CrtClockFrequency = inb(vgaIOBase + 5);
-
-+ outb(vgaIOBase + 4, CrtcClockFrequencyFraction);
-+ ext.CrtClockFrequencyFraction = inb(vgaIOBase + 5);
-+
-+ outb(vgaIOBase + 4, CrtcRefreshRate);
-+ ext.RefreshRate = inb(vgaIOBase + 5);
-+
-+ /* save standard VGA portion */
- CYRIXresetVGA();
- save = (vgaCYRIXPtr)vgaHWSave((vgaHWPtr)save, sizeof(vgaCYRIXRec));
- save->ext = ext;
-+
- return ((void *) save);
- }
-
-@@ -869,108 +812,101 @@
- static Bool
- CYRIXInit(mode)
- DisplayModePtr mode;
--{ int i, mode_index;
-- int clock = vga256InfoRec.clock[mode->Clock] / 1000;
-- int min, diff;
-- int offset_shift = (vgaBitsPerPixel == 16) ? 2 :
-+{ int offset_shift = (vgaBitsPerPixel == 16) ? 2 :
- (vgaBitsPerPixel == 8) ? 3 : 4;
- int line_offset = vga256InfoRec.displayWidth >> offset_shift;
-
- /* initialize standard VGA portion */
--
- if (!vgaHWInit(mode,sizeof(vgaCYRIXRec)))
- return(FALSE);
-
-- /* search for specified mode in the table */
-- /* Need to find the entry with the closest dot clock value */
-- /* Assume within at least 200 MHz and then maintain closest natch. */
--
-- mode_index = 0;
-- min = 200;
-- for (i = 0; i < NUM_CYRIX_MODES; i++)
-- {
-- diff = clock - CYRIXmodes[i].clock;
-- if (diff < 0) diff = -diff;
-- if ((mode->CrtcHDisplay == CYRIXmodes[i].xsize) &&
-- (mode->CrtcVDisplay == CYRIXmodes[i].ysize) &&
-- (diff < min))
-- {
-- mode_index = i;
-- min = diff;
-- }
-- }
--
-- /* override standard miscOutput register value */
--
-- newstate->ext.miscOutput = CYRIXmodes[mode_index].miscOutput;
-+ newstate->std.CRTC[19] = line_offset;
-
-- /* override standard CRTC register values */
-+ /* initialize SoftVGA extended registers */
-+ newstate->ext.VerticalTimingExtension =
-+ ((mode->CrtcVSyncStart & 0x400) >> 4) |
-+ (((mode->CrtcVDisplay - 1) & 0x400) >> 8) |
-+ (((mode->CrtcVTotal - 2) & 0x400) >> 10) |
-+ ((mode->CrtcVSyncStart & 0x400) >> 6);
-
-- for (i = 0; i < NUM_STD_CRTC_REGS; i++)
-- {
-- newstate->ext.stdCRTCregs[i] =
-- CYRIXmodes[mode_index].stdCRTCregs[i];
-- }
--
-- /* set extended CRTC registers */
--
-- for (i = 0; i < NUM_EXT_CRTC_REGS; i++)
-- {
-- newstate->ext.extCRTCregs[i] =
-- CYRIXmodes[mode_index].extCRTCregs[i];
-- }
--
-- /* override pitch from the mode tables */
-- /* (same tables are used for 8BPP and 16BPP) */
-+ if (vgaBitsPerPixel < 8)
-+ newstate->ext.ExtendedAddressControl = EAC_DIRECT_FRAME_BUFFER;
-+ else
-+ newstate->ext.ExtendedAddressControl = EAC_DIRECT_FRAME_BUFFER |
-+ EAC_PACKED_CHAIN4;
-
-- newstate->ext.stdCRTCregs[19] = line_offset;
-- newstate->ext.extCRTCregs[5] = ((line_offset >> 8) & 0x03);
-+ newstate->ext.ExtendedOffset = ((line_offset >> 8) & 0x03);
-
-- /* override color control from the mode tables */
-- /* (same tables are used for 8BPP and 16BPP) */
-+ newstate->ext.ExtendedColorControl = (vgaBitsPerPixel == 16)
-+ ? ECC_16BPP | ECC_565_FORMAT
-+ : ECC_8BPP;
-+
-+ /* display compression is set using the DC registers */
-+ newstate->ext.DisplayCompression = 0x00;
-+
-+ /* we drive the palette through the display controller (in new
-+ chipsets only) in 8bpp and 16bpp (that is, whenever the
-+ hardware cursor is used). */
-+ if (vgaBitsPerPixel < 8)
-+ newstate->ext.DriverControl = 0x00;
-+ else
-+ newstate->ext.DriverControl = DRVCT_DISPLAY_DRIVER_ACTIVE;
-
-- newstate->ext.extCRTCregs[6] = (vgaBitsPerPixel == 16)
-- ? ECC_16BPP | ECC_565_FORMAT : ECC_8BPP;
-+ /* set `16 bit bus' or else compression will hang the
-+ system in 16bpp mode */
-+ if (vgaBitsPerPixel == 16)
-+ newstate->ext.DACControl = DACCT_ENABLE_16BIT_BUS;
-+ else
-+ newstate->ext.DACControl = 0;
-
-- /* enable display compression when appropriate */
-
-- if (CYRIXvsaversion == CYRIX_VSA1)
-- {
-- /* For VSA1, SoftVGA manages the compression buffer. */
-- /* Enabling compression directly causes unpredictable results. */
-- /* Only enable if not panning (there is a bug in SoftVGA that */
-- /* will put the compression buffer in the wrong place when */
-- /* using a virtual desktop. */
-- /* By setting bit 0 of register 0x49, SoftVGA will enable */
-- /* compression whenever possible, based on memory available */
-- /* and starting address of memory. */
--
-- if ((mode->CrtcVDisplay == vga256InfoRec.virtualY) &&
-- (mode->CrtcHDisplay == vga256InfoRec.virtualX))
-- {
-- newstate->ext.extCRTCregs[9] = 0x01;
-- ErrorF("%s %s: Display compression enabled.\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-- }
-- else
-- {
-- ErrorF("%s %s: Display compression disabled.\n",
-- XCONFIG_PROBED, vga256InfoRec.name);
-- }
-+ if (newstate->std.NoClock >= 0)
-+ { int entier_clock = (vga256InfoRec.clock[mode->Clock] / 1000);
-+ int clock_fraction = (vga256InfoRec.clock[mode->Clock] / 100)
-+ - (entier_clock * 10);
-+
-+ newstate->ext.ClockControl = CLKCT_EXT_CLOCK_MODE;
-+ newstate->ext.CrtClockFrequency = entier_clock;
-+ newstate->ext.CrtClockFrequencyFraction = clock_fraction;
-+ newstate->ext.RefreshRate = 0 /* relevant to VGA BIOS only */;
-+ }
-+
-+#ifndef MONOVGA
-+ /* initialize masked contents of display controller
-+ hardware registers. */
-+ newstate->ext.DcCursStOffset = CYRIXcursorAddress;
-+ newstate->ext.DcCbStOffset = CYRIXcbufferAddress;
-+ newstate->ext.DcLineDelta = CYRIXcbLineDelta << 12;
-+ newstate->ext.DcBufSize = 0x41 << 9;
-+ newstate->ext.DcCursorX = 0;
-+ newstate->ext.DcCursorY = 0;
-+ newstate->ext.DcCursorColor = 0;
-+
-+ /* Compression is enabled only when a buffer was allocated by
-+ FbInit and provided that the displayed screen is the virtual
-+ screen. If the line delta is not 1024 or 2048, entire frames
-+ will be flagged dirty as opposed to lines. Problems with 16bpp
-+ and line-dirty flagging seem to have been solved now. */
-+ if (CYRIXcbLineDelta != 0 &&
-+ mode->CrtcVDisplay == vga256InfoRec.virtualY &&
-+ mode->CrtcHDisplay == vga256InfoRec.virtualX)
-+ { newstate->ext.DcGeneralCfg = DC_GCFG_DECE
-+ | DC_GCFG_CMPE;
-+ if (/* vgaBitsPerPixel != 8 || -- this is OK now */
-+ (vga256InfoRec.displayWidth * (vgaBitsPerPixel / 8)) & 0x03FF)
-+ newstate->ext.DcGeneralCfg |= DC_GCFG_FDTY;
- }
- else
-- {
-- /* ### TO DO ### */
-- /* Enable display compression directly for VSA2. */
-- /* For VSA2, the display driver manages all graphics memory. */
-- }
-+ newstate->ext.DcGeneralCfg = 0;
-
-- /* initialize the graphics pipeline registers */
-
-+ /* initialize the graphics pipeline registers */
- newstate->ext.GpBlitStatus = ((vga256InfoRec.displayWidth == 2048) ?
- BC_FB_WIDTH_2048 : BC_FB_WIDTH_1024) |
- ((vgaBitsPerPixel == 16) ?
- BC_16BPP : BC_8BPP);
-+#endif
-+
- return(TRUE);
- }
-
-@@ -978,68 +914,31 @@
- CYRIXAdjust(x, y)
- int x, y;
- { int Base = (y * vga256InfoRec.displayWidth + x);
-- unsigned long active, sync, count1, count2;
-
- if (vgaBitsPerPixel > 8) Base *= (vgaBitsPerPixel / 8);
- if (vgaBitsPerPixel < 8) Base /= 2;
-
-- /* wait until out of active display area */
--
-- active = GX_REG(DC_V_TIMING_1) & 0x07FF;
-- sync = GX_REG(DC_V_TIMING_3) & 0x07FF;
--
-- do
-- {
-- /* read twice to avoid transition values */
--
-- count1 = GX_REG(DC_V_LINE_CNT) & 0x07FF;
-- count2 = GX_REG(DC_V_LINE_CNT) & 0x07FF;
-- } while ((count1 != count2) || (count1 < active) || (count1 >= sync));
--
-- /* load the start address directly */
--
-+ /* doing this using the SoftVGA registers does not work reliably */
- GX_REG(DC_UNLOCK) = DC_UNLOCK_VALUE;
- GX_REG(DC_FB_ST_OFFSET) = Base;
- GX_REG(DC_UNLOCK) = 0;
- }
-
--/*------------------------------------------------------------------------*\
--** ValidMode()
--**
--** From README file: "The ValidMode() function is required. It is used to
--** check for any chipset dependent reasons why a graphics mode might not be
--** valid. It gets called by higher levels of the code after the Probe()
--** stage. In many cases no special checking will be required and this
--** function will simply return TRUE always."
--**
--** For the Cyrix driver, this routine loops through modes provided in a
--** table at the beginning of this file and returns OK if it finds a match.
--** These tables were required to make the standard VESA 60 Hz and 75 Hz
--** modes work correctly. Doing this, however, takes away the flexibility
--** of adding different resolutions or different refresh rates to the
--** XF86Config file.
--\*------------------------------------------------------------------------*/
--
- static int
- CYRIXValidMode(mode, verbose, flag)
- DisplayModePtr mode;
- Bool verbose;
- int flag;
--{
-- int i;
--
-- /* loop through table of modes */
--
-- for (i = 0; i < NUM_CYRIX_MODES; i++)
-- {
-- if ((mode->CrtcHDisplay == CYRIXmodes[i].xsize) &&
-- (mode->CrtcVDisplay == CYRIXmodes[i].ysize))
-- {
-- return MODE_OK;
-- }
-+{ /* note (avg): there seems to be a lot more to this if you look
-+ at the GGI code (adjustment). */
-+ if (mode->CrtcHSyncStart - mode->CrtcHDisplay >= 24 ||
-+ mode->CrtcHSyncStart - mode->CrtcHDisplay <= 8)
-+ { if (verbose)
-+ ErrorF("%s %s: mode %s: horizontal sync out of range (sync - display should be between 8 and 24)\n",
-+ XCONFIG_PROBED, vga256InfoRec.name, mode->name
-+ );
-+ return MODE_HSYNC;
- }
-- return MODE_BAD;
-+ return(MODE_OK);
- }
--
--/* END OF FILE */
-
-diff -ruN XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/gxrender.c XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/gxrender.c
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/gxrender.c Thu Jun 24 01:59:41 1999
-+++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/gxrender.c Wed Dec 31 19:00:00 1969
-@@ -1,1237 +0,0 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/gxrender.c,v 1.1.2.1 1999/06/24 05:59:41 hohndel Exp $ */
--/*
--//---------------------------------------------------------------------------
--// gxrender.c
--//
--// This file gives examples of using the MediaGX graphics unit to provide
--// acceleration for 2D display drivers. It is intended to provide an
--// absraction layer for new display driver development. This code handles
--// the quirks of the MediaGX graphics unit to allow faster developemt times
--// for new drivers.
--//---------------------------------------------------------------------------
--*/
--
--/* GRAPHICS PIPELINE REGISTER DEFINITIONS */
--
--#define GP_DST_XCOOR 0x8100 /* x destination origin */
--#define GP_DST_YCOOR 0x8102 /* y destination origin */
--#define GP_WIDTH 0x8104 /* pixel width */
--#define GP_HEIGHT 0x8106 /* pixel height */
--#define GP_SRC_XCOOR 0x8108 /* x source origin */
--#define GP_SRC_YCOOR 0x810A /* y source origin */
--
--#define GP_VECTOR_LENGTH 0x8104 /* vector length */
--#define GP_INIT_ERROR 0x8106 /* vector initial error */
--#define GP_AXIAL_ERROR 0x8108 /* axial error increment */
--#define GP_DIAG_ERROR 0x810A /* diagonal error increment */
--
--#define GP_SRC_COLOR_0 0x810C /* source color 0 */
--#define GP_SRC_COLOR_1 0x810E /* source color 1 */
--#define GP_PAT_COLOR_0 0x8110 /* pattern color 0 */
--#define GP_PAT_COLOR_1 0x8112 /* pattern color 1 */
--#define GP_PAT_COLOR_2 0x8114 /* pattern color 2 */
--#define GP_PAT_COLOR_3 0x8116 /* pattern color 3 */
--#define GP_PAT_DATA_0 0x8120 /* bits 31:0 of pattern */
--#define GP_PAT_DATA_1 0x8124 /* bits 63:32 of pattern */
--#define GP_PAT_DATA_2 0x8128 /* bits 95:64 of pattern */
--#define GP_PAT_DATA_3 0x812C /* bits 127:96 of pattern */
--
--#define GP_RASTER_MODE 0x8200 /* raster operation */
--#define GP_VECTOR_MODE 0x8204 /* vector mode register */
--#define GP_BLIT_MODE 0x8208 /* blit mode register */
--#define GP_BLIT_STATUS 0x820C /* blit status register */
--
--/* "GP_VECTOR_MODE" BIT DEFINITIONS */
--
--#define VM_X_MAJOR 0x0000 /* X major vector */
--#define VM_Y_MAJOR 0x0001 /* Y major vector */
--#define VM_MAJOR_INC 0x0002 /* positive major axis step */
--#define VM_MINOR_INC 0x0004 /* positive minor axis step */
--#define VM_READ_DST_FB 0x0008 /* read destination data */
--
--/* "GP_RASTER_MODE" BIT DEFINITIONS */
--
--#define RM_PAT_DISABLE 0x0000 /* pattern is disabled */
--#define RM_PAT_MONO 0x0100 /* 1BPP pattern expansion */
--#define RM_PAT_DITHER 0x0200 /* 2BPP pattern expansion */
--#define RM_PAT_COLOR 0x0300 /* 8BPP or 16BPP pattern */
--#define RM_PAT_MASK 0x0300 /* mask for pattern mode */
--#define RM_PAT_TRANSPARENT 0x0400 /* transparent 1BPP pattern */
--#define RM_SRC_TRANSPARENT 0x0800 /* transparent 1BPP source */
--
--/* "GP_BLIT_STATUS" BIT DEFINITIONS */
--
--#define BS_BLIT_BUSY 0x0001 /* blit engine is busy */
--#define BS_PIPELINE_BUSY 0x0002 /* graphics pipeline is bus */
--#define BS_BLIT_PENDING 0x0004 /* blit pending */
--#define BC_8BPP 0x0000 /* 8BPP mode */
--#define BC_16BPP 0x0100 /* 16BPP mode */
--#define BC_FB_WIDTH_1024 0x0000 /* framebuffer width = 1024 */
--#define BC_FB_WIDTH_2048 0x0200 /* framebuffer width = 2048 */
--
--/* "GP_BLIT_MODE" BIT DEFINITIONS */
--
--#define BM_READ_SRC_NONE 0x0000 /* source foreground color */
--#define BM_READ_SRC_FB 0x0001 /* read source from FB */
--#define BM_READ_SRC_BB0 0x0002 /* read source from BB0 */
--#define BM_READ_SRC_BB1 0x0003 /* read source from BB1 */
--#define BM_READ_SRC_MASK 0x0003 /* read source mask */
--
--#define BM_READ_DST_NONE 0x0000 /* no destination data */
--#define BM_READ_DST_BB0 0x0008 /* destination from BB0 */
--#define BM_READ_DST_BB1 0x000C /* destination from BB1 */
--#define BM_READ_DST_FB0 0x0010 /* dest from FB (store BB0) */
--#define BM_READ_DST_FB1 0x0014 /* dest from FB (store BB1)*/
--#define BM_READ_DST_MASK 0x001C /* read destination mask */
--
--#define BM_WRITE_FB 0x0000 /* write to framebuffer */
--#define BM_WRITE_MEM 0x0020 /* write to memory */
--#define BM_WRITE_MASK 0x0020 /* write mask */
--
--#define BM_SOURCE_COLOR 0x0000 /* source is 8BPP or 16BPP */
--#define BM_SOURCE_EXPAND 0x0040 /* source is 1BPP */
--#define BM_SOURCE_TEXT 0x00C0 /* source is 1BPP text */
--#define BM_SOURCE_MASK 0x00C0 /* source mask */
--
--#define BM_REVERSE_Y 0x0100 /* reverse Y direction */
--
--/* THE DRIVER NEEDS TO MAINTAIN THE SIZE AND LOCATION OF THE BLT BUFFERS
--// These constants will work with 2K or 3K config, 8 or 16 BPP. The driver
--// should set them, however, to optimize for the current config. Otherwise
--// screen to screen BLTs, for example, may be visibly split into two vertical
--// sections when they do not need to be.
--*/
--
--/* STATIC VARIABLES FOR GXRENDER.C FILE */
--
--unsigned char *GXRregptr;
--unsigned short GXRbpp;
--unsigned short GXRbb0Base;
--unsigned short GXRbb1Base;
--unsigned short GXRbufferWidthPixels;
--
--unsigned short GXRpatternFlags;
--unsigned short GXRsourceFlags;
--unsigned short GXRsavedColor;
--unsigned short GXRsavedRop;
--unsigned short GXRusesDstData;
--
--/* MACROS FOR REGISTER ACCESS
--// These macros asssume that a pointer was specified during initialization.
--// They also assume 32-bit access is possible (16-bit access such as for
--// Windows 98 display drivers would require different macros).
--*/
--
--#define WRITE_REG8(offset, value) \
-- (*(volatile unsigned char *)(GXRregptr + (offset))) = (value)
--
--#define WRITE_REG16(offset, value) \
-- (*(volatile unsigned short *)(GXRregptr + (offset))) = (value)
--
--#define WRITE_REG32(offset, value) \
-- (*(volatile unsigned long *)(GXRregptr + (offset))) = (value)
--
--#define READ_REG16(offset) \
-- (*(volatile unsigned short *)(GXRregptr + (offset)))
--
--#define READ_REG32(offset) \
-- (*(volatile unsigned long *)(GXRregptr + (offset)))
--
--/*
--//---------------------------------------------------------------------------
--// GXR_INITIALIZE
--//
--// This routine initializes the parameters for the current configuration.
--//
--// REGPTR pointer to GX memory mapped registers
--// BPP bits per pixel (8 pr 16)
--//
--//---------------------------------------------------------------------------
--*/
--
--void gxr_initialize(unsigned char *regptr, unsigned short bpp,
-- unsigned short BB0base, unsigned short BB1base,
-- unsigned short BBwidthPixels)
--{
-- GXRregptr = regptr;
-- GXRbpp = bpp;
-- GXRbb0Base = BB0base;
-- GXRbb1Base = BB1base;
-- GXRbufferWidthPixels = BBwidthPixels;
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_WAIT_UNTIL_IDLE
--//
--// This routine waits until the graphics engine is idle.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_wait_until_idle(void)
--{
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_BUSY);
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_LOAD_SOLID_SOURCE
--//
--// This routine is used to specify a solid source color. For the Xfree96
--// display driver, the source color is used to specify a planemask and the
--// ROP is adjusted accordingly.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_load_solid_source(unsigned short color)
--{
-- /* CLEAR TRANSPARENCY FLAG */
--
-- GXRsourceFlags = 0;
--
-- /* FORMAT 8 BPP COLOR */
-- /* GX requires 8BPP color data be duplicated into bits [15:8]. */
--
-- if (!(READ_REG16(GP_BLIT_STATUS) & BC_16BPP))
-- {
-- color &= 0x00FF;
-- color |= (color << 8);
-- }
--
-- /* POLL UNTIL ABLE TO WRITE THE SOURCE COLOR */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_SRC_COLOR_0, color);
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_LOAD_MONO_SOURCE
--//
--// This routine is used to specify the monochrome source colors.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_load_mono_source(unsigned short bgcolor, unsigned short fgcolor,
-- unsigned short transparent)
--{
-- /* SET TRANSPARENCY FLAG */
--
-- GXRsourceFlags = transparent ? RM_SRC_TRANSPARENT : 0;
--
-- /* FORMAT 8 BPP COLOR */
-- /* GX requires 8BPP color data be duplicated into bits [15:8]. */
--
-- if (!(READ_REG16(GP_BLIT_STATUS) & BC_16BPP))
-- {
-- bgcolor &= 0x00FF;
-- bgcolor |= (bgcolor << 8);
-- fgcolor &= 0x00FF;
-- fgcolor |= (fgcolor << 8);
-- }
--
-- /* POLL UNTIL ABLE TO WRITE THE SOURCE COLOR */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_SRC_COLOR_0, bgcolor);
-- WRITE_REG16(GP_SRC_COLOR_1, fgcolor);
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_LOAD_SOLID_PATTERN
--//
--// This routine is used to specify a solid pattern color. It is called
--// before performing solid rectangle fills or more complicated BLTs that
--// use a solid pattern color.
--//
--// The driver should always call "gxr_load_raster_operation" after a call
--// to this routine to make sure that the pattern flags are set appropriately.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_load_solid_pattern(unsigned short color)
--{
-- /* SET PATTERN FLAGS */
--
-- GXRpatternFlags = 0;
--
-- /* FORMAT 8 BPP COLOR */
-- /* GX requires 8BPP color data be duplicated into bits [15:8]. */
--
-- if (!(READ_REG16(GP_BLIT_STATUS) & BC_16BPP))
-- {
-- color &= 0x00FF;
-- color |= (color << 8);
-- }
--
-- /* SAVE THE REFORMATTED COLOR FOR LATER */
-- /* Used to call the "gxr_solid_fill" routine for special cases. */
--
-- GXRsavedColor = color;
--
-- /* POLL UNTIL ABLE TO WRITE THE PATTERN COLOR */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_PAT_COLOR_0, color);
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_LOAD_MONO_PATTERN
--//
--// This routine is used to specify a monochrome pattern.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_load_mono_pattern(unsigned short bgcolor, unsigned short fgcolor,
-- unsigned long data0, unsigned long data1, unsigned char transparent)
--{
-- /* SET PATTERN FLAGS */
--
-- GXRpatternFlags = transparent ? RM_PAT_MONO | RM_PAT_TRANSPARENT :
-- RM_PAT_MONO;
--
-- /* FORMAT 8 BPP COLOR */
-- /* GX requires 8BPP color data be duplicated into bits [15:8]. */
--
-- if (!(READ_REG16(GP_BLIT_STATUS) & BC_16BPP))
-- {
-- bgcolor &= 0x00FF;
-- bgcolor |= (bgcolor << 8);
-- fgcolor &= 0x00FF;
-- fgcolor |= (fgcolor << 8);
-- }
--
-- /* POLL UNTIL ABLE TO WRITE THE PATTERN COLORS AND DATA */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_PAT_COLOR_0, bgcolor);
-- WRITE_REG16(GP_PAT_COLOR_1, fgcolor);
-- WRITE_REG32(GP_PAT_DATA_0, data0);
-- WRITE_REG32(GP_PAT_DATA_1, data1);
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_LOAD_RASTER_OPERATION
--//
--// This routine loads the specified raster operation. It sets the pattern
--// flags appropriately.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_load_raster_operation(unsigned char rop)
--{
-- unsigned short rop16;
--
-- /* GENERATE 16-BIT VERSION OF ROP WITH PATTERN FLAGS */
--
-- rop16 = (unsigned short) rop | GXRpatternFlags;
-- if ((rop & 0x33) ^ ((rop >> 2) & 0x33))
-- rop16 |= GXRsourceFlags;
--
-- /* SAVE ROP FOR LATER COMPARISONS */
-- /* Need to have the pattern flags included */
--
-- GXRsavedRop = rop16;
--
-- /* SET FLAG INDICATING ROP REQUIRES DESTINATION DATA */
-- /* True if even bits (0:2:4:6) do not equal the correspinding */
-- /* even bits (1:3:5:7). */
--
-- GXRusesDstData = ((rop & 0x55) ^ ((rop >> 1) & 0x55));
--
-- /* POLL UNTIL ABLE TO WRITE THE PATTERN COLOR */
-- /* Only one operation can be pending at a time. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_RASTER_MODE, rop16);
--}
--
--/*
--//---------------------------------------------------------------------------
--// GXR_SOLID_FILL
--//
--// This routine MUST be used when performing a solid rectangle fill with
--// the ROPs of PATCOPY (0xF0), BLACKNESS (0x00), WHITENESS (0xFF), or
--// PATINVERT (0x0F). There is a bug in GXm for these cases that requires a
--// workaround.
--//
--// For BLACKNESS (ROP = 0x00), set the color to 0x0000.
--// For WHITENESS (ROP = 0xFF), set the color to 0xFFFF.
--// For PATINVERT (ROP = 0x0F), invert the desired color.
--//
--// X screen X position (left)
--// Y screen Y position (top)
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--// COLOR fill color
--//
--// THIS ROUTINE SHOULD NOT BE DIRECTLY CALLED FROM THE DRIVER. The driver
--// should always use gxr_pattern_fill and let that routine call this one
--// when approipriate. This is to hide quirks specific to MediaGX hardware.
--//---------------------------------------------------------------------------
--*/
--
--void gxr_solid_fill(unsigned short x, unsigned short y,
-- unsigned short width, unsigned short height, unsigned short color)
--{
-- unsigned short section;
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
-- /* Only one operation can be pending at a time. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
--
-- /* SET REGISTERS TO DRAW RECTANGLE */
--
-- WRITE_REG16(GP_DST_XCOOR, x);
-- WRITE_REG16(GP_DST_YCOOR, y);
-- WRITE_REG16(GP_HEIGHT, height);
-- WRITE_REG16(GP_RASTER_MODE, 0x00F0); /* PATCOPY */
-- WRITE_REG16(GP_PAT_COLOR_0, color);
--
-- /* CHECK WIDTH FOR GX BUG WORKAROUND */
--
-- if (width <= 16)
-- {
-- /* OK TO DRAW SMALL RECTANGLE IN ONE PASS */
--
-- WRITE_REG16(GP_WIDTH, width);
-- WRITE_REG16(GP_BLIT_MODE, 0);
-- }
-- else
-- {
-- /* DRAW FIRST PART OF RECTANGLE */
-- /* Get to a 16 pixel boundary. */
--
-- section = 0x10 - (x & 0x0F);
-- WRITE_REG16(GP_WIDTH, section);
-- WRITE_REG16(GP_BLIT_MODE, 0);
--
-- /* POLL UNTIL ABLE TO LOAD THE SECOND RECTANGLE */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_DST_XCOOR, x + section);
-- WRITE_REG16(GP_DST_YCOOR, y);
-- WRITE_REG16(GP_WIDTH, width - section);
-- WRITE_REG16(GP_BLIT_MODE, 0);
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// GXR_PATTERN_FILL
--//
--// This routine is used to fill a rectangular region. The pattern must
--// be previously loaded using one of gxr_load_*_pattern routines. Also, the
--// raster operation must be previously specified using the
--// "gxr_load_raster_operation" routine.
--//
--// X screen X position (left)
--// Y screen Y position (top)
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--//----------------------------------------------------------------------------
--*/
--
--void gxr_pattern_fill(unsigned short x, unsigned short y,
-- unsigned short width, unsigned short height)
--{
-- unsigned short section, buffer_width, blit_mode;
--
-- /* CHECK IF OPTIMIZED SOLID CASES */
-- /* Check all 16 bits of the ROP to include solid pattern flags. */
--
-- switch(GXRsavedRop)
-- {
-- /* CHECK FOR SPECIAL CASES WITHOUT DESTINATION DATA */
-- /* Need hardware workaround for fast "burst write" cases. */
--
-- case 0x00F0:
-- gxr_solid_fill(x, y, width, height, GXRsavedColor);
-- break;
-- case 0x000F:
-- gxr_solid_fill(x, y, width, height, ~GXRsavedColor);
-- break;
-- case 0x0000:
-- gxr_solid_fill(x, y, width, height, 0x0000);
-- break;
-- case 0x00FF:
-- gxr_solid_fill(x, y, width, height, 0xFFFF);
-- break;
--
-- /* REMAINING CASES REQUIRE DESTINATION DATA OR NOT SOLID COLOR */
--
-- default:
--
-- /* DETERMINE BLT MODE VALUE */
-- /* Still here for non-solid patterns without destination data. */
--
-- blit_mode = GXRusesDstData ? BM_READ_DST_FB0 : 0;
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
-- /* Write the registers that do not change for each section. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_HEIGHT, height);
--
-- /* SINCE ONLY DESTINATION DATA, WE CAN USE BOTH BB0 AND BB1. */
-- /* Therefore, width available = BLT buffer width * 2. */
--
-- buffer_width = GXRbufferWidthPixels << 1;
--
-- /* REPEAT UNTIL FINISHED WITH RECTANGLE */
-- /* Perform BLT in vertical sections, as wide as the BLT buffer */
-- /* allows. Hardware does not split the operations, so */
-- /* software must do it to avoid large scanlines that would */
-- /* overflow the BLT buffers. */
--
-- while(width > 0)
-- {
-- /* DETERMINE WIDTH OF SECTION */
--
-- if (width > buffer_width) section = buffer_width;
-- else section = width;
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_DST_XCOOR, x);
-- WRITE_REG16(GP_DST_YCOOR, y);
-- WRITE_REG16(GP_WIDTH, section);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
--
-- /* ADJUST PARAMETERS FOR NEXT SECTION */
--
-- width -= section;
-- x += section;
-- }
-- break;
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// SCREEN TO SCREEN BLT
--//
--// This routine should be used to perform a screen to screen BLT when the
--// ROP does not require destination data.
--//
--// SRCX screen X position to copy from
--// SRCY screen Y position to copy from
--// DSTX screen X position to copy to
--// DSTY screen Y position to copy to
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--//----------------------------------------------------------------------------
--*/
--
--void gxr_screen_to_screen_blt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height)
--{
-- unsigned short section, buffer_width;
-- unsigned short blit_mode;
--
-- /* CHECK IF RASTER OPERATION REQUIRES DESTINATION DATA */
--
-- blit_mode = GXRusesDstData ? BM_READ_DST_FB1 | BM_READ_SRC_FB :
-- BM_READ_SRC_FB;
--
-- /* CHECK Y DIRECTION */
-- /* Hardware has support for negative Y direction. */
--
-- if (dsty > srcy)
-- {
-- blit_mode |= BM_REVERSE_Y;
-- srcy += height - 1;
-- dsty += height - 1;
-- }
--
-- /* CHECK X DIRECTION */
-- /* Hardware does not support negative X direction since at the time */
-- /* of development all supported resolutions could fit a scanline of */
-- /* data at once into the BLT buffers (using both BB0 and BB1). This */
-- /* code is more generic to allow for any size BLT buffer. */
--
-- if (dstx > srcx)
-- {
-- srcx += width;
-- dstx += width;
-- }
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
-- /* Write the registers that do not change for each section. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_HEIGHT, height);
--
-- /* CHECK AVAILABLE BLT BUFFER SIZE */
-- /* Can use both BLT buffers if no destination data is required. */
--
-- buffer_width = GXRusesDstData ? GXRbufferWidthPixels :
-- GXRbufferWidthPixels << 1;
--
-- /* REPEAT UNTIL FINISHED WITH RECTANGLE */
-- /* Perform BLT in vertical sections, as wide as the BLT buffer allows. */
-- /* Hardware does not split the operations, so software must do it to */
-- /* avoid large scanlines that would overflow the BLT buffers. */
--
-- while(width > 0)
-- {
-- /* CHECK WIDTH OF CURRENT SECTION */
--
-- if (width > buffer_width) section = buffer_width;
-- else section = width;
--
-- /* PROGRAM REGISTERS THAT ARE THE SAME FOR EITHER X DIRECTION */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_SRC_YCOOR, srcy);
-- WRITE_REG16(GP_DST_YCOOR, dsty);
-- WRITE_REG16(GP_WIDTH, section);
--
-- /* CHECK X DIRECTION */
--
-- if (dstx > srcx)
-- {
-- /* NEGATIVE X DIRECTION */
-- /* Still positive X direction within the section. */
--
-- srcx -= section;
-- dstx -= section;
-- WRITE_REG16(GP_SRC_XCOOR, srcx);
-- WRITE_REG16(GP_DST_XCOOR, dstx);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
-- }
-- else
-- {
-- /* POSITIVE X DIRECTION */
--
-- WRITE_REG16(GP_SRC_XCOOR, srcx);
-- WRITE_REG16(GP_DST_XCOOR, dstx);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
-- dstx += section;
-- srcx += section;
-- }
-- width -= section;
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// SCREEN TO SCREEN TRANSPARENT BLT
--//
--// This routine should be used to perform a screen to screen BLT when a
--// specified color should by transparent. The only supported ROP is SRCCOPY.
--//
--// SRCX screen X position to copy from
--// SRCY screen Y position to copy from
--// DSTX screen X position to copy to
--// DSTY screen Y position to copy to
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--// COLOR transparent color
--//----------------------------------------------------------------------------
--*/
--
--void gxr_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned short color)
--{
-- unsigned short section, buffer_width;
-- unsigned short blit_mode = BM_READ_SRC_FB;
-- unsigned short i;
--
-- /* CHECK Y DIRECTION */
-- /* Hardware has support for negative Y direction. */
--
-- if (dsty > srcy)
-- {
-- blit_mode |= BM_REVERSE_Y;
-- srcy += height - 1;
-- dsty += height - 1;
-- }
--
-- /* CHECK X DIRECTION */
-- /* Hardware does not support negative X direction since at the time */
-- /* of development all supported resolutions could fit a scanline of */
-- /* data at once into the BLT buffers (using both BB0 and BB1). This */
-- /* code is more generic to allow for any size BLT buffer. */
--
-- if (dstx > srcx)
-- {
-- srcx += width;
-- dstx += width;
-- }
--
-- /* CALCULATE BLT BUFFER SIZE */
-- /* Need to use BB1 to store the BLT buffer data. */
--
-- buffer_width = GXRbufferWidthPixels;
--
-- /* WRITE TRANSPARENCY COLOR TO BLT BUFFER 1 */
--
-- if (!(READ_REG16(GP_BLIT_STATUS) & BC_16BPP))
-- {
-- color &= 0x00FF;
-- color |= (color << 8);
-- }
--
-- /* WAIT UNTIL PIPELINE IS NOT BUSY BEFORE LOADING DATA INTO BB1 */
-- /* Need to make sure any previous BLT using BB1 is complete. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_PIPELINE_BUSY);
-- for (i = 0; i < 16; i+=2)
-- {
-- WRITE_REG16(GXRbb1Base+i, color);
-- }
--
-- /* DO BOGUS BLT TO LATCH DATA FROM BB1 */
-- /* Already know graphics pipeline is idle. */
--
-- WRITE_REG32(GP_DST_XCOOR, 0);
-- WRITE_REG32(GP_SRC_XCOOR, 0);
-- WRITE_REG16(GP_WIDTH, 16);
-- WRITE_REG16(GP_HEIGHT, 1);
-- WRITE_REG16(GP_RASTER_MODE, 0x00CC);
-- WRITE_REG16(GP_BLIT_MODE, BM_READ_SRC_FB | BM_READ_DST_BB1);
--
-- /* WRITE REGISTERS FOR REAL SCREEN TO SCREEN BLT */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_HEIGHT, height);
-- WRITE_REG16(GP_RASTER_MODE, 0x10C6);
-- WRITE_REG32(GP_PAT_COLOR_0, 0xFFFFFFFF);
--
-- /* REPEAT UNTIL FINISHED WITH RECTANGLE */
-- /* Perform BLT in vertical sections, as wide as the BLT buffer allows. */
-- /* Hardware does not split the operations, so software must do it to */
-- /* avoid large scanlines that would overflow the BLT buffers. */
--
-- while(width > 0)
-- {
-- /* CHECK WIDTH OF CURRENT SECTION */
--
-- if (width > buffer_width) section = buffer_width;
-- else section = width;
--
-- /* PROGRAM REGISTERS THAT ARE THE SAME FOR EITHER X DIRECTION */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_SRC_YCOOR, srcy);
-- WRITE_REG16(GP_DST_YCOOR, dsty);
-- WRITE_REG16(GP_WIDTH, section);
--
-- /* CHECK X DIRECTION */
-- /* Again, this must be done in software, and can be removed if the */
-- /* display driver knows that the BLT buffers will always be large */
-- /* enough to contain an entire scanline of a screen to screen BLT. */
--
-- if (dstx > srcx)
-- {
-- /* NEGATIVE X DIRECTION */
-- /* Still positive X direction within the section. */
--
-- srcx -= section;
-- dstx -= section;
-- WRITE_REG16(GP_SRC_XCOOR, srcx);
-- WRITE_REG16(GP_DST_XCOOR, dstx);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
-- }
-- else
-- {
-- /* POSITIVE X DIRECTION */
--
-- WRITE_REG16(GP_SRC_XCOOR, srcx);
-- WRITE_REG16(GP_DST_XCOOR, dstx);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
-- dstx += section;
-- srcx += section;
-- }
-- width -= section;
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// COLOR BITMAP TO SCREEN BLT
--//
--// This routine transfers color bitmap data to the screen. For most cases,
--// when the ROP is SRCCOPY, it may be faster to write a separate routine that
--// copies the data to the frame buffer directly. This routine should be
--// used when the ROP requires destination data.
--//
--// Transparency is handled by another routine.
--//
--// SRCX X offset within source bitmap
--// SRCY Y offset within source bitmap
--// DSTX screen X position to render data
--// DSTY screen Y position to render data
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--// *DATA pointer to bitmap data
--// PITCH pitch of bitmap data (bytes between scanlines)
--// ROP ternary raster operation (0x00-0xFF).
--//----------------------------------------------------------------------------
--*/
--
--void gxr_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned char *data, unsigned short pitch,
-- unsigned char rop)
--{
-- unsigned short section, buffer_width;
-- unsigned short blit_mode = BM_READ_SRC_BB0;
-- unsigned short line_srcx, line_dstx, line_width;
-- unsigned short offset, i;
--
-- /* CHECK IF ROP REQUIRES DESTINATION DATA */
-- /* Even bits (0:2:4:6) do not equal corresponding odd bits (1:3:5:7). */
--
-- if ((rop & 0x55) ^ ((rop >> 1) & 0x55))
-- blit_mode |= BM_READ_DST_FB1;
--
-- /* CHECK SIZE OF BLT BUFFER */
--
-- buffer_width = GXRbufferWidthPixels;
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
-- /* Write the registers that do not change for each section. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_HEIGHT, 1);
-- WRITE_REG16(GP_RASTER_MODE, (unsigned short) rop & 0x00FF);
--
-- /* REPEAT FOR EACH SCANLINE */
--
-- offset = srcy * pitch;
--
-- while(height > 0)
-- {
-- line_width = width;
-- line_srcx = srcx;
-- line_dstx = dstx;
--
-- while(line_width > 0)
-- {
-- /* CHECK WIDTH OF CURRENT SECTION */
--
-- if (line_width > buffer_width) section = buffer_width;
-- else section = line_width;
--
-- /* TRANSFER SCANLINE OF BITMAP DATA TO BLT BUFFER 0 */
-- /* Need to wait for BS_PIPELINE_BUSY to make sure that the */
-- /* data in BB0 for the previous scanline is no longer used. */
-- /* This can be heavily optimized to not do a byte at a time. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_PIPELINE_BUSY);
-- if (READ_REG16(GP_BLIT_STATUS) & BC_16BPP)
-- {
-- for (i = 0; i < section; i++)
-- {
-- WRITE_REG16(GXRbb0Base+i, data[offset+((line_srcx+i)<<1)]);
-- }
-- }
-- else
-- {
-- for (i = 0; i < section; i++)
-- {
-- WRITE_REG8(GXRbb0Base+i, data[line_srcx+offset+i]);
-- }
-- }
--
-- /* RENDER FROM BB0 TO FRAME BUFFER */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_DST_XCOOR, line_dstx);
-- WRITE_REG16(GP_DST_YCOOR, dsty);
-- WRITE_REG16(GP_WIDTH, section);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
--
-- line_width -= section;
-- line_dstx += section;
-- line_srcx += section;
-- }
-- height--;
-- dsty++;
-- offset += pitch;
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// COLOR BITMAP TO SCREEN TRANSPARENT BLT
--//
--// This routine transfers color bitmap data to the screen with transparency.
--// The transparent color is specified. The only supported ROP is SRCCOPY,
--// meaning that transparency cannot be applied if the ROP requires
--// destination data (this is a hardware restriction).
--//
--// SRCX X offset within source bitmap
--// SRCY Y offset within source bitmap
--// DSTX screen X position to render data
--// DSTY screen Y position to render data
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--// *DATA pointer to bitmap data
--// PITCH pitch of bitmap data (bytes between scanlines)
--// COLOR transparent color
--//----------------------------------------------------------------------------
--*/
--
--void gxr_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned char *data, unsigned short pitch,
-- unsigned short color)
--{
-- unsigned short section, buffer_width;
-- unsigned short blit_mode = BM_READ_SRC_BB0;
-- unsigned short line_srcx, line_dstx, line_width;
-- unsigned short offset, i, first_blt = 1;
--
-- /* CHECK SIZE OF BLT BUFFER */
--
-- buffer_width = GXRbufferWidthPixels;
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
-- /* Write the registers that do not change for each section. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_HEIGHT, 1);
-- WRITE_REG16(GP_RASTER_MODE, 0x10C6);
-- WRITE_REG32(GP_PAT_COLOR_0, 0xFFFFFFFF);
--
-- /* CALCULATE OFFSET INTO BITMAP DATA */
--
-- offset = srcy * pitch;
--
-- /* REPEAT FOR EACH SCANLINE */
--
-- while(height > 0)
-- {
-- line_width = width;
-- line_srcx = srcx;
-- line_dstx = dstx;
--
-- while(line_width > 0)
-- {
-- /* CHECK WIDTH OF CURRENT SECTION */
--
-- if (line_width > buffer_width) section = buffer_width;
-- else section = line_width;
--
-- /* TRANSFER SCANLINE OF BITMAP DATA TO BLT BUFFER 0 */
-- /* Need to wait for BS_PIPELINE_BUSY to make sure that the */
-- /* data in BB0 for the previous scanline is no longer used. */
-- /* This can be heavily optimized to not do a byte at a time. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_PIPELINE_BUSY);
-- if (READ_REG16(GP_BLIT_STATUS) & BC_16BPP)
-- {
-- for (i = 0; i < section; i++)
-- {
-- WRITE_REG16(GXRbb0Base+i, data[offset+((line_srcx+i)<<1)]);
-- }
-- }
-- else
-- {
-- for (i = 0; i < section; i++)
-- {
-- WRITE_REG8(GXRbb0Base+i, data[line_srcx+offset+i]);
-- }
-- }
--
-- /* RENDER FROM BB0 TO FRAME BUFFER */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_DST_XCOOR, line_dstx);
-- WRITE_REG16(GP_DST_YCOOR, dsty);
-- WRITE_REG16(GP_WIDTH, section);
--
-- /* NEED TO DO EXTRA WORK FOR THE FIRST BLT */
--
-- if (first_blt)
-- {
-- /* WRITE TRANSPARENCY COLOR TO BLT BUFFER 1 */
-- /* This can be heavily optimized to not do 16-bits at a time. */
--
-- if (READ_REG16(GP_BLIT_STATUS) & BC_16BPP)
-- {
-- for (i = 0; i < section; i++)
-- {
-- WRITE_REG16(GXRbb1Base+i*2, color);
-- }
-- }
-- else
-- {
-- for (i = 0; i < section; i++)
-- {
-- WRITE_REG8(GXRbb1Base+i, (unsigned char) color);
-- }
-- }
-- WRITE_REG16(GP_BLIT_MODE, BM_READ_SRC_BB0 | BM_READ_DST_BB1);
-- first_blt = 0;
-- }
-- else
-- {
-- /* AFTER FIRST BLT, THE TRANSPARENCY DATA IS LATCHED */
-- /* Save time by not reading data from BB1. */
--
-- WRITE_REG16(GP_BLIT_MODE, BM_READ_SRC_BB0);
-- }
-- line_width -= section;
-- line_dstx += section;
-- line_srcx += section;
-- }
-- height--;
-- dsty++;
-- offset += pitch;
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// MONOCHROME BITMAP TO SCREEN BLT
--//
--// This routine transfers monochrome bitmap data to the screen.
--//
--// SRCX X offset within source bitmap
--// SRCY Y offset within source bitmap
--// DSTX screen X position to render data
--// DSTY screen Y position to render data
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--// *DATA pointer to bitmap data
--// PITCH pitch of bitmap data (bytes between scanlines)
--// FGCOLOR color for bits = 1
--// BGCOLOR color for bits = 0
--// ROP ternary raster operation (0x00-0xFF).
--// TRANSPARENT zero for opaque, otherwise transparent
--//----------------------------------------------------------------------------
--*/
--
--void gxr_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned char *data, unsigned short pitch,
-- unsigned short fgcolor, unsigned short bgcolor, unsigned char rop,
-- unsigned char transparent)
--{
-- unsigned short section, buffer_width;
-- unsigned short blit_mode = BM_READ_SRC_BB0 | BM_SOURCE_EXPAND;
-- unsigned short line_srcx, line_dstx, line_width;
-- unsigned short offset, i, bytes, raster_mode;
--
-- /* FORMAT 8BPP COLOR */
-- /* GX requires that 8BPP color data be duplicated into bits [15:8]. */
--
-- if (!(READ_REG16(GP_BLIT_STATUS) & BC_16BPP))
-- {
-- fgcolor &= 0x00FF;
-- fgcolor |= (fgcolor << 8);
-- bgcolor &= 0x00FF;
-- bgcolor |= (bgcolor << 8);
-- }
--
-- /* CHECK IF ROP REQUIRES DESTINATION DATA */
-- /* Even bits (0:2:4:6) do not equal corresponding odd bits (1:3:5:7). */
--
-- if ((rop & 0x55) ^ ((rop >> 1) & 0x55))
-- blit_mode |= BM_READ_DST_FB1;
--
-- /* CALCULATE RASTER MODE */
-- /* Set mono flag. Transparency set based on input parameter. */
--
-- raster_mode = ((unsigned short) rop & 0x00FF);
-- if (transparent) raster_mode |= RM_SRC_TRANSPARENT;
--
-- /* CHECK SIZE OF BLT BUFFER */
--
-- buffer_width = GXRbufferWidthPixels;
--
-- /* CALCULATE OFFSET INTO BITMAP DATA */
--
-- offset = srcy * pitch;
--
-- /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */
-- /* Write the registers that do not change for each section. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_HEIGHT, 1);
-- WRITE_REG16(GP_RASTER_MODE, raster_mode);
-- WRITE_REG16(GP_SRC_COLOR_0, bgcolor);
-- WRITE_REG16(GP_SRC_COLOR_1, fgcolor);
--
-- /* REPEAT FOR EACH SCANLINE */
--
-- while(height > 0)
-- {
-- line_width = width;
-- line_srcx = srcx;
-- line_dstx = dstx;
--
-- while(line_width > 0)
-- {
-- /* CHECK WIDTH OF CURRENT SECTION */
-- /* Only divide into sections if reading destination data. */
-- /* Since the source data is monochrome, it will always fit. */
--
-- section = line_width;
-- if ((line_width > buffer_width) && (blit_mode & BM_READ_DST_FB1))
-- section = buffer_width;
--
-- /* BYTES TO TRANSFER */
-- /* Add two bytes to handle truncating and alignment. */
--
-- bytes = (section >> 3) + 2;
--
-- /* TRANSFER SCANLINE OF BITMAP DATA TO BLT BUFFER 0 */
-- /* Need to wait for BS_PIPELINE_BUSY to make sure that the */
-- /* data in BB0 for the previous scanline is no longer used. */
-- /* This can be heavily optimized to not do a byte at a time. */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_PIPELINE_BUSY);
-- for (i = 0; i < bytes; i++)
-- {
-- WRITE_REG8(GXRbb0Base+i, data[(line_srcx >> 3)+offset+i]);
-- }
--
-- /* RENDER FROM BB0 TO FRAME BUFFER */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_DST_XCOOR, line_dstx);
-- WRITE_REG16(GP_DST_YCOOR, dsty);
-- WRITE_REG16(GP_SRC_XCOOR, line_srcx & 7);
-- WRITE_REG16(GP_WIDTH, section);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
--
-- line_width -= section;
-- line_dstx += section;
-- line_srcx += section;
-- }
-- height--;
-- dsty++;
-- offset += pitch;
-- }
--}
--
--/*
--//----------------------------------------------------------------------------
--// TEXT GLYPH
--//
--// This routine draws a single character of text. It can only be used for
--// characters that are less than or equal to 64x64 in size, since it
--// transfers the entire data into the BLT buffers at once. Larger characters
--// should use the monochrome bitmap to screen routine. The only supported
--// ROP is SRCCOPY, again since the BLT buffer size is limited.
--//
--// SRCX X offset within source bitmap
--// SRCY Y offset within source bitmap
--// DSTX screen X position to render data
--// DSTY screen Y position to render data
--// WIDTH width of rectangle, in pixels
--// HEIGHT height of rectangle, in scanlines
--// *DATA pointer to bitmap data (NULL if already loaded)
--// PITCH pitch of bitmap data (bytes between scanlines)
--//
--// For the Xfree86 display driver, the OS is given a pointer to BB0.
--// Therefore, the data is already loaded when the driver is called, so the
--// driver simply passes a NULL pointer to this routine.
--//
--// This same type of routine could be developed for "icons", or small
--// color bitmaps that can fit entirely in the BLT buffer.
--//----------------------------------------------------------------------------
--*/
--
--void gxr_text_glyph(unsigned short srcx, unsigned short srcy,
-- unsigned short dstx, unsigned short dsty, unsigned short width,
-- unsigned short height, unsigned char *data, unsigned short pitch)
--{
-- unsigned short offset, i, j, buffer_offset, bytes, blit_mode;
--
-- blit_mode = BM_READ_SRC_BB0 | BM_SOURCE_EXPAND;
-- if (GXRusesDstData) blit_mode |= BM_READ_DST_FB1;
--
-- /* CHECK IF DATA NEEDS TO BE TRANSFERRED */
--
-- if (data != 0)
-- {
-- /* TRANSFER ENTIRE BITMAP DATA TO BLT BUFFER 0 */
-- /* Need to wait for BS_PIPELINE_BUSY to make sure that the */
-- /* data in BB0 for any previous BLT is no longer used. */
-- /* This data transfer has lots of room for performance optimization. */
--
-- buffer_offset = 0;
-- offset = srcy * pitch + (srcx >> 3);
-- bytes = ((width + (srcx & 7) + 7) >> 3);
-- while(READ_REG16(GP_BLIT_STATUS) & BS_PIPELINE_BUSY);
-- for (j = 0; j < height; j++)
-- {
-- for (i = 0; i < bytes; i++)
-- {
-- WRITE_REG8(GXRbb0Base+buffer_offset, data[offset+i]);
-- buffer_offset++;
-- }
-- offset += pitch;
-- }
-- }
--
-- /* RENDER FROM BB0 TO FRAME BUFFER */
-- /* Already know that the pipeline is idle from loading data. */
--
-- WRITE_REG16(GP_DST_XCOOR, dstx);
-- WRITE_REG16(GP_DST_YCOOR, dsty);
-- WRITE_REG16(GP_SRC_XCOOR, srcx & 7);
-- WRITE_REG16(GP_WIDTH, width);
-- WRITE_REG16(GP_HEIGHT, height);
-- WRITE_REG16(GP_BLIT_MODE, blit_mode);
--}
--
--/*
--//----------------------------------------------------------------------------
--// BRESENHAM LINE
--//
--// This routine draws a vector using the specified Bresenham parameters.
--// Currently this file does not support a routine that accepts the two
--// endpoints of a vector and calculates the Bresenham parameters. If it
--// ever does, this routine is still required for vectors that have been
--// clipped.
--//
--// X screen X position to start vector
--// Y screen Y position to start vector
--// LENGTH length of the vector, in pixels
--// INITERR Bresenham initial error term
--// AXIALERR Bresenham axial error term
--// DIAGERR Bresenham diagonal error term
--// FLAGS VM_YMAJOR, VM_MAJOR_INC, VM_MINOR_INC
--//----------------------------------------------------------------------------
--*/
--
--void gxr_bresenham_line(unsigned short x, unsigned short y,
-- unsigned short length, unsigned short initerr,
-- unsigned short axialerr, unsigned short diagerr,
-- unsigned short flags)
--{
-- unsigned short vector_mode = flags;
-- if (GXRusesDstData) vector_mode |= VM_READ_DST_FB;
--
-- /* CHECK NULL LENGTH */
--
-- if (!length) return;
--
-- /* LOAD THE REGISTERS FOR THE VECTOR */
--
-- while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING);
-- WRITE_REG16(GP_DST_XCOOR, x);
-- WRITE_REG16(GP_DST_YCOOR, y);
-- WRITE_REG16(GP_VECTOR_LENGTH, length);
-- WRITE_REG16(GP_INIT_ERROR, initerr);
-- WRITE_REG16(GP_AXIAL_ERROR, axialerr);
-- WRITE_REG16(GP_DIAG_ERROR, diagerr);
-- WRITE_REG16(GP_VECTOR_MODE, vector_mode);
--}
--
--/* END OF FILE */
--
+++ /dev/null
-diff -Nru xc.orig/config/cf/xfree86.cf xc/config/cf/xfree86.cf
---- xc.orig/config/cf/xfree86.cf 2003-09-25 13:00:04.000000000 +0200
-+++ xc/config/cf/xfree86.cf 2003-09-26 10:57:00.626294344 +0200
-@@ -374,7 +374,7 @@
- # define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
- neomagic i740 tdfx savage \
- cirrus vmware tseng trident chips apm \
-- GlideDriver i128 NscDriver \
-+ i128 NscDriver \
- ati i810 AgpGartDrivers DevelDrivers ark \
- cyrix siliconmotion via \
- fbdev vesa vga \
+++ /dev/null
---- xc/config/cf/linux.cf~ Thu Jan 9 20:54:04 2003
-+++ xc/config/cf/linux.cf Thu Jan 9 20:53:47 2003
-@@ -983,3 +983,8 @@
- #ifndef HasFreetype2
- #define HasFreetype2 YES
- #endif
-+
-+#define BuildExpatLibrary NO
-+#define HasExpat YES
-+#define UseExpat YES
-+
+++ /dev/null
---- XFree86-4.0/xc/lib/dps/Xlibnet.h.fhs Thu May 18 19:46:12 2000
-+++ XFree86-4.0/xc/lib/dps/Xlibnet.h Wed Jun 28 19:17:19 2000
-@@ -20,7 +20,7 @@
-
- #ifndef X_UNIX_PATH
- #ifdef hpux
--#define X_UNIX_PATH "/usr/spool/sockets/X11/"
-+#define X_UNIX_PATH "/var/spool/sockets/X11/"
- #define OLD_UNIX_PATH "/tmp/.X11-unix/X"
- #else
- #define X_UNIX_PATH "/tmp/.X11-unix/X"
---- XFree86-4.0/xc/lib/dps/csconndi.c.fhs Thu May 18 19:46:12 2000
-+++ XFree86-4.0/xc/lib/dps/csconndi.c Wed Jun 28 19:17:19 2000
-@@ -483,8 +483,8 @@
-
- #ifndef CSDPS_UNIX_PATH
- #ifdef hpux
--#define CSDPS_UNIX_DIR "/usr/spool/sockets/DPSNX"
--#define CSDPS_UNIX_PATH "/usr/spool/sockets/DPSNX/"
-+#define CSDPS_UNIX_DIR "/var/spool/sockets/DPSNX"
-+#define CSDPS_UNIX_PATH "/var/spool/sockets/DPSNX/"
- #else
- #define CSDPS_UNIX_DIR "/tmp/.DPSNX-unix"
- #define CSDPS_UNIX_PATH "/tmp/.DPSNX-unix/AGENT"
---- XFree86-4.0/xc/lib/xtrans/Xtranssock.c.fhs Thu May 11 14:14:10 2000
-+++ XFree86-4.0/xc/lib/xtrans/Xtranssock.c Wed Jun 28 19:17:19 2000
-@@ -203,30 +203,30 @@
- #ifdef hpux
-
- #if defined(X11_t)
--#define UNIX_PATH "/usr/spool/sockets/X11/"
--#define UNIX_DIR "/usr/spool/sockets/X11"
-+#define UNIX_PATH "/var/spool/sockets/X11/"
-+#define UNIX_DIR "/var/spool/sockets/X11"
- #define OLD_UNIX_PATH "/tmp/.X11-unix/X"
- #endif /* X11_t */
- #if defined(XIM_t)
--#define UNIX_PATH "/usr/spool/sockets/XIM/"
--#define UNIX_DIR "/usr/spool/sockets/XIM"
-+#define UNIX_PATH "/var/spool/sockets/XIM/"
-+#define UNIX_DIR "/var/spool/sockets/XIM"
- #define OLD_UNIX_PATH "/tmp/.XIM-unix/XIM"
- #endif /* XIM_t */
- #if defined(FS_t) || defined(FONT_t)
--#define UNIX_PATH "/usr/spool/sockets/fontserv/"
--#define UNIX_DIR "/usr/spool/sockets/fontserv"
-+#define UNIX_PATH "/var/spool/sockets/fontserv/"
-+#define UNIX_DIR "/var/spool/sockets/fontserv"
- #endif /* FS_t || FONT_t */
- #if defined(ICE_t)
--#define UNIX_PATH "/usr/spool/sockets/ICE/"
--#define UNIX_DIR "/usr/spool/sockets/ICE"
-+#define UNIX_PATH "/var/spool/sockets/ICE/"
-+#define UNIX_DIR "/var/spool/sockets/ICE"
- #endif /* ICE_t */
- #if defined(TEST_t)
--#define UNIX_PATH "/usr/spool/sockets/xtrans_test/"
--#define UNIX_DIR "/usr/spool/sockets/xtrans_test"
-+#define UNIX_PATH "/var/spool/sockets/xtrans_test/"
-+#define UNIX_DIR "/var/spool/sockets/xtrans_test"
- #endif
- #if defined(LBXPROXY_t)
--#define UNIX_PATH "/usr/spool/sockets/X11/"
--#define UNIX_DIR "/usr/spool/sockets/X11"
-+#define UNIX_PATH "/var/spool/sockets/X11/"
-+#define UNIX_DIR "/var/spool/sockets/X11"
- #endif
-
- #else /* !hpux */
---- XFree86-4.0/xc/programs/rstart/Imakefile.fhs Wed Jun 28 19:34:12 2000
-+++ XFree86-4.0/xc/programs/rstart/Imakefile Wed Jun 28 19:34:32 2000
-@@ -39,7 +39,7 @@
- CLIENTNAME=rstart.cmd
- #endif
-
--MYLIBDIR=$(LIBDIR)/rstart
-+MYLIBDIR=/etc/X11/rstart
- ENVPREFIX=RSTART
- PACKAGEname=rstart
-
---- XFree86-4.0/xc/programs/xbiff/MailboxP.h.fhs Sat Feb 12 22:56:12 2000
-+++ XFree86-4.0/xc/programs/xbiff/MailboxP.h Wed Jun 28 19:17:19 2000
-@@ -50,7 +50,7 @@
- #endif
-
- #ifndef MAILBOX_DIRECTORY
--#define MAILBOX_DIRECTORY "/usr/spool/mail"
-+#define MAILBOX_DIRECTORY "/var/mail"
- #endif
-
- typedef struct { /* new fields for mailbox widget */
---- XFree86-4.0/xc/programs/xmh/xmh.man.fhs Sat Dec 21 22:31:12 1996
-+++ XFree86-4.0/xc/programs/xmh/xmh.man Wed Jun 28 19:17:19 2000
-@@ -1313,7 +1313,7 @@
- An example of \fI.xmhcheck\fP file format, for the folders ``inbox'' and
- ``xpert'':
- .nf
--inbox /usr/spool/mail/converse
-+inbox /var/mail/converse
- xpert /users/converse/maildrops/xpert
- .fi
- .sp
+++ /dev/null
---- XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/newmmio.h.fix Mon Jul 2 19:46:04 2001
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/newmmio.h Mon Jan 21 08:18:14 2002
-@@ -251,7 +251,7 @@
- #define WaitQueue(v) \
- if(!(pS3->PCIRetry)) { \
- mem_barrier(); \
-- while(inb(GP_STAT) & (0x0100 >> (v))); \
-+ while(mmio_INB_GP_STAT() & (0x0100 >> (v))); \
- }
-
- #define CMD_REG_WIDTH 0x200 /* select 32bit command register */
---- XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_accel.c.fix Sun Oct 28 12:33:44 2001
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_accel.c Mon Jan 21 08:22:08 2002
-@@ -46,6 +46,7 @@
-
- static void S3Sync(ScrnInfoPtr pScrn)
- {
-+ S3Ptr pS3 = S3PTR(pScrn);
- WaitIdle();
- }
-
-@@ -64,9 +65,7 @@
- static void S3SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y,
- int w, int h)
- {
--#ifdef S3_NEWMMIO
- S3Ptr pS3 = S3PTR(pScrn);
--#endif
-
- WaitQueue(5);
- SET_CURPT((short)x, (short)y);
-@@ -303,9 +302,8 @@
- int major, int minor,
- int err, int len, int octant)
- {
--#ifdef S3_NEWMMIO
- S3Ptr pS3 = S3PTR(pScrn);
--#endif
-+
- unsigned short cmd;
- int error, e1, e2;
-
---- XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_dga.c.fix Mon Jul 2 19:46:04 2001
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_dga.c Mon Jan 21 08:18:14 2002
-@@ -314,5 +314,6 @@
-
- static void S3_Sync(ScrnInfoPtr pScrn)
- {
-+ S3Ptr pS3 = S3PTR(pScrn);
- WaitIdle();
- }
---- XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_driver.c.fix Thu Dec 27 07:24:19 2001
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_driver.c Mon Jan 21 08:18:14 2002
-@@ -1569,7 +1569,20 @@
-
- outb(0x3c6, 0x00);
-
-- outw(SUBSYS_CNTL, 0x8000 | 0x1000);
-+/*
-+* XXX: resetting the Trio64V2/GX causes trouble with the SGRAM memory bus
-+* (gets out of sync? same as setting CR88_6) which I don't know to fix,
-+* so better not reset that chip and cross fingers...
-+* This happens at least for some IBM Netfinity boxes (e.g. 7000M10) with 1MB SGRAM.
-+*/
-+ if (pS3->Chipset == PCI_CHIP_TRIO64V2_DXGX) {
-+ outb(vgaCRIndex, 0x36);
-+ tmp = inb(vgaCRReg);
-+ if ((tmp & 0x0c) != 0x04) /* no SGRAM */
-+ outw(SUBSYS_CNTL, 0x8000 | 0x1000);
-+ }
-+ else /* do normal reset for S3 chip... */
-+ outw(SUBSYS_CNTL, 0x8000 | 0x1000);
- outw(SUBSYS_CNTL, 0x4000 | 0x1000);
-
- inw(SUBSYS_STAT);
-@@ -1603,6 +1616,12 @@
-
- WaitQueue(5);
- SET_SCISSORS(0, 0, pS3->s3ScissR, pS3->s3ScissB);
-+ if(pS3->s3Bpp > 2) {
-+ if(pS3->S3NewMMIO)
-+ SET_MULT_MISC(0x200);
-+ else
-+ SET_MULT_MISC(0);
-+ }
-
- outb(vgaCRIndex, 0x6f);
-
---- XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_reg.h.fix Mon Jul 2 19:46:04 2001
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_reg.h Mon Jan 21 08:18:14 2002
-@@ -148,10 +148,23 @@
- outw(p, (n) >> 16); \
- } else outw(p, n)
-
-+/*
-+ * mmio reads from GP_STAT
-+ */
-+#if !defined(__alpha__)
-+#define mmio_INB_GP_STAT() (*(((volatile unsigned char*)pS3->MMIOBase)+GP_STAT) & 0xff)
-+#define mmio_INW_GP_STAT() (*(((volatile unsigned short*)pS3->MMIOBase)+GP_STAT/2))
-+#else
-+#define mmio_INB_GP_STAT() inb(GP_STAT)
-+#define mmio_INW_GP_STAT() inw(GP_STAT)
-+#endif
-
- #define WaitIdle() do { \
- mem_barrier(); \
-- while(inw(GP_STAT) & GPBUSY); \
-+ if (pS3->S3NewMMIO) \
-+ while(mmio_INW_GP_STAT() & GPBUSY); \
-+ else \
-+ while(inw(GP_STAT) & GPBUSY); \
- } while(0)
-
-
-@@ -184,9 +197,12 @@
-
- #define CMD_REG_WIDTH 0x0000
-
--#define WaitQueue(n) do { \
-+#define WaitQueue(n) do { \
- mem_barrier(); \
-- while(inb(GP_STAT) & (0x0100 >> (n))); \
-+ if (pS3->S3NewMMIO) \
-+ while(mmio_INB_GP_STAT() & (0x0100 >> (n))); \
-+ else \
-+ while(inb(GP_STAT) & (0x0100 >> (n))); \
- } while (0)
-
- #define WaitQueue16_32(n16,n32) \
+++ /dev/null
---- XFree86-3.3.6/xc/lib/X11/XlibInt.c.fixemacs Mon Jan 24 17:09:48 2000
-+++ XFree86-3.3.6/xc/lib/X11/XlibInt.c Mon Jan 24 17:10:49 2000
-@@ -597,7 +597,10 @@
- register char *bufindex;
- _XExtension *ext;
-
-- if (dpy->flags & XlibDisplayIOError) return;
-+ if (dpy->flags & XlibDisplayIOError) {
-+ dpy->bufptr = dpy->buffer; /* reset to avoid buffer overflows */
-+ return;
-+ }
- #ifdef XTHREADS
- while (dpy->flags & XlibDisplayWriting) {
- ConditionWait(dpy, dpy->lock->writers);
+++ /dev/null
---- XFree86-3.3.3.1/xc/nls/XLC_LOCALE/iso8859-2.fixiso8859-2 Thu Jun 10 14:25:13 1999
-+++ XFree86-3.3.3.1/xc/nls/XLC_LOCALE/iso8859-2 Thu Jun 10 14:25:48 1999
-@@ -67,7 +67,7 @@
- #else
- wc_encoding \x00008080
- #endif
-- ct_encoding ISO8859-2:GR
-+ ct_encoding ISO8859-2:GR; ISO8859-1:GR
- }
-
- END XLC_XLOCALE
+++ /dev/null
-diff -urN XFree86-3.3.6.orig/xc/programs/Xserver/hw/xfree86/XF86Setup/Imakefile XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/XF86Setup/Imakefile
---- XFree86-3.3.6.orig/xc/programs/Xserver/hw/xfree86/XF86Setup/Imakefile Sat Apr 17 17:51:10 1999
-+++ XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/XF86Setup/Imakefile Sat Mar 11 04:36:27 2000
-@@ -81,7 +81,7 @@
-
- XCONFIG_DEFINES = $(EXT_DEFINES) -DXF86SETUP \
- '-DPROJECTROOT="$(PROJECTROOT)"' \
-- '-DSERVER_CONFIG_FILE="$(LIBDIR)/$(XCONFIGFILE)"'
-+ '-DSERVER_CONFIG_FILE="/etc/X11/$(XCONFIGFILE)"'
-
- XF86SETUPLIBDIR = $(LIBDIR)/XF86Setup
- DEFINES = -DCARD_DATABASE_FILE='"$(CARDDBFILE)"' \
-diff -urN XFree86-3.3.6.orig/xc/programs/Xserver/hw/xfree86/XF86Setup/phase5.tcl XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/XF86Setup/phase5.tcl
---- XFree86-3.3.6.orig/xc/programs/Xserver/hw/xfree86/XF86Setup/phase5.tcl Tue Oct 12 20:06:52 1999
-+++ XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/XF86Setup/phase5.tcl Sat Mar 11 04:38:12 2000
-@@ -38,7 +38,7 @@
- set devid [lindex $DeviceIDs $idx]
- global Device_$devid
- set server [set Device_${devid}(Server)]
-- set linkname $Xwinhome/bin/X
-+ set linkname /etc/X11/X
- set lastlink $linkname
- for {set nlinks 0} \
- {[file exists $linkname] && [file type $linkname]=="link" \
-@@ -75,7 +75,7 @@
- if [string match XFCom* $server] {
- set serverpath $Xwinhome/bin/$server
- } else {
-- set serverpath $Xwinhome/bin/XF86_$server
-+ set serverpath ../../usr/X11R6/bin/XF86_$server
- }
- if [catch "link $serverpath X" ret] {
- mesg "Link creation failed!\n\
-diff -urN XFree86-3.3.6.orig/xc/programs/Xserver/hw/xfree86/xf86config/xf86config.c XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/xf86config/xf86config.c
---- XFree86-3.3.6.orig/xc/programs/Xserver/hw/xfree86/xf86config/xf86config.c Mon Dec 20 17:40:07 1999
-+++ XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/xf86config/xf86config.c Sat Mar 11 04:36:27 2000
-@@ -107,7 +107,7 @@
- #endif
-
- /*
-- * Define this to have /etc/XF86Config prompted for as the default
-+ * Define this to have /etc/X11/XF86Config prompted for as the default
- * location to write the XF86Config file to.
- */
- #define PREFER_XF86CONFIG_IN_ETC
-@@ -215,7 +215,7 @@
- "This program will create a basic " CONFIGNAME " file, based on menu selections you\n"
- "make.\n"
- "\n"
--"The " CONFIGNAME " file usually resides in " TREEROOTLX " or /etc. A sample\n"
-+"The " CONFIGNAME " file usually resides in " TREEROOTLX " or /etc/X11. A sample\n"
- CONFIGNAME " file is supplied with XFree86; it is configured for a standard\n"
- "VGA card and monitor with 640x480 resolution. This program will ask for a\n"
- "pathname when it is ready to write the file.\n"
-@@ -2986,7 +2986,7 @@
- #endif
- #ifdef PREFER_XF86CONFIG_IN_ETC
- #if !(defined(__QNX__) && !defined(__QNXNTO__))
-- printf("Shall I write it to /etc/XF86Config? ");
-+ printf("Shall I write it to /etc/X11/XF86Config? ");
- #else
- printf("Shall I write it to /etc/config/X11/XF86Config.%d? ",
- getnid());
-@@ -2995,7 +2995,7 @@
- printf("\n");
- if (answerisyes(s))
- #if !(defined(__QNX__) && !defined(__QNXNTO__))
-- return "/etc/XF86Config";
-+ return "/etc/X11/XF86Config";
- #else
- /* In QNX, use XF86Config.nid for filename */
- {
-@@ -3030,11 +3030,11 @@
- #endif
-
- #ifndef PREFER_XF86CONFIG_IN_ETC
-- printf("Shall I write it to /etc/XF86Config? ");
-+ printf("Shall I write it to /etc/X11/XF86Config? ");
- getstring(s);
- printf("\n");
- if (answerisyes(s))
-- return "/etc/XF86Config";
-+ return "/etc/X11/XF86Config";
- #endif
- #else /* __EMX__ */
- {
-diff -urN XFree86-3.3.6.orig/xc/programs/Xserver/os/wrapper.c XFree86-3.3.6/xc/programs/Xserver/os/wrapper.c
---- XFree86-3.3.6.orig/xc/programs/Xserver/os/wrapper.c Fri Jul 30 15:07:09 1999
-+++ XFree86-3.3.6/xc/programs/Xserver/os/wrapper.c Sat Mar 11 04:36:27 2000
-@@ -42,6 +42,9 @@
- #define XSERVER_PATH "/usr/X11R6/bin/X"
- #endif
-
-+#undef XSERVER_PATH
-+#define XSERVER_PATH "/etc/X11/X"
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
+++ /dev/null
---- xc/lib/GL/mesa/src/drv/tdfx/Imakefile.fred Thu Aug 24 09:17:57 2000
-+++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile Thu Aug 24 09:51:47 2000
-@@ -278,7 +278,7 @@
- SRCS = $(DRISRCS) $(DRMSRCS) $(TDFXSRCS) $(MESASRCS) $(ASMSRCS)
- OBJS = $(DRIOBJS) $(DRMOBJS) $(TDFXOBJS) $(MESAOBJS) $(ASMOBJS)
-
--REQUIREDLIBS = -lglide3x -lm
-+REQUIREDLIBS = -lglide3 -lm
- #if !GlxBuiltInTdfx
- REQUIREDLIBS += -L../../../.. -lGL
- #endif
+++ /dev/null
---- XFree86-4.2.1/xc42/programs/Xserver/hw/xfree86/drivers/i740/i740.h Fri May 4 15:05:39 2001
-+++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/i740/i740.h Fri Jan 25 16:56:02 2002
-@@ -56,12 +56,13 @@
-
- typedef struct _I740Rec *I740Ptr;
-
--typedef void (*I740WriteIndexedByteFunc)(I740Ptr pI740, int addr,
-+typedef void (*I740WriteIndexedByteFunc)(I740Ptr pI740, IOADDRESS addr,
- unsigned char index, char value);
--typedef char (*I740ReadIndexedByteFunc)(I740Ptr pI740, int addr,
-+typedef char (*I740ReadIndexedByteFunc)(I740Ptr pI740, IOADDRESS addr,
- unsigned char index);
--typedef void (*I740WriteByteFunc)(I740Ptr pI740, int addr, unsigned char value);
--typedef char (*I740ReadByteFunc)(I740Ptr pI740, int addr);
-+typedef void (*I740WriteByteFunc)(I740Ptr pI740, IOADDRESS addr,
-+ unsigned char value);
-+typedef char (*I740ReadByteFunc)(I740Ptr pI740, IOADDRESS addr);
-
- typedef struct {
- unsigned char DisplayControl;
-@@ -114,6 +115,7 @@
- I740WriteByteFunc writeStandard;
- I740ReadByteFunc readStandard;
- OptionInfoPtr Options;
-+ IOADDRESS ioBase;
- } I740Rec;
-
- #define I740PTR(p) ((I740Ptr)((p)->driverPrivate))
---- XFree86-4.2.1/xc42/programs/Xserver/hw/xfree86/drivers/i740/i740_accel.c Sat Mar 3 17:26:12 2001
-+++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/i740/i740_accel.c Fri Jan 25 16:56:02 2002
-@@ -192,6 +192,7 @@
-
- static void
- I740SyncPIO(ScrnInfoPtr pScrn) {
-+ I740Ptr pI740 = I740PTR(pScrn);
- WAIT_ENGINE_IDLE_PIO();
- }
-
---- XFree86-4.2.1/xc42/programs/Xserver/hw/xfree86/drivers/i740/i740_driver.c Fri Jan 4 16:22:31 2002
-+++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/i740/i740_driver.c Fri Jan 25 16:56:02 2002
-@@ -501,6 +501,8 @@
-
- /* Allocate a vgaHWRec */
- if (!vgaHWGetHWRec(pScrn)) return FALSE;
-+ hwp = VGAHWPTR(pScrn);
-+ pI740->ioBase = hwp->PIOOffset;
-
- pI740->PciInfo = xf86GetPciInfoForEntity(pI740->pEnt->index);
- pI740->PciTag = pciTag(pI740->PciInfo->bus, pI740->PciInfo->device,
-@@ -571,7 +573,6 @@
- /* We use a programmable clock */
- pScrn->progClock = TRUE;
-
-- hwp = VGAHWPTR(pScrn);
- pI740->cpp = pScrn->bitsPerPixel/8;
-
- /* We have to use PIO to probe, because we haven't mappend yet */
-@@ -1736,11 +1737,6 @@
- static Bool
- I740SaveScreen(ScreenPtr pScreen, int mode)
- {
--#if 0
-- Bool unblack = xf86IsUnblank(mode);
-- if (unblack) outw(SRX, 0x0300);
-- else outw(SRX, 0x0100);
--#endif
- return vgaHWSaveScreen(pScreen, mode);
- }
-
---- XFree86-4.2.1/xc42/programs/Xserver/hw/xfree86/drivers/i740/i740_io.c Tue Feb 22 23:47:14 2000
-+++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/i740/i740_io.c Fri Jan 25 16:56:03 2002
-@@ -39,53 +39,76 @@
-
- #include "i740.h"
-
--static void I740WriteControlPIO(I740Ptr pI740, int addr, unsigned char index, char val) {
-+static void
-+I740WriteControlPIO(I740Ptr pI740, IOADDRESS addr,
-+ unsigned char index, char val)
-+{
-+ addr += pI740->ioBase;
- outb(addr, index);
- outb(addr+1, val);
- }
-
--static char I740ReadControlPIO(I740Ptr pI740, int addr, unsigned char index) {
-+static char
-+I740ReadControlPIO(I740Ptr pI740, IOADDRESS addr, unsigned char index)
-+{
-+ addr += pI740->ioBase;
- outb(addr, index);
- return inb(addr+1);
- }
-
--static void I740WriteStandardPIO(I740Ptr pI740, int addr, unsigned char val) {
-- outb(addr, val);
-+static void
-+I740WriteStandardPIO(I740Ptr pI740, IOADDRESS addr, unsigned char val)
-+{
-+ outb(pI740->ioBase + addr, val);
- }
-
--static char I740ReadStandardPIO(I740Ptr pI740, int addr) {
-- return inb(addr);
-+static char
-+I740ReadStandardPIO(I740Ptr pI740, IOADDRESS addr)
-+{
-+ return inb(pI740->ioBase + addr);
- }
-
--void I740SetPIOAccess(I740Ptr pI740) {
-+void
-+I740SetPIOAccess(I740Ptr pI740)
-+{
- pI740->writeControl=I740WriteControlPIO;
- pI740->readControl=I740ReadControlPIO;
- pI740->writeStandard=I740WriteStandardPIO;
- pI740->readStandard=I740ReadStandardPIO;
- }
-
--static void I740WriteControlMMIO(I740Ptr pI740, int addr, unsigned char index, char val) {
-+static void
-+I740WriteControlMMIO(I740Ptr pI740, IOADDRESS addr,
-+ unsigned char index, char val)
-+{
- moutb(addr, index);
- moutb(addr+1, val);
- }
-
--static char I740ReadControlMMIO(I740Ptr pI740, int addr, unsigned char index) {
-+static char
-+I740ReadControlMMIO(I740Ptr pI740, IOADDRESS addr, unsigned char index)
-+{
- moutb(addr, index);
- return minb(addr+1);
- }
-
--static void I740WriteStandardMMIO(I740Ptr pI740, int addr, unsigned char val) {
-+static void
-+I740WriteStandardMMIO(I740Ptr pI740, IOADDRESS addr, unsigned char val)
-+{
- moutb(addr, val);
- }
-
--static char I740ReadStandardMMIO(I740Ptr pI740, int addr) {
-+static char
-+I740ReadStandardMMIO(I740Ptr pI740, IOADDRESS addr)
-+{
- return minb(addr);
- }
-
--void I740SetMMIOAccess(I740Ptr pI740) {
-+void
-+I740SetMMIOAccess(I740Ptr pI740)
-+{
- pI740->writeControl=I740WriteControlMMIO;
- pI740->readControl=I740ReadControlMMIO;
- pI740->writeStandard=I740WriteStandardMMIO;
- pI740->readStandard=I740ReadStandardMMIO;
- }
--
---- XFree86-4.2.1/xc42/programs/Xserver/hw/xfree86/drivers/i740/i740_macros.h Tue Feb 22 23:47:14 2000
-+++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/i740/i740_macros.h Fri Jan 25 16:56:03 2002
-@@ -34,9 +34,9 @@
- */
-
- #define WAIT_ENGINE_IDLE_PIO() { \
-- outb(XRX, BITBLT_CNTL); \
-- while (inb(XRX+1) & BITBLT_STATUS) \
-- outb(XRX, BITBLT_CNTL); \
-+ outb(pI740->ioBase + XRX, BITBLT_CNTL); \
-+ while (inb(pI740->ioBase + XRX + 1) & BITBLT_STATUS) \
-+ outb(pI740->ioBase + XRX, BITBLT_CNTL); \
- }
-
- #define WAIT_ENGINE_IDLE_MMIO() { \
+++ /dev/null
---- XFree86-4.2.0/xc.orig/programs/Xserver/hw/xfree86/common/xf86PciInfo.h Mon Jan 21 02:55:00 2002
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h Mon Jan 21 03:01:54 2002
-@@ -644,6 +644,7 @@
- /* Intel */
- #define PCI_CHIP_I830_M_BRIDGE 0x3575
- #define PCI_CHIP_I830_M 0x3577
-+#define PCI_CHIP_I815_M 0x1112
- #define PCI_CHIP_I815_BRIDGE 0x1130
- #define PCI_CHIP_I815 0x1132
- #define PCI_CHIP_I810_BRIDGE 0x7120
-@@ -1599,6 +1600,7 @@
- {PCI_CHIP_I810_BRIDGE, "i810 Bridge",0},
- {PCI_CHIP_I810_DC100_BRIDGE, "i810-dc100 Bridge",0},
- {PCI_CHIP_I810_E_BRIDGE,"i810e Bridge",0},
-+ {PCI_CHIP_I815_M, "i815m",0},
- {PCI_CHIP_I815_BRIDGE, "i815 Bridge",0},
- {PCI_CHIP_I830_M_BRIDGE,"i830M Bridge",0},
- #endif
---- XFree86-4.2.0/xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i810.h Tue Jan 15 03:43:51 2002
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h Mon Jan 21 02:59:17 2002
-@@ -798,6 +798,7 @@
- #define PCI_CHIP_I810 0x7121
- #define PCI_CHIP_I810_DC100 0x7123
- #define PCI_CHIP_I810_E 0x7125
-+#define PCI_CHIP_I815_M 0x1112
- #define PCI_CHIP_I815 0x1132
- #define PCI_CHIP_I810_BRIDGE 0x7120
- #define PCI_CHIP_I810_DC100_BRIDGE 0x7122
-@@ -809,7 +810,8 @@
- #define IS_I810(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I810 || \
- pI810->PciInfo->chipType == PCI_CHIP_I810_DC100 || \
- pI810->PciInfo->chipType == PCI_CHIP_I810_E)
--#define IS_I815(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I815)
-+#define IS_I815(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I815 || \
-+ pI810->PciInfo->chipType == PCI_CHIP_I815_M)
- #define IS_I830(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I830_M)
-
-
---- XFree86-4.2.0/xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Thu Jan 10 01:02:29 2002
-+++ XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Mon Jan 21 03:00:42 2002
-@@ -101,7 +101,8 @@
- { PCI_CHIP_I810, "i810"},
- { PCI_CHIP_I810_DC100, "i810-dc100"},
- { PCI_CHIP_I810_E, "i810e"},
-- { PCI_CHIP_I815, "i815"},
-+ { PCI_CHIP_I815, "i815"},
-+ { PCI_CHIP_I815_M, "i815m"},
- { PCI_CHIP_I830_M, "i830M"},
- { -1, NULL }
- };
-@@ -110,7 +111,8 @@
- { PCI_CHIP_I810, PCI_CHIP_I810, RES_SHARED_VGA },
- { PCI_CHIP_I810_DC100, PCI_CHIP_I810_DC100, RES_SHARED_VGA },
- { PCI_CHIP_I810_E, PCI_CHIP_I810_E, RES_SHARED_VGA },
-- { PCI_CHIP_I815, PCI_CHIP_I815, RES_SHARED_VGA },
-+ { PCI_CHIP_I815, PCI_CHIP_I815, RES_SHARED_VGA },
-+ { PCI_CHIP_I815_M, PCI_CHIP_I815_M, RES_SHARED_VGA },
- { PCI_CHIP_I830_M, PCI_CHIP_I830_M, RES_SHARED_VGA },
- { -1, -1, RES_UNDEFINED }
- };
+++ /dev/null
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v
-retrieving revision 1.56
-retrieving revision 1.57
-diff -u -r1.56 -r1.57
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c 2000/12/06 15:35:07 1.56
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c 2001/01/06 20:19:06 1.57
-@@ -225,12 +225,13 @@
-
- switch (pEnt->busType) {
- case BUS_PCI:
-- return (primaryBus.type == BUS_PCI &&
-- pEnt->pciBusId.bus == primaryBus.id.pci.bus &&
-+ return (pEnt->pciBusId.bus == primaryBus.id.pci.bus &&
- pEnt->pciBusId.device == primaryBus.id.pci.device &&
- pEnt->pciBusId.func == primaryBus.id.pci.func);
- case BUS_ISA:
-- return ( primaryBus.type == BUS_ISA );
-+ return TRUE;
-+ case BUS_SBUS:
-+ return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum);
- default:
- return FALSE;
- }
-@@ -1395,7 +1396,7 @@
- * only deals with exclusive resources.
- */
- void
--RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment)
-+RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated)
- {
- resPtr pRes;
- memType size, newsize, adjust;
-@@ -1406,6 +1407,8 @@
- (target->res_type & ResPhysMask))
- && pRes->block_begin <= target->block_end
- && pRes->block_end >= target->block_begin) {
-+ /* Possibly ignore estimated resources */
-+ if (!useEstimated && (pRes->res_type & ResEstimated)) continue;
- /*
- * target should be a larger region than pRes. If pRes fully
- * contains target, don't do anything.
-@@ -2973,13 +2976,13 @@
- CheckGenericGA();
- if (primaryBus.type != BUS_NONE) {
- char *bus;
-- char *loc = xnfcalloc(1,8);
-+ char *loc = xnfcalloc(1,9);
- if (loc == NULL) return;
-
- switch (primaryBus.type) {
- case BUS_PCI:
- bus = "PCI";
-- sprintf(loc,"%2.2x:%2.2x:%1.1x",primaryBus.id.pci.bus,
-+ sprintf(loc," %2.2x:%2.2x:%1.1x",primaryBus.id.pci.bus,
- primaryBus.id.pci.device,primaryBus.id.pci.func);
- break;
- case BUS_ISA:
-@@ -2988,14 +2991,14 @@
- break;
- case BUS_SBUS:
- bus = "SBUS";
-- sprintf(loc,"%2.2x",primaryBus.id.sbus.fbNum);
-+ sprintf(loc," %2.2x",primaryBus.id.sbus.fbNum);
- break;
- default:
- bus = "";
- loc[0] = '\0';
- }
-
-- xf86MsgVerb(X_INFO, 2, "Primary Device is: %s %s\n",bus,loc);
-+ xf86MsgVerb(X_INFO, 2, "Primary Device is: %s%s\n",bus,loc);
- xfree(loc);
- }
-
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v
-retrieving revision 1.16
-retrieving revision 1.17
-diff -u -r1.16 -r1.17
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h 2000/06/20 05:08:43 1.16
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h 2001/01/06 20:19:07 1.17
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v 1.16 2000/06/20 05:08:43 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v 1.17 2001/01/06 20:19:07 tsi Exp $ */
- /*
- * Copyright (c) 1997 by The XFree86 Project, Inc.
- */
-@@ -124,7 +124,8 @@
- resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
- resPtr findIntersect(resRange Range, resPtr list);
- resPtr xf86FindIntersect(resRange Range, resPtr list);
--void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment);
-+void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment,
-+ Bool useEstimated);
- void xf86ConvertListToHost(int entityIndex, resPtr list);
-
- #endif /* _XF86_BUS_H */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Config.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v
-retrieving revision 3.236
-retrieving revision 3.237
-diff -u -r3.236 -r3.237
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Config.c 2000/12/06 15:35:07 3.236
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Config.c 2001/01/06 20:19:07 3.237
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.236 2000/12/06 15:35:07 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.237 2001/01/06 20:19:07 tsi Exp $ */
-
-
- /*
-@@ -2060,6 +2060,7 @@
- X_INFO_STRING " informational,\n"
- " " X_WARNING_STRING " warning, "
- X_ERROR_STRING " error, "
-+ X_NOT_IMPLEMENTED_STRING " not implemented, "
- X_UNKNOWN_STRING " unknown.\n");
-
- /*
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Configure.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v
-retrieving revision 3.49
-retrieving revision 3.50
-diff -u -r3.49 -r3.50
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Configure.c 2000/12/12 18:23:50 3.49
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Configure.c 2001/01/06 20:19:07 3.50
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v 3.49 2000/12/12 18:23:50 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v 3.50 2001/01/06 20:19:07 tsi Exp $ */
- /*
- * Copyright 2000 by Alan Hourihane, Sychdyn, North Wales.
- *
-@@ -213,7 +213,7 @@
- # undef CardName
-
- if (chipset < 0)
-- chipset = (pVideo->vendor << 16) || pVideo->chipType;
-+ chipset = (pVideo->vendor << 16) | pVideo->chipType;
- }
- break;
- case BUS_ISA:
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c,v
-retrieving revision 1.108
-retrieving revision 1.109
-diff -u -r1.108 -r1.109
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c 2000/12/14 16:33:08 1.108
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Helper.c 2001/01/06 20:19:07 1.109
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Helper.c,v 1.108 2000/12/14 16:33:08 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Helper.c,v 1.109 2001/01/06 20:19:07 tsi Exp $ */
-
- /*
- * Copyright (c) 1997-1998 by The XFree86 Project, Inc.
-@@ -1217,6 +1217,9 @@
- break;
- case X_INFO:
- s = X_INFO_STRING;
-+ break;
-+ case X_NOT_IMPLEMENTED:
-+ s = X_NOT_IMPLEMENTED_STRING;
- break;
- case X_NONE:
- s = NULL;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v
-retrieving revision 1.36
-retrieving revision 1.37
-diff -u -r1.36 -r1.37
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c 2000/12/06 15:35:11 1.36
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Mode.c 2001/01/06 20:19:08 1.37
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.36 2000/12/06 15:35:11 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.37 2001/01/06 20:19:08 tsi Exp $ */
-
- /*
- * Copyright (c) 1997,1998 by The XFree86 Project, Inc.
-@@ -1305,16 +1305,16 @@
- q->status = MODE_OK;
- } else {
- if (p->type & M_T_BUILTIN)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Built-in mode \"%s\" deleted (%s)\n", p->name,
-- xf86ModeStatusToString(status));
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using built-in mode \"%s\" (%s)\n",
-+ p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Default mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- }
- }
-@@ -1401,16 +1401,16 @@
- status = xf86LookupMode(scrp, p, clockRanges, strategy);
- if (status != MODE_OK) {
- if (p->type & M_T_BUILTIN)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Built-in mode \"%s\" deleted (%s)\n", p->name,
-- xf86ModeStatusToString(status));
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using built-in mode \"%s\" (%s)\n",
-+ p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Default mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- }
- if (status == MODE_ERROR) {
-@@ -1493,16 +1493,16 @@
-
- if (p->status != MODE_OK) {
- if (p->type & M_T_BUILTIN)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Built-in mode \"%s\" deleted (%s)\n", p->name,
-- xf86ModeStatusToString(p->status));
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using built-in mode \"%s\" (%s)\n",
-+ p->name, xf86ModeStatusToString(p->status));
- else if (p->type & M_T_DEFAULT)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Default mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
- else
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
-
- goto lookupNext;
-@@ -1607,17 +1607,17 @@
- if (p->status != MODE_OK) {
- #if 0
- if (p->type & M_T_BUILTIN)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Built-in mode \"%s\" deleted (%s)\n", p->name,
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using built-in mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
- else if (p->type & M_T_DEFAULT)
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Default mode \"%s\" deleted (%s)\n", p->name,
-- xf86ModeStatusToString(p->status));
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using default mode \"%s\" (%s)\n", p->name,
-+ xf86ModeStatusToString(p->status));
- else
-- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
-- "Mode \"%s\" deleted (%s)\n", p->name,
-- xf86ModeStatusToString(p->status));
-+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
-+ "Not using mode \"%s\" (%s)\n", p->name,
-+ xf86ModeStatusToString(p->status));
- #endif
- xf86DeleteMode(&(scrp->modes), p);
- }
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h,v
-retrieving revision 1.21
-retrieving revision 1.22
-diff -u -r1.21 -r1.22
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h 2000/11/06 19:24:07 1.21
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h 2001/01/06 20:19:08 1.22
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h,v 1.21 2000/11/06 19:24:07 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h,v 1.22 2001/01/06 20:19:08 tsi Exp $ */
-
- /*
- * Copyright (c) 1997,1998 by The XFree86 Project, Inc.
-@@ -200,6 +200,9 @@
- #endif
- #ifndef X_INFO_STRING
- #define X_INFO_STRING "(II)"
-+#endif
-+#ifndef X_NOT_IMPLEMENTED_STRING
-+#define X_NOT_IMPLEMENTED_STRING "(NI)"
- #endif
-
- #endif /* _XF86PRIVSTR_H */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v
-retrieving revision 3.28
-retrieving revision 3.29
-diff -u -r3.28 -r3.29
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c 2000/12/08 20:13:35 3.28
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c 2001/01/06 20:19:08 3.29
-@@ -175,11 +175,16 @@
- if ((PCISHAREDIOCLASSES(baseclass, subclass))
- && (pcrp->pci_command & PCI_CMD_IO_ENABLE) &&
- (pcrp->pci_prog_if == 0)) {
-- /* assumption: primary bus is always VGA */
-+ if (primaryBus.type == BUS_NONE) {
-+ /* assumption: primary bus is always VGA */
- primaryBus.type = BUS_PCI;
- primaryBus.id.pci.bus = pcrp->busnum;
- primaryBus.id.pci.device = pcrp->devnum;
- primaryBus.id.pci.func = pcrp->funcnum;
-+ } else if (primaryBus.type < BUS_last) {
-+ xf86Msg(X_NOTICE, "More than one primary device found\n");
-+ primaryBus.type ^= (BusType)(-1);
-+ }
- }
-
- for (j = 0; j < 6; j++) {
-@@ -752,7 +757,7 @@
- }
- }
-
-- RemoveOverlaps(target,bridgeRes,TRUE);
-+ RemoveOverlaps(target, bridgeRes, TRUE, TRUE);
- if (range.rEnd > target->block_end) {
- correctPciSize(range.rBegin,range.rEnd - range.rBegin,
- target->block_end - target->block_begin,
-@@ -902,9 +907,9 @@
- if (ResIsEstimated(&pRes->val)) {
- range = pRes->val;
-
-- RemoveOverlaps(pRes, *activeRes, TRUE);
-- if (xf86Info.estimateSizesAggressively > 0)
-- RemoveOverlaps(pRes, *inactiveRes, TRUE);
-+ RemoveOverlaps(pRes, *activeRes, TRUE, TRUE);
-+ RemoveOverlaps(pRes, *inactiveRes, TRUE,
-+ (xf86Info.estimateSizesAggressively > 0));
-
- if (range.rEnd > pRes->block_end) {
- correctPciSize(range.rBegin,range.rEnd - range.rBegin,
-@@ -923,14 +928,16 @@
- xf86PrintResList(3, *activeRes);
- }
-
-- if (*inactiveRes && (xf86Info.estimateSizesAggressively > 1)) {
-+ if (*inactiveRes) {
- /* Check for overlaps */
- for (pRes = *inactiveRes; pRes; pRes = pRes->next) {
- if (ResIsEstimated(&pRes->val)) {
- range = pRes->val;
-
-- RemoveOverlaps(pRes, *activeRes, TRUE);
-- RemoveOverlaps(pRes, *inactiveRes, TRUE);
-+ RemoveOverlaps(pRes, *activeRes, TRUE,
-+ (xf86Info.estimateSizesAggressively > 1));
-+ RemoveOverlaps(pRes, *inactiveRes, TRUE,
-+ (xf86Info.estimateSizesAggressively > 1));
-
- if (range.rEnd > pRes->block_end) {
- correctPciSize(range.rBegin,range.rEnd - range.rBegin,
-@@ -946,7 +953,7 @@
- }
- }
- xf86MsgVerb(X_INFO, 3,
-- "Ative PCI resource ranges after removing overlaps:\n");
-+ "Active PCI resource ranges after removing overlaps:\n");
- xf86PrintResList(3, *inactiveRes);
- }
- }
-@@ -968,7 +975,7 @@
- */
-
- for (tmp = *osRes; tmp; tmp = tmp->next)
-- RemoveOverlaps(tmp, activeRes, FALSE);
-+ RemoveOverlaps(tmp, activeRes, FALSE, TRUE);
-
- xf86MsgVerb(X_INFO, 3, "OS-reported resource ranges after removing"
- " overlaps with PCI:\n");
-@@ -976,7 +983,7 @@
-
- pciAvoidRes = xf86AddRangesToList(pciAvoidRes,PciAvoid,-1);
- for (tmp = pciAvoidRes; tmp; tmp = tmp->next)
-- RemoveOverlaps(tmp, activeRes, FALSE);
-+ RemoveOverlaps(tmp, activeRes, FALSE, TRUE);
- tmp = xf86DupResList(*osRes);
- pciAvoidRes = xf86JoinResLists(pciAvoidRes,tmp);
-
-@@ -1424,40 +1431,54 @@
- if ((*num < 0) || (*num > 5) ||
- !pvp->memBase[*num] || (pvp->size[*num] < biosSize)) {
- *num = -1;
-+ } else {
-+ P_M_RANGE(range, TAG(pvp), pvp->memBase[*num], biosSize,
-+ ResExcMemBlock);
-+ if (!xf86IsSubsetOf(range, m) || ChkConflict(&range, avoid, SETUP))
-+ *num = -1;
-+ }
-+
-+ if (*num < 0) {
- for (n = 0; n <= 5; n++) {
- if (pvp->memBase[n] && (pvp->size[n] >= biosSize)) {
-- *num = n;
-- break;
-+ /* keep bios size ! */
-+ P_M_RANGE(range, TAG(pvp), pvp->memBase[*num],
-+ biosSize, ResExcMemBlock);
-+ if (xf86IsSubsetOf(range, m) &&
-+ !ChkConflict(&range, avoid, SETUP)) {
-+ *num = n;
-+ break;
-+ }
- }
- }
- }
-
-- if (*num >= 0) {
-- /* then try suggested memBase */
-- /* keep bios size ! */
-- P_M_RANGE(range,TAG(pvp),pvp->memBase[*num],biosSize,ResExcMemBlock);
-- if (xf86IsSubsetOf(range,m) && !ChkConflict(&range,avoid,SETUP)) {
-- xf86FreeResList(avoid);
-- xf86FreeResList(m);
-- return pvp->memBase[*num];
-- }
-- }
-+ /*
-+ * Return a possible window. Note that this doesn't deal with host bridges
-+ * yet. But the fix for that belongs elsewhere.
-+ */
- while (m) {
- range = xf86GetBlock(ResExcMemBlock,
-- PCI_SIZE(ResMem,TAG(pvp),(1 << biosSize)),
-+ PCI_SIZE(ResMem, TAG(pvp), 1 << biosSize),
- m->block_begin, m->block_end,
-- PCI_SIZE(ResMem,TAG(pvp),alignment), avoid);
-- if (range.type != ResEnd)
-- break;
-+ PCI_SIZE(ResMem, TAG(pvp), alignment), avoid);
-+ if (range.type != ResEnd) {
-+ xf86FreeResList(avoid);
-+ xf86FreeResList(m);
-+ return M2B(TAG(pvp), range.rBase);
-+ }
- m = m->next;
- }
--
-+
- xf86FreeResList(avoid);
- xf86FreeResList(m);
-- xf86MsgVerb(X_INFO,5,"GetVaildBIOSBase for %x:%x:%x: BIOSbase 0x%lx\n",
-- pvp->bus,pvp->device,pvp->func,
-- (memType)M2B(TAG(pvp),range.rBase));
-- return M2B(TAG(pvp),range.rBase);
-+
-+ if (*num >= 0) {
-+ /* then try suggested memBase */
-+ return pvp->memBase[*num];
-+ }
-+
-+ return 0;
- }
-
- /*
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86str.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/common/xf86str.h,v
-retrieving revision 1.74
-retrieving revision 1.75
-diff -u -r1.74 -r1.75
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86str.h 2000/12/13 02:44:59 1.74
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86str.h 2001/01/06 20:19:08 1.75
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86str.h,v 1.74 2000/12/13 02:44:59 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86str.h,v 1.75 2001/01/06 20:19:08 tsi Exp $ */
-
- /*
- * Copyright (c) 1997-2000 by The XFree86 Project, Inc.
-@@ -233,7 +233,8 @@
- BUS_NONE,
- BUS_ISA,
- BUS_PCI,
-- BUS_SBUS
-+ BUS_SBUS,
-+ BUS_last /* Keep last */
- } BusType;
-
- typedef struct {
-@@ -438,7 +439,8 @@
- X_ERROR, /* Error message */
- X_WARNING, /* Warning message */
- X_INFO, /* Informational message */
-- X_NONE /* No prefix */
-+ X_NONE, /* No prefix */
-+ X_NOT_IMPLEMENTED /* Not implemented */
- } MessageType;
-
- /* flags for depth 24 pixmap options */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c,v
-retrieving revision 1.13
-retrieving revision 1.15
-diff -u -r1.13 -r1.15
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c 2000/11/02 16:55:28 1.13
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c 2001/01/06 20:58:06 1.15
-@@ -1,6 +1,6 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c,v 1.13 2000/11/02 16:55:28 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c,v 1.15 2001/01/06 20:58:06 tsi Exp $ */
- /*
-- * Copyright 1999 through 2000 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca
-+ * Copyright 1999 through 2001 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
-@@ -107,8 +107,8 @@
- OptionInfoPtr
- ATIAvailableOptions
- (
-- int ChipId, /* Ignored */
-- int BusId /* Ignored */
-+ int ChipId,
-+ int BusId
- )
- {
- OptionInfoPtr pOptions;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v
-retrieving revision 1.36
-retrieving revision 1.38
-diff -u -r1.36 -r1.38
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c 2000/12/13 02:44:59 1.36
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c 2001/01/06 20:58:07 1.38
-@@ -1,6 +1,6 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v 1.36 2000/12/13 02:44:59 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v 1.38 2001/01/06 20:58:07 tsi Exp $ */
- /*
-- * Copyright 1997 through 2000 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca
-+ * Copyright 1997 through 2001 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
-@@ -2241,6 +2241,7 @@
-
- xf86LoaderReqSymLists(ATISymbols, NULL);
-
-+#ifndef ELFDEBUG
- /* Workaround for possible loader bug */
- # define ATIPreInit \
- (xf86PreInitProc*) LoaderSymbol("ATIPreInit")
-@@ -2258,6 +2259,7 @@
- (xf86FreeScreenProc*) LoaderSymbol("ATIFreeScreen")
- # define ATIValidMode \
- (xf86ValidModeProc*) LoaderSymbol("ATIValidMode")
-+#endif
-
- #endif
-
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atiregs.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/atiregs.h,v
-retrieving revision 1.12
-retrieving revision 1.14
-diff -u -r1.12 -r1.14
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atiregs.h 2000/08/22 21:54:31 1.12
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/atiregs.h 2001/01/06 20:58:07 1.14
-@@ -1,6 +1,6 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiregs.h,v 1.12 2000/08/22 21:54:31 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiregs.h,v 1.14 2001/01/06 20:58:07 tsi Exp $ */
- /*
-- * Copyright 1994 through 2000 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca
-+ * Copyright 1994 through 2001 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
-@@ -62,7 +62,7 @@
- #define SparseIOTag(_IOSelect) IOPortTag(_IOSelect, 0)
- #define BlockIOTag(_IOSelect) IOPortTag(0, _IOSelect)
-
--/* MDA/CGA/EGA/VGA I/O ports */
-+/* MDA/[M]CGA/EGA/VGA I/O ports */
- #define GENVS 0x0102u /* Write (and Read on uC only) */
-
- #define R_GENLPS 0x03b9u /* Read */
-@@ -99,24 +99,24 @@
- #define MonochromeIOBase 0x03b0u
- #define ColourIOBase 0x03d0u
-
--/* Other EGA/CGA/VGA I/O ports */
--/* ?(_IOBase) (_IOBase + 0x00u) */
--/* ?(_IOBase) (_IOBase + 0x01u) */
--/* ?(_IOBase) (_IOBase + 0x02u) */
--/* ?(_IOBase) (_IOBase + 0x03u) */
--#define CRTX(_IOBase) (_IOBase + 0x04u)
--#define CRTD(_IOBase) (_IOBase + 0x05u)
--/* ?(_IOBase) (_IOBase + 0x06u) */
--/* ?(_IOBase) (_IOBase + 0x07u) */
--#define GENMC(_IOBase) (_IOBase + 0x08u)
--/* ?(_IOBase) (_IOBase + 0x09u) */ /* R_GENLPS/GENB */
--#define GENS1(_IOBase) (_IOBase + 0x0au) /* Read */
--#define GENFC(_IOBase) (_IOBase + 0x0au) /* Write */
--#define GENLPC(_IOBase) (_IOBase + 0x0bu)
--/* ?(_IOBase) (_IOBase + 0x0cu) */ /* /GENLPS */
--/* ?(_IOBase) (_IOBase + 0x0du) */ /* /KCX */
--/* ?(_IOBase) (_IOBase + 0x0eu) */ /* /KCD */
--/* ?(_IOBase) (_IOBase + 0x0fu) */ /* GENHP/ */
-+/* Other MDA/[M]CGA/EGA/VGA I/O ports */
-+/* ?(_IOBase) ((_IOBase) + 0x00u) */ /* CRTX synonym */
-+/* ?(_IOBase) ((_IOBase) + 0x01u) */ /* CRTD synonym */
-+/* ?(_IOBase) ((_IOBase) + 0x02u) */ /* CRTX synonym */
-+/* ?(_IOBase) ((_IOBase) + 0x03u) */ /* CRTD synonym */
-+#define CRTX(_IOBase) ((_IOBase) + 0x04u)
-+#define CRTD(_IOBase) ((_IOBase) + 0x05u)
-+/* ?(_IOBase) ((_IOBase) + 0x06u) */
-+/* ?(_IOBase) ((_IOBase) + 0x07u) */
-+#define GENMC(_IOBase) ((_IOBase) + 0x08u)
-+/* ?(_IOBase) ((_IOBase) + 0x09u) */ /* R_GENLPS/GENB */
-+#define GENS1(_IOBase) ((_IOBase) + 0x0au) /* Read */
-+#define GENFC(_IOBase) ((_IOBase) + 0x0au) /* Write */
-+#define GENLPC(_IOBase) ((_IOBase) + 0x0bu)
-+/* ?(_IOBase) ((_IOBase) + 0x0cu) */ /* /GENLPS */
-+/* ?(_IOBase) ((_IOBase) + 0x0du) */ /* /KCX */
-+/* ?(_IOBase) ((_IOBase) + 0x0eu) */ /* /KCD */
-+/* ?(_IOBase) ((_IOBase) + 0x0fu) */ /* GENHP/ */
-
- /* 8514/A VESA approved register definitions */
- #define DISP_STAT 0x02e8u /* Read */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v
-retrieving revision 1.8
-retrieving revision 1.9
-diff -u -r1.8 -r1.9
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2000/12/08 19:15:33 1.8
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2001/01/06 20:19:10 1.9
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v 1.8 2000/12/08 19:15:33 martin Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v 1.9 2001/01/06 20:19:10 tsi Exp $ */
- /*
- * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
- * Precision Insight, Inc., Cedar Park, Texas, and
-@@ -193,7 +193,6 @@
- unsigned long LinearAddr; /* Frame buffer physical address */
- unsigned long MMIOAddr; /* MMIO region physical address */
- unsigned long BIOSAddr; /* BIOS physical address */
-- Bool BIOSFromPCI; /* BIOS is read from PCI space */
-
- unsigned char *MMIO; /* Map of MMIO region */
- unsigned char *FB; /* Map of frame buffer */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c,v
-retrieving revision 1.15
-retrieving revision 1.16
-diff -u -r1.15 -r1.16
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c 2000/12/22 12:13:15 1.15
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c 2001/01/06 20:19:10 1.16
-@@ -503,17 +503,12 @@
- }
-
- /* Read the Video BIOS block and the FP registers (if applicable). */
--static Bool R128GetBIOSParameters(ScrnInfoPtr pScrn)
-+static Bool R128GetBIOSParameters(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
- {
- R128InfoPtr info = R128PTR(pScrn);
- int i;
- int FPHeader = 0;
-
--#define R128ReadBIOS(offset, buffer, length) \
-- (info->BIOSFromPCI ? \
-- xf86ReadPciBIOS(offset, info->PciTag, 0, buffer, length) : \
-- xf86ReadBIOS(info->BIOSAddr, offset, buffer, length))
--
- #define R128_BIOS8(v) (info->VBIOS[v])
- #define R128_BIOS16(v) (info->VBIOS[v] | \
- (info->VBIOS[(v) + 1] << 8))
-@@ -528,16 +523,20 @@
- return FALSE;
- }
-
-- info->BIOSFromPCI = TRUE;
-- R128ReadBIOS(0x0000, info->VBIOS, R128_VBIOS_SIZE);
-- if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
-- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-- "Video BIOS not detected in PCI space!\n");
-- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-- "Attempting to read Video BIOS from legacy ISA space!\n");
-- info->BIOSFromPCI = FALSE;
-- info->BIOSAddr = 0x000c0000;
-- R128ReadBIOS(0x0000, info->VBIOS, R128_VBIOS_SIZE);
-+ if (pInt10) {
-+ info->BIOSAddr = pInt10->BIOSseg << 4;
-+ (void)memcpy(info->VBIOS, xf86int10Addr(pInt10, info->BIOSAddr),
-+ R128_VBIOS_SIZE);
-+ } else {
-+ xf86ReadPciBIOS(0, info->PciTag, 0, info->VBIOS, R128_VBIOS_SIZE);
-+ if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "Video BIOS not detected in PCI space!\n");
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "Attempting to read Video BIOS from legacy ISA space!\n");
-+ info->BIOSAddr = 0x000c0000;
-+ xf86ReadBIOS(info->BIOSAddr, 0, info->VBIOS, R128_VBIOS_SIZE);
-+ }
- }
- if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
- info->BIOSAddr = 0x00000000;
-@@ -1010,7 +1009,7 @@
- return TRUE;
- }
-
--static Bool R128PreInitDDC(ScrnInfoPtr pScrn)
-+static Bool R128PreInitDDC(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
- {
- R128InfoPtr info = R128PTR(pScrn);
- vbeInfoPtr pVbe;
-@@ -1026,7 +1025,7 @@
- #ifdef XFree86LOADER
- xf86LoaderReqSymLists(vbeSymbols,NULL);
- #endif
-- pVbe = VBEInit(NULL,info->pEnt->index);
-+ pVbe = VBEInit(pInt10, info->pEnt->index);
- if (!pVbe) return FALSE;
-
- xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(pVbe,NULL)));
-@@ -1155,15 +1154,13 @@
- return TRUE;
- }
-
--static Bool R128PreInitInt10(ScrnInfoPtr pScrn)
-+static Bool R128PreInitInt10(ScrnInfoPtr pScrn, xf86Int10InfoPtr *ppInt10)
- {
- R128InfoPtr info = R128PTR(pScrn);
- #if 1
- if (xf86LoadSubModule(pScrn, "int10")) {
-- xf86Int10InfoPtr pInt;
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
-- pInt = xf86InitInt10(info->pEnt->index);
-- xf86FreeInt10(pInt);
-+ *ppInt10 = xf86InitInt10(info->pEnt->index);
- }
- #endif
- return TRUE;
-@@ -1296,7 +1293,8 @@
- /* R128PreInit is called once at server startup. */
- Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
- {
-- R128InfoPtr info;
-+ R128InfoPtr info;
-+ xf86Int10InfoPtr pInt10 = NULL;
-
- R128TRACE(("R128PreInit\n"));
-
-@@ -1403,26 +1401,26 @@
- }
-
- if (!info->FBDev)
-- if (!R128PreInitInt10(pScrn)) goto fail;
-+ if (!R128PreInitInt10(pScrn, &pInt10)) goto fail;
-
-- if (!R128PreInitConfig(pScrn)) goto fail;
-+ if (!R128PreInitConfig(pScrn)) goto fail;
-
-- if (!R128GetBIOSParameters(pScrn)) goto fail;
-+ if (!R128GetBIOSParameters(pScrn, pInt10)) goto fail;
-
-- if (!R128GetPLLParameters(pScrn)) goto fail;
-+ if (!R128GetPLLParameters(pScrn)) goto fail;
-
-- if (!R128PreInitDDC(pScrn)) goto fail;
-+ if (!R128PreInitDDC(pScrn, pInt10)) goto fail;
-
-- if (!R128PreInitGamma(pScrn)) goto fail;
-+ if (!R128PreInitGamma(pScrn)) goto fail;
-
-- if (!R128PreInitModes(pScrn)) goto fail;
-+ if (!R128PreInitModes(pScrn)) goto fail;
-
-- if (!R128PreInitCursor(pScrn)) goto fail;
-+ if (!R128PreInitCursor(pScrn)) goto fail;
-
-- if (!R128PreInitAccel(pScrn)) goto fail;
-+ if (!R128PreInitAccel(pScrn)) goto fail;
-
- #ifdef XF86DRI
-- if (!R128PreInitDRI(pScrn)) goto fail;
-+ if (!R128PreInitDRI(pScrn)) goto fail;
- #endif
-
- /* Free the video bios (if applicable) */
-@@ -1431,6 +1429,10 @@
- info->VBIOS = NULL;
- }
-
-+ /* Free int10 info */
-+ if (pInt10)
-+ xf86FreeInt10(pInt10);
-+
- return TRUE;
-
- fail:
-@@ -1441,6 +1443,10 @@
- xfree(info->VBIOS);
- info->VBIOS = NULL;
- }
-+
-+ /* Free int10 info */
-+ if (pInt10)
-+ xf86FreeInt10(pInt10);
-
- vgaHWFreeHWRec(pScrn);
- R128FreeRec(pScrn);
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c,v
-retrieving revision 1.6
-retrieving revision 1.7
-diff -u -r1.6 -r1.7
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c 2000/12/13 02:45:00 1.6
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c 2001/01/06 20:19:10 1.7
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c,v 1.6 2000/12/13 02:45:00 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c,v 1.7 2001/01/06 20:19:10 tsi Exp $ */
- /*
- * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
- * Precision Insight, Inc., Cedar Park, Texas, and
-@@ -86,6 +86,8 @@
- * Return options defined in the r128 submodule which will have been
- * loaded by this point.
- */
-+ if ((chipid >> 16) == PCI_VENDOR_ATI)
-+ chipid -= PCI_VENDOR_ATI << 16;
- for (i = 0; R128PciChipsets[i].PCIid > 0; i++) {
- if (chipid == R128PciChipsets[i].PCIid)
- return R128Options;
-@@ -159,7 +161,7 @@
- pEnt = xf86GetEntityInfo(usedChips[i]);
-
- if (pEnt->active) {
-- ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
-+ ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
-
- #ifdef XFree86LOADER
- if (!xf86LoadSubModule(pScrn, "r128")) {
-@@ -171,6 +173,7 @@
-
- xf86LoaderReqSymLists(R128Symbols, NULL);
-
-+#ifndef ELFDEBUG
- /* Workaround for possible loader bug */
- # define R128PreInit \
- (xf86PreInitProc*) LoaderSymbol("R128PreInit")
-@@ -188,6 +191,7 @@
- (xf86FreeScreenProc*) LoaderSymbol("R128FreeScreen")
- # define R128ValidMode \
- (xf86ValidModeProc*) LoaderSymbol("R128ValidMode")
-+#endif
-
- #endif
-
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h,v
-retrieving revision 1.8
-retrieving revision 1.9
-diff -u -r1.8 -r1.9
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h 2000/12/08 14:41:16 1.8
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h 2001/01/06 20:19:10 1.9
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h,v 1.8 2000/12/08 14:41:16 alanh Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h,v 1.9 2001/01/06 20:19:10 tsi Exp $ */
- /*
- * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
- * VA Linux Systems Inc., Fremont, California.
-@@ -197,7 +197,6 @@
- unsigned long LinearAddr; /* Frame buffer physical address */
- unsigned long MMIOAddr; /* MMIO region physical address */
- unsigned long BIOSAddr; /* BIOS physical address */
-- Bool BIOSFromPCI; /* BIOS is read from PCI space */
-
- unsigned char *MMIO; /* Map of MMIO region */
- unsigned char *FB; /* Map of frame buffer */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v
-retrieving revision 1.9
-retrieving revision 1.10
-diff -u -r1.9 -r1.10
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2000/12/22 12:13:15 1.9
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2001/01/06 20:19:10 1.10
-@@ -496,7 +496,7 @@
- }
-
- /* Read the Video BIOS block and the FP registers (if applicable). */
--static Bool RADEONGetBIOSParameters(ScrnInfoPtr pScrn)
-+static Bool RADEONGetBIOSParameters(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
- {
- RADEONInfoPtr info = RADEONPTR(pScrn);
- #ifdef ENABLE_FLAT_PANEL
-@@ -523,16 +523,20 @@
- return FALSE;
- }
-
-- info->BIOSFromPCI = TRUE;
-- RADEONReadBIOS(0x0000, info->VBIOS, RADEON_VBIOS_SIZE);
-- if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
-- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-- "Video BIOS not detected in PCI space!\n");
-- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-- "Attempting to read Video BIOS from legacy ISA space!\n");
-- info->BIOSFromPCI = FALSE;
-- info->BIOSAddr = 0x000c0000;
-- RADEONReadBIOS(0x0000, info->VBIOS, RADEON_VBIOS_SIZE);
-+ if (pInt10) {
-+ info->BIOSAddr = pInt10->BIOSseg << 4;
-+ (void)memcpy(info->VBIOS, xf86int10Addr(pInt10, info->BIOSAddr),
-+ RADEON_VBIOS_SIZE);
-+ } else {
-+ xf86ReadPciBIOS(0, info->PciTag, 0, info->VBIOS, RADEON_VBIOS_SIZE);
-+ if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "Video BIOS not detected in PCI space!\n");
-+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-+ "Attempting to read Video BIOS from legacy ISA space!\n");
-+ info->BIOSAddr = 0x000c0000;
-+ xf86ReadBIOS(info->BIOSAddr, 0, info->VBIOS, RADEON_VBIOS_SIZE);
-+ }
- }
- if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
- info->BIOSAddr = 0x00000000;
-@@ -953,7 +957,7 @@
- return TRUE;
- }
-
--static Bool RADEONPreInitDDC(ScrnInfoPtr pScrn)
-+static Bool RADEONPreInitDDC(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
- {
- RADEONInfoPtr info = RADEONPTR(pScrn);
- vbeInfoPtr pVbe;
-@@ -961,7 +965,7 @@
- if (!xf86LoadSubModule(pScrn, "ddc")) return FALSE;
- xf86LoaderReqSymLists(ddcSymbols, NULL);
- if (xf86LoadSubModule(pScrn, "vbe")) {
-- pVbe = VBEInit(NULL,info->pEnt->index);
-+ pVbe = VBEInit(pInt10, info->pEnt->index);
- if (!pVbe) return FALSE;
-
- xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(pVbe,NULL)));
-@@ -1088,15 +1092,13 @@
- return TRUE;
- }
-
--static Bool RADEONPreInitInt10(ScrnInfoPtr pScrn)
-+static Bool RADEONPreInitInt10(ScrnInfoPtr pScrn, xf86Int10InfoPtr *ppInt10)
- {
- RADEONInfoPtr info = RADEONPTR(pScrn);
- #if 1
- if (xf86LoadSubModule(pScrn, "int10")) {
-- xf86Int10InfoPtr pInt;
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
-- pInt = xf86InitInt10(info->pEnt->index);
-- xf86FreeInt10(pInt);
-+ *ppInt10 = xf86InitInt10(info->pEnt->index);
- }
- #endif
- return TRUE;
-@@ -1237,7 +1239,8 @@
- /* RADEONPreInit is called once at server startup. */
- Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags)
- {
-- RADEONInfoPtr info;
-+ RADEONInfoPtr info;
-+ xf86Int10InfoPtr pInt10 = NULL;
-
- #ifdef XFree86LOADER
- /*
-@@ -1331,26 +1334,26 @@
- }
-
- if (!info->FBDev)
-- if (!RADEONPreInitInt10(pScrn)) goto fail;
-+ if (!RADEONPreInitInt10(pScrn, &pInt10)) goto fail;
-
-- if (!RADEONPreInitConfig(pScrn)) goto fail;
-+ if (!RADEONPreInitConfig(pScrn)) goto fail;
-
-- if (!RADEONGetBIOSParameters(pScrn)) goto fail;
-+ if (!RADEONGetBIOSParameters(pScrn, pInt10)) goto fail;
-
-- if (!RADEONGetPLLParameters(pScrn)) goto fail;
-+ if (!RADEONGetPLLParameters(pScrn)) goto fail;
-
-- if (!RADEONPreInitDDC(pScrn)) goto fail;
-+ if (!RADEONPreInitDDC(pScrn, pInt10)) goto fail;
-
-- if (!RADEONPreInitGamma(pScrn)) goto fail;
-+ if (!RADEONPreInitGamma(pScrn)) goto fail;
-
-- if (!RADEONPreInitModes(pScrn)) goto fail;
-+ if (!RADEONPreInitModes(pScrn)) goto fail;
-
-- if (!RADEONPreInitCursor(pScrn)) goto fail;
-+ if (!RADEONPreInitCursor(pScrn)) goto fail;
-
-- if (!RADEONPreInitAccel(pScrn)) goto fail;
-+ if (!RADEONPreInitAccel(pScrn)) goto fail;
-
- #ifdef XF86DRI
-- if (!RADEONPreInitDRI(pScrn)) goto fail;
-+ if (!RADEONPreInitDRI(pScrn)) goto fail;
- #endif
-
- /* Free the video bios (if applicable) */
-@@ -1359,6 +1362,10 @@
- info->VBIOS = NULL;
- }
-
-+ /* Free int10 info */
-+ if (pInt10)
-+ xf86FreeInt10(pInt10);
-+
- return TRUE;
-
- fail:
-@@ -1369,6 +1376,10 @@
- xfree(info->VBIOS);
- info->VBIOS = NULL;
- }
-+
-+ /* Free int10 info */
-+ if (pInt10)
-+ xf86FreeInt10(pInt10);
-
- vgaHWFreeHWRec(pScrn);
- RADEONFreeRec(pScrn);
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_misc.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_misc.c,v
-retrieving revision 1.2
-retrieving revision 1.3
-diff -u -r1.2 -r1.3
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_misc.c 2000/11/18 19:37:12 1.2
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_misc.c 2001/01/06 20:58:08 1.3
-@@ -1,6 +1,6 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_misc.c,v 1.2 2000/11/18 19:37:12 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_misc.c,v 1.3 2001/01/06 20:58:08 tsi Exp $ */
- /*
-- * Copyright 2000 by Marc Aurele La France (TSI @ UQV), tsi@ualberta.ca
-+ * Copyright 2000 through 2001 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c,v
-retrieving revision 1.5
-retrieving revision 1.6
-diff -u -r1.5 -r1.6
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c 2000/12/13 02:45:00 1.5
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c 2001/01/06 20:19:11 1.6
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c,v 1.5 2000/12/13 02:45:00 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c,v 1.6 2001/01/06 20:19:11 tsi Exp $ */
- /*
- * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
- * VA Linux Systems Inc., Fremont, California.
-@@ -73,6 +73,8 @@
- * Return options defined in the radeon submodule which will have been
- * loaded by this point.
- */
-+ if ((chipid >> 16) == PCI_VENDOR_ATI)
-+ chipid -= PCI_VENDOR_ATI << 16;
- for (i = 0; RADEONPciChipsets[i].PCIid > 0; i++) {
- if (chipid == RADEONPciChipsets[i].PCIid)
- return RADEONOptions;
-@@ -146,7 +148,7 @@
- pEnt = xf86GetEntityInfo(usedChips[i]);
-
- if (pEnt->active) {
-- ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
-+ ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
-
- #ifdef XFree86LOADER
- if (!xf86LoadSubModule(pScrn, "radeon")) {
-@@ -158,6 +160,7 @@
-
- xf86LoaderReqSymLists(RADEONSymbols, NULL);
-
-+#ifndef ELFDEBUG
- /* Workaround for possible loader bug */
- # define RADEONPreInit \
- (xf86PreInitProc*) LoaderSymbol("RADEONPreInit")
-@@ -175,6 +178,7 @@
- (xf86FreeScreenProc*) LoaderSymbol("RADEONFreeScreen")
- # define RADEONValidMode \
- (xf86ValidModeProc*) LoaderSymbol("RADEONValidMode")
-+#endif
-
- #endif
-
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/pcitweak.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/etc/pcitweak.c,v
-retrieving revision 1.14
-retrieving revision 1.15
-diff -u -r1.14 -r1.15
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/pcitweak.c 2000/08/10 17:40:34 1.14
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/pcitweak.c 2001/01/06 20:19:12 1.15
-@@ -5,7 +5,7 @@
- *
- * Author: David Dawes <dawes@xfree86.org>
- */
--/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/pcitweak.c,v 1.14 2000/08/10 17:40:34 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/pcitweak.c,v 1.15 2001/01/06 20:19:12 tsi Exp $ */
-
- #include "X.h"
- #include "os.h"
-@@ -31,6 +31,8 @@
- extern char *optarg;
- extern int optind, opterr;
- #endif
-+
-+pciVideoPtr *xf86PciVideoInfo = NULL;
-
- static void usage(void);
- static Bool parsePciBusString(const char *id, int *bus, int *device, int *func);
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/scanpci.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v
-retrieving revision 3.80
-retrieving revision 3.81
-diff -u -r3.80 -r3.81
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/scanpci.c 2000/06/20 19:38:04 3.80
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/scanpci.c 2001/01/06 20:19:12 3.81
-@@ -21,7 +21,7 @@
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
--/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.80 2000/06/20 19:38:04 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.81 2001/01/06 20:19:12 tsi Exp $ */
-
- #include "X.h"
- #include "os.h"
-@@ -47,6 +47,8 @@
- extern char *optarg;
- extern int optind, opterr;
- #endif
-+
-+pciVideoPtr *xf86PciVideoInfo = NULL;
-
- void usage(void);
- void identify_card(pciConfigPtr pcr, int verbose);
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/generic.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/generic.c,v
-retrieving revision 1.13
-retrieving revision 1.14
-diff -u -r1.13 -r1.14
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/generic.c 2000/11/21 23:10:38 1.13
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/generic.c 2001/01/06 20:19:13 1.14
-@@ -1,11 +1,10 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/generic.c,v 1.13 2000/11/21 23:10:38 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/generic.c,v 1.14 2001/01/06 20:19:13 tsi Exp $ */
- /*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
- * Copyright 1999 Egbert Eich
- */
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_OSproc.h"
- #include "xf86_ansic.h"
- #include "xf86Pci.h"
-@@ -61,20 +60,19 @@
- void* base = 0;
- void* vbiosMem = 0;
- legacyVGARec vga;
--
-+
- screen = (xf86FindScreenForEntity(entityIndex))->scrnIndex;
--
-+
- if (int10skip(xf86Screens[screen],entityIndex))
- return NULL;
-
-- pInt = (xf86Int10InfoPtr)xnfcalloc(1,sizeof(xf86Int10InfoRec));
-+ pInt = (xf86Int10InfoPtr)xnfcalloc(1, sizeof(xf86Int10InfoRec));
- pInt->entityIndex = entityIndex;
- if (!xf86Int10ExecSetup(pInt))
- goto error0;
- pInt->mem = &genericMem;
-- pInt->private = (pointer)xnfcalloc(1,sizeof(genericInt10Priv));
-- INTPriv(pInt)->alloc =
-- (pointer)xnfcalloc(1,ALLOC_ENTRIES(getpagesize()));
-+ pInt->private = (pointer)xnfcalloc(1, sizeof(genericInt10Priv));
-+ INTPriv(pInt)->alloc = (pointer)xnfcalloc(1, ALLOC_ENTRIES(getpagesize()));
- pInt->scrnIndex = screen;
- base = INTPriv(pInt)->base = xnfalloc(SYS_BIOS);
-
-@@ -85,11 +83,11 @@
- MapVRam(pInt);
- #ifdef _PC
- if (!sysMem)
-- sysMem = xf86MapVidMem(screen,VIDMEM_FRAMEBUFFER,SYS_BIOS,BIOS_SIZE);
-+ sysMem = xf86MapVidMem(screen, VIDMEM_FRAMEBUFFER, SYS_BIOS, BIOS_SIZE);
- INTPriv(pInt)->sysMem = sysMem;
--
-- if (xf86ReadBIOS(0,0,(unsigned char *)base,LOW_PAGE_SIZE) < 0) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot read int vect\n");
-+
-+ if (xf86ReadBIOS(0, 0, base, LOW_PAGE_SIZE) < 0) {
-+ xf86DrvMsg(screen, X_ERROR, "Cannot read int vect\n");
- goto error1;
- }
-
-@@ -106,74 +104,79 @@
- "Unable to retrieve all of segment 0x%06X.\n", cs);
-
- if (xf86IsEntityPrimary(entityIndex)) {
-- cs = MEM_RW(pInt,((0x10<<2)+2));
-+ cs = MEM_RW(pInt, (0x10 << 2) + 2);
-
- vbiosMem = (unsigned char *)base + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
-- cs = MEM_RW(pInt,((0x42<<2)+2));
-+ cs = MEM_RW(pInt, (0x42 << 2) + 2);
- vbiosMem = (unsigned char *)base + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
- cs = V_BIOS >> 4;
- vbiosMem = (unsigned char *)base + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
-- xf86DrvMsg(screen,X_ERROR,"No V_BIOS found\n");
-+ xf86DrvMsg(screen, X_ERROR, "No V_BIOS found\n");
- goto error1;
- }
- }
- }
-- xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
--
-+ xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%x\n", cs);
-+
- set_return_trap(pInt);
- pInt->BIOSseg = cs;
- } else {
-- reset_int_vect(pInt);
-+ reset_int_vect(pInt);
- set_return_trap(pInt);
- vbiosMem = (unsigned char *)base + V_BIOS;
-- if (!mapPciRom(pInt,(unsigned char *)(vbiosMem))) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (3)\n");
-+ if (!mapPciRom(pInt, vbiosMem)) {
-+ xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS (3)\n");
- goto error1;
- }
- pInt->BIOSseg = V_BIOS >> 4;
- pInt->num = 0xe6;
-- LockLegacyVGA(screen, &vga);
-+ LockLegacyVGA(screen, &vga);
- xf86ExecX86int10(pInt);
- UnlockLegacyVGA(screen, &vga);
- }
- #else
- if (!sysMem) {
- sysMem = xnfalloc(BIOS_SIZE);
-- setup_system_bios((memType)sysMem);
-+ setup_system_bios(sysMem);
- }
- INTPriv(pInt)->sysMem = sysMem;
- setup_int_vect(pInt);
- set_return_trap(pInt);
-- vbiosMem = (unsigned char *)base + V_BIOS;
-- {
-- EntityInfoPtr pEnt = xf86GetEntityInfo(pInt->entityIndex);
-- switch (pEnt->location.type) {
-- case BUS_PCI:
-- if (!mapPciRom(pInt,(unsigned char *)(vbiosMem))) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (4)\n");
-- goto error1;
-- }
-- break;
-- case BUS_ISA:
-- (void)memset(vbiosMem, 0, V_BIOS_SIZE);
-- if (xf86ReadBIOS(V_BIOS, 0, vbiosMem, V_BIOS_SIZE) < V_BIOS_SIZE)
-- xf86DrvMsg(screen, X_WARNING,
-- "Unable to retrieve all of segment 0x0C0000.\n");
-- if (!int10_check_bios(screen, V_BIOS >> 4, vbiosMem)) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (5)\n");
-- goto error1;
-- }
-- break;
-- default:
-+
-+ /*
-+ * Retrieve two segments: one at V_BIOS, the other 64kB beyond the first.
-+ * This'll catch any BIOS that might have been initialised before server
-+ * entry.
-+ */
-+ vbiosMem = (char *)base + V_BIOS;
-+ (void)memset(vbiosMem, 0, 2 * V_BIOS_SIZE);
-+ if (xf86ReadBIOS(V_BIOS, 0, vbiosMem, V_BIOS_SIZE) < V_BIOS_SIZE)
-+ xf86DrvMsg(screen, X_WARNING,
-+ "Unable to retrieve all of segment 0x0C0000.\n");
-+ else if (((unsigned char *)vbiosMem)[2] > 0x80)
-+ if (xf86ReadBIOS(V_BIOS + V_BIOS_SIZE, 0,
-+ (unsigned char *)vbiosMem + V_BIOS_SIZE, V_BIOS_SIZE) < V_BIOS_SIZE)
-+ xf86DrvMsg(screen, X_WARNING,
-+ "Unable to retrieve all of segment 0x0D0000.\n");
-+
-+ /*
-+ * If this adapter is the primary, use its post-init BIOS (if we can find
-+ * it).
-+ */
-+ if (!xf86IsEntityPrimary(entityIndex) ||
-+ !int10_check_bios(screen, V_BIOS >> 4, vbiosMem)) {
-+ if (!mapPciRom(pInt, vbiosMem)) {
-+ xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS (4)\n");
- goto error1;
- }
- }
-+
- pInt->BIOSseg = V_BIOS >> 4;
- pInt->num = 0xe6;
-- LockLegacyVGA(screen, &vga);
-+ LockLegacyVGA(screen, &vga);
- xf86ExecX86int10(pInt);
- UnlockLegacyVGA(screen, &vga);
- #endif
-@@ -197,17 +200,17 @@
- int pagesize = getpagesize();
- int size = ((VRAM_SIZE + pagesize - 1)/pagesize) * pagesize;
-
-- INTPriv(pInt)->vRam = xf86MapVidMem(screen,VIDMEM_MMIO,V_RAM,size);
-+ INTPriv(pInt)->vRam = xf86MapVidMem(screen, VIDMEM_MMIO, V_RAM, size);
- }
-
--static void
-+static void
- UnmapVRam(xf86Int10InfoPtr pInt)
- {
- int screen = pInt->scrnIndex;
- int pagesize = getpagesize();
- int size = ((VRAM_SIZE + pagesize - 1)/pagesize) * pagesize;
-
-- xf86UnMapVidMem(screen,INTPriv(pInt)->vRam,size);
-+ xf86UnMapVidMem(screen, INTPriv(pInt)->vRam, size);
- }
-
- void
-@@ -221,7 +224,7 @@
- {
- if (!pInt)
- return;
-- if (Int10Current == pInt)
-+ if (Int10Current == pInt)
- Int10Current = NULL;
- xfree(INTPriv(pInt)->base);
- UnmapVRam(pInt);
-@@ -231,83 +234,79 @@
- }
-
- void *
--xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off)
-+xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off)
- {
- int pagesize = getpagesize();
- int num_pages = ALLOC_ENTRIES(pagesize);
- int i,j;
-
-- for (i=0;i<num_pages - num;i++) {
-+ for (i = 0; i < (num_pages - num); i++) {
- if (INTPriv(pInt)->alloc[i] == 0) {
-- for (j=i;j < num + i;j++)
-+ for (j = i; j < (num + i); j++)
- if (INTPriv(pInt)->alloc[j] != 0)
- break;
-- if (j == num + i)
-+ if (j == (num + i))
- break;
-- else
-- i = i + num;
-+ i += num;
- }
- }
-- if (i == num_pages - num)
-+ if (i == (num_pages - num))
- return NULL;
--
-- for (j = i; j < i + num; j++)
-+
-+ for (j = i; j < (i + num); j++)
- INTPriv(pInt)->alloc[j] = 1;
-
- *off = (i + 1) * pagesize;
--
-- return (void *)
-- ((char*)INTPriv(pInt)->base + (i + 1) * pagesize);
-+
-+ return (char *)INTPriv(pInt)->base + *off;
- }
-
- void
- xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
- {
- int pagesize = getpagesize();
-- int first = ((unsigned long)pbase
-- - (unsigned long)INTPriv(pInt)->base)
-- / pagesize - 1;
-+ int first = (((char *)pbase - (char *)INTPriv(pInt)->base) / pagesize) - 1;
- int i;
-
-- for (i = first; i < first + num; i++)
-+ for (i = first; i < (first + num); i++)
- INTPriv(pInt)->alloc[i] = 0;
- }
-
- #define OFF(addr) ((addr) & 0xffff)
- #define SYS(addr) ((addr) >= SYS_BIOS)
- #define V_ADDR(addr) \
-- (SYS(addr) ? ((char*)INTPriv(pInt)->sysMem) + (addr - SYS_BIOS) \
-- : ((char*)(INTPriv(pInt)->base) + addr))
-+ (SYS(addr) ? ((char*)INTPriv(pInt)->sysMem) + (addr - SYS_BIOS) \
-+ : ((char*)(INTPriv(pInt)->base) + addr))
- #define VRAM_ADDR(addr) (addr - V_RAM)
- #define VRAM_BASE (INTPriv(pInt)->vRam)
-
- #define VRAM(addr) ((addr >= V_RAM) && (addr < (V_RAM + VRAM_SIZE)))
- #define V_ADDR_RB(addr) \
-- (VRAM(addr)) ? MMIO_IN8((CARD8*)VRAM_BASE,VRAM_ADDR(addr)) \
-- : *(CARD8*) V_ADDR(addr)
-+ (VRAM(addr)) ? MMIO_IN8((CARD8*)VRAM_BASE,VRAM_ADDR(addr)) \
-+ : *(CARD8*) V_ADDR(addr)
- #define V_ADDR_RW(addr) \
-- (VRAM(addr)) ? MMIO_IN16((CARD16*)VRAM_BASE,VRAM_ADDR(addr)) \
-- : ldw_u((pointer)V_ADDR(addr))
-+ (VRAM(addr)) ? MMIO_IN16((CARD16*)VRAM_BASE,VRAM_ADDR(addr)) \
-+ : ldw_u((pointer)V_ADDR(addr))
- #define V_ADDR_RL(addr) \
-- (VRAM(addr)) ? MMIO_IN32((CARD32*)VRAM_BASE,VRAM_ADDR(addr)) \
-- : ldl_u((pointer)V_ADDR(addr))
-+ (VRAM(addr)) ? MMIO_IN32((CARD32*)VRAM_BASE,VRAM_ADDR(addr)) \
-+ : ldl_u((pointer)V_ADDR(addr))
-
- #define V_ADDR_WB(addr,val) \
-- if(VRAM(addr)) \
-- MMIO_OUT8((CARD8*)VRAM_BASE,VRAM_ADDR(addr),val); \
-- else \
-- *(CARD8*) V_ADDR(addr) = val;
-+ if(VRAM(addr)) \
-+ MMIO_OUT8((CARD8*)VRAM_BASE,VRAM_ADDR(addr),val); \
-+ else \
-+ *(CARD8*) V_ADDR(addr) = val;
- #define V_ADDR_WW(addr,val) \
-- if(VRAM(addr)) \
-- MMIO_OUT16((CARD16*)VRAM_BASE,VRAM_ADDR(addr),val); \
-- else \
-- stw_u((val),(pointer)(V_ADDR(addr)));
-+ if(VRAM(addr)) \
-+ MMIO_OUT16((CARD16*)VRAM_BASE,VRAM_ADDR(addr),val); \
-+ else \
-+ stw_u((val),(pointer)(V_ADDR(addr)));
-
- #define V_ADDR_WL(addr,val) \
-- if (VRAM(addr)) \
-- MMIO_OUT32((CARD32*)VRAM_BASE,VRAM_ADDR(addr),val); \
-- else \
-- stl_u(val,(pointer)(V_ADDR(addr)));
-+ if (VRAM(addr)) \
-+ MMIO_OUT32((CARD32*)VRAM_BASE,VRAM_ADDR(addr),val); \
-+ else \
-+ stl_u(val,(pointer)(V_ADDR(addr)));
-
- static CARD8
- read_b(xf86Int10InfoPtr pInt, int addr)
-@@ -318,37 +317,24 @@
- static CARD16
- read_w(xf86Int10InfoPtr pInt, int addr)
- {
--#if X_BYTE_ORDER == X_BIG_ENDIAN
-- return ((V_ADDR_RB(addr))
-- || ((V_ADDR_RB(addr + 1)) << 8));
--#else
-- if (OFF(addr + 1) > 0) {
-+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
-+ if (OFF(addr + 1) > 0)
- return V_ADDR_RW(addr);
-- } else
-- return ((V_ADDR_RB(addr + 1))
-- || ((V_ADDR_RB(addr)) << 8));
--
- #endif
-+ return V_ADDR_RB(addr) | (V_ADDR_RB(addr + 1) << 8);
- }
-
- static CARD32
- read_l(xf86Int10InfoPtr pInt, int addr)
- {
--#if X_BYTE_ORDER == X_BIG_ENDIAN
-- return ((V_ADDR_RB(addr))
-- || ((V_ADDR_RB(addr + 1)) << 8)
-- || ((V_ADDR_RB(addr + 2)) << 16)
-- || ((V_ADDR_RB(addr + 3)) << 24));
--#else
-- if (OFF(addr + 3) > 2) {
-+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
-+ if (OFF(addr + 3) > 2)
- return V_ADDR_RL(addr);
-- } else {
-- return ((V_ADDR_RB(addr + 3))
-- || ((V_ADDR_RB(addr + 2)) << 8)
-- || ((V_ADDR_RB(addr + 1)) << 16)
-- || ((V_ADDR_RB(addr)) << 24));
-- }
- #endif
-+ return V_ADDR_RB(addr) |
-+ (V_ADDR_RB(addr + 1) << 8) |
-+ (V_ADDR_RB(addr + 2) << 16) |
-+ (V_ADDR_RB(addr + 3) << 24);
- }
-
- static void
-@@ -360,49 +346,29 @@
- static void
- write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val)
- {
--#if X_BYTE_ORDER == X_BIG_ENDIAN
-- V_ADDR_WB(addr,val);
-- V_ADDR_WB(addr + 1,val >> 8);
--#else
-- if (OFF(addr + 1) > 0) {
-- V_ADDR_WW(addr,val);
-- } else {
-- V_ADDR_WB(addr + 1,val);
-- V_ADDR_WB(addr,val >> 8);
-- }
-+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
-+ if (OFF(addr + 1) > 0)
-+ V_ADDR_WW(addr, val);
- #endif
-+ V_ADDR_WB(addr, val);
-+ V_ADDR_WB(addr + 1, val >> 8);
- }
-
- static void
- write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val)
- {
--#if X_BYTE_ORDER == X_BIG_ENDIAN
-- V_ADDR_WB(addr,val);
-+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
-+ if (OFF(addr + 3) > 2)
-+ V_ADDR_WL(addr, val);
-+#endif
-+ V_ADDR_WB(addr, val);
- V_ADDR_WB(addr + 1, val >> 8);
- V_ADDR_WB(addr + 2, val >> 16);
- V_ADDR_WB(addr + 3, val >> 24);
--#else
-- if (OFF(addr + 3) > 2) {
-- V_ADDR_WL(addr,val);
-- } else {
-- V_ADDR_WB(addr + 3, val);
-- V_ADDR_WB(addr + 2, val >> 8);
-- V_ADDR_WB(addr + 1, val >> 16);
-- V_ADDR_WB(addr, val >> 24);
-- }
--#endif
- }
-
- pointer
- xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr)
- {
-- return (pointer) V_ADDR(addr);
-+ return V_ADDR(addr);
- }
--
--
--
--
--
--
--
--
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/helper_exec.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/helper_exec.c,v
-retrieving revision 1.11
-retrieving revision 1.12
-diff -u -r1.11 -r1.12
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/helper_exec.c 2000/12/06 15:35:26 1.11
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/helper_exec.c 2001/01/06 20:19:13 1.12
-@@ -1,12 +1,12 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/helper_exec.c,v 1.11 2000/12/06 15:35:26 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/helper_exec.c,v 1.12 2001/01/06 20:19:13 tsi Exp $ */
- /*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
- * Copyright 1999 Egbert Eich
- *
-- * Part of this is based on code taken form DOSEMU
-+ * Part of this is based on code taken from DOSEMU
- * (C) Copyright 1992, ..., 1999 the "DOSEMU-Development-Team"
-- */
-+ */
-
- /*
- * To debug port accesses define PRINT_PORT.
-@@ -15,7 +15,6 @@
- * on PIO.
- */
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_OSproc.h"
- #include "xf86_ansic.h"
- #include "compiler.h"
-@@ -44,17 +43,15 @@
- X86_EDX = (CARD32) pInt->dx;
- X86_ESI = (CARD32) pInt->si;
- X86_EDI = (CARD32) pInt->di;
-- X86_ES = (CARD32) pInt->es;
- X86_EBP = (CARD32) pInt->bp;
-- X86_EIP = 0;
-- X86_CS = 0x60; /* address of 'hlt' */
-- X86_ESP = 0x100;
-- X86_SS = 0x30; /* This is the standard pc bios stack */
-- X86_DS = 0x40; /* standard pc ds */
-+ X86_ESP = 0x1000; X86_SS = pInt->stackseg >> 4;
-+ X86_EIP = 0x0600; X86_CS = 0x0; /* address of 'hlt' */
-+ X86_DS = 0x40; /* standard pc ds */
-+ X86_ES = pInt->es;
- X86_FS = 0;
- X86_GS = 0;
-- X86_EFLAGS = (X86_IF_MASK | X86_IOPL_MASK);
--
-+ X86_EFLAGS = X86_IF_MASK | X86_IOPL_MASK;
-+
- return xf86BlockSIGIO();
- }
-
-@@ -68,188 +65,23 @@
- pInt->dx = (CARD16) X86_EDX;
- pInt->si = (CARD16) X86_ESI;
- pInt->di = (CARD16) X86_EDI;
-+ pInt->es = (CARD16) X86_ES;
- pInt->bp = (CARD16) X86_EBP;
- pInt->flags = (CARD16) X86_FLAGS;
- }
-
--#define SEG_ADR(type, seg, reg) type((seg << 4) \
-- + (X86_##reg))
--#define SEG_EADR(type, seg, reg) type((seg << 4) \
-- + (X86_E##reg))
--#ifndef _X86EMU
--/* get the linear address */
--#define LIN_PREF_SI ((pref_seg << 4) + X86_SI)
--#define LWECX (prefix66 ^ prefix67 ? X86_ECX : X86_CX)
--#define LWECX_ZERO {if (prefix66 ^ prefix67) X86_ECX = 0; else X86_CX = 0;}
--#define DF (1 << 10)
--
--
--/* vm86 fault handling */
--Bool
--vm86_GP_fault(xf86Int10InfoPtr pInt)
--{
-- unsigned char *csp, *lina;
-- CARD32 org_eip;
-- int pref_seg;
-- int done,is_rep,prefix66,prefix67;
--
--
-- csp = lina = SEG_ADR((unsigned char *), X86_CS, IP);
--
-- is_rep = 0;
-- prefix66 = prefix67 = 0;
-- pref_seg = -1;
--
-- /* eat up prefixes */
-- done = 0;
-- do {
-- switch (MEM_RB(pInt,(int)csp++)) {
-- case 0x66: /* operand prefix */ prefix66=1; break;
-- case 0x67: /* address prefix */ prefix67=1; break;
-- case 0x2e: /* CS */ pref_seg=X86_CS; break;
-- case 0x3e: /* DS */ pref_seg=X86_DS; break;
-- case 0x26: /* ES */ pref_seg=X86_ES; break;
-- case 0x36: /* SS */ pref_seg=X86_SS; break;
-- case 0x65: /* GS */ pref_seg=X86_GS; break;
-- case 0x64: /* FS */ pref_seg=X86_FS; break;
-- case 0xf2: /* repnz */
-- case 0xf3: /* rep */ is_rep=1; break;
-- default: done=1;
-- }
-- } while (!done);
-- csp--; /* oops one too many */
-- org_eip = X86_EIP;
-- X86_IP += (csp - lina);
--
-- switch (MEM_RB(pInt,(int)csp)) {
-- case 0x6c: /* insb */
-- /* NOTE: ES can't be overwritten; prefixes 66,67 should use esi,edi,ecx
-- * but is anyone using extended regs in real mode? */
-- /* WARNING: no test for DI wrapping! */
-- X86_EDI += port_rep_inb(pInt,X86_DX,SEG_EADR((CARD32),X86_ES,DI),
-- X86_FLAGS & DF, (is_rep? LWECX:1));
-- if (is_rep) LWECX_ZERO;
-- X86_IP++;
-- break;
--
-- case 0x6d: /* (rep) insw / insd */
-- /* NOTE: ES can't be overwritten */
-- /* WARNING: no test for _DI wrapping! */
-- if (prefix66) {
-- X86_DI += port_rep_inl(pInt,X86_DX,SEG_ADR((CARD32),X86_ES,DI),
-- X86_EFLAGS & DF, (is_rep? LWECX:1));
-- }
-- else {
-- X86_DI += port_rep_inw(pInt,X86_DX,SEG_ADR((CARD32),X86_ES,DI),
-- X86_FLAGS & DF, (is_rep? LWECX:1));
-- }
-- if (is_rep) LWECX_ZERO;
-- X86_IP++;
-- break;
--
-- case 0x6e: /* (rep) outsb */
-- if (pref_seg < 0) pref_seg = X86_DS;
-- /* WARNING: no test for _SI wrapping! */
-- X86_SI += port_rep_outb(pInt,X86_DX,(CARD32)LIN_PREF_SI, X86_FLAGS&DF,
-- (is_rep? LWECX:1));
-- if (is_rep) LWECX_ZERO;
-- X86_IP++;
-- break;
--
-- case 0x6f: /* (rep) outsw / outsd */
-- if (pref_seg < 0) pref_seg = X86_DS;
-- /* WARNING: no test for _SI wrapping! */
-- if (prefix66) {
-- X86_SI += port_rep_outl(pInt,X86_DX,(CARD32)LIN_PREF_SI,
-- X86_EFLAGS&DF, (is_rep? LWECX:1));
-- }
-- else {
-- X86_SI += port_rep_outw(pInt,X86_DX,(CARD32)LIN_PREF_SI,
-- X86_FLAGS & DF, (is_rep? LWECX:1));
-- }
-- if (is_rep) LWECX_ZERO;
-- X86_IP++;
-- break;
--
-- case 0xe5: /* inw xx, inl xx */
-- if (prefix66) X86_EAX = p_inl((int) MEM_RB(pInt,(int)(csp+1)));
-- else X86_AX = p_inw((int) (int)(csp[1]));
-- X86_IP += 2;
-- break;
-- case 0xe4: /* inb xx */
-- X86_AX &= ~(CARD32)0xff;
-- X86_AL |= p_inb((int) MEM_RB(pInt,(int)(csp+1)));
-- X86_IP += 2;
-- break;
-- case 0xed: /* inw dx, inl dx */
-- if (prefix66) X86_EAX = p_inl(X86_EDX);
-- else X86_AX = p_inw(X86_DX);
-- X86_IP += 1;
-- break;
-- case 0xec: /* inb dx */
-- X86_AX &= ~(CARD32)0xff;
-- X86_AL |= p_inb(X86_DX);
-- X86_IP += 1;
-- break;
--
-- case 0xe7: /* outw xx */
-- if (prefix66) p_outl((int)MEM_RB(pInt,(int)(csp+1)), X86_EAX);
-- else p_outw((int)MEM_RB(pInt,(int)(csp+1)), X86_AX);
-- X86_IP += 2;
-- break;
-- case 0xe6: /* outb xx */
-- p_outb((int) MEM_RB(pInt,(int)(csp+1)), X86_AL);
-- X86_IP += 2;
-- break;
-- case 0xef: /* outw dx */
-- if (prefix66) p_outl(X86_DX, X86_EAX);
-- else p_outw(X86_DX, X86_AX);
-- X86_IP += 1;
-- break;
-- case 0xee: /* outb dx */
-- p_outb(X86_DX, X86_AL);
-- X86_IP += 1;
-- break;
--
-- case 0xf4:
--#ifdef DEBUG
-- ErrorF("hlt at %p\n", lina);
--#endif
-- return FALSE;
--
-- case 0x0f:
-- xf86DrvMsg(pInt->scrnIndex,
-- X_ERROR,"CPU 0x0f Trap at eip=0x%lx\n",X86_EIP);
-- goto op0ferr;
-- break;
--
-- case 0xf0: /* lock */
-- default:
-- xf86DrvMsg(pInt->scrnIndex,X_ERROR,"unknown reason for exception\n");
-- dump_registers(pInt);
-- stack_trace(pInt);
--
-- op0ferr:
-- dump_code(pInt);
-- xf86DrvMsg(pInt->scrnIndex,X_ERROR,"cannot continue\n");
-- return FALSE;
-- } /* end of switch() */
-- return TRUE;
--}
--#endif
--
- /* general software interrupt handler */
- CARD32
- getIntVect(xf86Int10InfoPtr pInt,int num)
- {
-- return (MEM_RW(pInt,(num << 2)) + (MEM_RW(pInt,((num << 2) + 2)) << 4));
-+ return MEM_RW(pInt, num << 2) + (MEM_RW(pInt, (num << 2) + 2) << 4);
- }
-
- void
- pushw(xf86Int10InfoPtr pInt, CARD16 val)
- {
- X86_ESP -= 2;
-- MEM_WW(pInt,((CARD32) X86_SS << 4) + X86_SP,val);
-+ MEM_WW(pInt, ((CARD32) X86_SS << 4) + X86_SP, val);
- }
-
- int
-@@ -258,11 +90,11 @@
- CARD32 eflags;
- #ifndef _PC
- /* check if bios vector is initialized */
-- if (MEM_RW(pInt,(num<<2)+2) == (SYS_BIOS >> 4)) { /* SYS_BIOS_SEG ?*/
-+ if (MEM_RW(pInt, (num << 2) + 2) == (SYS_BIOS >> 4)) { /* SYS_BIOS_SEG ?*/
- #ifdef PRINT_INT
-- ErrorF("card BIOS not loaded\n");
-+ ErrorF("card BIOS not loaded\n");
- #endif
-- return 0;
-+ return 0;
- }
- #endif
- #ifdef PRINT_INT
-@@ -275,11 +107,11 @@
- #endif
- pushw(pInt, eflags);
- pushw(pInt, X86_CS);
-- pushw(pInt, (CARD16)X86_EIP);
-- X86_CS = MEM_RW(pInt,((num << 2) + 2));
-- X86_EIP = (X86_EIP & 0xFFFF0000) | MEM_RW(pInt,(num << 2));
-+ pushw(pInt, X86_IP);
-+ X86_CS = MEM_RW(pInt, (num << 2) + 2);
-+ X86_IP = MEM_RW(pInt, num << 2);
- #ifdef PRINT_INT
-- ErrorF("0x%x:%lx\n",X86_CS,X86_EIP);
-+ ErrorF("0x%x:%lx\n", X86_CS, X86_EIP);
- #endif
- return 1;
- }
-@@ -291,52 +123,50 @@
- int i;
- CARD32 lina = SEG_ADR((CARD32), X86_CS, IP);
-
-- ErrorF("code at 0x%8.8lx: ",lina);
-- for (i=0; i<0x10; i++)
-- ErrorF("%2.2x ",MEM_RB(pInt,lina + i));
-- ErrorF("\n ");
-- for (; i<0x20; i++)
-- ErrorF("%2.2x ",MEM_RB(pInt,lina + i));
-- ErrorF("\n");
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3, "code at 0x%8.8lx:\n", lina);
-+ for (i=0; i<0x10; i++)
-+ xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i));
-+ xf86ErrorFVerb(3, "\n");
-+ for (; i<0x20; i++)
-+ xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i));
-+ xf86ErrorFVerb(3, "\n");
- }
-
--#define PRINT(x) ErrorF(#x":%4.4x ",x)
--#define PRINT_FLAGS(x) ErrorF(#x":%8.8x ",x)
- void
- dump_registers(xf86Int10InfoPtr pInt)
- {
-- PRINT(X86_AX);
-- PRINT(X86_BX);
-- PRINT(X86_CX);
-- PRINT(X86_DX);
-- ErrorF("\n");
-- PRINT(X86_IP);
-- PRINT(X86_SI);
-- PRINT(X86_DI);
-- PRINT(X86_BP);
-- PRINT(X86_SP);
-- ErrorF("\n");
-- PRINT(X86_CS);
-- PRINT(X86_SS);
-- PRINT(X86_ES);
-- PRINT(X86_DS);
-- PRINT(X86_FS);
-- PRINT(X86_GS);
-- ErrorF("\n");
-- PRINT_FLAGS(X86_EFLAGS);
-- ErrorF("\n");
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
-+ "EAX=0x%8.8x, EBX=0x%8.8x, ECX=0x%8.8x, EDX=0x%8.8x\n",
-+ X86_EAX, X86_EBX, X86_ECX, X86_EDX);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
-+ "ESP=0x%8.8x, EBP=0x%8.8x, ESI=0x%8.8x, EDI=0x%8.8x\n",
-+ X86_ESP, X86_EBP, X86_ESI, X86_EDI);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
-+ "CS=0x%4.4x, SS=0x%4.4x,"
-+ " DS=0x%4.4x, ES=0x%4.4x, FS=0x%4.4x, GS=0x%4.4x\n",
-+ X86_CS, X86_SS, X86_DS, X86_ES, X86_FS, X86_GS);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
-+ "EIP=0x%8.8x, EFLAGS=0x%8.8x\n", X86_EIP, X86_EFLAGS);
- }
-
- void
- stack_trace(xf86Int10InfoPtr pInt)
- {
-- int i;
-- CARD32 stack = SEG_ADR((CARD32), X86_SS, SP);
--
-- ErrorF("stack at 0x%8.8lx:\n",stack);
-- for (i=0; i < 0x10; i++)
-- ErrorF("%2.2x ",MEM_RB(pInt,stack + i));
-- ErrorF("\n");
-+ int i = 0;
-+ CARD32 stack = SEG_ADR((CARD32), X86_SS, SP);
-+ CARD32 tail = (CARD32)((X86_SS << 4) + 0x1000);
-+
-+ if (stack >= tail) return;
-+
-+ xf86MsgVerb(X_INFO, 3, "stack at 0x%8.8lx:\n", stack);
-+ for (; stack < tail; stack++) {
-+ xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, stack));
-+ i = (i + 1) % 0x10;
-+ if (!i)
-+ xf86ErrorFVerb(3, "\n");
-+ }
-+ if (i)
-+ xf86ErrorFVerb(3, "\n");
- }
-
- int
-@@ -347,13 +177,13 @@
- CARD32 dst = base;
- #ifdef PRINT_PORT
- ErrorF(" rep_insb(%#x) %d bytes at %p %s\n",
-- port, count, base, d_f?"up":"down");
-+ port, count, base, d_f ? "up" : "down");
- #endif
- while (count--) {
-- MEM_WB(pInt,dst,inb(port));
-+ MEM_WB(pInt, dst, x_inb(port));
- dst += inc;
- }
-- return (dst-base);
-+ return dst - base;
- }
-
- int
-@@ -362,15 +192,15 @@
- {
- register int inc = d_f ? -2 : 2;
- CARD32 dst = base;
--#ifdef PRINT_PORT
-+#ifdef PRINT_PORT
- ErrorF(" rep_insw(%#x) %d bytes at %p %s\n",
-- port, count, base, d_f?"up":"down");
-+ port, count, base, d_f ? "up" : "down");
- #endif
- while (count--) {
-- MEM_WW(pInt,dst,inw(port));
-+ MEM_WW(pInt, dst, x_inw(port));
- dst += inc;
- }
-- return (dst-base);
-+ return dst - base;
- }
-
- int
-@@ -379,15 +209,15 @@
- {
- register int inc = d_f ? -4 : 4;
- CARD32 dst = base;
--#ifdef PRINT_PORT
-+#ifdef PRINT_PORT
- ErrorF(" rep_insl(%#x) %d bytes at %p %s\n",
-- port, count, base, d_f?"up":"down");
-+ port, count, base, d_f ? "up" : "down");
- #endif
- while (count--) {
-- MEM_WL(pInt,dst,inl(port));
-+ MEM_WL(pInt, dst, x_inl(port));
- dst += inc;
- }
-- return (dst-base);
-+ return dst - base;
- }
-
- int
-@@ -396,15 +226,15 @@
- {
- register int inc = d_f ? -1 : 1;
- CARD32 dst = base;
--#ifdef PRINT_PORT
-+#ifdef PRINT_PORT
- ErrorF(" rep_outb(%#x) %d bytes at %p %s\n",
-- port, count, base, d_f?"up":"down");
-+ port, count, base, d_f ? "up" : "down");
- #endif
- while (count--) {
-- outb(port,MEM_RB(pInt,dst));
-+ x_outb(port, MEM_RB(pInt, dst));
- dst += inc;
- }
-- return (dst-base);
-+ return dst - base;
- }
-
- int
-@@ -413,15 +243,15 @@
- {
- register int inc = d_f ? -2 : 2;
- CARD32 dst = base;
--#ifdef PRINT_PORT
-+#ifdef PRINT_PORT
- ErrorF(" rep_outw(%#x) %d bytes at %p %s\n",
-- port, count, base, d_f?"up":"down");
-+ port, count, base, d_f ? "up" : "down");
- #endif
- while (count--) {
-- outw(port,MEM_RW(pInt,dst));
-+ x_outw(port, MEM_RW(pInt, dst));
- dst += inc;
- }
-- return (dst-base);
-+ return dst - base;
- }
-
- int
-@@ -430,27 +260,36 @@
- {
- register int inc = d_f ? -4 : 4;
- CARD32 dst = base;
--#ifdef PRINT_PORT
-+#ifdef PRINT_PORT
- ErrorF(" rep_outl(%#x) %d bytes at %p %s\n",
-- port, count, base, d_f?"up":"down");
-+ port, count, base, d_f ? "up" : "down");
- #endif
- while (count--) {
-- outl(port,MEM_RL(pInt,dst));
-+ x_outl(port, MEM_RL(pInt, dst));
- dst += inc;
- }
-- return (dst-base);
-+ return dst - base;
- }
-
--#if defined(PRINT_PORT) || (!defined(_PC) && !defined(_PC_IO))
- CARD8
- x_inb(CARD16 port)
- {
- CARD8 val;
-
-- val = inb(port);
--#ifdef PRINT_PORT
-- ErrorF(" inb(%#x) = %2.2x\n",port,val);
-+ if (port >= 0x0100) { /* Don't interfere with mainboard */
-+ val = inb(port);
-+#ifdef PRINT_PORT
-+ ErrorF(" inb(%#x) = %2.2x\n", port, val);
- #endif
-+ } else {
-+ val = 0;
-+ xf86DrvMsgVerb(Int10Current->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "inb 0x%4.4x\n", port);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(Int10Current);
-+ stack_trace(Int10Current);
-+ }
-+ }
- return val;
- }
-
-@@ -460,8 +299,8 @@
- CARD16 val;
-
- val = inw(port);
--#ifdef PRINT_PORT
-- ErrorF(" inw(%#x) = %4.4x\n",port,val);
-+#ifdef PRINT_PORT
-+ ErrorF(" inw(%#x) = %4.4x\n", port, val);
- #endif
- return val;
- }
-@@ -469,19 +308,29 @@
- void
- x_outb(CARD16 port, CARD8 val)
- {
--#ifdef PRINT_PORT
-- ErrorF(" outb(%#x, %2.2x)\n",port,val);
-+ if (port >= 0x0100) { /* Don't interfere with mainboard */
-+#ifdef PRINT_PORT
-+ ErrorF(" outb(%#x, %2.2x)\n", port, val);
- #endif
-- outb(port,val);
-+ outb(port, val);
-+ } else {
-+ xf86DrvMsgVerb(Int10Current->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "outb 0x%4.4x,0x%2.2x\n", port, val);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(Int10Current);
-+ stack_trace(Int10Current);
-+ }
-+ }
- }
-
- void
- x_outw(CARD16 port, CARD16 val)
- {
--#ifdef PRINT_PORT
-- ErrorF(" outw(%#x, %4.4x)\n",port,val);
-+#ifdef PRINT_PORT
-+ ErrorF(" outw(%#x, %4.4x)\n", port, val);
- #endif
-- outw(port,val);
-+
-+ outw(port, val);
- }
-
- CARD32
-@@ -489,13 +338,13 @@
- {
- CARD32 val;
-
--#if !defined (_PC) && !defined (_PC_PCI)
-- if (!pciCfg1in(port,&val))
-+#if !defined(_PC) && !defined(_PC_PCI)
-+ if (!pciCfg1in(port, &val))
- #endif
- val = inl(port);
-
- #ifdef PRINT_PORT
-- ErrorF(" inl(%#x) = %8.8x\n",port,val);
-+ ErrorF(" inl(%#x) = %8.8x\n", port, val);
- #endif
- return val;
- }
-@@ -504,52 +353,52 @@
- x_outl(CARD16 port, CARD32 val)
- {
- #ifdef PRINT_PORT
-- ErrorF(" outl(%#x, %8.8x)\n",port,val);
-+ ErrorF(" outl(%#x, %8.8x)\n", port, val);
- #endif
--#if !defined (_PC) && !defined (_PC_PCI)
-- if (!pciCfg1out(port,val))
-+
-+#if !defined(_PC) && !defined(_PC_PCI)
-+ if (!pciCfg1out(port, val))
- #endif
-- outl(port,val);
-+ outl(port, val);
- }
--#endif
-
- CARD8
- Mem_rb(int addr)
- {
-- return Int10Current->mem->rb(Int10Current,addr);
-+ return (*Int10Current->mem->rb)(Int10Current, addr);
- }
-
- CARD16
- Mem_rw(int addr)
- {
-- return Int10Current->mem->rw(Int10Current,addr);
-+ return (*Int10Current->mem->rw)(Int10Current, addr);
- }
-
- CARD32
- Mem_rl(int addr)
- {
-- return Int10Current->mem->rl(Int10Current,addr);
-+ return (*Int10Current->mem->rl)(Int10Current, addr);
- }
-
- void
--Mem_wb(int addr,CARD8 val)
-+Mem_wb(int addr, CARD8 val)
- {
-- Int10Current->mem->wb(Int10Current,addr,val);
-+ (*Int10Current->mem->wb)(Int10Current, addr, val);
- }
-
- void
--Mem_ww(int addr,CARD16 val)
-+Mem_ww(int addr, CARD16 val)
- {
-- Int10Current->mem->ww(Int10Current,addr,val);
-+ (*Int10Current->mem->ww)(Int10Current, addr, val);
- }
-
- void
--Mem_wl(int addr,CARD32 val)
-+Mem_wl(int addr, CARD32 val)
- {
-- Int10Current->mem->wl(Int10Current,addr,val);
-+ (*Int10Current->mem->wl)(Int10Current, addr, val);
- }
-
--#if !defined (_PC) && !defined (_PC_PCI)
-+#if !defined(_PC) && !defined(_PC_PCI)
- static CARD32 PciCfg1Addr = 0;
-
- #define TAG(Cfg1Addr) (Cfg1Addr & 0xffff00)
-@@ -562,7 +411,7 @@
- *val = PciCfg1Addr;
- return 1;
- }
-- else if (addr == 0xCFC) {
-+ if (addr == 0xCFC) {
- *val = pciReadLong(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr));
- return 1;
- }
-@@ -576,7 +425,7 @@
- PciCfg1Addr = val;
- return 1;
- }
-- else if (addr == 0xCFC) {
-+ if (addr == 0xCFC) {
- pciWriteLong(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr),val);
- return 1;
- }
-@@ -603,7 +452,7 @@
- * disable registers before we call the BIOS initialization and
- * restore the original values afterwards. In beween we hold our
- * breath. To get to a (possibly exising) ISA card need to disable
-- * our current PCI card.
-+ * our current PCI card.
- */
- /*
- * This is just for booting: we just want to catch pure
-@@ -615,25 +464,25 @@
- void
- LockLegacyVGA(int screenIndex,legacyVGAPtr vga)
- {
-- xf86SetCurrentAccess(FALSE,xf86Screens[screenIndex]);
-+ xf86SetCurrentAccess(FALSE, xf86Screens[screenIndex]);
- vga->save_msr = inb(0x3CC);
- vga->save_vse = inb(0x3C3);
- vga->save_46e8 = inb(0x46e8);
- vga->save_pos102 = inb(0x102);
-- outb(0x3C2,~(CARD8)0x03 & vga->save_msr);
-- outb(0x3C3,~(CARD8)0x01 & vga->save_vse);
-+ outb(0x3C2, ~(CARD8)0x03 & vga->save_msr);
-+ outb(0x3C3, ~(CARD8)0x01 & vga->save_vse);
- outb(0x46e8, ~(CARD8)0x08 & vga->save_46e8);
- outb(0x102, ~(CARD8)0x01 & vga->save_pos102);
-- xf86SetCurrentAccess(TRUE,xf86Screens[screenIndex]);
-+ xf86SetCurrentAccess(TRUE, xf86Screens[screenIndex]);
- }
-
- void
- UnlockLegacyVGA(int screenIndex, legacyVGAPtr vga)
- {
-- xf86SetCurrentAccess(FALSE,xf86Screens[screenIndex]);
-+ xf86SetCurrentAccess(FALSE, xf86Screens[screenIndex]);
- outb(0x102, vga->save_pos102);
- outb(0x46e8, vga->save_46e8);
- outb(0x3C3, vga->save_vse);
- outb(0x3C2, vga->save_msr);
-- xf86SetCurrentAccess(TRUE,xf86Screens[screenIndex]);
-+ xf86SetCurrentAccess(TRUE, xf86Screens[screenIndex]);
- }
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/helper_mem.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/helper_mem.c,v
-retrieving revision 1.14
-retrieving revision 1.15
-diff -u -r1.14 -r1.15
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/helper_mem.c 2000/12/02 15:31:01 1.14
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/helper_mem.c 2001/01/06 20:19:13 1.15
-@@ -1,11 +1,10 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/helper_mem.c,v 1.14 2000/12/02 15:31:01 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/helper_mem.c,v 1.15 2001/01/06 20:19:13 tsi Exp $ */
- /*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
- * Copyright 1999 Egbert Eich
- */
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_OSproc.h"
- #include "xf86_ansic.h"
- #include "compiler.h"
-@@ -21,14 +20,14 @@
- } INT10Opts;
-
- static OptionInfoRec INT10Options[] = {
-- {OPT_NOINT10, "NoINT10", OPTV_BOOLEAN, {0}, FALSE },
-- { -1, NULL, OPTV_NONE, {0}, FALSE },
-+ {OPT_NOINT10, "NoINT10", OPTV_BOOLEAN, {0}, FALSE},
-+ { -1, NULL, OPTV_NONE, {0}, FALSE},
- };
-
- #define nINT10Options (sizeof(INT10Options) / sizeof(INT10Options[0]))
-
- #ifdef DEBUG
--void
-+void
- dprint(unsigned long start, unsigned long size)
- {
- int i,j;
-@@ -37,7 +36,7 @@
- for (j = 0; j < (size >> 4); j++) {
- char *d = c;
- ErrorF("\n0x%lx: ",(unsigned long)c);
-- for (i = 0; i<16; i++)
-+ for (i = 0; i<16; i++)
- ErrorF("%2.2x ",(unsigned char) (*(c++)));
- c = d;
- for (i = 0; i<16; i++) {
-@@ -49,8 +48,8 @@
- ErrorF("\n");
- }
- #endif
--
-
-+#ifndef _PC
- /*
- * here we are really paranoid about faking a "real"
- * BIOS. Most of this information was pulled from
-@@ -59,66 +58,64 @@
- void
- setup_int_vect(xf86Int10InfoPtr pInt)
- {
-- const CARD16 cs = (SYS_BIOS >> 4);
-- const CARD16 ip = 0x0;
- int i;
--
-+
- /* let the int vects point to the SYS_BIOS seg */
-- for (i=0; i<0x80; i++) {
-- MEM_WW(pInt,(i<<2),ip);
-- MEM_WW(pInt,((i<<2)+2),cs);
-+ for (i = 0; i < 0x80; i++) {
-+ MEM_WW(pInt, i << 2, 0);
-+ MEM_WW(pInt, (i << 2) + 2, SYS_BIOS >> 4);
- }
-- /* video interrupts default location */
-- MEM_WW(pInt,(0x42<<2),0xf065);
-- MEM_WW(pInt,(0x10<<2),0xf065);
-- MEM_WW(pInt,(0x6D<<2),0xf065);
-- /* video param table default location (int 1d) */
-- MEM_WW(pInt,(0x1d<<2),0xf0A4);
-+
-+ reset_int_vect(pInt);
- /* font tables default location (int 1F) */
-- MEM_WW(pInt,(0x1f<<2),0xfa6e);
-+ MEM_WW(pInt,0x1f<<2,0xfa6e);
-
-- /* int 11 default location */
-- MEM_WW(pInt,(0x11<<2),0xf84d);
-- /* int 12 default location */
-- MEM_WW(pInt,(0x12<<2),0xf841);
-- /* int 15 default location */
-- MEM_WW(pInt,(0x15<<2),0xf859);
-- /* int 1A default location */
-- MEM_WW(pInt,(0x1a<<2),0xff6e);
-- /* int 05 default location */
-- MEM_WW(pInt,(0x05<<2),0xff54);
-- /* int 08 default location */
-- MEM_WW(pInt,(0x08<<2),0xfea5);
-- /* int 13 default location (fdd) */
-- MEM_WW(pInt,(0x13<<2),0xec59);
-- /* int 0E default location */
-- MEM_WW(pInt,(0x0e<<2),0xef57);
-- /* int 17 default location */
-- MEM_WW(pInt,(0x17<<2),0xefd2);
-+ /* int 11 default location (Get Equipment Configuration) */
-+ MEM_WW(pInt, 0x11 << 2, 0xf84d);
-+ /* int 12 default location (Get Conventional Memory Size) */
-+ MEM_WW(pInt, 0x12 << 2, 0xf841);
-+ /* int 15 default location (I/O System Extensions) */
-+ MEM_WW(pInt, 0x15 << 2, 0xf859);
-+ /* int 1A default location (RTC, PCI and others) */
-+ MEM_WW(pInt, 0x1a << 2, 0xff6e);
-+ /* int 05 default location (Bound Exceeded) */
-+ MEM_WW(pInt, 0x05 << 2, 0xff54);
-+ /* int 08 default location (Double Fault) */
-+ MEM_WW(pInt, 0x08 << 2, 0xfea5);
-+ /* int 13 default location (Disk) */
-+ MEM_WW(pInt, 0x13 << 2, 0xec59);
-+ /* int 0E default location (Page Fault) */
-+ MEM_WW(pInt, 0x0e << 2, 0xef57);
-+ /* int 17 default location (Parallel Port) */
-+ MEM_WW(pInt, 0x17 << 2, 0xefd2);
- /* fdd table default location (int 1e) */
-- MEM_WW(pInt,(0x1e<<2),0xefc7);
-+ MEM_WW(pInt, 0x1e << 2, 0xefc7);
-+
-+ /* Set Equipment flag to VGA */
-+ i = MEM_RB(pInt, 0x0410) & 0xCF;
-+ MEM_WB(pInt, 0x0410, i);
-+ /* XXX Perhaps setup more of the BDA here. See also int42(0x00). */
- }
-+#endif
-
- int
- setup_system_bios(memType base_addr)
- {
-- char *date = "06/01/99";
-- char *eisa_ident = "PCI/ISA";
-- CARD16 *base = (CARD16*) base_addr;
--
-+ char *base = (char *) base_addr;
-+
- /*
- * we trap the "industry standard entry points" to the BIOS
- * and all other locations by filling them with "hlt"
- * TODO: implement hlt-handler for these
- */
-- memset((void *)(base),0xf4,0x10000);
-+ memset(base, 0xf4, 0x10000);
-
- /* set bios date */
-- strcpy((((char *)base) + 0xFFF5),date);
-+ strcpy(base + 0x0FFF5, "06/11/99");
- /* set up eisa ident string */
-- strcpy((((char *)base) + 0xFFD9),eisa_ident);
-+ strcpy(base + 0x0FFD9, "PCI_ISA");
- /* write system model id for IBM-AT */
-- *(((unsigned char *)base) + 0xFFFE) = 0xfc;
-+ *((unsigned char *)(base + 0x0FFFE)) = 0xfc;
-
- return 1;
- }
-@@ -126,23 +123,65 @@
- void
- reset_int_vect(xf86Int10InfoPtr pInt)
- {
-- MEM_WW(pInt,(0x10<<2),0xf065);
-- MEM_WW(pInt,((0x10<<2)+2),(SYS_BIOS >> 4));
-- MEM_WW(pInt,(0x42<<2),0xf065);
-- MEM_WW(pInt,((0x42<<2)+2),(SYS_BIOS >> 4));
-- MEM_WW(pInt,(0x6D<<2),0xf065);
-- MEM_WW(pInt,((0x6D<<2)+2),(SYS_BIOS >> 4));
-- }
-+ /*
-+ * This table is normally located at 0xF000:0xF0A4. However, int 0x42,
-+ * function 0 (Mode Set) expects it (or a copy) somewhere in the bottom
-+ * 64kB. Note that because this data doesn't survive POST, int 0x42 should
-+ * only be used during EGA/VGA BIOS initialisation.
-+ */
-+ static const CARD8 VideoParms[] = {
-+ /* Timing for modes 0x00 & 0x01 */
-+ 0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c,
-+ 0x02, 0x07, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00,
-+ /* Timing for modes 0x02 & 0x03 */
-+ 0x71, 0x50, 0x5a, 0x0a, 0x1f, 0x06, 0x19, 0x1c,
-+ 0x02, 0x07, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00,
-+ /* Timing for modes 0x04, 0x05 & 0x06 */
-+ 0x38, 0x28, 0x2d, 0x0a, 0x7f, 0x06, 0x64, 0x70,
-+ 0x02, 0x01, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00,
-+ /* Timing for mode 0x07 */
-+ 0x61, 0x50, 0x52, 0x0f, 0x19, 0x06, 0x19, 0x19,
-+ 0x02, 0x0d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00,
-+ /* Display page lengths in little endian order */
-+ 0x00, 0x08, /* Modes 0x00 and 0x01 */
-+ 0x00, 0x10, /* Modes 0x02 and 0x03 */
-+ 0x00, 0x40, /* Modes 0x04 and 0x05 */
-+ 0x00, 0x40, /* Modes 0x06 and 0x07 */
-+ /* Number of columns for each mode */
-+ 40, 40, 80, 80, 40, 40, 80, 80,
-+ /* CGA Mode register value for each mode */
-+ 0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29,
-+ /* Padding */
-+ 0x00, 0x00, 0x00, 0x00
-+ };
-+ int i;
-+
-+ for (i = 0; i < sizeof(VideoParms); i++)
-+ MEM_WB(pInt, i + (0x1000 - sizeof(VideoParms)), VideoParms[i]);
-+ MEM_WW(pInt, 0x1d << 2, 0x1000 - sizeof(VideoParms));
-+ MEM_WW(pInt, (0x1d << 2) + 2, 0);
-+
-+ MEM_WW(pInt, 0x10 << 2, 0xf065);
-+ MEM_WW(pInt, (0x10 << 2) + 2, SYS_BIOS >> 4);
-+ MEM_WW(pInt, 0x42 << 2, 0xf065);
-+ MEM_WW(pInt, (0x42 << 2) + 2, SYS_BIOS >> 4);
-+ MEM_WW(pInt, 0x6D << 2, 0xf065);
-+ MEM_WW(pInt, (0x6D << 2) + 2, SYS_BIOS >> 4);
-+}
-
- void
- set_return_trap(xf86Int10InfoPtr pInt)
--{
-+{
- /*
-- * here we also set the exit condition:
-- * we return when we encounter 'hlt' (^=0xf4) this
-- * will be located at address 0x600 in x86 memory.
-+ * Here we set the exit condition: We return when we encounter
-+ * 'hlt' (=0xf4), which we locate at address 0x600 in x86 memory.
- */
-- MEM_WB(pInt,0x600,0xf4);
-+ MEM_WB(pInt, 0x0600, 0xf4);
-+
-+ /*
-+ * Allocate a segment for the stack
-+ */
-+ xf86Int10AllocPages(pInt, 1, &pInt->stackseg);
- }
-
- Bool
-@@ -150,7 +189,7 @@
- {
- Bool noint10 = FALSE;
- EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex);
--
-+
- if (pEnt->device && pEnt->device->options) {
- OptionInfoRec options[nINT10Options];
-
-@@ -170,12 +209,12 @@
- int size;
-
- if ((codeSeg & 0x1f) || /* Not 512-byte aligned otherwise */
-- ((codeSeg << 4) < V_BIOS) ||
-+ ((codeSeg << 4) < V_BIOS) ||
- ((codeSeg << 4) >= SYS_SIZE))
-- return FALSE;
-+ return FALSE;
-
- if (xf86IsPc98())
-- return FALSE;
-+ return FALSE;
-
- if ((*vbiosMem != 0x55) || (*(vbiosMem+1) != 0xAA) || !*(vbiosMem+2))
- return FALSE;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/pci.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/pci.c,v
-retrieving revision 1.5
-retrieving revision 1.6
-diff -u -r1.5 -r1.6
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/pci.c 2000/12/02 15:31:01 1.5
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/pci.c 2001/01/06 20:19:13 1.6
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/pci.c,v 1.5 2000/12/02 15:31:01 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/pci.c,v 1.6 2001/01/06 20:19:13 tsi Exp $ */
-
- /*
- * XFree86 int10 module
-@@ -7,7 +7,6 @@
- */
- #include "xf86Pci.h"
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_ansic.h"
- #define _INT10_PRIVATE
- #include "xf86int10.h"
-@@ -18,7 +17,7 @@
- PCITAG tag;
- unsigned long offset = 0;
- unsigned char *mem, *ptr;
-- int length, rlength, blength;
-+ int length;
-
- pciVideoPtr pvp = xf86GetPciInfoForEntity(pInt->entityIndex);
-
-@@ -30,25 +29,18 @@
- }
-
- tag = pciTag(pvp->bus,pvp->device,pvp->func);
-- rlength = blength = 1 << pvp->biosSize;
-+ length = 1 << pvp->biosSize;
-
-- /* Read in entire PCI ROM in 64kB chunks */
-- mem = ptr = xnfcalloc(blength, 1);
-- while ((length = rlength) > 0) {
-- if (length > 0x10000) length = 0x10000;
-- if (xf86ReadPciBIOS(offset, tag, -1, ptr, length) < length) {
-- xfree(mem);
-+ /* Read in entire PCI ROM */
-+ mem = ptr = xnfcalloc(length, 1);
-+ if (xf86ReadPciBIOS(offset, tag, -1, ptr, length) < length) {
-+ xfree(mem);
- #ifdef DEBUG
-- ErrorF("mapPciRom: cannot read BIOS\n");
-+ ErrorF("mapPciRom: cannot read BIOS\n");
- #endif
-- return 0;
-- }
-- offset += length;
-- rlength -= length;
-- ptr += length;
-+ return 0;
- }
-
-- ptr = mem;
- while ((ptr[0] == 0x55) && (ptr[1] == 0xAA)) {
- unsigned short data_off = ptr[0x18] | (ptr[0x19] << 8);
- unsigned char *data = ptr + data_off;
-@@ -63,10 +55,10 @@
- #ifdef PRINT_PCI
- ErrorF("data segment in BIOS: 0x%x, type: 0x%x\n", data_off, type);
- #endif
-- if (type) { /* not PC-AT image: find next one */
-+ if (type) { /* not PC-AT image: find next one */
- unsigned int image_length;
- unsigned char indicator = data[0x15];
-- if (indicator & 0x80) /* last image */
-+ if (indicator & 0x80) /* last image */
- break;
- image_length = (data[0x10] | (data[0x11] << 8)) << 9;
- #ifdef PRINT_PCI
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86int10.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/xf86int10.c,v
-retrieving revision 1.5
-retrieving revision 1.6
-diff -u -r1.5 -r1.6
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86int10.c 2000/04/04 19:25:18 1.5
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86int10.c 2001/01/06 20:19:13 1.6
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86int10.c,v 1.5 2000/04/04 19:25:18 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86int10.c,v 1.6 2001/01/06 20:19:13 tsi Exp $ */
- /*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
-@@ -6,7 +6,6 @@
- */
-
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_ansic.h"
- #include "compiler.h"
- #include "xf86Pci.h"
-@@ -14,10 +13,14 @@
- #include "xf86int10.h"
- #include "int10Defines.h"
-
-+#define REG pInt
-+
- xf86Int10InfoPtr Int10Current = NULL;
-
- static int int1A_handler(xf86Int10InfoPtr pInt);
-+#ifndef _PC
- static int int42_handler(xf86Int10InfoPtr pInt);
-+#endif
- static int intE6_handler(xf86Int10InfoPtr pInt);
- static PCITAG findPci(unsigned short bx);
- static CARD32 pciSlotBX(pciVideoPtr pvp);
-@@ -26,88 +29,557 @@
- int_handler(xf86Int10InfoPtr pInt)
- {
- int num = pInt->num;
-+ int ret = 0;
-
- switch (num) {
-+#ifndef _PC
- case 0x10:
- case 0x42:
-- if (!(int42_handler(pInt)))
-- goto bios_handler;
-- else return 1;
-+ case 0x6D:
-+ if (getIntVect(pInt, num) == I_S_DEFAULT_INT_VECT)
-+ ret = int42_handler(pInt);
-+ break;
-+#endif
- case 0x1A:
-- if(!(int1A_handler(pInt)))
-- goto bios_handler;
-- else return 1;
-+ ret = int1A_handler(pInt);
-+ break;
- case 0xe6:
-- if (!(intE6_handler(pInt)))
-- goto bios_handler;
-- else return 1;
-+ ret = intE6_handler(pInt);
-+ break;
- default:
-- goto bios_handler;
-+ break;
- }
-- bios_handler:
-- return run_bios_int(num,pInt);
-+
-+ if (!ret)
-+ ret = run_bios_int(num, pInt);
-+
-+ if (!ret) {
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
-+ "Halting on int 0x%2.2x!\n", num);
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+
-+ return ret;
- }
-
-+#ifndef _PC
- /*
-- * The system-BIOS provides int10 ax=1200 and ax=1201 functions
-- * before the video bios is installed. The int10_handler below
-- * provides these functions, too. However there have been cases
-- * in which disabling generic video has caused problems. Therefore
-- * it has been disabled by default. To reenable it do:
-- * #define DO_GENERIC_INT10
-+ * This is derived from a number of PC system BIOS'es. The intent here is to
-+ * provide very primitive video support, before an EGA/VGA BIOS installs its
-+ * own interrupt vector. Here, "Ignored" calls should remain so. "Not
-+ * Implemented" denotes functionality that can be implemented should the need
-+ * arise. What are "Not Implemented" throughout are video memory accesses.
-+ * Also, very little input validity checking is done here.
- */
- static int
- int42_handler(xf86Int10InfoPtr pInt)
- {
--#define REG pInt
--#ifdef DO_GENERIC_INT10
-- unsigned char c;
--#endif
-- int num = pInt->num;
--#ifdef PRINT_INT
-- ErrorF("int 0x%x: ax:0x%x bx:0x%x cx:0x%x dx:0x%x\n",num,
-- X86_EAX,X86_EBX,X86_ECX,X86_EDX);
--#endif
-- /*
-- * video bios has modified these -
-- * leave it to the video bios to do this
-- */
-+ switch (X86_AH) {
-+ case 0x00:
-+ /* Set Video Mode */
-+ /* Enter: AL = video mode number */
-+ /* Leave: Nothing */
-+ /* Implemented (except for clearing the screen) */
-+ { /* Localise */
-+ int i;
-+ CARD16 ioport, int1d, regvals, tmp;
-+ CARD8 mode, cgamode, cgacolour;
-+
-+ /*
-+ * Ignore all mode numbers but 0x00-0x13. Some systems also ignore
-+ * 0x0B and 0x0C, but don't do that here.
-+ */
-+ if (X86_AL > 0x13)
-+ break;
-+
-+ /*
-+ * You didn't think that was really the mode set, did you? There
-+ * are only so many slots in the video parameter table...
-+ */
-+ mode = X86_AL;
-+ ioport = 0x03D4;
-+ switch (MEM_RB(pInt, 0x0410) & 0x30) {
-+ case 0x30: /* MDA */
-+ mode = 0x07; /* Force mode to 0x07 */
-+ ioport = 0x03B4;
-+ break;
-+ case 0x10: /* CGA 40x25 */
-+ if (mode >= 0x07)
-+ mode = 0x01;
-+ break;
-+ case 0x20: /* CGA 80x25 (MCGA?) */
-+ if (mode >= 0x07)
-+ mode = 0x03;
-+ break;
-+ case 0x00: /* EGA/VGA */
-+ if (mode >= 0x07) /* Don't try MDA timings */
-+ mode = 0x01; /* !?!?! */
-+ break;
-+ }
-+
-+ /* Locate data in video parameter table */
-+ int1d = MEM_RW(pInt, 0x1d << 2);
-+ regvals = ((mode >> 1) << 4) + int1d;
-+ cgacolour = 0x30;
-+ if (mode == 0x06) {
-+ regvals -= 0x10;
-+ cgacolour = 0x3F;
-+ }
-+
-+ /** Update BIOS Data Area **/
-+
-+ /* Video mode */
-+ MEM_WB(pInt, 0x0449, mode);
-+
-+ /* Columns */
-+ tmp = MEM_RB(pInt, mode + int1d + 0x48);
-+ MEM_WW(pInt, 0x044A, tmp);
-+
-+ /* Page length */
-+ tmp = MEM_RW(pInt, (mode & 0x06) + int1d + 0x40);
-+ MEM_WW(pInt, 0x044C, tmp);
-+
-+ /* Start Address */
-+ MEM_WW(pInt, 0x044E, 0);
-+
-+ /* Cursor positions, one for each display page */
-+ for (i = 0x0450; i < 0x0460; i += 2)
-+ MEM_WW(pInt, i, 0);
-+
-+ /* Cursor start & end scanlines */
-+ tmp = MEM_RB(pInt, regvals + 0x0B);
-+ MEM_WB(pInt, 0x0460, tmp);
-+ tmp = MEM_RB(pInt, regvals + 0x0A);
-+ MEM_WB(pInt, 0x0461, tmp);
-+
-+ /* Current display page number */
-+ MEM_WB(pInt, 0x0462, 0);
-+
-+ /* CRTC I/O address */
-+ MEM_WW(pInt, 0x0463, ioport);
-+
-+ /* CGA Mode register value */
-+ cgamode = MEM_RB(pInt, mode + int1d + 0x50);
-+ MEM_WB(pInt, 0x0465, cgamode);
-+
-+ /* CGA Colour register value */
-+ MEM_WB(pInt, 0x0466, cgacolour);
-+
-+ /* Rows */
-+ MEM_WB(pInt, 0x0484, (25 - 1));
-+
-+ /* Programme the mode */
-+ outb(ioport + 4, cgamode & 0x37); /* Turn off screen */
-+ for (i = 0; i < 0x10; i++) {
-+ tmp = MEM_RB(pInt, regvals + i);
-+ outb(ioport, i);
-+ outb(ioport + 1, tmp);
-+ }
-+ outb(ioport + 5, cgacolour); /* Select colour mode */
-+ outb(ioport + 4, cgamode); /* Turn on screen */
-+ }
-+ break;
-+
-+ case 0x01:
-+ /* Set Cursor Type */
-+ /* Enter: CH = starting line for cursor */
-+ /* CL = ending line for cursor */
-+ /* Leave: Nothing */
-+ /* Implemented */
-+ { /* Localise */
-+ CARD16 ioport = MEM_RW(pInt, 0x0463);
-+
-+ MEM_WB(pInt, 0x0460, X86_CL);
-+ MEM_WB(pInt, 0x0461, X86_CH);
-+
-+ outb(ioport, 0x0A);
-+ outb(ioport + 1, X86_CH);
-+ outb(ioport, 0x0B);
-+ outb(ioport + 1, X86_CL);
-+ }
-+ break;
-+
-+ case 0x02:
-+ /* Set Cursor Position */
-+ /* Enter: BH = display page number */
-+ /* DH = row */
-+ /* DL = column */
-+ /* Leave: Nothing */
-+ /* Implemented */
-+ { /* Localise */
-+ CARD16 offset, ioport;
-+
-+ MEM_WB(pInt, (X86_BH << 1) + 0x0450, X86_DL);
-+ MEM_WB(pInt, (X86_BH << 1) + 0x0451, X86_DH);
-+
-+ if (X86_BH != MEM_RB(pInt, 0x0462))
-+ break;
-+
-+ offset = (X86_DH * MEM_RW(pInt, 0x044A)) + X86_DL;
-+ offset += MEM_RW(pInt, 0x044E) << 1;
-+
-+ ioport = MEM_RW(pInt, 0x0463);
-+ outb(ioport, 0x0E);
-+ outb(ioport + 1, offset >> 8);
-+ outb(ioport, 0x0F);
-+ outb(ioport + 1, offset & 0xFF);
-+ }
-+ break;
-+
-+ case 0x03:
-+ /* Get Cursor Position */
-+ /* Enter: BH = display page number */
-+ /* Leave: CH = starting line for cursor */
-+ /* CL = ending line for cursor */
-+ /* DH = row */
-+ /* DL = column */
-+ /* Implemented */
-+ { /* Localise */
-+ X86_CL = MEM_RB(pInt, 0x0460);
-+ X86_CH = MEM_RB(pInt, 0x0461);
-+ X86_DL = MEM_RB(pInt, (X86_BH << 1) + 0x0450);
-+ X86_DH = MEM_RB(pInt, (X86_BH << 1) + 0x0451);
-+ }
-+ break;
-+
-+ case 0x04:
-+ /* Get Light Pen Position */
-+ /* Enter: Nothing */
-+ /* Leave: AH = 0x01 (down/triggered) or 0x00 (not) */
-+ /* BX = pixel column */
-+ /* CX = pixel row */
-+ /* DH = character row */
-+ /* DL = character column */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x04) -- Get Light Pen Position\n", pInt->num);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ X86_AH = X86_BX = X86_CX = X86_DX = 0;
-+ }
-+ break;
-+
-+ case 0x05:
-+ /* Set Display Page */
-+ /* Enter: AL = display page number */
-+ /* Leave: Nothing */
-+ /* Implemented */
-+ { /* Localise */
-+ CARD16 start, ioport = MEM_RW(pInt, 0x0463);
-+ CARD8 x, y;
-+
-+ /* Calculate new start address */
-+ MEM_WB(pInt, 0x0462, X86_AL);
-+ start = X86_AL * MEM_RW(pInt, 0x044C);
-+ MEM_WW(pInt, 0x044E, start);
-+ start <<= 1;
-+
-+ /* Update start address */
-+ outb(ioport, 0x0C);
-+ outb(ioport + 1, start >> 8);
-+ outb(ioport, 0x0D);
-+ outb(ioport + 1, start & 0xFF);
-+
-+ /* Switch cursor position */
-+ y = MEM_RB(pInt, (X86_AL << 1) + 0x0450);
-+ x = MEM_RB(pInt, (X86_AL << 1) + 0x0451);
-+ start += (y * MEM_RW(pInt, 0x044A)) + x;
-+
-+ /* Update cursor position */
-+ outb(ioport, 0x0E);
-+ outb(ioport + 1, start >> 8);
-+ outb(ioport, 0x0F);
-+ outb(ioport + 1, start & 0xFF);
-+ }
-+ break;
-+
-+ case 0x06:
-+ /* Initialise or Scroll Window Up */
-+ /* Enter: AL = lines to scroll up */
-+ /* BH = attribute for blank */
-+ /* CH = upper y of window */
-+ /* CL = left x of window */
-+ /* DH = lower y of window */
-+ /* DL = right x of window */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x06) -- Initialise or Scroll Window Up\n",
-+ pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ " AL=0x%2.2x, BH=0x%2.2x,"
-+ " CH=0x%2.2x, CL=0x%2.2x, DH=0x%2.2x, DL=0x%2.2x\n",
-+ X86_AL, X86_BH, X86_CH, X86_CL, X86_DH, X86_DL);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ }
-+ break;
-+
-+ case 0x07:
-+ /* Initialise or Scroll Window Down */
-+ /* Enter: AL = lines to scroll down */
-+ /* BH = attribute for blank */
-+ /* CH = upper y of window */
-+ /* CL = left x of window */
-+ /* DH = lower y of window */
-+ /* DL = right x of window */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x07) -- Initialise or Scroll Window Down\n",
-+ pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ " AL=0x%2.2x, BH=0x%2.2x,"
-+ " CH=0x%2.2x, CL=0x%2.2x, DH=0x%2.2x, DL=0x%2.2x\n",
-+ X86_AL, X86_BH, X86_CH, X86_CL, X86_DH, X86_DL);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ }
-+ break;
-+
-+ case 0x08:
-+ /* Read Character and Attribute at Cursor */
-+ /* Enter: BH = display page number */
-+ /* Leave: AH = attribute */
-+ /* AL = character */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x08) -- Read Character and Attribute at"
-+ " Cursor\n", pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "BH=0x%2.2x\n", X86_BH);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ X86_AX = 0;
-+ }
-+ break;
-+
-+ case 0x09:
-+ /* Write Character and Attribute at Cursor */
-+ /* Enter: AL = character */
-+ /* BH = display page number */
-+ /* BL = attribute (text) or colour (graphics) */
-+ /* CX = replication count */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x09) -- Write Character and Attribute at"
-+ " Cursor\n", pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "AL=0x%2.2x, BH=0x%2.2x, BL=0x%2.2x, CX=0x%4.4x\n",
-+ X86_AL, X86_BH, X86_BL, X86_CX);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ }
-+ break;
-+
-+ case 0x0a:
-+ /* Write Character at Cursor */
-+ /* Enter: AL = character */
-+ /* BH = display page number */
-+ /* BL = colour */
-+ /* CX = replication count */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x0A) -- Write Character at Cursor\n",
-+ pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "AL=0x%2.2x, BH=0x%2.2x, BL=0x%2.2x, CX=0x%4.4x\n",
-+ X86_AL, X86_BH, X86_BL, X86_CX);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ }
-+ break;
-+
-+ case 0x0b:
-+ /* Set Palette, Background or Border */
-+ /* Enter: BH = 0x00 or 0x01 */
-+ /* BL = colour or palette (respectively) */
-+ /* Leave: Nothing */
-+ /* Implemented */
-+ { /* Localise */
-+ CARD16 ioport = MEM_RW(pInt, 0x0463) + 5;
-+ CARD8 cgacolour = MEM_RB(pInt, 0x0466);
-+
-+ if (X86_BH) {
-+ cgacolour &= 0xDF;
-+ cgacolour |= (X86_BL & 0x01) << 5;
-+ } else {
-+ cgacolour &= 0xE0;
-+ cgacolour |= X86_BL & 0x1F;
-+ }
-+
-+ MEM_WB(pInt, 0x0466, cgacolour);
-+ outb(ioport, cgacolour);
-+ }
-+ break;
-+
-+ case 0x0c:
-+ /* Write Graphics Pixel */
-+ /* Enter: AL = pixel value */
-+ /* BH = display page number */
-+ /* CX = column */
-+ /* DX = row */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x0C) -- Write Graphics Pixel\n", pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "AL=0x%2.2x, BH=0x%2.2x, CX=0x%4.4x, DX=0x%4.4x\n",
-+ X86_AL, X86_BH, X86_CX, X86_DX);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ }
-+ break;
-+
-+ case 0x0d:
-+ /* Read Graphics Pixel */
-+ /* Enter: BH = display page number */
-+ /* CX = column */
-+ /* DX = row */
-+ /* Leave: AL = pixel value */
-+ /* Not Implemented */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x0D) -- Read Graphics Pixel\n", pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "BH=0x%2.2x, CX=0x%4.4x, DX=0x%4.4x\n",
-+ X86_BH, X86_CX, X86_DX);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ X86_AL = 0;
-+ }
-+ break;
-+
-+ case 0x0e:
-+ /* Write Character in Teletype Mode */
-+ /* Enter: AL = character */
-+ /* BH = display page number */
-+ /* BL = foreground colour */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ /* WARNING: Emulation of BEL characters will require */
-+ /* emulation of RTC and PC speaker I/O. */
-+ /* Also, this recurses through int 0x10 */
-+ /* which might or might not have been */
-+ /* installed yet. */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x0E) -- Write Character in Teletype Mode\n",
-+ pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "AL=0x%2.2x, BH=0x%2.2x, BL=0x%2.2x\n",
-+ X86_AL, X86_BH, X86_BL);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
-+ }
-+ break;
-+
-+ case 0x0f:
-+ /* Get Video Mode */
-+ /* Enter: Nothing */
-+ /* Leave: AH = number of columns */
-+ /* AL = video mode number */
-+ /* BH = display page number */
-+ /* Implemented */
-+ { /* Localise */
-+ X86_AH = MEM_RW(pInt, 0x044A);
-+ X86_AL = MEM_RB(pInt, 0x0449);
-+ X86_BH = MEM_RB(pInt, 0x0462);
-+ }
-+ break;
-
-- if (getIntVect(pInt,num) != I_S_DEFAULT_INT_VECT) {
-- return 0;
-- }
--
-- if ((X86_EBX & 0xff) == 0x32) {
-- switch (X86_EAX & 0xFFFF) {
-- case 0x1200:
--#ifdef PRINT_INT
-- ErrorF("enabling video\n");
--#endif
--#ifdef DO_GENERIC_INT10
-- c = inb(0x3cc);
-- c |= 0x02;
-- outb(0x3c2,c);
--#endif
-- return 1;
-- case 0x1201:
--#ifdef PRINT_INT
-- ErrorF("disabling video\n");
--#endif
--#ifdef DO_GENERIC_INT10
-- c = inb(0x3cc);
-- c &= ~0x02;
-- outb(0x3c2,c);
--#endif
-- return 1;
-- default:
-- break;
-+ case 0x10:
-+ /* Colour Control (subfunction in AL) */
-+ /* Enter: Various */
-+ /* Leave: Various */
-+ /* Ignored */
-+ break;
-+
-+ case 0x11:
-+ /* Font Control (subfunction in AL) */
-+ /* Enter: Various */
-+ /* Leave: Various */
-+ /* Ignored */
-+ break;
-+
-+ case 0x12:
-+ /* Miscellaneous (subfunction in BL) */
-+ /* Enter: Various */
-+ /* Leave: Various */
-+ /* Ignored. Previous code here optionally allowed */
-+ /* the enabling and disabling of VGA, but no system */
-+ /* BIOS I've come across actually implements it. */
-+ break;
-+
-+ case 0x13:
-+ /* Write String in Teletype Mode */
-+ /* Enter: AL = write mode */
-+ /* BL = attribute (if (AL & 0x02) == 0) */
-+ /* CX = string length */
-+ /* DH = row */
-+ /* DL = column */
-+ /* ES:BP = string segment:offset */
-+ /* Leave: Nothing */
-+ /* Not Implemented */
-+ /* WARNING: Emulation of BEL characters will require */
-+ /* emulation of RTC and PC speaker I/O. */
-+ /* Also, this recurses through int 0x10 */
-+ /* which might or might not have been */
-+ /* installed yet. */
-+ { /* Localise */
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x%2.2x(AH=0x13) -- Write String in Teletype Mode\n",
-+ pInt->num);
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 3,
-+ "AL=0x%2.2x, BL=0x%2.2x, CX=0x%4.4x,"
-+ " DH=0x%2.2x, DL=0x%2.2x, ES:BP=0x%4.4x:0x%4.4x\n",
-+ X86_AL, X86_BL, X86_CX, X86_DH, X86_DL, X86_ES, X86_BP);
-+ if (xf86GetVerbosity() > 3) {
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ }
- }
-+ break;
-+
-+ default:
-+ /* Various extensions */
-+ /* Enter: Various */
-+ /* Leave: Various */
-+ /* Ignored */
-+ break;
- }
-- if (num == 0x42)
-- return 1;
-- else
-- return 0;
-+
-+ return 1;
- }
-+#endif
-
- #define SUCCESSFUL 0x00
- #define DEVICE_NOT_FOUND 0x86
-@@ -118,164 +590,159 @@
- {
- PCITAG tag;
- pciVideoPtr pvp;
--
-- if (! (pvp = xf86GetPciInfoForEntity(pInt->entityIndex)))
-+
-+ if (!(pvp = xf86GetPciInfoForEntity(pInt->entityIndex)))
- return 0; /* oops */
-
- #ifdef PRINT_INT
- ErrorF("int 0x1a: ax=0x%x bx=0x%x cx=0x%x dx=0x%x di=0x%x es=0x%x\n",
-- X86_EAX,X86_EBX,X86_ECX,X86_EDX,X86_EDI,X86_ESI);
-+ X86_EAX, X86_EBX, X86_ECX, X86_EDX, X86_EDI, X86_ESI);
- #endif
-- switch (X86_EAX & 0xFFFF) {
-+ switch (X86_AX) {
- case 0xb101:
-- X86_EAX &= 0xFF00; /* no config space/special cycle support */
-+ X86_EAX &= 0xFF00; /* no config space/special cycle support */
- X86_EDX = 0x20494350; /* " ICP" */
-- X86_EBX = 0x0210; /* Version 2.10 */
-- X86_ECX &= 0xFF00;
-+ X86_EBX = 0x0210; /* Version 2.10 */
-+ X86_ECX &= 0xFF00;
- X86_ECX |= (pciNumBuses & 0xFF); /* Max bus number in system */
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- #ifdef PRINT_INT
- ErrorF("ax=0x%x dx=0x%x bx=0x%x cx=0x%x flags=0x%x\n",
-- X86_EAX,X86_EDX,X86_EBX,X86_ECX,X86_EFLAGS);
-+ X86_EAX, X86_EDX, X86_EBX, X86_ECX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb102:
-- if ((X86_EDX & 0xFFFF) == pvp->vendor &&
-- (X86_ECX & 0xFFFF) ==pvp->chipType &&
-- X86_ESI == 0) {
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ if (X86_DX == pvp->vendor && X86_CX == pvp->chipType && X86_ESI == 0) {
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
-- X86_EBX = pciSlotBX(pvp);
-+ X86_EBX = pciSlotBX(pvp);
- }
- #ifdef SHOW_ALL_DEVICES
-- else if ((pvp = xf86FindPciDeviceVendor(X86_EDX,X86_ECX,X86_ESI,pvp))
-- != NULL) {
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ else
-+ if ((pvp = xf86FindPciDeviceVendor(X86_EDX, X86_ECX, X86_ESI, pvp))) {
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- X86_EBX = pciSlotBX(pvp);
- }
- #endif
- else {
-- X86_EAX = (X86_EAX & 0x00FF) | (DEVICE_NOT_FOUND << 8);
-+ X86_EAX = X86_AL | (DEVICE_NOT_FOUND << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x bx=0x%x flags=0x%x\n",
-- X86_EAX,X86_EBX,X86_EFLAGS);
-+ ErrorF("ax=0x%x bx=0x%x flags=0x%x\n", X86_EAX, X86_EBX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb103:
-- if ((X86_ECX & 0xFF) == pvp->interface &&
-- ((X86_ECX & 0xFF00) >> 8) == pvp->subclass &&
-+ if (X86_CL == pvp->interface &&
-+ X86_CH == pvp->subclass &&
- ((X86_ECX & 0xFFFF0000) >> 16) == pvp->class) {
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EBX = pciSlotBX(pvp);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- }
- #ifdef SHOW_ALL_DEVICES
-- else if ((pvp = xf86FindPciClass(X86_ECX & 0xFF,
-- (X86_ECX & 0xff00) >> 8,
-+ else if ((pvp = xf86FindPciClass(X86_CL, X86_CH,
- (X86_ECX & 0xffff0000) >> 16,
-- X86_ESI,pvp))!= NULL) {
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ X86_ESI, pvp))) {
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- X86_EBX = pciSlotBX(pvp);
- }
- #endif
- else {
-- X86_EAX = (X86_EAX & 0x00FF) | (DEVICE_NOT_FOUND << 8);
-+ X86_EAX = X86_AL | (DEVICE_NOT_FOUND << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x flags=0x%x\n",X86_EAX,X86_EFLAGS);
-+ ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb108:
- if ((tag = findPci(X86_EBX))) {
-- X86_ECX &= 0xFFFFFF00;
-- X86_ECX |= pciReadByte(tag,X86_EDI);
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ X86_CL = pciReadByte(tag, X86_EDI);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- } else {
-- X86_EAX = (X86_EAX & 0x00FF) | (BAD_REGISTER_NUMBER << 8);
-+ X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x cx=0x%x flags=0x%x\n",
-- X86_EAX,X86_ECX,X86_EFLAGS);
-+ ErrorF("ax=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_ECX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb109:
- if ((tag = findPci(X86_EBX))) {
-- X86_ECX &= 0xFFFF0000;
-- X86_ECX |= pciReadWord(tag,X86_EDI);
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ X86_CX = pciReadWord(tag, X86_EDI);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- } else {
-- X86_EAX = (X86_EAX & 0x00FF) | (BAD_REGISTER_NUMBER << 8);
-+ X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x cx=0x%x flags=0x%x\n",
-- X86_EAX,X86_ECX,X86_EFLAGS);
-+ ErrorF("ax=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_ECX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb10a:
- if ((tag = findPci(X86_EBX))) {
-- X86_ECX &= 0;
-- X86_ECX |= pciReadLong(tag, X86_EDI);
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ X86_ECX = pciReadLong(tag, X86_EDI);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- } else {
-- X86_EAX = (X86_EAX & 0x00FF) | (BAD_REGISTER_NUMBER << 8);
-+ X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x cx=0x%x flags=0x%x\n",
-- X86_EAX,X86_ECX,X86_EFLAGS);
-+ ErrorF("ax=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_ECX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb10b:
- if ((tag = findPci(X86_EBX))) {
-- pciWriteByte(tag,X86_EDI,(CARD8)X86_ECX);
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ pciWriteByte(tag, X86_EDI, X86_CL);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- } else {
-- X86_EAX = (X86_EAX & 0x00FF) | (BAD_REGISTER_NUMBER << 8);
-+ X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x flags=0x%x\n", X86_EAX,X86_EFLAGS);
-+ ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb10c:
- if ((tag = findPci(X86_EBX))) {
-- pciWriteWord(tag,X86_EDI,(CARD16)X86_ECX);
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ pciWriteWord(tag, X86_EDI, X86_CX);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- } else {
-- X86_EAX = (X86_EAX & 0x00FF) | (BAD_REGISTER_NUMBER << 8);
-+ X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x flags=0x%x\n", X86_EAX,X86_EFLAGS);
-+ ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS);
- #endif
- return 1;
- case 0xb10d:
- if ((tag = findPci(X86_EBX))) {
-- pciWriteLong(tag,X86_EDI,(CARD32)X86_ECX);
-- X86_EAX = (X86_EAX & 0x00FF) | (SUCCESSFUL << 8);
-+ pciWriteLong(tag, X86_EDI, X86_ECX);
-+ X86_EAX = X86_AL | (SUCCESSFUL << 8);
- X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
- } else {
-- X86_EAX = (X86_EAX & 0x00FF) | (BAD_REGISTER_NUMBER << 8);
-+ X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8);
- X86_EFLAGS |= ((unsigned long)0x01); /* set carry flag */
- }
- #ifdef PRINT_INT
-- ErrorF("ax=0x%x flags=0x%x\n", X86_EAX,X86_EFLAGS);
-+ ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS);
- #endif
- return 1;
- default:
-- return 0;
-+ xf86DrvMsgVerb(pInt->scrnIndex, X_NOT_IMPLEMENTED, 2,
-+ "int 0x1a subfunction\n");
-+ dump_registers(pInt);
-+ if (xf86GetVerbosity() > 3)
-+ stack_trace(pInt);
-+ return 1;
- }
- }
-
-@@ -285,15 +752,15 @@
- int bus = (bx >> 8) & 0xFF;
- int dev = (bx >> 3) & 0x1F;
- int func = bx & 0x7;
-- if (xf86IsPciDevPresent(bus,dev,func))
-- return pciTag(bus,dev,func);
-+ if (xf86IsPciDevPresent(bus, dev, func))
-+ return pciTag(bus, dev, func);
- return 0;
- }
-
- static CARD32
- pciSlotBX(pciVideoPtr pvp)
- {
-- return ((pvp->bus << 8) | (pvp->device << 3) | (pvp->func));
-+ return (pvp->bus << 8) | (pvp->device << 3) | (pvp->func);
- }
-
- /*
-@@ -304,12 +771,10 @@
- {
- pciVideoPtr pvp;
-
-- if ((pvp = xf86GetPciInfoForEntity(pInt->entityIndex))) {
-- X86_AX = (CARD16)(((pvp->bus) << 8)
-- | (pvp->device << 3) | (pvp->func & 0x7));
-- }
-- pushw(pInt,X86_CS);
-- pushw(pInt,(CARD16)X86_EIP);
-+ if ((pvp = xf86GetPciInfoForEntity(pInt->entityIndex)))
-+ X86_AX = (pvp->bus << 8) | (pvp->device << 3) | (pvp->func & 0x7);
-+ pushw(pInt, X86_CS);
-+ pushw(pInt, X86_IP);
- X86_CS = pInt->BIOSseg;
- X86_EIP = 0x0003;
- X86_ES = 0; /* standard pc es */
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86int10.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/xf86int10.h,v
-retrieving revision 1.15
-retrieving revision 1.16
-diff -u -r1.15 -r1.16
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86int10.h 2000/12/06 18:08:55 1.15
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86int10.h 2001/01/06 20:19:13 1.16
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86int10.h,v 1.15 2000/12/06 18:08:55 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86int10.h,v 1.16 2001/01/06 20:19:13 tsi Exp $ */
-
- /*
- * XFree86 int10 module
-@@ -12,11 +12,11 @@
- #include "Xmd.h"
- #include "Xdefs.h"
-
--#define SEG_ADDR(x) ((x>>4) & 0xF000)
--#define SEG_OFF(x) (x & 0xFFFF)
-+#define SEG_ADDR(x) (((x) >> 4) & 0x00F000)
-+#define SEG_OFF(x) ((x) & 0x0FFFF)
-
- /* int10 info structure */
--typedef struct {
-+typedef struct {
- int entityIndex;
- int scrnIndex;
- pointer cpuRegs;
-@@ -33,15 +33,16 @@
- int es;
- int bp;
- int flags;
-- } xf86Int10InfoRec, *xf86Int10InfoPtr;
-+ int stackseg;
-+} xf86Int10InfoRec, *xf86Int10InfoPtr;
-
- typedef struct _int10Mem {
-- CARD8(*rb)(xf86Int10InfoPtr,int);
-- CARD16(*rw)(xf86Int10InfoPtr,int);
-- CARD32(*rl)(xf86Int10InfoPtr,int);
-- void(*wb)(xf86Int10InfoPtr,int,CARD8);
-- void(*ww)(xf86Int10InfoPtr,int,CARD16);
-- void(*wl)(xf86Int10InfoPtr,int,CARD32);
-+ CARD8(*rb)(xf86Int10InfoPtr, int);
-+ CARD16(*rw)(xf86Int10InfoPtr, int);
-+ CARD32(*rl)(xf86Int10InfoPtr, int);
-+ void(*wb)(xf86Int10InfoPtr, int, CARD8);
-+ void(*ww)(xf86Int10InfoPtr, int, CARD16);
-+ void(*wl)(xf86Int10InfoPtr, int, CARD32);
- } int10MemRec, *int10MemPtr;
-
- typedef struct {
-@@ -54,7 +55,7 @@
- /* OS dependent functions */
- xf86Int10InfoPtr xf86InitInt10(int entityIndex);
- void xf86FreeInt10(xf86Int10InfoPtr pInt);
--void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off);
-+void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off);
- void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num);
- pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr);
-
-@@ -78,23 +79,25 @@
- #define V_BIOS 0xC0000
- #define HIGH_MEM V_BIOS
- #define HIGH_MEM_SIZE (SYS_BIOS - HIGH_MEM)
-+#define SEG_ADR(type, seg, reg) type((seg << 4) + (X86_##reg))
-+#define SEG_EADR(type, seg, reg) type((seg << 4) + (X86_E##reg))
-
- #define X86_TF_MASK 0x00000100
- #define X86_IF_MASK 0x00000200
--#define X86_IOPL_MASK 0x00003000
-+#define X86_IOPL_MASK 0x00003000
- #define X86_NT_MASK 0x00004000
- #define X86_VM_MASK 0x00020000
- #define X86_AC_MASK 0x00040000
--#define X86_VIF_MASK 0x00080000 /* virtual interrupt flag */
--#define X86_VIP_MASK 0x00100000 /* virtual interrupt pending */
-+#define X86_VIF_MASK 0x00080000 /* virtual interrupt flag */
-+#define X86_VIP_MASK 0x00100000 /* virtual interrupt pending */
- #define X86_ID_MASK 0x00200000
-
--#define MEM_RB(name,addr) name->mem->rb(name,addr)
--#define MEM_RW(name,addr) name->mem->rw(name,addr)
--#define MEM_RL(name,addr) name->mem->rl(name,addr)
--#define MEM_WB(name,addr,val) name->mem->wb(name,addr,val)
--#define MEM_WW(name,addr,val) name->mem->ww(name,addr,val)
--#define MEM_WL(name,addr,val) name->mem->wl(name,addr,val)
-+#define MEM_RB(name, addr) (*name->mem->rb)(name, addr)
-+#define MEM_RW(name, addr) (*name->mem->rw)(name, addr)
-+#define MEM_RL(name, addr) (*name->mem->rl)(name, addr)
-+#define MEM_WB(name, addr, val) (*name->mem->wb)(name, addr, val)
-+#define MEM_WW(name, addr, val) (*name->mem->ww)(name, addr, val)
-+#define MEM_WL(name, addr, val) (*name->mem->wl)(name, addr, val)
-
- /* OS dependent functions */
- void MapCurrentInt10(xf86Int10InfoPtr pInt);
-@@ -108,8 +111,7 @@
- /* helper_exec.c */
- int setup_int(xf86Int10InfoPtr pInt);
- void finish_int(xf86Int10InfoPtr, int sig);
--CARD32 getIntVect(xf86Int10InfoPtr pInt,int num);
--int vm86_GP_fault(xf86Int10InfoPtr pInt);
-+CARD32 getIntVect(xf86Int10InfoPtr pInt, int num);
- void pushw(xf86Int10InfoPtr pInt, CARD16 val);
- int run_bios_int(int num, xf86Int10InfoPtr pInt);
- void dump_code(xf86Int10InfoPtr pInt);
-@@ -117,7 +119,7 @@
- void stack_trace(xf86Int10InfoPtr pInt);
- xf86Int10InfoPtr getInt10Rec(int entityIndex);
- CARD8 bios_checksum(CARD8 *start, int size);
--void LockLegacyVGA(int screenIndex,legacyVGAPtr vga);
-+void LockLegacyVGA(int screenIndex, legacyVGAPtr vga);
- void UnlockLegacyVGA(int screenIndex, legacyVGAPtr vga);
- int port_rep_inb(xf86Int10InfoPtr pInt,
- CARD16 port, CARD32 base, int d_f, CARD32 count);
-@@ -139,30 +141,12 @@
- CARD32 x_inl(CARD16 port);
- void x_outl(CARD16 port, CARD32 val);
-
--#ifndef _INT10_NO_INOUT_MACROS
--#if defined(PRINT_PORT) || (!defined(_PC) && !defined(_PC_IO))
--# define p_inb x_inb
--# define p_inw x_inw
--# define p_outb x_outb
--# define p_outw x_outw
--# define p_inl x_inl
--# define p_outl x_outl
--#else
--# define p_inb inb
--# define p_inw inw
--# define p_outb outb
--# define p_outw outw
--# define p_inl inl
--# define p_outl outl
--#endif
--#endif
--
- CARD8 Mem_rb(int addr);
- CARD16 Mem_rw(int addr);
- CARD32 Mem_rl(int addr);
--void Mem_wb(int addr,CARD8 val);
--void Mem_ww(int addr,CARD16 val);
--void Mem_wl(int addr,CARD32 val);
-+void Mem_wb(int addr, CARD8 val);
-+void Mem_ww(int addr, CARD16 val);
-+void Mem_wl(int addr, CARD32 val);
-
- /* helper_mem.c */
- void setup_int_vect(xf86Int10InfoPtr pInt);
-@@ -177,9 +161,7 @@
- #endif
-
- /* pci.c */
--int mapPciRom(xf86Int10InfoPtr pInt, unsigned char * address);
-+int mapPciRom(xf86Int10InfoPtr pInt, unsigned char *address);
-
- #endif /* _INT10_PRIVATE */
- #endif /* _XF86INT10_H */
--
--
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.c,v
-retrieving revision 1.9
-retrieving revision 1.10
-diff -u -r1.9 -r1.10
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.c 2000/12/06 15:35:26 1.9
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.c 2001/01/06 20:19:13 1.10
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.c,v 1.9 2000/12/06 15:35:26 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.c,v 1.10 2001/01/06 20:19:13 tsi Exp $ */
- /*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
-@@ -6,128 +6,65 @@
- */
- #include <x86emu.h>
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_ansic.h"
- #include "compiler.h"
- #include "xf86_OSproc.h"
- #include "xf86Pci.h"
- #include "xf86_libc.h"
- #define _INT10_PRIVATE
--#define _INT10_NO_INOUT_MACROS
- #include "xf86int10.h"
- #include "int10Defines.h"
-
--#define M _X86EMU_env
-+#define M _X86EMU_env
-
--#if defined(PRINT_PORT) || (!defined(_PC) && !defined(_PC_IO))
--# define p_inb x_inb
--# define p_inw x_inw
--# define p_outb x_outb
--# define p_outw x_outw
--# define p_inl x_inl
--# define p_outl x_outl
--#else
--# define p_inb f_inb
--# define p_inw f_inw
--# define p_outb f_outb
--# define p_outw f_outw
--# define p_inl f_inl
--# define p_outl f_outl
--#endif
--
--/*
-- * inb/outb, etc are not available as functions (compler.h) on all
-- * platforms (eg SVR4.0 with cc). This provides versions that are guaranteed
-- * to be functions.
-- */
--
--static CARD8
--f_inb(CARD16 port)
--{
-- return inb(port);
--}
--
--static CARD16
--f_inw(CARD16 port)
--{
-- return inw(port);
--}
--
--static CARD32
--f_inl(CARD16 port)
--{
-- return inl(port);
--}
--
--static void
--f_outb(CARD16 port, CARD8 val)
--{
-- outb(port, val);
--}
--
--static void
--f_outw(CARD16 port, CARD16 val)
--{
-- outw(port,val);
--}
--
--static void
--f_outl(CARD16 port, CARD32 val)
--{
-- outl(port,val);
--}
--
- static void
- x86emu_do_int(int num)
- {
- Int10Current->num = num;
-
- if (!int_handler(Int10Current)) {
-- xf86DrvMsg(Int10Current->scrnIndex,
-- X_ERROR,"\nUnknown vm86_int: %X\n\n",num);
- X86EMU_halt_sys();
- }
-- return;
- }
--
-+
- void
- xf86ExecX86int10(xf86Int10InfoPtr pInt)
- {
- int sig = setup_int(pInt);
-
- if (int_handler(pInt)) {
-- X86EMU_exec();
-+ X86EMU_exec();
- }
--
-+
- finish_int(pInt, sig);
- }
--
-+
- Bool
- xf86Int10ExecSetup(xf86Int10InfoPtr pInt)
- {
- int i;
- X86EMU_intrFuncs intFuncs[256];
- X86EMU_pioFuncs pioFuncs = {
-- (u8(*)(u16))p_inb,
-- (u16(*)(u16))p_inw,
-- (u32(*)(u16))p_inl,
-- (void(*)(u16,u8))p_outb,
-- (void(*)(u16,u16))p_outw,
-- (void(*)(u16,u32))p_outl
-+ (u8(*)(u16))x_inb,
-+ (u16(*)(u16))x_inw,
-+ (u32(*)(u16))x_inl,
-+ (void(*)(u16, u8))x_outb,
-+ (void(*)(u16, u16))x_outw,
-+ (void(*)(u16, u32))x_outl
- };
--
-+
- X86EMU_memFuncs memFuncs = {
- (u8(*)(u32))Mem_rb,
- (u16(*)(u32))Mem_rw,
- (u32(*)(u32))Mem_rl,
-- (void(*)(u32,u8))Mem_wb,
-- (void(*)(u32,u16))Mem_ww,
-- (void(*)(u32,u32))Mem_wl
-+ (void(*)(u32, u8))Mem_wb,
-+ (void(*)(u32, u16))Mem_ww,
-+ (void(*)(u32, u32))Mem_wl
- };
-
- X86EMU_setupMemFuncs(&memFuncs);
--
-- pInt->cpuRegs = &M;
-+
-+ pInt->cpuRegs = &M;
- M.mem_base = 0;
- M.mem_size = 1024*1024 + 1024;
- X86EMU_setupPioFuncs(&pioFuncs);
-@@ -146,5 +83,3 @@
- VErrorF(fmt, argptr);
- va_end(argptr);
- }
--
--
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.h,v
-retrieving revision 1.1
-retrieving revision 1.2
-diff -u -r1.1 -r1.2
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.h 2000/01/23 04:44:35 1.1
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.h 2001/01/06 20:19:13 1.2
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.h,v 1.1 2000/01/23 04:44:35 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86x86emu.h,v 1.2 2001/01/06 20:19:13 tsi Exp $ */
- /*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
-@@ -8,7 +8,7 @@
- #define XF86X86EMU_H_
- #include <x86emu.h>
-
--#define M _X86EMU_env
-+#define M _X86EMU_env
-
- #define X86_EAX M.x86.R_EAX
- #define X86_EBX M.x86.R_EBX
-@@ -37,10 +37,15 @@
- #define X86_SS M.x86.R_SS
- #define X86_FS M.x86.R_FS
- #define X86_GS M.x86.R_GS
--
-+
- #define X86_AL M.x86.R_AL
- #define X86_BL M.x86.R_BL
- #define X86_CL M.x86.R_CL
- #define X86_DL M.x86.R_DL
-+
-+#define X86_AH M.x86.R_AH
-+#define X86_BH M.x86.R_BH
-+#define X86_CH M.x86.R_CH
-+#define X86_DH M.x86.R_DH
-
- #endif
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elf.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/loader/elf.h,v
-retrieving revision 1.9
-retrieving revision 1.10
-diff -u -r1.9 -r1.10
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elf.h 2000/09/07 19:06:52 1.9
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elf.h 2001/01/06 20:19:13 1.10
-@@ -1,11 +1,11 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elf.h,v 1.9 2000/09/07 19:06:52 anderson Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elf.h,v 1.10 2001/01/06 20:19:13 tsi Exp $ */
-
-
--typedef unsigned long Elf32_Addr;
-+typedef unsigned int Elf32_Addr;
- typedef unsigned short Elf32_Half;
--typedef unsigned long Elf32_Off;
-+typedef unsigned int Elf32_Off;
- typedef long Elf32_Sword;
--typedef unsigned long Elf32_Word;
-+typedef unsigned int Elf32_Word;
-
- typedef unsigned long Elf64_Addr;
- typedef unsigned short Elf64_Half;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v
-retrieving revision 1.31
-retrieving revision 1.32
-diff -u -r1.31 -r1.32
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c 2000/12/13 16:52:01 1.31
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c 2001/01/06 20:19:14 1.32
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.31 2000/12/13 16:52:01 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.32 2001/01/06 20:19:14 tsi Exp $ */
-
- /*
- *
-@@ -61,7 +61,11 @@
- #endif
- #endif
-
--#if defined (__alpha__) || defined (__ia64__) || (defined (__sparc__) && (defined (__arch64__) || defined (__sparcv9)))
-+#if defined (__alpha__) || \
-+ defined (__ia64__) || \
-+ (defined (__sparc__) && \
-+ (defined (__arch64__) || \
-+ defined (__sparcv9)))
- typedef Elf64_Ehdr Elf_Ehdr;
- typedef Elf64_Shdr Elf_Shdr;
- typedef Elf64_Sym Elf_Sym;
-@@ -135,6 +139,16 @@
- #define ELF_R_TYPE ELF32_R_TYPE
- #endif
-
-+#if defined(__powerpc__) || \
-+ defined(__mc68000__) || \
-+ defined(__alpha__) || \
-+ defined(__sparc__) || \
-+ defined(__ia64__)
-+typedef Elf_Rela Elf_Rel_t;
-+#else
-+typedef Elf_Rel Elf_Rel_t;
-+#endif
-+
- /*
- * This structure contains all of the information about a module
- * that has been loaded.
-@@ -222,12 +236,7 @@
- * to try later after more modules have been loaded.
- */
- typedef struct _elf_reloc {
--#if defined(i386)
-- Elf_Rel *rel;
--#endif
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
-- Elf_Rela *rel;
--#endif
-+ Elf_Rel_t *rel;
- ELFModulePtr file;
- unsigned char *secp;
- struct _elf_reloc *next;
-@@ -251,33 +260,25 @@
- static char *ElfGetStringIndex(ELFModulePtr, int, int);
- static char *ElfGetString(ELFModulePtr, int);
- static char *ElfGetSectionName(ELFModulePtr, int);
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
--static ELFRelocPtr ElfDelayRelocation(ELFModulePtr, unsigned char *, Elf_Rela *);
--#else
--static ELFRelocPtr ElfDelayRelocation(ELFModulePtr, unsigned char *, Elf_Rel *);
--#endif
-+static ELFRelocPtr ElfDelayRelocation(ELFModulePtr, unsigned char *, Elf_Rel_t *);
- static ELFCommonPtr ElfAddCOMMON(Elf_Sym *);
- static int ElfCOMMONSize(void);
- static int ElfCreateCOMMON(ELFModulePtr,LOOKUP *);
- static char *ElfGetSymbolNameIndex(ELFModulePtr, int, int);
- static char *ElfGetSymbolName(ELFModulePtr, int);
- static Elf_Addr ElfGetSymbolValue(ELFModulePtr, int);
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
--static ELFRelocPtr Elf_RelocateEntry(ELFModulePtr, unsigned char *, Elf_Rela *, int);
--#else
--static ELFRelocPtr Elf_RelocateEntry(ELFModulePtr, unsigned char *, Elf_Rel *, int);
--#endif
-+static ELFRelocPtr Elf_RelocateEntry(ELFModulePtr, unsigned char *, Elf_Rel_t *, int);
- static ELFRelocPtr ELFCollectRelocations(ELFModulePtr, int);
- static LOOKUP *ELF_GetSymbols(ELFModulePtr, unsigned short **);
- static void ELFCollectSections(ELFModulePtr, int, int *, int *);
- #if defined(__alpha__) || defined(__ia64__)
--static void ElfAddGOT(ELFModulePtr, Elf_Rela *);
-+static void ElfAddGOT(ELFModulePtr, Elf_Rel_t *);
- static int ELFCreateGOT(ELFModulePtr, int);
- #endif
- #if defined(__ia64__)
- static void ElfAddOPD(ELFModulePtr, int, LOOKUP *);
- static void ELFCreateOPD(ELFModulePtr);
--static void ElfAddPLT(ELFModulePtr, Elf_Rela *);
-+static void ElfAddPLT(ELFModulePtr, Elf_Rel_t *);
- static void ELFCreatePLT(ELFModulePtr);
- enum ia64_operand {
- IA64_OPND_IMM22,
-@@ -343,12 +344,7 @@
- ElfDelayRelocation(elffile,secp,rel)
- ELFModulePtr elffile;
- unsigned char *secp;
--#if defined(i386)
--Elf_Rel *rel;
--#endif
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
--Elf_Rela *rel;
--#endif
-+Elf_Rel_t *rel;
- {
- ELFRelocPtr reloc;
-
-@@ -361,11 +357,17 @@
- reloc->rel=rel;
- reloc->next=0;
- #ifdef ELFDEBUG
-- ELFDEBUG("ElfDelayRelocation %lx: file %lx, sec %lx, r_offset 0x%x, r_info 0x%x", reloc, elffile, secp, rel->r_offset, rel->r_info);
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
-- ELFDEBUG(", r_addend 0x%x", rel->r_addend);
-+ ELFDEBUG("ElfDelayRelocation %lx: file %lx, sec %lx,"
-+ " r_offset 0x%lx, r_info 0x%x",
-+ reloc, elffile, secp, rel->r_offset, rel->r_info);
-+#if defined(__powerpc__) || \
-+ defined(__mc68000__) || \
-+ defined(__alpha__) || \
-+ defined(__sparc__) || \
-+ defined(__ia64__)
-+ ELFDEBUG(", r_addend 0x%lx", rel->r_addend);
- #endif
-- ELFDEBUG("\n" );
-+ ELFDEBUG("\n");
- #endif
- return reloc;
- }
-@@ -396,7 +398,11 @@
-
- for (common = listCOMMON; common; common = common->next) {
- size+=common->sym->st_size;
--#if defined(__alpha__) || defined(__ia64__) || (defined(__sparc__) && (defined(__arch64__) || defined(__sparcv9)))
-+#if defined(__alpha__) || \
-+ defined(__ia64__) || \
-+ (defined(__sparc__) && \
-+ (defined(__arch64__) || \
-+ defined(__sparcv9)))
- size = (size+7)&~0x7;
- #endif
- }
-@@ -417,7 +423,11 @@
-
- for (common = listCOMMON; common; common = common->next) {
- size+=common->sym->st_size;
--#if defined(__alpha__) || defined(__ia64__) || (defined(__sparc__) && (defined(__arch64__) || defined(__sparcv9)))
-+#if defined(__alpha__) || \
-+ defined(__ia64__) || \
-+ (defined(__sparc__) && \
-+ (defined(__arch64__) || \
-+ defined(__sparcv9)))
- size = (size+7)&~0x7;
- #endif
- numsyms++;
-@@ -453,10 +463,12 @@
- /* this is xstrdup because is should be more efficient. it is freed
- * with xf86loaderfree
- */
-- pLookup[l].symName = xf86loaderstrdup(ElfGetString(elffile,common->sym->st_name));
-+ pLookup[l].symName =
-+ xf86loaderstrdup(ElfGetString(elffile,common->sym->st_name));
- pLookup[l].offset = (funcptr)(elffile->common + offset);
- #ifdef ELFDEBUG
-- ELFDEBUG("Adding common %lx %s\n", pLookup[l].offset, pLookup[l].symName );
-+ ELFDEBUG("Adding common %lx %s\n",
-+ pLookup[l].offset, pLookup[l].symName);
- #endif
-
- /* Record the symbol address for gdb */
-@@ -468,7 +480,11 @@
- }
- listCOMMON=common->next;
- offset+=common->sym->st_size;
--#if defined(__alpha__) || defined(__ia64__) || (defined(__sparc__) && (defined(__arch64__) || defined(__sparcv9)))
-+#if defined(__alpha__) || \
-+ defined(__ia64__) || \
-+ (defined(__sparc__) && \
-+ (defined(__arch64__) || \
-+ defined(__sparcv9)))
- offset = (offset+7)&~0x7;
- #endif
- xf86loaderfree(common);
-@@ -549,18 +565,7 @@
- ELFModulePtr elffile;
- int index;
- {
-- char *name,*symname;
-- symname=ElfGetSymbolNameIndex( elffile, index, elffile->symndx );
-- if( symname == NULL )
-- return NULL;
--
-- name=xf86loadermalloc(strlen(symname)+1);
-- if (!name)
-- FatalError("ELFGetSymbolName: Out of memory\n");
--
-- strcpy(name,symname);
--
-- return name;
-+ return ElfGetSymbolNameIndex(elffile, index, elffile->symndx);
- }
-
- static Elf_Addr
-@@ -619,7 +624,7 @@
- break;
- }
- #ifdef ELFDEBUG
-- ELFDEBUG( "%x\t", symbol );
-+ ELFDEBUG( "%lx\t", symbol );
- ELFDEBUG( "%lx\t", symval );
- ELFDEBUG( "%s\n", symname ? symname : "NULL");
- #endif
-@@ -711,8 +716,8 @@
- break;
- }
- #ifdef ELFDEBUG
-- ELFDEBUG( "ElfGetPlt: symbol=%x\t", symbol );
-- ELFDEBUG( "newval=%x\t", symval );
-+ ELFDEBUG( "ElfGetPlt: symbol=%lx\t", symbol );
-+ ELFDEBUG( "newval=%lx\t", symval );
- ELFDEBUG( "name=\"%s\"\n", symname ? symname : "NULL");
- #endif
- break;
-@@ -738,20 +743,18 @@
- static void
- ElfAddGOT(elffile,rel)
- ELFModulePtr elffile;
--Elf_Rela *rel;
-+Elf_Rel_t *rel;
- {
- ELFGotEntryPtr gotent;
-
- #ifdef ELFDEBUG
- {
- Elf_Sym *sym;
-- char *namestr;
-
- sym=(Elf_Sym *)&(elffile->symtab[ELF_R_SYM(rel->r_info)]);
- if( sym->st_name) {
- ELFDEBUG("ElfAddGOT: Adding GOT entry for %s\n",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- }
- else
- ELFDEBUG("ElfAddGOT: Adding GOT entry for %s\n",
-@@ -799,9 +802,7 @@
- int gotsize;
- #ifdef ELFDEBUG
- ELFDEBUG( "ELFCreateGOT: %x entries in the GOT\n", elffile->gotsize/8 );
--#endif
-
--#ifdef ELFDEBUG
- /*
- * Hmmm. Someone is getting here without any got entries, but they
- * may still have R_ALPHA_GPDISP relocations against the got.
-@@ -836,7 +837,8 @@
- gots->freeptr = gots->freeptr + elffile->gotsize;
- gots->nuses++;
- #ifdef ELFDEBUG
-- ELFDEBUG( "ELFCreateGOT: GOT address %lx in shared GOT, nuses %d\n", elffile->got, gots->nuses );
-+ ELFDEBUG( "ELFCreateGOT: GOT address %lx in shared GOT, nuses %d\n",
-+ elffile->got, gots->nuses );
- #endif
- return TRUE;
- }
-@@ -930,22 +932,18 @@
- ELFCreateOPD(elffile)
- ELFModulePtr elffile;
- {
-- ELFOpdPtr opdent, last = NULL;
-+ ELFOpdPtr opdent;
-
- if (elffile->got == NULL)
- ErrorF( "ELFCreateOPD() Unallocated GOT!!!!\n" );
-
-- for (opdent = elffile->opd_entries; opdent; last = opdent, opdent = opdent->next) {
-- if (last && last->index == -1)
-- xf86loaderfree(last);
-+ for (opdent = elffile->opd_entries; opdent; opdent = opdent->next) {
- if (opdent->index != -1)
- continue;
- ((unsigned long *)(elffile->got+opdent->offset))[0] = (long)opdent->l->offset;
- ((unsigned long *)(elffile->got+opdent->offset))[1] = (long)elffile->got;
- opdent->l->offset = (funcptr)(elffile->got+opdent->offset);
- }
-- if (last && last->index == -1)
-- xf86loaderfree(last);
- }
-
- /*
-@@ -954,20 +952,18 @@
- static void
- ElfAddPLT(elffile,rel)
- ELFModulePtr elffile;
--Elf_Rela *rel;
-+Elf_Rel_t *rel;
- {
- ELFPltEntryPtr pltent;
-
- #ifdef ELFDEBUG
- {
- Elf_Sym *sym;
-- char *namestr;
-
- sym=(Elf_Sym *)&(elffile->symtab[ELF_R_SYM(rel->r_info)]);
- if( sym->st_name) {
- ELFDEBUG("ElfAddPLT: Adding PLT entry for %s\n",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- }
- else
- ErrorF("ElfAddPLT: Add PLT entry for section??\n");
-@@ -1046,7 +1042,7 @@
- case 0: data = *data128; break;
- case 1: memcpy(&data, (char *)data128 + 5, 8); break;
- case 2: memcpy(&data, (char *)data128 + 10, 6); break;
-- default: FatalError("Unexpected slot in nIA64InstallReloc()\n");
-+ default: FatalError("Unexpected slot in IA64InstallReloc()\n");
- }
- switch (opnd) {
- case IA64_OPND_IMM22:
-@@ -1072,7 +1068,7 @@
- case 0: *data128 = data; break;
- case 1: memcpy((char *)data128 + 5, &data, 8); break;
- case 2: memcpy((char *)data128 + 10, &data, 6); break;
-- default: FatalError("Unexpected slot in nIA64InstallReloc()\n");
-+ default: FatalError("Unexpected slot in IA64InstallReloc()\n");
- }
- #ifdef ELFDEBUG
- ELFDEBUG( "After [%016lx%016lx]\n", data128[1], data128[0]);
-@@ -1091,12 +1087,7 @@
- Elf_RelocateEntry(elffile, secp, rel, force)
- ELFModulePtr elffile;
- unsigned char *secp; /* Begining of the target section */
--#if defined(i386)
--Elf_Rel *rel;
--#endif
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
--Elf_Rela *rel;
--#endif
-+Elf_Rel_t *rel;
- int force;
- {
- unsigned int *dest32; /* address of the 32 bit place being modified */
-@@ -1109,11 +1100,7 @@
- #if defined(__alpha__)
- unsigned int *dest32h; /* address of the high 32 bit place being modified */
- unsigned long *dest64;
--#if 0 /* XXX unused */
-- unsigned long *gp=(unsigned long *)elffile->got+0x8000; /*
-- * location of the got table */
- #endif
--#endif
- #if defined(__ia64__)
- unsigned long *dest64;
- unsigned long *dest128;
-@@ -1121,16 +1108,17 @@
- Elf_Addr symval = 0; /* value of the indicated symbol */
-
- #ifdef ELFDEBUG
--#if defined(i386)
- ELFDEBUG( "%lx %d %d\n", rel->r_offset,
-- ELF_R_SYM(rel->r_info),ELF_R_TYPE(rel->r_info) );
-+ ELF_R_SYM(rel->r_info), ELF_R_TYPE(rel->r_info) );
-+#if defined(__powerpc__) || \
-+ defined(__mc68000__) || \
-+ defined(__alpha__) || \
-+ defined(__sparc__) || \
-+ defined(__ia64__)
-+ ELFDEBUG( "%lx", rel->r_addend );
- #endif
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__ia64__)
-- ELFDEBUG( "%x %d %d %x\n", rel->r_offset,
-- ELF_R_SYM(rel->r_info),ELF_R_TYPE(rel->r_info),
-- rel->r_addend );
-+ ELFDEBUG("\n");
- #endif
--#endif
- #if defined(__alpha__)
- if (ELF_R_SYM(rel->r_info) && ELF_R_TYPE(rel->r_info) != R_ALPHA_GPDISP) {
- #else
-@@ -1142,10 +1130,8 @@
- symval = (Elf_Addr) &LoaderDefaultFunc;
- } else {
- #ifdef ELFDEBUG
-- char *namestr;
-- namestr = ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info));
-- ELFDEBUG("***Unable to resolve symbol %s\n", namestr);
-- xf86loaderfree(namestr);
-+ ELFDEBUG("***Unable to resolve symbol %s\n",
-+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
- #endif
- return ElfDelayRelocation(elffile,secp,rel);
- }
-@@ -1170,16 +1156,12 @@
- case R_386_PC32:
- dest32=(unsigned int *)(secp+rel->r_offset);
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_386_PC32 %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
-- }
- #endif
-
- *dest32=symval+(*dest32)-(Elf_Addr)dest32; /* S + A - P */
-@@ -1188,7 +1170,7 @@
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
- #endif
-
-- break;
-+ break;
- #endif /* i386 */
- #if defined(__alpha__)
- case R_ALPHA_NONE:
-@@ -1216,16 +1198,12 @@
- dest32=(unsigned int *)dest64;
-
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_ALPHA_GPREL32 %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
-- }
- #endif
- symval += rel->r_addend;
- symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
-@@ -1249,16 +1227,12 @@
- ELFGotEntryPtr gotent;
- dest32=(unsigned int *)(secp+rel->r_offset);
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_ALPHA_LITERAL %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
-- }
- #endif
-
- for (gotent=elffile->got_entries;gotent;gotent=gotent->next) {
-@@ -1311,11 +1285,8 @@
- dest32=(unsigned int *)((secp+rel->r_offset)+rel->r_addend);
-
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_ALPHA_GPDISP %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "got=%lx\t", elffile->got );
- ELFDEBUG( "gp=%lx\t", gp );
-@@ -1323,13 +1294,10 @@
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
- ELFDEBUG( "dest32h=%lx\t", dest32h );
- ELFDEBUG( "*dest32h=%8.8x\t", *dest32h );
-- }
- #endif
- if ((*dest32h >> 26) != 9 || (*dest32 >> 26) != 8) {
-- char *namestr;
- ErrorF( "***Bad instructions in relocating %s\n",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- }
-
- symval = (*dest32h & 0xffff) << 16 | (*dest32 & 0xffff);
-@@ -1362,16 +1330,12 @@
- case R_ALPHA_HINT:
- dest32=(unsigned int *)((secp+rel->r_offset)+rel->r_addend);
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_ALPHA_HINT %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
-- }
- #endif
-
- #ifdef ELFDEBUG
-@@ -1405,32 +1369,30 @@
- case R_68K_32:
- dest32=(unsigned long *)(secp+rel->r_offset);
- #ifdef ELFDEBUG
--ELFDEBUG( "R_68K_32\t", dest32 );
--ELFDEBUG( "dest32=%x\t", dest32 );
--ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
-+ ELFDEBUG( "R_68K_32\t", dest32 );
-+ ELFDEBUG( "dest32=%x\t", dest32 );
-+ ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
- #endif
- *dest32=symval+(*dest32); /* S + A */
- #ifdef ELFDEBUG
--ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
-+ ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
- #endif
- break;
- case R_68K_PC32:
- dest32=(unsigned long *)(secp+rel->r_offset);
- #ifdef ELFDEBUG
--char *namestr;
--ELFDEBUG( "R_68K_PC32 %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
--xf86loaderfree(namestr);
--ELFDEBUG( "secp=%x\t", secp );
--ELFDEBUG( "symval=%x\t", symval );
--ELFDEBUG( "dest32=%x\t", dest32 );
--ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
-+ ELFDEBUG( "R_68K_PC32 %s\t",
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-+ ELFDEBUG( "secp=%x\t", secp );
-+ ELFDEBUG( "symval=%x\t", symval );
-+ ELFDEBUG( "dest32=%x\t", dest32 );
-+ ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
- #endif
-
- *dest32=symval+(*dest32)-(Elf_Addr)dest32; /* S + A - P */
-
- #ifdef ELFDEBUG
--ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
-+ ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
- #endif
-
- break;
-@@ -1900,7 +1862,8 @@
- if (rel->r_addend)
- FatalError("\nAddend for R_IA64_LTOFF_FPTR22 not supported\n");
- #ifdef ELFDEBUG
-- ELFDEBUG( "opd=%016lx.%016lx\n", ((long *)symval)[0], ((long *)symval)[1] );
-+ ELFDEBUG( "opd=%016lx.%016lx\n",
-+ ((long *)symval)[0], ((long *)symval)[1] );
- #endif
- /* FALLTHROUGH */
- case R_IA64_LTOFF22:
-@@ -1908,18 +1871,14 @@
- ELFGotEntryPtr gotent;
- dest128=(unsigned long *)(secp+(rel->r_offset&~3));
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "%s %s\t", ELF_R_TYPE(rel->r_info) == R_IA64_LTOFF22 ?
- "R_IA64_LTOFF22" : "R_IA64_LTOFF_FPTR22",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest128=%lx\t", dest128 );
-- ELFDEBUG( "slot=%ld\t", rel->r_offset & 3);
-- ELFDEBUG( "*dest128=[%016lx%016lx]\t", dest128[1], dest128[0]);
-- }
-+ ELFDEBUG( "slot=%d\n", rel->r_offset & 3);
-+ ELFDEBUG( "*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
- #endif
-
- for (gotent=elffile->got_entries;gotent;gotent=gotent->next) {
-@@ -1933,7 +1892,7 @@
- *(unsigned long *)(elffile->got+gotent->offset) =
- symval+rel->r_addend;
- #ifdef ELFDEBUG
-- ELFDEBUG("Setting gotent[%x]=%lx\t",
-+ ELFDEBUG("Setting gotent[%x]=%lx\n",
- gotent->offset, symval+rel->r_addend);
- #endif
- if ((gotent->offset & 0xffe00000) != 0)
-@@ -1951,18 +1910,14 @@
- ELFPltEntryPtr pltent;
- dest128=(unsigned long *)(secp+(rel->r_offset&~3));
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_IA64_PCREL21B %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "opd=%lx.%lx\t", ((long *)symval)[0], ((long *)symval)[1]);
- ELFDEBUG( "dest128=%lx\t", dest128 );
-- ELFDEBUG( "slot=%ld\t", rel->r_offset & 3);
-- ELFDEBUG( "*dest128=[%016lx%016lx]\t", dest128[1], dest128[0]);
-- }
-+ ELFDEBUG( "slot=%d\n", rel->r_offset & 3);
-+ ELFDEBUG( "*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
- #endif
- if (rel->r_addend)
- FatalError("\nAddend for PCREL21B not supported\n");
-@@ -2010,16 +1965,12 @@
- case R_IA64_FPTR64LSB:
- dest64=(unsigned long *)(secp+rel->r_offset);
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_IA64_FPTR64LSB %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest64=%lx\t", dest64 );
- ELFDEBUG( "opd=%016lx.%016lx\n", ((long *)symval)[0], ((long *)symval)[1] );
-- }
- #endif
-
- if (rel->r_addend)
-@@ -2030,15 +1981,11 @@
- case R_IA64_DIR64LSB:
- dest64=(unsigned long *)(secp+rel->r_offset);
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_IA64_DIR64LSB %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
-- ELFDEBUG( "dest64=%lx\t", dest64 );
-- }
-+ ELFDEBUG( "dest64=%lx\n", dest64 );
- #endif
- *dest64 = symval + rel->r_addend;
- break;
-@@ -2046,26 +1993,22 @@
- case R_IA64_GPREL22:
- dest128=(unsigned long *)(secp+(rel->r_offset&~3));
- #ifdef ELFDEBUG
-- {
-- char *namestr;
- ELFDEBUG( "R_IA64_GPREL22 %s\t",
-- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
-- xf86loaderfree(namestr);
-+ ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest128=%lx\t", dest128 );
-- ELFDEBUG( "slot=%ld\t", rel->r_offset & 3);
-- ELFDEBUG( "*dest128=[%016lx%016lx]\t", dest128[1], dest128[0]);
-- }
-+ ELFDEBUG( "slot=%d\n", rel->r_offset & 3);
-+ ELFDEBUG( "*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
- #endif
-- IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_IMM22, symval + rel->r_addend - (long)elffile->got);
-+ IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_IMM22,
-+ symval + rel->r_addend - (long)elffile->got);
- break;
-
- #endif
- default:
-- ErrorF(
-- "Elf_RelocateEntry() Unsupported relocation type %d\n",
-- ELF_R_TYPE(rel->r_info) );
-+ ErrorF("Elf_RelocateEntry() Unsupported relocation type %d\n",
-+ ELF_R_TYPE(rel->r_info));
- break;
- }
- return 0;
-@@ -2078,12 +2021,7 @@
- {
- int i, numrel;
- Elf_Shdr *sect=&(elffile->sections[index]);
--#if defined(i386)
-- Elf_Rel *rel=(Elf_Rel *)elffile->saddr[index];
--#endif
--#if defined(__powerpc__) || defined(__mc68000__) || defined(__alpha__) || defined(__sparc__) || defined(__sparc__) || defined(__ia64__)
-- Elf_Rela *rel=(Elf_Rela *)elffile->saddr[index];
--#endif
-+ Elf_Rel_t *rel=(Elf_Rel_t *)elffile->saddr[index];
- Elf_Sym *syms;
- unsigned char *secp; /* Begining of the target section */
- ELFRelocPtr reloc_head = NULL;
-@@ -2101,7 +2039,7 @@
- #if defined(__alpha__)
- if( ELF_R_TYPE(rel[i].r_info) == R_ALPHA_LITERAL) {
- ElfAddGOT(elffile,&rel[i]);
-- }
-+ }
- #endif
- #if defined(__ia64__)
- if (ELF_R_TYPE(rel[i].r_info) == R_IA64_LTOFF22
-@@ -2500,7 +2438,7 @@
- elffile->reltxtndx=i;
- elffile->reltxtsize=SecSize(i);
- #ifdef ELFDEBUG
-- ELFDEBUG(".rela.text starts at %x\n", elffile->reltext );
-+ ELFDEBUG(".rela.text starts at %lx\n", elffile->reltext );
- #endif
- continue;
- }
-@@ -2514,7 +2452,7 @@
- elffile->reldatndx=i;
- elffile->reldatsize=SecSize(i);
- #ifdef ELFDEBUG
-- ELFDEBUG(".rela.data starts at %x\n", elffile->reldata );
-+ ELFDEBUG(".rela.data starts at %lx\n", elffile->reldata );
- #endif
- continue;
- }
-@@ -2528,7 +2466,7 @@
- elffile->relsdatndx=i;
- elffile->relsdatsize=SecSize(i);
- #ifdef ELFDEBUG
-- ELFDEBUG(".rela.sdata starts at %x\n", elffile->relsdata );
-+ ELFDEBUG(".rela.sdata starts at %lx\n", elffile->relsdata );
- #endif
- continue;
- }
-@@ -2542,7 +2480,7 @@
- elffile->relrodatndx=i;
- elffile->relrodatsize=SecSize(i);
- #ifdef ELFDEBUG
-- ELFDEBUG(".rela.rodata starts at %x\n", elffile->relrodata );
-+ ELFDEBUG(".rela.rodata starts at %lx\n", elffile->relrodata );
- #endif
- continue;
- }
-@@ -2724,7 +2662,8 @@
- /*
- * Get the ELF header
- */
-- elffile->header=(Elf_Ehdr*)_LoaderFileToMem(elffd,0,sizeof(Elf_Ehdr),"header");
-+ elffile->header=
-+ (Elf_Ehdr*)_LoaderFileToMem(elffd, 0, sizeof(Elf_Ehdr), "header");
- header=(Elf_Ehdr *)elffile->header;
-
- /*
-@@ -2732,8 +2671,9 @@
- */
- elffile->numsh=header->e_shnum;
- elffile->secsize=(header->e_shentsize*header->e_shnum);
-- elffile->sections=(Elf_Shdr *)_LoaderFileToMem(elffd,header->e_shoff,
-- elffile->secsize, "sections");
-+ elffile->sections=
-+ (Elf_Shdr *)_LoaderFileToMem(elffd, header->e_shoff, elffile->secsize,
-+ "sections");
- #if defined(__alpha__) || defined(__ia64__)
- /*
- * Need to allocate space for the .got section which will be
-@@ -2782,8 +2722,9 @@
- * Get the section header string table
- */
- elffile->shstrsize = SecSize(header->e_shstrndx);
-- elffile->shstraddr = _LoaderFileToMem(elffd,SecOffset(header->e_shstrndx),
-- SecSize(header->e_shstrndx),".shstrtab");
-+ elffile->shstraddr =
-+ _LoaderFileToMem(elffd, SecOffset(header->e_shstrndx),
-+ SecSize(header->e_shstrndx), ".shstrtab");
- elffile->shstrndx = header->e_shstrndx;
- #if defined(__alpha__) || defined(__ia64__)
- /*
-@@ -2991,6 +2932,10 @@
- {
- ELFModulePtr elffile = (ELFModulePtr)modptr;
- ELFRelocPtr relptr, reltptr, *brelptr;
-+#ifdef __ia64__
-+ ELFOpdPtr opdent;
-+ ELFPltEntryPtr pltent;
-+#endif
-
- /*
- * Delete any unresolved relocations
-@@ -3031,8 +2976,14 @@
- #if defined(__alpha__) || defined(__ia64__)
- if (elffile->shared_got) {
- elffile->shared_got->nuses--;
-- if (!elffile->shared_got->nuses)
-+ if (!elffile->shared_got->nuses) {
-+ ELFGotPtr *pgot = &ELFSharedGOTs;
-+ while (*pgot && *pgot != elffile->shared_got)
-+ pgot = &(*pgot)->next;
-+ if (*pgot)
-+ *pgot = elffile->shared_got->next;
- xf86loaderfree(elffile->shared_got);
-+ }
- }
- #endif
- #else
-@@ -3045,13 +2996,21 @@
- CheckandFreeFile(elffile->rodata,elffile->rodatsize);
- CheckandFreeFile(elffile->rodata1,elffile->rodat1size);
- CheckandFree(elffile->common,elffile->comsize);
--#if defined(__ia64__)
-- CheckandFree(elffile->plt,elffile->pltsize);
--#endif
- #if defined(__alpha__) || defined(__ia64__)
- CheckandFree(elffile->got,elffile->gotsize);
- #endif
- #endif
-+#if defined(__ia64__)
-+ CheckandFree(elffile->plt,elffile->pltsize);
-+ while ((pltent = elffile->plt_entries)) {
-+ elffile->plt_entries = pltent->next;
-+ xf86loaderfree(pltent);
-+ }
-+ while ((opdent = elffile->opd_entries)) {
-+ elffile->opd_entries = opdent->next;
-+ xf86loaderfree(opdent);
-+ }
-+#endif
- CheckandFreeFile(elffile->reltext,elffile->reltxtsize);
- CheckandFreeFile(elffile->reldata,elffile->reldatsize);
- CheckandFreeFile(elffile->relrodata,elffile->relrodatsize);
-@@ -3086,4 +3045,3 @@
- }
- return NULL;
- }
--
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h,v
-retrieving revision 1.1
-retrieving revision 1.2
-diff -u -r1.1 -r1.2
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h 2000/01/23 04:44:35 1.1
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h 2001/01/06 20:19:14 1.2
-@@ -1,46 +1,55 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h,v 1.1 2000/01/23 04:44:35 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h,v 1.2 2001/01/06 20:19:14 tsi Exp $ */
-+
-+#ifndef _INT10DEFINES_H_
-+#define _INT10DEFINES_H_ 1
-+
- #ifdef _VM86_LINUX
-
- #include <asm/vm86.h>
-
--#define CPU_R(type,name) \
-- (*((type *)&(((struct vm86_struct *)REG->cpuRegs)->regs.##name)))
--#define CPU_RD(name) CPU_R(CARD32,name)
--#define CPU_RW(name) CPU_R(CARD16,name)
--#define CPU_RB(name) CPU_R(CARD8,name)
--
--#define X86_EAX CPU_RD(eax)
--#define X86_EBX CPU_RD(ebx)
--#define X86_ECX CPU_RD(ecx)
--#define X86_EDX CPU_RD(edx)
--#define X86_ESI CPU_RD(esi)
--#define X86_EDI CPU_RD(edi)
--#define X86_EBP CPU_RD(ebp)
--#define X86_EIP CPU_RD(eip)
--#define X86_ESP CPU_RD(esp)
--#define X86_EFLAGS CPU_RD(eflags)
--
--#define X86_FLAGS CPU_RW(eflags)
--#define X86_AX CPU_RW(eax)
--#define X86_BX CPU_RW(ebx)
--#define X86_CX CPU_RW(ecx)
--#define X86_DX CPU_RW(edx)
--#define X86_SI CPU_RW(esi)
--#define X86_DI CPU_RW(edi)
--#define X86_BP CPU_RW(ebp)
--#define X86_IP CPU_RW(eip)
--#define X86_SP CPU_RW(esp)
--#define X86_CS CPU_RW(cs)
--#define X86_DS CPU_RW(ds)
--#define X86_ES CPU_RW(es)
--#define X86_SS CPU_RW(ss)
--#define X86_FS CPU_RW(fs)
--#define X86_GS CPU_RW(gs)
--
--#define X86_AL CPU_RB(eax)
--#define X86_BL CPU_RB(ebx)
--#define X86_CL CPU_RB(ecx)
--#define X86_DL CPU_RB(edx)
-+#define CPU_R(type,name,num) \
-+ (((type *)&(((struct vm86_struct *)REG->cpuRegs)->regs.##name))[num])
-+#define CPU_RD(name,num) CPU_R(CARD32,name,num)
-+#define CPU_RW(name,num) CPU_R(CARD16,name,num)
-+#define CPU_RB(name,num) CPU_R(CARD8,name,num)
-+
-+#define X86_EAX CPU_RD(eax,0)
-+#define X86_EBX CPU_RD(ebx,0)
-+#define X86_ECX CPU_RD(ecx,0)
-+#define X86_EDX CPU_RD(edx,0)
-+#define X86_ESI CPU_RD(esi,0)
-+#define X86_EDI CPU_RD(edi,0)
-+#define X86_EBP CPU_RD(ebp,0)
-+#define X86_EIP CPU_RD(eip,0)
-+#define X86_ESP CPU_RD(esp,0)
-+#define X86_EFLAGS CPU_RD(eflags,0)
-+
-+#define X86_FLAGS CPU_RW(eflags,0)
-+#define X86_AX CPU_RW(eax,0)
-+#define X86_BX CPU_RW(ebx,0)
-+#define X86_CX CPU_RW(ecx,0)
-+#define X86_DX CPU_RW(edx,0)
-+#define X86_SI CPU_RW(esi,0)
-+#define X86_DI CPU_RW(edi,0)
-+#define X86_BP CPU_RW(ebp,0)
-+#define X86_IP CPU_RW(eip,0)
-+#define X86_SP CPU_RW(esp,0)
-+#define X86_CS CPU_RW(cs,0)
-+#define X86_DS CPU_RW(ds,0)
-+#define X86_ES CPU_RW(es,0)
-+#define X86_SS CPU_RW(ss,0)
-+#define X86_FS CPU_RW(fs,0)
-+#define X86_GS CPU_RW(gs,0)
-+
-+#define X86_AL CPU_RB(eax,0)
-+#define X86_BL CPU_RB(ebx,0)
-+#define X86_CL CPU_RB(ecx,0)
-+#define X86_DL CPU_RB(edx,0)
-+
-+#define X86_AH CPU_RB(eax,1)
-+#define X86_BH CPU_RB(ebx,1)
-+#define X86_CH CPU_RB(ecx,1)
-+#define X86_DH CPU_RB(edx,1)
-
- #elif defined(_X86EMU)
-
-@@ -48,3 +57,4 @@
-
- #endif
-
-+#endif
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v
-retrieving revision 1.2
-retrieving revision 1.3
-diff -u -r1.2 -r1.3
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c 2000/11/06 19:24:08 1.2
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c 2001/01/06 20:19:14 1.3
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.2 2000/11/06 19:24:08 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.3 2001/01/06 20:19:14 tsi Exp $ */
-
- /* Resource information code */
-
-@@ -80,10 +80,12 @@
- RANGE(range,0xc0000,0xeffff,ResExcMemBlock);
- ret = xf86AddResToList(ret, &range, -1);
-
-- /* Fallback is to claim well known ports in the 0x0 - 0x3ff range */
-- /* Possibly should claim some of them as sparse ranges */
--
-- RANGE(range,0,0x1ff,ResExcIoBlock | ResEstimated);
-+ /*
-+ * Fallback would be to claim well known ports in the 0x0 - 0x3ff range
-+ * along with their sparse I/O aliases, but that's too imprecise. Instead
-+ * claim a bare minimum here.
-+ */
-+ RANGE(range, 0, 0x00ff, ResExcIoBlock); /* For mainboard */
- ret = xf86AddResToList(ret, &range, -1);
- /* XXX add others */
- return ret;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v
-retrieving revision 1.42
-retrieving revision 1.43
-diff -u -r1.42 -r1.43
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c 2000/12/07 15:43:45 1.42
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c 2001/01/06 20:19:15 1.43
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.42 2000/12/07 15:43:45 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.43 2001/01/06 20:19:15 tsi Exp $ */
- /*
- * Pci.c - New server PCI access functions
- *
-@@ -1054,8 +1054,10 @@
- unsigned char *Buf, int Len)
- {
- ADDRESS hostbase;
-+ CARD8 *image = Buf;
-+ unsigned long offset;
- CARD32 romaddr, savebase = 0, romsave = 0, newbase = 0;
-- int ret;
-+ int ret, length, rlength, n;
-
- /* XXX This assumes that memory access is enabled */
-
-@@ -1067,24 +1069,23 @@
- romsave = pciReadLong(Tag, PCI_MAP_ROM_REG);
- romaddr = PCIGETROM(romsave);
- if ((newbase = getValidBIOSBase(Tag, &basereg)) != romaddr) {
-+RetryWithBase:
- romaddr = PCIGETROM(newbase);
-- if (romaddr != 0 && romaddr == newbase) {
--#if 1
-- /* move mem base out of the way if in conflict with ROM */
-+ if (romaddr) {
-+ /* move mem base out of the way if in conflicts with ROM */
- if ((basereg >= 0) && (basereg <= 5)) {
-- savebase = pciReadLong(Tag, PCI_MAP_REG_START + (basereg << 2));
-+ if (!savebase)
-+ savebase = pciReadLong(Tag, PCI_MAP_REG_START+(basereg<<2));
- if (PCIGETROM(savebase) == romaddr) {
- xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]"
- " for device %i:%i:%i\n", basereg,
- PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag),
- PCI_FUNC_FROM_TAG(Tag));
-- pciWriteLong(Tag, PCI_MAP_REG_START + (basereg << 2), 0);
-+ pciWriteLong(Tag, PCI_MAP_REG_START + (basereg << 2),
-+ (CARD32)~0);
- }
- }
--#endif
-- pciWriteLong(Tag, PCI_MAP_ROM_REG, romaddr);
-- } else
-- romaddr = 0;
-+ }
- }
-
-
-@@ -1092,10 +1093,10 @@
- xf86Msg(X_WARNING, "xf86ReadPciBIOS: cannot locate a BIOS address\n");
- return -1;
- }
-- else
-- xf86MsgVerb(X_INFO,5,"xf86ReadPciBIOS: found ValidBIOSBase for %i:%i:%i:"
-- " %x\n", PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag),
-- PCI_FUNC_FROM_TAG(Tag),newbase);
-+ xf86MsgVerb(X_INFO, 5,
-+ "xf86ReadPciBIOS: found ValidBIOSBase for %i:%i:%i: %x\n",
-+ PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag), PCI_FUNC_FROM_TAG(Tag),
-+ newbase);
-
- hostbase = pciBusAddrToHostAddr(Tag, PCI_MEM, PCIGETROM(romaddr));
- #ifdef DEBUG
-@@ -1103,8 +1104,38 @@
- #endif
- /* Enable ROM address decoding */
- pciWriteLong(Tag, PCI_MAP_ROM_REG, romaddr | PCI_MAP_ROM_DECODE_ENABLE);
-+
-+ /* Read BIOS in 64kB chunks */
-+ ret = 0;
-+ offset = Offset;
-+ while ((length = Len) > 0) {
-+ if (length > 0x10000) length = 0x10000;
-+ rlength = xf86ReadBIOS(hostbase, offset, image, length);
-+ if (rlength < 0) {
-+ ret = rlength;
-+ break;
-+ }
-+ ret += rlength;
-+ if (rlength < length) break;
-+ offset += length;
-+ image += length;
-+ Len -= length;
-+ }
-
-- ret = xf86ReadBIOS(hostbase, Offset, Buf, Len);
-+ if ((ret != Len) || (Buf[0] != 0x55) || (Buf[1] != 0xaa) || !Buf[2] ||
-+ (Len < (Buf[2] << 9))) {
-+ n = 0;
-+ if ((basereg >= 0) && (basereg <= 5) && xf86PciVideoInfo) do {
-+ pciVideoPtr pvp;
-+
-+ if (!(pvp = xf86PciVideoInfo[n++])) break;
-+ if (pciTag(pvp->bus, pvp->device, pvp->func) == Tag) {
-+ if (newbase == pvp->memBase[basereg]) break;
-+ newbase = pvp->memBase[basereg];
-+ goto RetryWithBase;
-+ }
-+ } while (1);
-+ }
-
- /* Restore ROM address decoding */
- pciWriteLong(Tag, PCI_MAP_ROM_REG, romsave);
-@@ -1129,7 +1160,8 @@
-
- size = readPciBIOS(Offset,Tag,basereg,Buf,Len);
-
-- if (size != -1 && Buf[0] == 0x55 && Buf[1] == 0xaa)
-+ if ((size == Len) && (Buf[0] == 0x55) && (Buf[1] == 0xaa) && Buf[2] &&
-+ (Len >= (Buf[2] << 9)))
- return size;
-
- num = pciTestMultiDeviceCard(PCI_BUS_FROM_TAG(Tag),
-@@ -1149,7 +1181,8 @@
- PCI_CMD_STAT_REG,(Acc2 | PCI_ENA));
- size = readPciBIOS(Offset,pTag[i],0,Buf,Len);
- ((WriteProcPtr)(pciLongFunc(pTag[i],WRITE)))(pTag[i],PCI_CMD_STAT_REG,Acc2);
-- if (size != -1 && ((CARD8*)Buf)[0] == 0x55 && ((CARD8*)Buf)[1] == 0xaa)
-+ if ((size == Len) && (Buf[0] == 0x55) && (Buf[1] == 0xaa) && Buf[2] &&
-+ (Len >= (Buf[2] << 9)))
- break;
- }
- ((WriteProcPtr)(pciLongFunc(Tag,WRITE)))(Tag,PCI_CMD_STAT_REG,Acc1);
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v
-retrieving revision 3.11
-retrieving revision 3.12
-diff -u -r3.11 -r3.12
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c 2000/10/17 16:53:20 3.11
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c 2001/01/06 20:19:15 3.12
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v 3.11 2000/10/17 16:53:20 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v 3.12 2001/01/06 20:19:15 tsi Exp $ */
-
- /* Resource information code */
-
-@@ -141,10 +141,12 @@
- RANGE(range,0xc0000,0xeffff,ResExcMemBlock);
- ret = xf86AddResToList(ret, &range, -1);
-
-- /* Fallback is to claim well known ports in the 0x0 - 0x3ff range */
-- /* Possibly should claim some of them as sparse ranges */
--
-- RANGE(range,0,0x1ff,ResExcIoBlock | ResEstimated);
-+ /*
-+ * Fallback would be to claim well known ports in the 0x0 - 0x3ff range
-+ * along with their sparse I/O aliases, but that's too imprecise. Instead
-+ * claim a bare minimum here.
-+ */
-+ RANGE(range, 0, 0x00ff, ResExcIoBlock); /* For mainboard */
- ret = xf86AddResToList(ret, &range, -1);
- /* XXX add others */
- return ret;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v
-retrieving revision 1.19
-retrieving revision 1.20
-diff -u -r1.19 -r1.20
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c 2000/12/06 15:35:31 1.19
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c 2001/01/06 20:19:15 1.20
-@@ -1,10 +1,9 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.19 2000/12/06 15:35:31 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.20 2001/01/06 20:19:15 tsi Exp $ */
- /*
- * linux specific part of the int10 module
- * Copyright 1999 Egbert Eich
- */
- #include "xf86.h"
--#include "xf86str.h"
- #include "xf86_OSproc.h"
- #include "xf86_ansic.h"
- #include "xf86Pci.h"
-@@ -28,12 +27,12 @@
-
- static int counter = 0;
-
--static CARD8 read_b(xf86Int10InfoPtr pInt,int addr);
--static CARD16 read_w(xf86Int10InfoPtr pInt,int addr);
--static CARD32 read_l(xf86Int10InfoPtr pInt,int addr);
--static void write_b(xf86Int10InfoPtr pInt,int addr, CARD8 val);
--static void write_w(xf86Int10InfoPtr pInt,int addr, CARD16 val);
--static void write_l(xf86Int10InfoPtr pInt,int addr, CARD32 val);
-+static CARD8 read_b(xf86Int10InfoPtr pInt, int addr);
-+static CARD16 read_w(xf86Int10InfoPtr pInt, int addr);
-+static CARD32 read_l(xf86Int10InfoPtr pInt, int addr);
-+static void write_b(xf86Int10InfoPtr pInt, int addr, CARD8 val);
-+static void write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val);
-+static void write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val);
-
- int10MemRec linuxMem = {
- read_b,
-@@ -70,20 +69,20 @@
- legacyVGARec vga;
-
- screen = (xf86FindScreenForEntity(entityIndex))->scrnIndex;
-- if (int10skip(xf86Screens[screen],entityIndex))
-+ if (int10skip(xf86Screens[screen], entityIndex))
- return NULL;
-
- if ((!vidMem) || (!sysMem)) {
-- if ((fd = open(DEV_MEM,O_RDWR,0)) >= 0) {
-+ if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) {
- if (!sysMem) {
- #ifdef DEBUG
- ErrorF("Mapping sys bios area\n");
- #endif
-- if ((sysMem = mmap((void *)(SYS_BIOS),BIOS_SIZE,PROT_READ
-- | PROT_WRITE | PROT_EXEC,
-- MAP_SHARED | MAP_FIXED,fd, SYS_BIOS))
-+ if ((sysMem = mmap((void *)(SYS_BIOS), BIOS_SIZE,
-+ PROT_READ | PROT_WRITE | PROT_EXEC,
-+ MAP_SHARED | MAP_FIXED, fd, SYS_BIOS))
- == MAP_FAILED) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot map SYS BIOS\n");
-+ xf86DrvMsg(screen, X_ERROR, "Cannot map SYS BIOS\n");
- close(fd);
- goto error0;
- }
-@@ -92,33 +91,33 @@
- #ifdef DEBUG
- ErrorF("Mapping VRAM area\n");
- #endif
-- if ((vidMem = mmap((void *)(V_RAM),VRAM_SIZE,PROT_READ
-- | PROT_WRITE | PROT_EXEC,
-- MAP_SHARED | MAP_FIXED,fd, V_RAM))
-+ if ((vidMem = mmap((void *)(V_RAM), VRAM_SIZE,
-+ PROT_READ | PROT_WRITE | PROT_EXEC,
-+ MAP_SHARED | MAP_FIXED, fd, V_RAM))
- == MAP_FAILED) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot map V_RAM\n");
-+ xf86DrvMsg(screen, X_ERROR, "Cannot map V_RAM\n");
- close(fd);
- goto error0;
- }
- }
- close(fd);
- } else {
-- xf86DrvMsg(screen,X_ERROR,"Cannot open %s\n",DEV_MEM);
-+ xf86DrvMsg(screen, X_ERROR, "Cannot open %s\n", DEV_MEM);
- goto error0;
- }
- }
--
-- pInt = (xf86Int10InfoPtr)xnfcalloc(1,sizeof(xf86Int10InfoRec));
-+
-+ pInt = (xf86Int10InfoPtr)xnfcalloc(1, sizeof(xf86Int10InfoRec));
- pInt->scrnIndex = screen;
- pInt->entityIndex = entityIndex;
- if (!xf86Int10ExecSetup(pInt))
- goto error0;
- pInt->mem = &linuxMem;
- pagesize = getpagesize();
-- pInt->private = (pointer)xnfcalloc(1,sizeof(linuxInt10Priv));
-+ pInt->private = (pointer)xnfcalloc(1, sizeof(linuxInt10Priv));
- ((linuxInt10Priv*)pInt->private)->screen = screen;
-- ((linuxInt10Priv*)pInt->private)->alloc =
-- (pointer)xnfcalloc(1,ALLOC_ENTRIES(pagesize));
-+ ((linuxInt10Priv*)pInt->private)->alloc =
-+ (pointer)xnfcalloc(1, ALLOC_ENTRIES(pagesize));
-
- #ifdef DEBUG
- ErrorF("Mapping high memory area\n");
-@@ -135,23 +134,23 @@
- ErrorF("Mapping 640kB area\n");
- #endif
- if ((low_mem = shmget(counter++, V_RAM,
-- IPC_CREAT|SHM_R|SHM_W)) == -1)
-+ IPC_CREAT | SHM_R | SHM_W)) == -1)
- goto error2;
--
-+
- ((linuxInt10Priv*)pInt->private)->lowMem = low_mem;
-- base = shmat(low_mem,0,0);
-+ base = shmat(low_mem, 0, 0);
- ((linuxInt10Priv *)pInt->private)->base = base;
-- base_high = shmat(high_mem,0,0);
-- ((linuxInt10Priv *)pInt->private)->base_high = base_high;
--
-- MapCurrentInt10(pInt);
-+ base_high = shmat(high_mem, 0, 0);
-+ ((linuxInt10Priv*)pInt->private)->base_high = base_high;
-+
-+ MapCurrentInt10(pInt);
- Int10Current = pInt;
--
-+
- #ifdef DEBUG
- ErrorF("Mapping int area\n");
- #endif
-- if (xf86ReadBIOS(0,0,(unsigned char *)0,LOW_PAGE_SIZE) < 0) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot read int vect\n");
-+ if (xf86ReadBIOS(0, 0, (unsigned char *)0, LOW_PAGE_SIZE) < 0) {
-+ xf86DrvMsg(screen, X_ERROR, "Cannot read int vect\n");
- goto error3;
- }
-
-@@ -165,33 +164,33 @@
- if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE)
- xf86DrvMsg(screen, X_WARNING,
- "Unable to retrieve all of segment 0x%06X.\n", cs);
--
-+
- if (xf86IsEntityPrimary(entityIndex)) {
-- cs = ((CARD16*)0)[(0x10<<1)+1];
-+ cs = ((CARD16*)0)[(0x10 <<1) + 1];
- bios_base = (unsigned char *)(cs << 4);
--
-+
- if (!int10_check_bios(screen, cs, bios_base)) {
-- cs = ((CARD16*)0)[(0x42<<1)+1];
-+ cs = ((CARD16*)0)[(0x42 << 1) + 1];
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- cs = V_BIOS >> 4;
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
-- xf86DrvMsg(screen,X_ERROR,"No V_BIOS found\n");
-+ xf86DrvMsg(screen, X_ERROR, "No V_BIOS found\n");
- goto error3;
- }
- }
- }
-- xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
-+ xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%x\n", cs);
-
- pInt->BIOSseg = cs;
- set_return_trap(pInt);
- } else {
-- if (!mapPciRom(pInt,(unsigned char *)(V_BIOS))) {
-- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS\n");
-+ if (!mapPciRom(pInt, (unsigned char *)(V_BIOS))) {
-+ xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS\n");
- goto error3;
- }
--
-+
- pInt->BIOSseg = V_BIOS >> 4;
- pInt->num = 0xe6;
- reset_int_vect(pInt);
-@@ -201,20 +200,20 @@
- UnlockLegacyVGA(screen, &vga);
- }
- #ifdef DEBUG
-- dprint(0xc0000,0x20);
-+ dprint(0xc0000, 0x20);
- #endif
--
-+
- return pInt;
--
-+
- error3:
- shmdt(base_high);
- shmdt(base);
- shmdt(0);
- shmdt((char*)HIGH_MEM);
-- shmctl(low_mem,IPC_RMID,NULL);
-+ shmctl(low_mem, IPC_RMID, NULL);
- Int10Current = NULL;
- error2:
-- shmctl(high_mem,IPC_RMID,NULL);
-+ shmctl(high_mem, IPC_RMID,NULL);
- error1:
- xfree(((linuxInt10Priv*)pInt->private)->alloc);
- xfree(pInt->private);
-@@ -230,120 +229,119 @@
- shmdt(0);
- shmdt((char*)HIGH_MEM);
- }
-- shmat(((linuxInt10Priv *)pInt->private)->lowMem,(char*)1,SHM_RND);
-- shmat(((linuxInt10Priv *)pInt->private)->highMem,(char*)HIGH_MEM,0);
-+ shmat(((linuxInt10Priv*)pInt->private)->lowMem, (char*)1, SHM_RND);
-+ shmat(((linuxInt10Priv*)pInt->private)->highMem, (char*)HIGH_MEM, 0);
- }
-
- void
- xf86FreeInt10(xf86Int10InfoPtr pInt)
- {
- if (!pInt)
-- return;
-+ return;
- if (Int10Current == pInt) {
- shmdt(0);
- shmdt((char*)HIGH_MEM);
- Int10Current = NULL;
- }
-- shmdt(((linuxInt10Priv *)pInt->private)->base_high);
-- shmdt(((linuxInt10Priv *)pInt->private)->base);
-- shmctl(((linuxInt10Priv *)pInt->private)->lowMem,IPC_RMID,NULL);
-- shmctl(((linuxInt10Priv *)pInt->private)->highMem,IPC_RMID,NULL);
-+ shmdt(((linuxInt10Priv*)pInt->private)->base_high);
-+ shmdt(((linuxInt10Priv*)pInt->private)->base);
-+ shmctl(((linuxInt10Priv*)pInt->private)->lowMem, IPC_RMID, NULL);
-+ shmctl(((linuxInt10Priv*)pInt->private)->highMem, IPC_RMID, NULL);
- xfree(((linuxInt10Priv*)pInt->private)->alloc);
- xfree(pInt->private);
- xfree(pInt);
- }
-
- void *
--xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off)
-+xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off)
- {
- int pagesize = getpagesize();
- int num_pages = ALLOC_ENTRIES(pagesize);
-- int i,j;
-+ int i, j;
-
-- for (i=0;i<num_pages - num;i++) {
-+ for (i = 0; i < (num_pages - num); i++) {
- if (((linuxInt10Priv*)pInt->private)->alloc[i] == 0) {
-- for (j=i;j < num + i;j++)
-+ for (j = i; j < (num + i); j++)
- if ((((linuxInt10Priv*)pInt->private)->alloc[j] != 0))
- break;
-- if (j == num + i)
-+ if (j == (num + i))
- break;
- else
- i = i + num;
- }
- }
-- if (i == num_pages - num)
-+ if (i == (num_pages - num))
- return NULL;
--
-- for (j = i; j < i + num; j++)
-+
-+ for (j = i; j < (i + num); j++)
- ((linuxInt10Priv*)pInt->private)->alloc[j] = 1;
-
- *off = (i + 1) * pagesize;
--
-- return (void *)
-- (((linuxInt10Priv*)pInt->private)->base + (i + 1) * pagesize);
-+
-+ return ((linuxInt10Priv*)pInt->private)->base + ((i + 1) * pagesize);
- }
-
- void
- xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
- {
- int pagesize = getpagesize();
-- int first = ((unsigned long)pbase
-+ int first = (((unsigned long)pbase
- - (unsigned long)((linuxInt10Priv*)pInt->private)->base)
-- / pagesize - 1;
-+ / pagesize) - 1;
- int i;
-
-- for (i = first; i < first + num; i++)
-+ for (i = first; i < (first + num); i++)
- ((linuxInt10Priv*)pInt->private)->alloc[i] = 0;
- }
-
- static CARD8
--read_b(xf86Int10InfoPtr pInt,int addr)
-+read_b(xf86Int10InfoPtr pInt, int addr)
- {
-- return *((CARD8 *)(addr));
-+ return *((CARD8 *)addr);
- }
-
- static CARD16
--read_w(xf86Int10InfoPtr pInt,int addr)
-+read_w(xf86Int10InfoPtr pInt, int addr)
- {
-- return *((CARD16 *)(addr));
-+ return *((CARD16 *)addr);
- }
-
- static CARD32
--read_l(xf86Int10InfoPtr pInt,int addr)
-+read_l(xf86Int10InfoPtr pInt, int addr)
- {
-- return *((CARD32 *)(addr));
-+ return *((CARD32 *)addr);
- }
-
- static void
--write_b(xf86Int10InfoPtr pInt,int addr, CARD8 val)
-+write_b(xf86Int10InfoPtr pInt, int addr, CARD8 val)
- {
-- *((CARD8 *)(addr)) = (CARD8)val;
-+ *((CARD8 *)addr) = val;
- }
-
- static void
--write_w(xf86Int10InfoPtr pInt,int addr, CARD16 val)
-+write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val)
- {
-- *((CARD16 *)(addr)) = (CARD16)val;
-+ *((CARD16 *)addr) = val;
- }
-
- static
--void write_l(xf86Int10InfoPtr pInt,int addr, CARD32 val)
-+void write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val)
- {
-- *((CARD32 *)(addr)) = (CARD32)val;
-+ *((CARD32 *)addr) = val;
- }
-
- pointer
- xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr)
- {
- if (addr < V_RAM)
-- return (pointer)(((linuxInt10Priv*)pInt->private)->base + addr);
-+ return ((linuxInt10Priv*)pInt->private)->base + addr;
- else if (addr < V_BIOS)
-- return (pointer) addr;
-+ return (pointer)addr;
- else if (addr < SYS_BIOS)
-- return (pointer)(((linuxInt10Priv*)pInt->private)->base_high
-+ return (pointer)(((linuxInt10Priv*)pInt->private)->base_high
- - V_BIOS + addr);
- else
-- return (pointer) addr;
-+ return (pointer)addr;
- }
-
- #ifdef _VM86_LINUX
-@@ -355,38 +353,200 @@
- {
- #define VM86S ((struct vm86_struct *)pInt->cpuRegs)
-
-- pInt->cpuRegs = (pointer) xnfcalloc(1,sizeof(struct vm86_struct));
-+ pInt->cpuRegs = (pointer)xnfcalloc(1, sizeof(struct vm86_struct));
- VM86S->flags = 0;
- VM86S->screen_bitmap = 0;
- VM86S->cpu_type = CPU_586;
-- memset(&VM86S->int_revectored, 0xff,sizeof(VM86S->int_revectored)) ;
-- memset(&VM86S->int21_revectored, 0xff,sizeof(VM86S->int21_revectored)) ;
-+ memset(&VM86S->int_revectored, 0xff, sizeof(VM86S->int_revectored));
-+ memset(&VM86S->int21_revectored, 0xff, sizeof(VM86S->int21_revectored));
-+ return TRUE;
-+}
-+
-+/* get the linear address */
-+#define LIN_PREF_SI ((pref_seg << 4) + X86_SI)
-+#define LWECX ((prefix66 ^ prefix67) ? X86_ECX : X86_CX)
-+#define LWECX_ZERO {if (prefix66 ^ prefix67) X86_ECX = 0; else X86_CX = 0;}
-+#define DF (1 << 10)
-+
-+/* vm86 fault handling */
-+static Bool
-+vm86_GP_fault(xf86Int10InfoPtr pInt)
-+{
-+ unsigned char *csp, *lina;
-+ CARD32 org_eip;
-+ int pref_seg;
-+ int done, is_rep, prefix66, prefix67;
-+
-+ csp = lina = SEG_ADR((unsigned char *), X86_CS, IP);
-+
-+ is_rep = 0;
-+ prefix66 = prefix67 = 0;
-+ pref_seg = -1;
-+
-+ /* eat up prefixes */
-+ done = 0;
-+ do {
-+ switch (MEM_RB(pInt, (int)csp++)) {
-+ case 0x66: /* operand prefix */ prefix66=1; break;
-+ case 0x67: /* address prefix */ prefix67=1; break;
-+ case 0x2e: /* CS */ pref_seg=X86_CS; break;
-+ case 0x3e: /* DS */ pref_seg=X86_DS; break;
-+ case 0x26: /* ES */ pref_seg=X86_ES; break;
-+ case 0x36: /* SS */ pref_seg=X86_SS; break;
-+ case 0x65: /* GS */ pref_seg=X86_GS; break;
-+ case 0x64: /* FS */ pref_seg=X86_FS; break;
-+ case 0xf2: /* repnz */
-+ case 0xf3: /* rep */ is_rep=1; break;
-+ default: done=1;
-+ }
-+ } while (!done);
-+ csp--; /* oops one too many */
-+ org_eip = X86_EIP;
-+ X86_IP += (csp - lina);
-+
-+ switch (MEM_RB(pInt, (int)csp)) {
-+ case 0x6c: /* insb */
-+ /* NOTE: ES can't be overwritten; prefixes 66,67 should use esi,edi,ecx
-+ * but is anyone using extended regs in real mode? */
-+ /* WARNING: no test for DI wrapping! */
-+ X86_EDI += port_rep_inb(pInt, X86_DX, SEG_EADR((CARD32), X86_ES, DI),
-+ X86_FLAGS & DF, is_rep ? LWECX : 1);
-+ if (is_rep) LWECX_ZERO;
-+ X86_IP++;
-+ break;
-+
-+ case 0x6d: /* (rep) insw / insd */
-+ /* NOTE: ES can't be overwritten */
-+ /* WARNING: no test for _DI wrapping! */
-+ if (prefix66) {
-+ X86_DI += port_rep_inl(pInt, X86_DX, SEG_ADR((CARD32), X86_ES, DI),
-+ X86_EFLAGS & DF, is_rep ? LWECX : 1);
-+ }
-+ else {
-+ X86_DI += port_rep_inw(pInt, X86_DX, SEG_ADR((CARD32), X86_ES, DI),
-+ X86_FLAGS & DF, is_rep ? LWECX : 1);
-+ }
-+ if (is_rep) LWECX_ZERO;
-+ X86_IP++;
-+ break;
-+
-+ case 0x6e: /* (rep) outsb */
-+ if (pref_seg < 0) pref_seg = X86_DS;
-+ /* WARNING: no test for _SI wrapping! */
-+ X86_SI += port_rep_outb(pInt, X86_DX, (CARD32)LIN_PREF_SI,
-+ X86_FLAGS & DF, is_rep ? LWECX : 1);
-+ if (is_rep) LWECX_ZERO;
-+ X86_IP++;
-+ break;
-+
-+ case 0x6f: /* (rep) outsw / outsd */
-+ if (pref_seg < 0) pref_seg = X86_DS;
-+ /* WARNING: no test for _SI wrapping! */
-+ if (prefix66) {
-+ X86_SI += port_rep_outl(pInt, X86_DX, (CARD32)LIN_PREF_SI,
-+ X86_EFLAGS & DF, is_rep ? LWECX : 1);
-+ }
-+ else {
-+ X86_SI += port_rep_outw(pInt, X86_DX, (CARD32)LIN_PREF_SI,
-+ X86_FLAGS & DF, is_rep ? LWECX : 1);
-+ }
-+ if (is_rep) LWECX_ZERO;
-+ X86_IP++;
-+ break;
-+
-+ case 0xe5: /* inw xx, inl xx */
-+ if (prefix66) X86_EAX = x_inl(csp[1]);
-+ else X86_AX = x_inw(csp[1]);
-+ X86_IP += 2;
-+ break;
-+
-+ case 0xe4: /* inb xx */
-+ X86_AL = x_inb(csp[1]);
-+ X86_IP += 2;
-+ break;
-+
-+ case 0xed: /* inw dx, inl dx */
-+ if (prefix66) X86_EAX = x_inl(X86_DX);
-+ else X86_AX = x_inw(X86_DX);
-+ X86_IP += 1;
-+ break;
-+
-+ case 0xec: /* inb dx */
-+ X86_AL = x_inb(X86_DX);
-+ X86_IP += 1;
-+ break;
-+
-+ case 0xe7: /* outw xx */
-+ if (prefix66) x_outl(csp[1], X86_EAX);
-+ else x_outw(csp[1], X86_AX);
-+ X86_IP += 2;
-+ break;
-+
-+ case 0xe6: /* outb xx */
-+ x_outb(csp[1], X86_AL);
-+ X86_IP += 2;
-+ break;
-+
-+ case 0xef: /* outw dx */
-+ if (prefix66) x_outl(X86_DX, X86_EAX);
-+ else x_outw(X86_DX, X86_AX);
-+ X86_IP += 1;
-+ break;
-+
-+ case 0xee: /* outb dx */
-+ x_outb(X86_DX, X86_AL);
-+ X86_IP += 1;
-+ break;
-+
-+ case 0xf4:
-+#ifdef DEBUG
-+ ErrorF("hlt at %p\n", lina);
-+#endif
-+ return FALSE;
-+
-+ case 0x0f:
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
-+ "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8x\n", X86_CS, X86_EIP);
-+ goto op0ferr;
-+
-+ case 0xf0: /* lock */
-+ default:
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR, "unknown reason for exception\n");
-+
-+ op0ferr:
-+ dump_registers(pInt);
-+ stack_trace(pInt);
-+ dump_code(pInt);
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR, "cannot continue\n");
-+ return FALSE;
-+ } /* end of switch() */
- return TRUE;
- }
--
-+
- static int
- do_vm86(xf86Int10InfoPtr pInt)
- {
- int retval, signo;
--
-+
- xf86InterceptSignals(&signo);
- retval = vm86_rep(VM86S);
- xf86InterceptSignals(NULL);
-
- if (signo >= 0) {
-- xf86DrvMsg(pInt->scrnIndex, X_ERROR, "vm86() syscall generated signal %d.\n", signo);
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
-+ "vm86() syscall generated signal %d.\n", signo);
- dump_registers(pInt);
- dump_code(pInt);
- stack_trace(pInt);
- return 0;
- }
--
-+
- switch (VM86_TYPE(retval)) {
- case VM86_UNKNOWN:
- if (!vm86_GP_fault(pInt)) return 0;
- break;
- case VM86_STI:
-- xf86DrvMsg(pInt->scrnIndex,X_ERROR,"vm86_sti :-((\n");
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR, "vm86_sti :-((\n");
- dump_registers(pInt);
- dump_code(pInt);
- stack_trace(pInt);
-@@ -394,8 +554,8 @@
- case VM86_INTx:
- pInt->num = VM86_ARG(retval);
- if (!int_handler(pInt)) {
-- xf86DrvMsg(pInt->scrnIndex,
-- X_ERROR,"Unknown vm86_int: 0x%X\n\n",VM86_ARG(retval));
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
-+ "Unknown vm86_int: 0x%X\n\n", VM86_ARG(retval));
- dump_registers(pInt);
- dump_code(pInt);
- stack_trace(pInt);
-@@ -409,17 +569,17 @@
- * we used to warn here and bail out - but now the sigio stuff
- * always fires signals at us. So we just ignore them for now.
- */
-- xf86DrvMsg(pInt->scrnIndex,X_WARNING,"received signal\n");
-+ xf86DrvMsg(pInt->scrnIndex, X_WARNING, "received signal\n");
- return 0;
- default:
-- xf86DrvMsg(pInt->scrnIndex,X_ERROR,"unknown type(0x%x)=0x%x\n",
-- VM86_ARG(retval),VM86_TYPE(retval));
-+ xf86DrvMsg(pInt->scrnIndex, X_ERROR, "unknown type(0x%x)=0x%x\n",
-+ VM86_ARG(retval), VM86_TYPE(retval));
- dump_registers(pInt);
- dump_code(pInt);
- stack_trace(pInt);
- return 0;
- }
--
-+
- return 1;
- }
-
-@@ -431,11 +591,11 @@
- if (int_handler(pInt))
- while(do_vm86(pInt)) {};
-
-- finish_int(pInt,sig);
-+ finish_int(pInt, sig);
- }
-
- static int
--vm86_rep(struct vm86_struct *ptr)
-+vm86_rep(struct vm86_struct *ptr)
- {
- int __res;
-
-@@ -455,9 +615,9 @@
- "b" ((struct vm86_struct *)ptr));
- #endif
-
-- if ((__res) < 0) {
-+ if (__res < 0) {
- errno = -__res;
-- __res=-1;
-+ __res = -1;
- }
- else errno = 0;
- return __res;
-Index: XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c
-===================================================================
-RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c,v
-retrieving revision 1.15
-retrieving revision 1.16
-diff -u -r1.15 -r1.16
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c 2000/04/23 19:27:03 1.15
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c 2001/01/06 20:19:15 1.16
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c,v 1.15 2000/04/23 19:27:03 tsi Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c,v 1.16 2001/01/06 20:19:15 tsi Exp $ */
-
- /* Standard resource information code */
-
-@@ -108,10 +108,12 @@
- RANGE(range,0xffe00000,0xffffffff,ResExcMemBlock | ResBios);
- ret = xf86AddResToList(ret, &range, -1);
-
-- /* Fallback is to claim well known ports in the 0x0 - 0x3ff range */
-- /* Possibly should claim some of them as sparse ranges */
--
-- RANGE(range,0,0x1ff,ResExcIoBlock | ResEstimated);
-+ /*
-+ * Fallback would be to claim well known ports in the 0x0 - 0x3ff range
-+ * along with their sparse I/O aliases, but that's too imprecise. Instead
-+ * claim a bare minimum here.
-+ */
-+ RANGE(range, 0, 0x00ff, ResExcIoBlock); /* For mainboard */
- ret = xf86AddResToList(ret, &range, -1);
- /* XXX add others */
- return ret;
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/vesa/vesa.c.ia64-2 Sat Dec 2 10:31:00 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/vesa/vesa.c Mon Jan 29 11:48:02 2001
-@@ -26,7 +26,7 @@
- *
- * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
- *
-- * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vesa/vesa.c,v 1.8 2000/12/02 15:31:00 tsi Exp $
-+ * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vesa/vesa.c,v 1.9 2001/01/11 03:36:59 tsi Exp $
- */
-
- #include "vesa.h"
-@@ -144,14 +144,30 @@
- #endif
- "cfbScreenInit",
- "mfbScreenInit",
-+ "cfb24_32ScreenInit",
- NULL
- };
-
- static const char *shadowSymbols[] = {
-- "ShadowInit",
-+ "shadowAlloc",
-+ "shadowInit",
-+ "shadowUpdatePacked",
-+ "shadowUpdatePlanar4",
-+ "shadowUpdatePlanar4x8",
- NULL
- };
-
-+static const char *vbeSymbols[] = {
-+ "VBEInit",
-+ "vbeDoEDID",
-+ NULL
-+};
-+
-+static const char *ddcSymbols[] = {
-+ "xf86PrintEDID",
-+ "xf86SetDDCproperties",
-+ NULL};
-+
- #ifdef XFree86LOADER
-
- /* Module loader interface */
-@@ -186,7 +202,11 @@
- {
- Initialised = TRUE;
- xf86AddDriver(&VESA, Module, 0);
-- LoaderRefSymLists(fbSymbols, shadowSymbols, NULL);
-+ LoaderRefSymLists(fbSymbols,
-+ shadowSymbols,
-+ vbeSymbols,
-+ ddcSymbols,
-+ NULL);
- return (pointer)TRUE;
- }
-
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c.ia64-2 Mon Jan 29 11:48:01 2001
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c Mon Jan 29 11:48:02 2001
-@@ -2932,10 +2932,6 @@
- {
- ELFModulePtr elffile = (ELFModulePtr)modptr;
- ELFRelocPtr relptr, reltptr, *brelptr;
--#ifdef __ia64__
-- ELFOpdPtr opdent;
-- ELFPltEntryPtr pltent;
--#endif
-
- /*
- * Delete any unresolved relocations
-@@ -2999,16 +2995,33 @@
- #if defined(__alpha__) || defined(__ia64__)
- CheckandFree(elffile->got,elffile->gotsize);
- #endif
--#endif
- #if defined(__ia64__)
- CheckandFree(elffile->plt,elffile->pltsize);
-- while ((pltent = elffile->plt_entries)) {
-- elffile->plt_entries = pltent->next;
-- xf86loaderfree(pltent);
-+#endif
-+#endif
-+#if defined(__alpha__) || defined(__ia64__)
-+ {
-+ ELFGotEntryPtr gotent;
-+ while((gotent = elffile->got_entries)) {
-+ elffile->got_entries = gotent->next;
-+ xf86loaderfree(gotent);
-+ }
- }
-- while ((opdent = elffile->opd_entries)) {
-- elffile->opd_entries = opdent->next;
-- xf86loaderfree(opdent);
-+#endif
-+#if defined(__ia64__)
-+ {
-+ ELFPltEntryPtr pltent;
-+ while ((pltent = elffile->plt_entries)) {
-+ elffile->plt_entries = pltent->next;
-+ xf86loaderfree(pltent);
-+ }
-+ }
-+ {
-+ ELFOpdPtr opdent;
-+ while ((opdent = elffile->opd_entries)) {
-+ elffile->opd_entries = opdent->next;
-+ xf86loaderfree(opdent);
-+ }
- }
- #endif
- CheckandFreeFile(elffile->reltext,elffile->reltxtsize);
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c.ia64-2 Tue Nov 14 13:20:38 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c Mon Jan 29 11:48:02 2001
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c,v 1.42 2000/11/14 18:20:38 dawes Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c,v 1.43 2001/01/11 03:37:00 tsi Exp $ */
-
- /*
- *
-@@ -1602,10 +1602,21 @@
- rgb blackColour = scrp->display->blackColour,
- whiteColour = scrp->display->whiteColour;
-
-- /* Detect default for black & white */
-- if (!blackColour.red && !blackColour.green && !blackColour.blue &&
-- !whiteColour.red && !whiteColour.green && !whiteColour.blue)
-- whiteColour.red = whiteColour.green = whiteColour.blue = 0x3F;
-+ if (blackColour.red > 0x3F) blackColour.red = 0x3F;
-+ if (blackColour.green > 0x3F) blackColour.green = 0x3F;
-+ if (blackColour.blue > 0x3F) blackColour.blue = 0x3F;
-+
-+ if (whiteColour.red > 0x3F) whiteColour.red = 0x3F;
-+ if (whiteColour.green > 0x3F) whiteColour.green = 0x3F;
-+ if (whiteColour.blue > 0x3F) whiteColour.blue = 0x3F;
-+
-+ if ((blackColour.red == whiteColour.red ) &&
-+ (blackColour.green == whiteColour.green) &&
-+ (blackColour.blue == whiteColour.blue )) {
-+ blackColour.red ^= 0x3F;
-+ blackColour.green ^= 0x3F;
-+ blackColour.blue ^= 0x3F;
-+ }
-
- /*
- * initialize default colormap for monochrome
-diff -ru XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c /usr/src/redhat/BUILD/XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c Fri Feb 16 12:03:12 2001
-+++ /usr/src/redhat/BUILD/XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/loader/elfloader.c Thu Feb 15 18:40:55 2001
-@@ -2920,7 +2920,9 @@
- flag = _LoaderHandleUnresolved(
- name, _LoaderHandleToName(erel->file->handle));
- if(flag) fatalsym = 1;
-- xf86loaderfree(name);
-+#ifndef __ia64__
-+ xf86loaderfree(name);
-+#endif
- erel=erel->next;
- }
- return fatalsym;
+++ /dev/null
-diff -ur XFree86-4.0.2/xc/config/imake/Imakefile XFree86-4.0.2.new/xc/config/imake/Imakefile
---- XFree86-4.0.2/xc/config/imake/Imakefile Sat Aug 14 12:49:01 1999
-+++ XFree86-4.0.2.new/xc/config/imake/Imakefile Sat Dec 23 17:48:28 2000
-@@ -15,10 +15,14 @@
- CPP_DEFINES = -DCPP_PROGRAM="\"$(CPP_PROGRAM)\""
- GCC_COMMAND = $(CC) -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1> /dev/null
- GCC_DEFINES = -DHAS_MERGE_CONSTANTS=`if $(GCC_COMMAND); then echo 1; else echo 0; fi`
--DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) $(CPP_DEFINES) $(GCC_DEFINES)
-+DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) $(CPP_DEFINES) $(GCC_DEFINES) -DDEFAULT_OS_CPU_FROB="\"$(DEFAULT_OS_CPU_FROB)\""
-
- #if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture)
- XBSDLIB = /**/
-+#endif
-+
-+#if !defined(DEFAULT_OS_CPU_FROB)
-+DEFAULT_OS_CPU_FROB = `uname -m`
- #endif
-
- #if !defined(OS2Architecture)
-diff -ur XFree86-4.0.2/xc/config/imake/Makefile.ini XFree86-4.0.2.new/xc/config/imake/Makefile.ini
---- XFree86-4.0.2/xc/config/imake/Makefile.ini Sat Oct 28 03:15:23 2000
-+++ XFree86-4.0.2.new/xc/config/imake/Makefile.ini Sat Dec 23 17:48:37 2000
-@@ -9,11 +9,15 @@
- #
- # $XFree86: xc/config/imake/Makefile.ini,v 3.9 2000/10/26 17:57:45 dawes Exp $
-
-+#if !defined(DEFAULT_OS_CPU_FROB)
-+DEFAULT_OS_CPU_FROB = `uname -m`
-+#endif
-+
- BOOTSTRAPCFLAGS =
- CC = cc
- CDEBUGFLAGS = -O
- INCLUDES = -I../../include -I../../imports/x11/include/X11
--CFLAGS = $(BOOTSTRAPCFLAGS) $(CDEBUGFLAGS) $(INCLUDES)
-+CFLAGS = $(BOOTSTRAPCFLAGS) $(CDEBUGFLAGS) $(INCLUDES) -DDEFAULT_OS_CPU_FROB="\"$(DEFAULT_OS_CPU_FROB)\""
- SHELL = /bin/sh
- RM = rm -f
- MV = mv
-diff -ur XFree86-4.0.2/xc/config/imake/imake.c XFree86-4.0.2.new/xc/config/imake/imake.c
---- XFree86-4.0.2/xc/config/imake/imake.c Sat Dec 23 17:53:30 2000
-+++ XFree86-4.0.2.new/xc/config/imake/imake.c Sat Dec 23 17:51:03 2000
-@@ -265,6 +265,8 @@
- #if defined(linux) || defined(__GNU__)
- #include <limits.h>
- #include <stdio.h>
-+#include <linux/uts.h>
-+#include <linux/version.h>
- #endif
- #ifdef __QNX__
- #include <unix.h>
-@@ -1208,57 +1210,19 @@
- #if !defined(WIN32) && !defined(__EMX__)
- #if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
- defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
-- struct utsname name;
-- char buf[SYS_NMLN * 5 + 1];
-
-- /* Obtain the system information. */
-- if (uname(&name) < 0)
-- LogFatal("Cannot invoke uname", "");
--
--# ifdef DEFAULT_OS_NAME
-- parse_utsname(&name, DEFAULT_OS_NAME, buf,
-- "Bad DEFAULT_OS_NAME syntax %s");
--# ifdef DEFAULT_OS_NAME_FROB
-- DEFAULT_OS_NAME_FROB(buf, sizeof buf);
--# endif
-- if (buf[0] != '\0')
-- fprintf(inFile, "#define DefaultOSName %s\n", buf);
--# endif
-+ fprintf(inFile, "#define DefaultOSName %s %s %s\n",
-+ UTS_SYSNAME, UTS_RELEASE, DEFAULT_OS_CPU_FROB);
-
--# ifdef DEFAULT_OS_MAJOR_REV
-- parse_utsname(&name, DEFAULT_OS_MAJOR_REV, buf,
-- "Bad DEFAULT_OS_MAJOR_REV syntax %s");
--# ifdef DEFAULT_OS_MAJOR_REV_FROB
-- DEFAULT_OS_MAJOR_REV_FROB(buf, sizeof buf);
--# endif
-- fprintf(inFile, "#define DefaultOSMajorVersion %s\n",
-- *buf ? trim_version(buf) : "0");
--# endif
-+ fprintf(inFile, "#define DefaultOSMajorVersion %d\n",
-+ LINUX_VERSION_CODE >> 16);
-
--# ifdef DEFAULT_OS_MINOR_REV
-- parse_utsname(&name, DEFAULT_OS_MINOR_REV, buf,
-- "Bad DEFAULT_OS_MINOR_REV syntax %s");
--# ifdef DEFAULT_OS_MINOR_REV_FROB
-- DEFAULT_OS_MINOR_REV_FROB(buf, sizeof buf);
--# endif
-- fprintf(inFile, "#define DefaultOSMinorVersion %s\n",
-- *buf ? trim_version(buf) : "0");
--# endif
-+ fprintf(inFile, "#define DefaultOSMinorVersion %d\n",
-+ (LINUX_VERSION_CODE >> 8) & 0xFF);
-+
-+ fprintf(inFile, "#define DefaultOSTeenyVersion %d\n",
-+ LINUX_VERSION_CODE & 0xFF);
-
--# ifdef DEFAULT_OS_TEENY_REV
-- parse_utsname(&name, DEFAULT_OS_TEENY_REV, buf,
-- "Bad DEFAULT_OS_TEENY_REV syntax %s");
--# ifdef DEFAULT_OS_TEENY_REV_FROB
-- DEFAULT_OS_TEENY_REV_FROB(buf, sizeof buf);
--# endif
-- fprintf(inFile, "#define DefaultOSTeenyVersion %s\n",
-- *buf ? trim_version(buf) : "0");
--# endif
--# ifdef DEFAULT_MACHINE_ARCHITECTURE
-- parse_utsname(&name, DEFAULT_MACHINE_ARCHITECTURE, buf,
-- "Bad DEFAULT_MACHINE_ARCHITECTURE %s");
-- fprintf(inFile, "#ifndef %s\n# define %s\n#endif\n", buf, buf);
--# endif
- #endif
- #ifdef linux
- get_distrib (inFile);
+++ /dev/null
---- XFree86-3.3.3/xc/config/cf/xfree86.cf.joy Mon Dec 7 15:50:14 1998
-+++ XFree86-3.3.3/xc/config/cf/xfree86.cf Mon Dec 7 15:50:36 1998
-@@ -684,7 +684,7 @@
- #endif
- #endif
- #ifndef JoystickSupport
--#define JoystickSupport NO
-+#define JoystickSupport YES
- #endif
-
- /*
+++ /dev/null
-diff -urN XFree86-4.3.99.6.org/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c XFree86-4.3.99.6/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c
---- XFree86-4.3.99.6.org/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c 2003-06-18 19:41:00.000000000 +0200
-+++ XFree86-4.3.99.6/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c 2003-06-18 19:41:18.000000000 +0200
-@@ -66,6 +66,7 @@
- /* kbd rate stuff based on kbdrate.c from Rik Faith <faith@cs.unc.edu> et.al.
- * from util-linux-2.9t package */
-
-+#include <linux/version.h>
- #include <linux/kd.h>
- #ifdef __sparc__
- #include <asm/param.h>
+++ /dev/null
---- xc/lib/Xi/XListDev.c.orig 2003-04-30 02:40:02.000000000 -0400
-+++ xc/lib/Xi/XListDev.c 2003-04-30 02:40:27.000000000 -0400
-@@ -81,10 +81,10 @@
- register long rlen;
- XExtDisplayInfo *info = XInput_find_display (dpy);
-
-- LockDisplay (dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release) == -1)
- return ((XDeviceInfo *) NULL);
-
-+ LockDisplay (dpy);
- GetReq(ListInputDevices,req);
- req->reqType = info->codes->major_opcode;
- req->ReqType = X_ListInputDevices;
+++ /dev/null
---- XFree86-4.3.99.15/xc/lib/Xfontcache/Imakefile.orig 2003-11-02 05:43:16.000000000 +0100
-+++ XFree86-4.3.99.15/xc/lib/Xfontcache/Imakefile 2003-11-03 07:58:44.399216056 +0100
-@@ -36,7 +36,7 @@
- MANSUFFIX=$(LIBMANSUFFIX)
- InstallManPage(LibName,$(LIBMANDIR))
- #if ExpandManNames
--InstallManPageAliases(LibName,$(MANDIR),FontCacheQueryExtension FontCacheQueryVersion FontCacheGetCacheSettings FontCacheChangeCacheSettings FontCacheGetCacheStatistics)
-+InstallManPageAliases(LibName,$(LIBMANDIR),FontCacheQueryExtension FontCacheQueryVersion FontCacheGetCacheSettings FontCacheChangeCacheSettings FontCacheGetCacheStatistics)
- #endif
-
- DependTarget()
+++ /dev/null
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c.orig Wed May 2 17:06:09 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c Sun Jun 17 23:03:55 2001
-@@ -897,6 +897,7 @@
- DRIInfoPtr pDRIInfo;
- MGADRIPtr pMGADRI;
- MGADRIServerPrivatePtr pMGADRIServer;
-+ CARD32 pciCommand;
-
- switch ( pMga->Chipset ) {
- case PCI_CHIP_MGAG400:
-@@ -1118,6 +1119,11 @@
- return FALSE;
- }
- xf86DrvMsg( pScrn->scrnIndex, X_INFO, "[dri] visual configs initialized\n" );
-+
-+ /* Enable bus mastering in PCI config space */
-+ pciCommand = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG);
-+ pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG,
-+ pciCommand | PCI_CMD_MASTER_ENABLE);
-
- return TRUE;
- }
+++ /dev/null
-diff -urN XFree86-4.0.3.orig/xc/programs/mkfontdir/mkfontdir.c XFree86-4.0.3/xc/programs/mkfontdir/mkfontdir.c
---- XFree86-4.0.3.orig/xc/programs/mkfontdir/mkfontdir.c Wed Nov 29 17:45:52 2000
-+++ XFree86-4.0.3/xc/programs/mkfontdir/mkfontdir.c Wed May 23 20:00:31 2001
-@@ -210,6 +210,7 @@
- fprintf (file, "%s %s\n", entry->u.bitmap.fileName, entry->name.name);
- }
- fclose (file);
-+ chmod (full_name, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
- /* Write out encodings directory */
-
-@@ -232,6 +233,7 @@
- fprintf(file, "%s %s%s\n",
- encoding->name, prefix, encoding->fileName);
- fclose(file);
-+ chmod (full_name, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
-
- return TRUE;
- }
+++ /dev/null
---- XFree86-4.0/xc/lib/X11/OpenDis.c.moresecurity Wed Jun 28 18:54:22 2000
-+++ XFree86-4.0/xc/lib/X11/OpenDis.c Wed Jun 28 18:54:58 2000
-@@ -397,6 +397,11 @@
- * now extract the vendor string... String must be null terminated,
- * padded to multiple of 4 bytes.
- */
-+ /* Check for a sane vendor string length */
-+ if (u.setup->nbytesVendor > 256) {
-+ OutOfMemory(dpy, setup);
-+ return (NULL);
-+ }
- dpy->vendor = (char *) Xmalloc((unsigned) (u.setup->nbytesVendor + 1));
- if (dpy->vendor == NULL) {
- OutOfMemory(dpy, setup);
+++ /dev/null
-diff -urN XFree86-3.3.6.orig/xc/config/cf/xf86site.def XFree86-3.3.6/xc/config/cf/xf86site.def
---- XFree86-3.3.6.orig/xc/config/cf/xf86site.def Sat Mar 11 04:34:04 2000
-+++ XFree86-3.3.6/xc/config/cf/xf86site.def Sat Mar 11 05:02:00 2000
-@@ -93,8 +93,8 @@
- * Some Linux releases don't have a libtermcap. In this case you may need
- * to uncomment the following
- *
--#define TermcapLibrary -lncurses
- */
-+#define TermcapLibrary -lncurses
-
- /*
- * If you have Tk (which is required to build XF86Setup), uncomment this
-diff -urN XFree86-3.3.6.orig/xc/programs/xterm/Imakefile XFree86-3.3.6/xc/programs/xterm/Imakefile
---- XFree86-3.3.6.orig/xc/programs/xterm/Imakefile Sat Mar 11 05:00:52 2000
-+++ XFree86-3.3.6/xc/programs/xterm/Imakefile Sat Mar 11 05:02:00 2000
-@@ -83,7 +83,7 @@
- -DOSMINORVERSION=$(OSMINORVERSION)
- MISC_DEFINES = /* -DALLOWLOGGING -DALLOWLOGFILEEXEC */
- XKB_DEFINES = XkbClientDefines
-- DEFINES = -I. $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT)
-+ DEFINES = -I. -I/usr/include/ncurses $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT)
-
- #ifdef OS2Architecture
- MAINSRC = os2main.c
+++ /dev/null
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_driver.c.org Wed Dec 6 19:08:54 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_driver.c Mon Feb 26 13:37:31 2001
-@@ -913,6 +913,13 @@
- else
- nPtr->Options = (OptionInfoPtr)NEOOptions;
-
-+ /* Neomagic 256XL+ needs hardware-cursor disabled by default <hdeller@redhat.com> */
-+ if (nPtr->NeoChipset == NM2380) { /* Neomagic 256XL+ */
-+ nPtr->swCursor = TRUE;
-+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
-+ "Neomagic 256XL+ (NM2380) - default to software cursor\n");
-+ }
-+
- xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, nPtr->Options);
-
- xf86GetOptValBool(nPtr->Options, OPTION_NOLINEAR_MODE,&nPtr->noLinear);
+++ /dev/null
-diff -urN LinuxDriver.org/2D/savage_video.c LinuxDriver/2D/savage_video.c
---- LinuxDriver.org/2D/savage_video.c 2003-08-28 21:48:40.000000000 +0200
-+++ LinuxDriver/2D/savage_video.c 2003-08-28 21:49:19.000000000 +0200
-@@ -621,18 +621,15 @@
- \r
- switch (id) {\r
- case FOURCC_Y211: /* Y211 */\r
-- xf86Msg(X_INFO,"FOURCC_Y211");\r
- srcPitch = width;\r
- break;\r
- case FOURCC_YV12: /* YV12 */\r
-- xf86Msg(X_INFO,"FOURCC_YV12");\r
- srcPitch = (width + 3) & ~3;\r
- srcPitch2 = ((width >> 1) + 3) & ~3; \r
- offsetV = srcPitch * height;\r
- offsetU = offsetV + (srcPitch2 * (height >> 1)) ;\r
- break;\r
- case FOURCC_I420:\r
-- xf86Msg(X_INFO,"FOURCC_I420");\r
- srcPitch = (width + 3) & ~3;\r
- srcPitch2 = ((width >> 1) + 3) & ~3; \r
- offsetU = srcPitch * height;\r
+++ /dev/null
---- XFree86-4.3.99.16/LinuxDriver/2D/savage_video.c.orig 2003-11-24 01:54:37.000000000 +0100
-+++ XFree86-4.3.99.16/LinuxDriver/2D/savage_video.c 2003-11-25 00:45:41.793649736 +0100
-@@ -600,7 +600,7 @@
- \r
- SavageClipVideo(\r
- &dstBox, &x1, &x2, &y1, &y2,\r
-- REGION_EXTENTS(pScreen, clipBoxes), width, height);\r
-+ REGION_EXTENTS(pScrn->pScreen, clipBoxes), width, height);\r
- \r
- if ((x1 >= x2) || (y1 >= y2))\r
- return Success;\r
-@@ -701,7 +701,7 @@
- \r
- /* update cliplist */\r
- if (!RegionsEqual(&pPriv->clip, clipBoxes)) {\r
-- REGION_COPY(pScreen, &pPriv->clip, clipBoxes);\r
-+ REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);\r
- /* draw these */\r
- xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);\r
- }\r
-@@ -2146,7 +2146,7 @@
- \r
- #if 1\r
- SavageClipVideo(&dstBox, &x1, &x2, &y1, &y2,\r
-- REGION_EXTENTS(pScreen, clipBoxes), width, height);\r
-+ REGION_EXTENTS(pScrn->pScreen, clipBoxes), width, height);\r
- \r
- \r
- drw_w = dstBox.x2 - dstBox.x1;\r
-@@ -2339,7 +2339,7 @@
- \r
- /* update cliplist */\r
- if(!RegionsEqual(&pPriv->clip, clipBoxes)) {\r
-- REGION_COPY(pScreen, &pPriv->clip, clipBoxes);\r
-+ REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);\r
- /* draw these */\r
- XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0,\r
- REGION_NUM_RECTS(clipBoxes),\r
-@@ -2724,7 +2724,7 @@
- dstBox.y2 = drw_y + drw_h;\r
- \r
- SavageClipVideo(&dstBox, &x1, &x2, &y1, &y2,\r
-- REGION_EXTENTS(pScreen, clipBoxes), \r
-+ REGION_EXTENTS(pScrn->pScreen, clipBoxes), \r
- surface->width, surface->height);\r
- \r
- if((x1 >= x2) || (y1 >= y2))\r
+++ /dev/null
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Imakefile~ Wed Apr 18 16:52:43 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Imakefile Sun Jun 17 22:50:25 2001
-@@ -7,16 +7,10 @@
- XCOMM to maintain the single Makefile.linux with kernel-specific
- XCOMM support. Later, we can move to a different Imakefile.
-
--#if BuildXF86DRI && BuildXF86DRM
--all::
-- $(MAKE) -f Makefile.linux
--
- clean::
- $(MAKE) -f Makefile.linux clean
--#else
- all::
- @echo 'Use "make -f Makefile.linux" to manually build drm.o'
--#endif
-
- LinkSourceFile(drm_sarea.h,$(XF86OSSRC)/shared/drm/kernel)
- LinkSourceFile(mga.h,$(XF86OSSRC)/shared/drm/kernel)
+++ /dev/null
-diff -urN XFree86-3.3.5.orig/xc/programs/xterm/Imakefile XFree86-3.3.5/xc/programs/xterm/Imakefile
---- XFree86-3.3.5.orig/xc/programs/xterm/Imakefile Wed Jul 28 15:37:50 1999
-+++ XFree86-3.3.5/xc/programs/xterm/Imakefile Thu Sep 2 18:51:23 1999
-@@ -20,6 +20,10 @@
- #define XkbClientDefines /**/
- #endif
-
-+#if InstallXtermSetUID
-+#undef InstallXtermSetUID
-+#endif
-+
- #ifndef XkbClientDepLibs
- #define XkbClientDepLibs /**/
- #endif
-@@ -48,6 +52,8 @@
- PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */
- PTYLIB = -lpucc
- #endif
-+
-+ PTYLIB = -lutil -lutempter
-
- #if ((LinuxCLibMajorVersion == 6) && (LinuxCLibMinorVersion < 1))
- PTYLIB = -lutil
-diff -urN XFree86-3.3.5.orig/xc/programs/xterm/main.c XFree86-3.3.5/xc/programs/xterm/main.c
---- XFree86-3.3.5.orig/xc/programs/xterm/main.c Thu Sep 2 16:49:51 1999
-+++ XFree86-3.3.5/xc/programs/xterm/main.c Thu Sep 2 18:52:41 1999
-@@ -1934,7 +1934,7 @@
- static int
- get_pty (int *pty)
- {
--#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS))
-+#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__linux__)
- int tty;
- return (openpty(pty, &tty, ttydev, NULL, NULL));
- #elif (defined(SYSV) && defined(i386) && !defined(SVR4)) || defined(__QNXNTO__)
-@@ -2611,6 +2611,9 @@
- }
- #endif /* sun vs TIOCSWINSZ */
-
-+#undef UTMP
-+ addToUtmp(ttydev, NULL, screen->respond);
-+
- if (!am_slave) {
- #ifdef USE_HANDSHAKE
- if (pipe(pc_pipe) || pipe(cp_pipe))
-@@ -3230,6 +3233,7 @@
- if (pw && pw->pw_name)
- Setenv ("LOGNAME=", pw->pw_name); /* for POSIX */
- #ifdef USE_SYSV_UTMP
-+
- /* Set up our utmp entry now. We need to do it here
- ** for the following reasons:
- ** - It needs to have our correct process id (for
-@@ -3328,7 +3332,6 @@
- #endif
- /* close the file */
- (void) endutent();
--
- #else /* USE_SYSV_UTMP */
- /* We can now get our ttyslot! We can also set the initial
- * UTMP entry.
-@@ -4063,6 +4066,7 @@
- Exit(int n)
- {
- register TScreen *screen = &term->screen;
-+ removeFromUtmp();
- #ifdef UTMP
- #ifdef USE_SYSV_UTMP
- #if defined(SVR4) || defined(SCO325)
+++ /dev/null
---- XFree86-3.3.5/xc/config/cf/linux.cf~ Thu Sep 2 20:21:42 1999
-+++ XFree86-3.3.5/xc/config/cf/linux.cf Thu Sep 2 21:14:58 1999
-@@ -139,7 +139,7 @@
- #define HasMkstemp YES
- #endif
- #ifndef HasPam
--#define HasPam NO
-+#define HasPam YES
- #endif
-
- #define AvoidNullMakeCommand YES
+++ /dev/null
---- XFree86-4.0.1/xc/config/cf/Imake.rules.pmake Wed Oct 25 13:16:57 2000
-+++ XFree86-4.0.1/xc/config/cf/Imake.rules Wed Oct 25 15:51:01 2000
-@@ -1027,7 +1027,7 @@
- MoveToBakFile($@) @@\
- LinkRule($@,$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
- @@\
--Concat(load,server): @@\
-+Concat(load,server): subdirs objects libs @@\
- MoveToBakFile(ProgramTargetName(server)) @@\
- LinkRule(ProgramTargetName(server),$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
- @@\
-@@ -2633,6 +2633,10 @@
- #endif
-
-
-+#ifndef SubdirsTarget
-+#define SubdirsTarget all
-+#endif
-+
- /*
- * LangNamedTargetSubdirs - recursively make a series of steps
- */
-@@ -2662,7 +2666,7 @@
-
- #ifndef LangMakeSubdirs
- #define LangMakeSubdirs(lang,dirs) @@\
--LangNamedMakeSubdirs(lang,all,dirs)
-+LangNamedMakeSubdirs(lang,SubdirsTarget,dirs)
- #endif /* LangMakeSubdirs */
-
-
-@@ -2696,8 +2700,19 @@
-
- #ifndef MakeSubdirs
- #define MakeSubdirs(dirs) @@\
--NamedMakeSubdirs(all,dirs)
-+NamedMakeSubdirs(SubdirsTarget,dirs)
- #endif /* MakeSubdirs */
-+
-+#ifndef MakeSubdirsDep
-+#define MakeSubdirsDep(dirs,dep) @@\
-+all:: dep @@\
-+ @MakeFlagsToShellFlags(ik,set +e); \ @@\
-+ for i in dirs ;\ @@\
-+ do \ @@\
-+ echo "making" all "in $(CURRENT_DIR)/$$i..."; \ @@\
-+ MakeNamedTargetSubdir ($$i,PassCDebugFlags,all);\ @@\
-+ done
-+#endif /* MakeSubdirsDep */
-
-
- /*
---- XFree86-4.0.1/xc/lib/GL/Imakefile.pmake Sun Sep 24 15:50:59 2000
-+++ XFree86-4.0.1/xc/lib/GL/Imakefile Wed Oct 25 15:51:38 2000
-@@ -3,6 +3,8 @@
- #include <Threads.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- #define PassCDebugFlags
-
-@@ -292,11 +294,11 @@
-
-
- #if NormalLibGlx
--NormalDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(UOBJS))
-+NormalDepLibraryTarget($(LIBNAME),all.subdirs,$(UOBJS))
- InstallLibrary($(LIBNAME),$(USRLIBDIR))
- #endif
- #if SharedLibGlx
--SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(GLXSUBDIRS) $(DONES),$(OBJS) $(THREADOBJS),.,.)
-+SharedDepLibraryTarget($(LIBNAME),$(SOREV),all.subdirs,$(OBJS) $(THREADOBJS),.,.)
- InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
- #if LinkGLToUsrLib && AlternateUsrLibDir
- install::
-@@ -308,11 +310,11 @@
- #endif
- #endif
- #if DebugLibGlx
--DebuggedDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(DOBJS))
-+DebuggedDepLibraryTarget($(LIBNAME),all.subdirs,$(DOBJS))
- InstallLibrary($(LIBNAME)_d,$(USRLIBDIR))
- #endif
- #if ProfileLibGlx
--ProfiledDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(POBJS))
-+ProfiledDepLibraryTarget($(LIBNAME),all.subdirs,$(POBJS))
- InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
- #endif
-
-@@ -320,7 +322,11 @@
-
- #if BuildXF86DRI && !GlxUseSGISI && (!GlxBuiltInMesa || !defined(GlxDriverUsesMesa))
- OSMESASUBDIRS = mesa/src/OSmesa
--MakeSubdirs($(OSMESASUBDIRS))
-+#if SharedLibGlx
-+MakeSubdirsDep($(OSMESASUBDIRS),lib$(LIBNAME).so.$(SOREV))
-+#else
-+MakeSubdirsDep($(OSMESASUBDIRS),lib$(LIBNAME).a)
-+#endif
- #endif
-
-
-@@ -339,7 +345,11 @@
-
- DRIVERSUBDIRS = mesa/src/drv
-
--MakeSubdirs($(DRIVERSUBDIRS))
-+#if SharedLibGlx
-+MakeSubdirsDep($(DRIVERSUBDIRS),lib$(LIBNAME).so.$(SOREV))
-+#else
-+MakeSubdirsDep($(DRIVERSUBDIRS),lib$(LIBNAME).a)
-+#endif
-
- #endif
-
---- XFree86-4.0.1/xc/lib/font/Imakefile.pmake Tue Sep 19 14:46:06 2000
-+++ XFree86-4.0.1/xc/lib/font/Imakefile Wed Oct 25 15:54:16 2000
-@@ -3,6 +3,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- #define DoNormalLib NormalLibFont
- #define DoSharedLib SharedLibFont
-@@ -119,31 +121,30 @@
- #define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
-
- #if NormalLibFont
--NormalDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(STATIC_OBJS))
-+NormalDepLibraryTarget($(LIBNAME),all.subdirs,$(STATIC_OBJS))
- InstallLibrary($(LIBNAME),$(USRLIBDIR))
- #endif /* NormalLibFont */
-
- #if SharedLibFont
--SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.)
-+SharedDepLibraryTarget($(LIBNAME),$(SOREV),all.subdirs,$(SHARED_OBJS),.,.)
- InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
- #endif /* SharedLibFont */
-
- #if DebugLibFont
--DebuggedDepLibraryTarget(Xfont,$(SUBDIRS) $(DONES),$(DEBUG_OBJS))
-+DebuggedDepLibraryTarget(Xfont,all.subdirs,$(DEBUG_OBJS))
- InstallLibrary($(LIBNAME)_d,$(USRLIBDIR))
- #endif /* DebugLibFont */
-
- #if ProfileLibFont
--ProfiledDepLibraryTarget(Xfont,$(SUBDIRS) $(DONES),$(PROFILE_OBJS))
-+ProfiledDepLibraryTarget(Xfont,all.subdirs,$(PROFILE_OBJS))
- InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
- #endif /* ProfileLibFont */
-
- #if BuildServer && DoLoadableServer
--NormalDepLibraryTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASELIBOBJS))
--NormalDepRelocatableTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASEOBJS))
-+NormalDepLibraryTarget(fontbase,all.subdirs,$(BASELIBOBJS))
-+NormalDepRelocatableTarget(fontbase,all.subdirs,$(BASEOBJS))
- #endif
-
--
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
---- XFree86-4.0.1/xc/lib/lbxutil/Imakefile.pmake Sat Apr 17 11:08:13 1999
-+++ XFree86-4.0.1/xc/lib/lbxutil/Imakefile Wed Oct 25 15:51:01 2000
-@@ -8,6 +8,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- SUBDIRS = lbx_zlib delta image
-
-@@ -22,9 +24,9 @@
- #undef _LinkBuildLibrary
- #define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
-
--NormalDepLibraryTarget(lbxutil,$(SUBDIRS) $(DONES),$(OBJS))
-+NormalDepLibraryTarget(lbxutil,all.subdirs,$(OBJS))
-
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
-
---- XFree86-4.0.1/xc/programs/Xserver/GL/mesa/src/Imakefile.pmake Sun Sep 24 15:51:22 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/GL/mesa/src/Imakefile Wed Oct 25 15:51:01 2000
-@@ -4,6 +4,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- SUBDIRS = X
-
-@@ -367,9 +369,9 @@
-
- ModuleObjectRule()
-
--DepLibraryModuleTarget(GLcore,$(SUBDIRS) $(DONES) $(OBJS),$(OBJS) $(XOBJS))
-+DepLibraryModuleTarget(GLcore,all.subdirs $(OBJS),$(OBJS) $(XOBJS))
- InstallLibraryModule(GLcore,$(MODULEDIR),extensions)
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- #else
- MakeSubdirs($(SUBDIRS))
---- XFree86-4.0.1/xc/programs/Xserver/GL/Imakefile.pmake Fri Aug 25 00:20:08 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/GL/Imakefile Wed Oct 25 15:51:01 2000
-@@ -4,6 +4,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- #if GlxUseSGISI
- CORE_SUBDIR = /* opengl */
-@@ -42,10 +44,10 @@
-
- ModuleObjectRule()
-
--DepLibraryModuleTarget(glx,$(SUBDIRS) $(DONES) $(MOBJS),$(OBJS))
-+DepLibraryModuleTarget(glx,all.subdirs $(MOBJS),$(OBJS))
-
- InstallLibraryModule(glx,$(MODULEDIR),extensions)
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
- MakeLintLibSubdirs($(SUBDIRS))
---- XFree86-4.0.1/xc/programs/Xserver/PEX5/Imakefile.pmake Sat Aug 14 12:49:24 1999
-+++ XFree86-4.0.1/xc/programs/Xserver/PEX5/Imakefile Wed Oct 25 15:51:01 2000
-@@ -5,6 +5,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- #ifndef PexDipexCDebugFlags
- #define PexDipexCDebugFlags ServerCDebugFlags
-@@ -58,9 +60,9 @@
-
- ModuleObjectRule()
-
--DepLibraryModuleTarget(pex5,$(SUBDIRS) $(DONES) $(MOBJS),$(OBJS))
-+DepLibraryModuleTarget(pex5,all.subdirs $(MOBJS),$(OBJS))
- InstallLibraryModule(pex5,$(MODULEDIR),extensions)
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- #else
- MakeSubdirs($(SUBDIRS))
---- XFree86-4.0.1/xc/programs/Xserver/XIE/dixie/Imakefile.pmake Fri Aug 25 00:20:11 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/XIE/dixie/Imakefile Wed Oct 25 15:54:12 2000
-@@ -10,6 +10,8 @@
- DONES = request/DONE import/DONE process/DONE export/DONE
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
-
- #if HasParallelMake
-@@ -20,9 +22,9 @@
- $(DONES): $(SUBDIRS)
- #endif
-
--DepLibraryModuleTarget(dixie,$(SUBDIRS) $(DONES),$(OBJS))
-+DepLibraryModuleTarget(dixie,all.subdirs,$(OBJS))
-
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
-
---- XFree86-4.0.1/xc/programs/Xserver/XIE/mixie/Imakefile.pmake Fri Aug 25 00:20:11 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/XIE/mixie/Imakefile Wed Oct 25 15:54:48 2000
-@@ -15,6 +15,8 @@
- #endif
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
-
- #if HasParallelMake
-@@ -25,9 +27,9 @@
- $(DONES): $(SUBDIRS)
- #endif
-
--DepLibraryModuleTarget(mixie,$(SUBDIRS) $(DONES),$(OBJS))
-+DepLibraryModuleTarget(mixie,all.subdirs,$(OBJS))
-
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
-
---- XFree86-4.0.1/xc/programs/Xserver/XIE/Imakefile.pmake Sat Aug 14 12:49:24 1999
-+++ XFree86-4.0.1/xc/programs/Xserver/XIE/Imakefile Wed Oct 25 15:51:01 2000
-@@ -5,6 +5,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
-
- SUBDIRS = dixie mixie
-@@ -53,9 +55,9 @@
- #endif
-
- ModuleObjectRule()
--DepLibraryModuleTarget(xie,$(SUBDIRS) $(DONES) $(MOBJS),$(OBJS))
-+DepLibraryModuleTarget(xie,all.subdirs $(MOBJS),$(OBJS))
- InstallLibraryModule(xie,$(MODULEDIR),extensions)
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependTarget()
-
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/Imakefile.pmake Fri Oct 20 16:59:00 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/Imakefile Wed Oct 25 15:51:01 2000
-@@ -46,7 +46,9 @@
-
- NormalLibraryObjectRule()
-
-+#if !DoLoadableServer
- ForceSubdirs($(SUBDIRS))
-+#endif
-
- DependSubdirs($(SUBDIRS))
-
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/input/Imakefile.pmake Sun Mar 5 20:26:46 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/input/Imakefile Wed Oct 25 15:51:01 2000
-@@ -3,6 +3,8 @@
- #define IHaveModules
- #include <Server.tmpl>
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- #if JoystickSupport
- JOYSTICKDIR = joystick
-@@ -33,7 +35,7 @@
- $(DONES): $(SUBDIRS)
- #endif
- #if !DoLoadableServer
--NormalDepLibraryTarget(idriver,$(SUBDIRS) $(DONES) idriver.list,$(OBJS))
-+NormalDepLibraryTarget(idriver,all.subdirs idriver.list,$(OBJS))
- #endif
- #else
- #if !DoLoadableServer
-@@ -51,7 +53,7 @@
-
- NormalLibraryObjectRule()
-
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
-
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/os-support/Imakefile.pmake Thu Aug 10 19:40:34 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/os-support/Imakefile Wed Oct 25 15:51:01 2000
-@@ -9,6 +9,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- #if defined(i386Architecture) || defined(ia64Architecture) || \
- (defined(LinuxArchitecture) && defined(AlphaArchitecture)) || \
-@@ -123,13 +125,13 @@
- $(DONES): $(SUBDIRS)
- #endif
-
--NormalDepLibraryTarget(xf86_os,$(SUBDIRS) $(DONES),$(OBJS))
-+NormalDepLibraryTarget(xf86_os,all.subdirs,$(OBJS))
-
- #if !HasSnprintf
- LinkSourceFile(snprintf.c,$(LIBSRC)/misc)
- #endif
-
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
-
- DependSubdirs($(SUBDIRS))
-
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/xaa/Imakefile.pmake Wed Sep 20 04:05:41 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/xaa/Imakefile Wed Oct 25 15:51:01 2000
-@@ -4,6 +4,8 @@
- #include <Server.tmpl>
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- EXPSRCS = lsb_first/?*.c msb_first/?*.c lsb_fixed/?*.c msb_fixed/?*.c
-
-@@ -52,14 +54,14 @@
- ObjectFromSpecialSource(xaaSeg, xaaLine, -DPOLYSEGMENT)
- ObjectFromSpecialSource(xaaDashSeg, xaaDashLine, -DPOLYSEGMENT)
-
--DepLibraryModuleTarget(xaa, $(OBJS) $(SUBDIRS) $(DONES), $(OBJS) $(EXPOBJS))
-+DepLibraryModuleTarget(xaa, $(OBJS) all.subdirs, $(OBJS) $(EXPOBJS))
-
- InstallLibraryModule(xaa,$(MODULEDIR),.)
-
- DependTarget()
-
-
--ForceSubdirs($(SUBDIRS))
-+MakeSubdirs($(SUBDIRS))
- DependSubdirs($(SUBDIRS))
-
-
---- XFree86-4.0.1/xc/programs/Xserver/Imakefile.pmake Wed Oct 25 15:51:01 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/Imakefile Wed Oct 25 15:51:01 2000
-@@ -662,7 +662,7 @@
- MakeMutex($(XF86SERVERSUBDIRS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS))
- #endif
- #if ForceServerRemake
--$(XF86SERVERLIBS) $(XF86SERVERSYSLIBS):: $(XF86SERVERSUBDIRS)
-+$(XF86SERVEROBJS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- SetUIDServerTarget(XFree86,$(XF86SERVERSUBDIRS),$(XF86SERVEROBJS),$(XF86SERVERLIBS),$(XF86SERVERSYSLIBS))
-@@ -724,7 +724,7 @@
- MakeMutex($(FBDEVDIRS) $(FBDEVOBJS) $(FBDEVLIBS) $(FBDEVSYSLIBS))
- #endif
- #if ForceServerRemake
--$(FBDEVOBJS) $(XFBDEV) $(FBDEVLIBS) $(FBDEVSYSLIBS):: $(FBDEVDIRS)
-+$(FBDEVOBJS) $(FBDEVLIBS) $(FBDEVSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xfbdev,$(FBDEVDIRS),$(FBDEVOBJS),$(FBDEVLIBS),$(FBDEVSYSLIBS))
-@@ -749,7 +749,7 @@
- MakeMutex($(SAVAGEDIRS) $(SAVAGEOBJS) $(SAVAGELIBS) $(SAVAGESYSLIBS))
- #endif
- #if ForceServerRemake
--$(SAVAGEOBJS) $(XSAVAGE) $(SAVAGELIBS) $(SAVAGESYSLIBS):: $(SAVAGEDIRS)
-+$(SAVAGEOBJS) $(SAVAGELIBS) $(SAVAGESYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xsavage,$(SAVAGEDIRS),$(SAVAGEOBJS),$(SAVAGELIBS),$(SAVAGESYSLIBS))
-@@ -804,7 +804,7 @@
- MakeMutex($(TRIDENTDIRS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS))
- #endif
- #if ForceServerRemake
--$(TRIDENTOBJS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS):: $(TRIDENTDIRS)
-+$(TRIDENTOBJS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xtrident,$(TRIDENTDIRS),$(TRIDENTOBJS),$(TRIDENTLIBS),$(TRIDENTSYSLIBS))
-@@ -829,7 +829,7 @@
- MakeMutex($(SIS530DIRS) $(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS))
- #endif
- #if ForceServerRemake
--$(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS):: $(SIS530DIRS)
-+$(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xsis530,$(SIS530DIRS),$(SIS530OBJS),$(SIS530LIBS),$(SIS530SYSLIBS))
-@@ -854,7 +854,7 @@
- MakeMutex($(TRIODIRS) $(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS))
- #endif
- #if ForceServerRemake
--$(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS):: $(TRIODIRS)
-+$(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xtrio,$(TRIODIRS),$(TRIOOBJS),$(TRIOLIBS),$(TRIOSYSLIBS))
-@@ -885,7 +885,7 @@
- MakeMutex($(TS300DIRS) $(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS))
- #endif
- #if ForceServerRemake
--$(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS):: $(TS300DIRS)
-+$(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xts300,$(TS300DIRS),$(TS300OBJS),$(TS300LIBS),$(TS300SYSLIBS))
-@@ -909,7 +909,7 @@
- MakeMutex($(ITSYDIRS) $(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS))
- #endif
- #if ForceServerRemake
--$(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS):: $(ITSYDIRS)
-+$(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xitsy,$(ITSYDIRS),$(ITSYOBJS),$(ITSYLIBS),$(ITSYSYSLIBS))
-@@ -973,7 +973,7 @@
- MakeMutex($(XPSUBDIRS) $(XPOBJS) $(XPLIBS) $(XPSYSLIBS))
- #endif
- #if ForceServerRemake
--$(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS)
-+$(XPOBJS) $(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(XPSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS),$(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XPSYSLIBS))
-@@ -1005,7 +1005,7 @@
- MakeMutex($(XNESTDIRS) $(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS))
- #endif
- #if ForceServerRemake
--$(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS):: $(XNESTDIRS)
-+$(XNESTOBJS) $(XNESTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(XNESTSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xnest,$(XNESTDIRS),$(XNESTOBJS), \
-@@ -1070,7 +1070,7 @@
- MakeMutex($(XVFBDIRS) $(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS))
- #endif
- #if ForceServerRemake
--$(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS):: $(XVFBDIRS)
-+$(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(XVFBSYSLIBS):: all.subdirs
- @if [ -f $@ ]; then touch $@; fi
- #endif
- ServerTarget(Xvfb,$(XVFBDIRS),$(XVFBOBJS), \
-@@ -1130,11 +1130,13 @@
- #endif
-
- #define IHaveSubdirs
-+#undef SubdirsTarget
-+#define SubdirsTarget all.subdirs
-
- DependSubdirs($(SUBDIRS))
- MakeLintLibSubdirs($(SUBDIRS))
- LintSubdirs($(SUBDIRS))
-
--ForceSubdirs($(DEPDIRS) $(SUBDIRS))
-+MakeSubdirs($(DEPDIRS) $(SUBDIRS))
-
- InstallManPage(Xserver,$(MANDIR))
---- XFree86-4.0.1/xc/programs/xkbcomp/Imakefile.pmake Mon Jan 31 20:33:45 2000
-+++ XFree86-4.0.1/xc/programs/xkbcomp/Imakefile Wed Oct 25 15:51:01 2000
-@@ -48,7 +48,7 @@
-
- LinkBuildBinary(ProgramTargetName(xkbcomp))
-
--MakeSubdirs($(SUBDIRS))
-+MakeSubdirsDep($(SUBDIRS),$(BUILDBINDIR)/xkbcomp)
-
- #ifdef OS2Architecture
- all::
---- XFree86-4.0.1/xc/Makefile.pmake Wed Mar 22 22:23:30 2000
-+++ XFree86-4.0.1/xc/Makefile Wed Oct 25 15:51:01 2000
-@@ -63,6 +63,7 @@
- $(MAKE_CMD) $(MFLAGS) Makefiles
- $(MAKE_CMD) $(MFLAGS) clean BOOTSTRAPSUBDIRS=
- $(MAKE_CMD) $(MFLAGS) includes
-+ $(MAKE) -C $(CONFIGSRC)/util gccmakedep
- $(MAKE_CMD) $(MFLAGS) depend
- $(MAKE_CMD) $(MFLAGS) $(WORLDOPTS) World
- @echo ""
-@@ -88,7 +89,8 @@
-
- depend.bootstrap: $(DEPENDSRC)/Makefile.proto
- cd $(DEPENDSRC) && $(RM) -r Makefile Makefile.dep makedepend *.o bootstrap
-- cd $(DEPENDSRC) && $(MAKE) -f Makefile.proto bootstrap
-+ cd $(IMAKESRC) && mkdir X11 && cd X11 && ln -s ../../../include/* .
-+ cd $(DEPENDSRC) && $(MAKE) -f Makefile.proto makedepend
-
- $(IMAKESRC)/Makefile.proto: depend.bootstrap
- $(IMAKE_CMD) -s $(IMAKESRC)/Makefile.proto -f $(IMAKESRC)/Imakefile -DTOPDIR=$(IMAKETOP) -DCURDIR=$(IMAKESRC) -DBootStrap
+++ /dev/null
-diff -urN xc.orig/config/cf/Library.tmpl xc/config/cf/Library.tmpl
---- xc.orig/config/cf/Library.tmpl Mon Dec 30 15:52:30 2002
-+++ xc/config/cf/Library.tmpl Mon Dec 30 19:33:30 2002
-@@ -212,9 +212,9 @@
- # if !DoSharedLib && defined(IncludeNormalLibInSharedObject)
- # define _NormalObjCompile(options) NormalRelocLibObjCompile(options)
- # else
--# define _NormalObjCompile(options) NormalLibObjCompile(options)
-+# define _NormalObjCompile(options) NormalLibObjCompile(options $(PICFLAGS))
- # endif
--# define _NormalObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options)
-+# define _NormalObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options $(PICFLAGS))
- # define _NormalCleanDir() $(_NULLCMD_)
- # endif
- #endif
-@@ -227,8 +227,8 @@
- # define _SharedObjCompile(options) NormalSharedLibObjCompile(options)
- # define _SharedObjCplusplusCompile(options) NormalSharedLibObjCplusplusCompile(options)
- #else
--# define _SharedObjCompile(options) NormalLibObjCompile(options)
--# define _SharedObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options)
-+# define _SharedObjCompile(options) NormalLibObjCompile(options $(PICFLAGS))
-+# define _SharedObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options $(PICFLAGS))
- #endif
- #endif
-
+++ /dev/null
---- xc/lib/Xcursor/Imakefile~ Thu Sep 26 09:52:01 2002
-+++ xc/lib/Xcursor/Imakefile Tue Jan 14 01:38:12 2003
-@@ -69,7 +69,7 @@
- RemoveFile($@)
- sh config-subst $(SUBSTVARS) < xcursor.pc.in > $@
-
--InstallNonExecFile(xcursor.pc,$(USRLIBDIR)/pkgconfig)
-+InstallNonExecFile(xcursor.pc,/usr/lib/pkgconfig)
-
- clean::
- RemoveFile(xcursor.pc)
---- xc/lib/Xft/Imakefile~ Thu Nov 14 22:01:18 2002
-+++ xc/lib/Xft/Imakefile Tue Jan 14 03:09:43 2003
-@@ -132,7 +132,7 @@
- RemoveFile($@)
- sh config/config-subst $(SUBSTVARS) < xft.pc.in > $@
-
--InstallNonExecFile(xft.pc,$(USRLIBDIR)/pkgconfig)
-+InstallNonExecFile(xft.pc,/usr/lib/pkgconfig)
-
- clean::
- RemoveFile(xft.pc)
+++ /dev/null
-Index: r128.h
-===================================================================
-RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h,v
-retrieving revision 1.8
-diff -u -r1.8 r128.h
---- XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2000/12/08 19:15:33 1.8
-+++ XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h 2001/03/02 20:16:38
-@@ -280,6 +280,8 @@
- unsigned char *AGP; /* Map */
- int agpMode;
-
-+ CARD32 pciCommand;
-+
- Bool CCEInUse; /* CCE is currently active */
- int CCEMode; /* CCE mode that server/clients use */
- int CCEFifoSize; /* Size of the CCE command FIFO */
-Index: r128_dri.c
-===================================================================
-RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v
-retrieving revision 1.7
-diff -u -r1.7 r128_dri.c
---- XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2000/12/12 17:17:12 1.7
-+++ XFree86-4.0.3/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 2001/03/02 20:16:38
-@@ -403,6 +403,9 @@
- int s, l;
- int flags;
-
-+ /* Save the old PCI command reg */
-+ info->pciCommand = pciReadLong(info->PciTag, PCI_CMD_STAT_REG);
-+
- if (drmAgpAcquire(info->drmFD) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] AGP not available\n");
- return FALSE;
-@@ -576,6 +579,11 @@
- OUTREG(R128_AGP_BASE, info->ringHandle); /* Ring buf is at AGP offset 0 */
- OUTREG(R128_AGP_CNTL, cntl);
-
-+ /* Enable bus mastering in PCI config
-+ space */
-+ pciWriteLong(info->PciTag, PCI_CMD_STAT_REG,
-+ info->pciCommand | PCI_CMD_MASTER_ENABLE);
-+
- return TRUE;
- }
-
-@@ -1020,6 +1028,9 @@
- drmAgpFree(info->drmFD, info->agpMemHandle);
- info->agpMemHandle = 0;
- drmAgpRelease(info->drmFD);
-+
-+ /* Restore PCI command register */
-+ pciWriteLong(info->PciTag, PCI_CMD_STAT_REG, info->pciCommand);
- }
-
- /* De-allocate all DRI resources */
+++ /dev/null
---- XFree86-3.3.3/xc/config/cf/xf86site.def.rh Sun Nov 8 06:19:11 1998
-+++ XFree86-3.3.3/xc/config/cf/xf86site.def Mon Nov 30 13:48:39 1998
-@@ -66,9 +66,9 @@
- *
- * This should automatically get set correctly by imake.
- *
--#define LinuxCLibMajorVersion 5
--#define LinuxClibMinorVersion 4
- */
-+#define LinuxCLibMajorVersion 6
-+#define LinuxClibMinorVersion 0
-
- /*
- * If you want to use the GNU malloc library, uncomment this
-@@ -101,8 +101,8 @@
- * Note: version 4.0 or 4.1 is required, and XF86Setup links it statically by
- * default.
- *
--#define HasTk YES
- */
-+#define HasTk YES
-
- /*
- * Set the paths and names for your Tk library if they don't match the
-@@ -115,25 +115,26 @@
- *
- * Some Linux releases need TkLibDir set to /usr/X11R6/lib
- *
--#define TkLibDir /usr/local/lib
--#define TkIncDir /usr/local/include
--#define TkLibName tk
- */
-+#define TkLibDir /usr/lib
-+#define TkIncDir /usr/include
-+#define TkLibName tk
-
- /*
- * By default, XF86Setup is linked with a static Tk library. To change
- * that, uncomment the following line.
- *
--#define XF86SetupUsesStaticTk NO
- */
-+#define XF86SetupUsesStaticTk NO
-+
-
- /*
- * If you have Tcl (which is required to build XF86Setup), uncomment this
- * Note: version 7.4 or 7.5 is required, and XF86Setup links it statically by
- * default.
- *
--#define HasTcl YES
- */
-+#define HasTcl YES
-
- /*
- * Set the paths and names for your Tcl library if they don't match the
-@@ -143,17 +144,17 @@
- *
- * Some Linux releases need TclIncDir set to /usr/include/tcl.
- *
--#define TclLibDir /usr/local/lib
--#define TclIncDir /usr/local/include
--#define TclLibName tcl
- */
-+#define TclLibDir /usr/lib
-+#define TclIncDir /usr/include
-+#define TclLibName tcl
-
- /*
- * By default, XF86Setup is linked with a static Tcl library. To change
- * that, uncomment the following line.
- *
--#define XF86SetupUsesStaticTcl NO
- */
-+#define XF86SetupUsesStaticTcl NO
-
- /*
- * Which servers do you wish to build, you can save a lot of disk space
-@@ -369,8 +370,8 @@
- /*
- * To not build/install the Cyrillic fonts, uncomment the following
- *
--#define BuildCyrillicFonts NO
- */
-+#define BuildCyrillicFonts YES
-
- /*
- * To not install the local font directory, uncomment the following
-@@ -400,7 +401,7 @@
- * will need to be built with the Joystick driver in order to be able to
- * use this.
- *
--#define JoystickSupport NO
-+#define JoystickSupport YES
- #define WacomSupport YES
- #define MicroTouchSupport YES
- #define ElographicsSupport YES
-@@ -536,8 +537,8 @@
- * To forceably build static libraries in addition to shared libraries,
- * uncomment this.
- *
--#define ForceNormalLib YES
- */
-+#define ForceNormalLib YES
-
- /*
- * Uncomment this if your default tools (eg, gcc, ld, as, etc) are
---- XFree86-3.3.3/xc/config/cf/site.def.rh Sun Jun 22 06:32:21 1997
-+++ XFree86-3.3.3/xc/config/cf/site.def Mon Nov 30 13:43:48 1998
-@@ -106,10 +111,11 @@
- */
-
- /*
--#undef DefaultUserPath
--#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
- */
--
-+#undef DefaultUserPath
-+#define DefaultUserPath /usr/local/bin:/bin:/usr/bin
-+#undef DefaultSystemPath
-+#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin
-
- /* You do NOT need SetUID if you only run the server under xdm */
- /* You MAY need SetUID if users run the server by hand or under xinit */
---- XFree86-3.3.3/xc/config/cf/linux.cf.rh Sun Nov 8 06:34:50 1998
-+++ XFree86-3.3.3/xc/config/cf/linux.cf Mon Nov 30 13:43:53 1998
-@@ -318,1 +318,5 @@
- #include <xfree86.cf>
-+
-+#ifndef XtermWithI18N
-+#define XtermWithI18N YES
-+#endif
---- XFree86-3.3.3/xc/programs/xinit/Imakefile.rh Thu Nov 5 14:28:39 1998
-+++ XFree86-3.3.3/xc/programs/xinit/Imakefile Mon Nov 30 13:43:47 1998
-@@ -35,9 +35,11 @@
- InstallNamedProg(startx,startx,$(BINDIR))
- InstallManPage(startx,$(MANDIR))
-
--#if InstallXinitConfig
--InstallNonExecFile($(SAMPLECONFIG),$(XINITDIR))
--#else
--InstallNonExecFileNoClobber($(SAMPLECONFIG),$(XINITDIR))
--#endif
-+XCOMM Red Hat gets this from a different package
-+XCOMM #if InstallXinitConfig
-+XCOMM InstallNonExecFile($(SAMPLECONFIG),$(XINITDIR))
-+XCOMM #else
-+XCOMM InstallNonExecFileNoClobber($(SAMPLECONFIG),$(XINITDIR))
-+XCOMM #endif
-+
- #endif
+++ /dev/null
---- XFree86-3.3.3.1/xc/programs/xdm/config/Xsession.rhxdm Wed Jan 3 02:36:27 1996
-+++ XFree86-3.3.3.1/xc/programs/xdm/config/Xsession Mon Apr 12 19:26:02 1999
-@@ -1,5 +1,23 @@
--#!/bin/sh
--# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
-+#!/bin/sh -l
-+# Xsession for Red Hat Linux 6.0
-+# Copyright (c) 1999 Red Hat Software, Inc.
-+
-+# clean up after xbanner
-+if [ -f /usr/X11R6/bin/freetemp ]; then
-+ freetemp
-+fi
-+
-+# clear screen to some sane color
-+/usr/X11R6/bin/xsetroot -solid "#356390"
-+
-+case $# in
-+1)
-+ case $1 in
-+ failsafe)
-+ exec xterm -geometry 80x24-0-0
-+ ;;
-+ esac
-+esac
-
- # redirect errors to a file in user's home directory if we can
- for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
-@@ -12,20 +30,15 @@
- fi
- done
-
--case $# in
--1)
-- case $1 in
-- failsafe)
-- exec xterm -geometry 80x24-0-0
-- ;;
-- esac
--esac
--
- startup=$HOME/.xsession
- resources=$HOME/.Xresources
-
--if [ -f "$startup" ]; then
-+if [ -x "$startup" ]; then
- exec "$startup"
-+elif [ -x "$HOME/.Xclients" ]; then
-+ exec "$HOME/.Xclients"
-+elif [ -x /etc/X11/xinit/Xclients ]; then
-+ exec /etc/X11/xinit/Xclients
- else
- if [ -f "$resources" ]; then
- xrdb -load "$resources"
---- XFree86-3.3.3.1/xc/programs/xdm/config/Xsetup_0.rhxdm Wed Apr 27 03:20:03 1994
-+++ XFree86-3.3.3.1/xc/programs/xdm/config/Xsetup_0 Mon Apr 12 19:26:02 1999
-@@ -1,3 +1,6 @@
- #!/bin/sh
--# $XConsortium: Xsetup_0,v 1.3 93/09/28 14:30:31 gildea Exp $
--xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
-+# Xsetup for Red Hat Linux 6.0
-+# Copyright (c) 1999 Red Hat Software, Inc.
-+/usr/X11R6/bin/xsetroot -solid "#356390"
-+/usr/bin/xsri -geometry +5+5 -avoid 300x250 -keep-aspect \
-+ /usr/share/pixmaps/redhat/redhat-transparent.png
---- XFree86-3.3.3.1/xc/programs/xdm/config/xdm-conf.cpp.rhxdm Sat Feb 10 00:46:54 1996
-+++ XFree86-3.3.3.1/xc/programs/xdm/config/xdm-conf.cpp Mon Apr 12 19:26:02 1999
-@@ -1,19 +1,19 @@
- ! $XConsortium: xdm-conf.cpp /main/3 1996/01/15 15:17:26 gildea $
--DisplayManager.errorLogFile: XDMDIR/xdm-errors
--DisplayManager.pidFile: XDMDIR/xdm-pid
--DisplayManager.keyFile: XDMDIR/xdm-keys
--DisplayManager.servers: XDMDIR/Xservers
--DisplayManager.accessFile: XDMDIR/Xaccess
-+DisplayManager.errorLogFile: /var/log/xdm-error.log
-+DisplayManager.pidFile: /var/run/xdm.pid
-+DisplayManager.keyFile: /etc/X11/xdm/xdm-keys
-+DisplayManager.servers: /etc/X11/xdm/Xservers
-+DisplayManager.accessFile: /etc/X11/xdm/Xaccess
- ! All displays should use authorization, but we cannot be sure
- ! X terminals will be configured that way, so by default
- ! use authorization only for local displays :0, :1, etc.
- DisplayManager._0.authorize: true
- DisplayManager._1.authorize: true
- ! The following three resources set up display :0 as the console.
--DisplayManager._0.setup: XDMDIR/Xsetup_0
--DisplayManager._0.startup: XDMDIR/GiveConsole
--DisplayManager._0.reset: XDMDIR/TakeConsole
-+DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0
-+DisplayManager._0.startup: /etc/X11/xdm/GiveConsole
-+DisplayManager._0.reset: /etc/X11/xdm/TakeConsole
- !
--DisplayManager*resources: XDMDIR/Xresources
--DisplayManager*session: XDMDIR/Xsession
-+DisplayManager*resources: /etc/X11/xdm/Xresources
-+DisplayManager*session: /etc/X11/xdm/Xsession
- DisplayManager*authComplain: false
---- XFree86-3.3.3.1/xc/programs/xdm/config/GiveConsole.rhxdm Mon Apr 12 19:33:09 1999
-+++ XFree86-3.3.3.1/xc/programs/xdm/config/GiveConsole Mon Apr 12 19:34:11 1999
-@@ -8,3 +8,5 @@
- # causing serious grief.
- #
- chown $USER /dev/console
-+/usr/X11R6/bin/sessreg -a -w "/var/log/wtmp" -u "/var/run/utmp" \
-+ -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
---- XFree86-3.3.3.1/xc/programs/xdm/config/TakeConsole.rhxdm Mon Apr 12 19:33:13 1999
-+++ XFree86-3.3.3.1/xc/programs/xdm/config/TakeConsole Mon Apr 12 19:34:45 1999
-@@ -5,3 +5,5 @@
- #
- chmod 622 /dev/console
- chown root /dev/console
-+/usr/X11R6/bin/sessreg -d -w "/var/log/wtmp" -u "/var/run/utmp" \
-+ -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
+++ /dev/null
---- XFree86-4.0.2.orig/xc/programs/xkbcomp/symbols/ro Tue Aug 15 12:51:32 2000
-+++ XFree86-4.0.2/xc/programs/xkbcomp/symbols/ro Fri Jan 19 22:03:56 2001
-@@ -5,7 +5,6 @@
- //
- // Created by Cristian Gafton, <gafton@redhat.com> (C) 2000
- //
--// $XFree86: xc/programs/xkbcomp/symbols/ro,v 3.1 2000/08/15 16:51:32 dawes Exp $
-
- partial hidden alphanumeric_keys modifier_keys
- xkb_symbols "basic" {
-@@ -13,7 +12,7 @@
-
- key <TLDE> { [], [ acircumflex, acircumflex ] };
- key <AC01> { [], [ atilde, acircumflex ] };
-- key <AC02> { [], [ scedilla, Scedilla ] };
-+ key <AC02> { [], [ masculine, ordfeminine ] };
- key <AD05> { [], [ thorn, Thorn ] };
- key <AD08> { [], [ icircumflex, Icircumflex ] };
- };
+++ /dev/null
---- XFree86-3.3.4.orig/xc/nls/locale.alias Wed Jun 2 09:50:05 1999
-+++ XFree86-3.3.4/xc/nls/locale.alias Sun Aug 8 21:57:30 1999
-@@ -282,7 +282,7 @@
- ru_RU.iso88595 ru_RU.ISO8859-5
- #if defined(INCLUDE_ru_SU)
- XCOMM ru_SU is redundant now
--ru_SU ru_RU.ISO8859-5
-+ru_SU ru_RU.KOI8-R
- ru_SU.ISO8859-5 ru_RU.ISO8859-5
- ru_SU.KOI8-R ru_RU.KOI8-R
- #endif
+++ /dev/null
-diff -urN XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_accel.c XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_accel.c
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_accel.c Fri Nov 8 19:03:32 2002
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_accel.c Mon May 5 12:30:22 2003
-@@ -470,6 +470,7 @@
- | NO_TRANSPARENCY
- | HARDWARE_PATTERN_PROGRAMMED_BITS
- | HARDWARE_PATTERN_PROGRAMMED_ORIGIN
-+ | ROP_NEEDS_SOURCE
- ;
- }
- #endif
-@@ -496,6 +497,7 @@
- | SCANLINE_PAD_DWORD
- | BIT_ORDER_IN_BYTE_MSBFIRST
- | LEFT_EDGE_CLIPPING
-+ | ROP_NEEDS_SOURCE
- ;
- xaaptr->SetupForImageWrite = SavageSetupForImageWrite;
- xaaptr->SubsequentImageWriteRect = SavageSubsequentImageWriteRect;
-@@ -506,7 +508,7 @@
- /* WriteBitmap color expand */
-
- #if 0
-- xaaptr->WriteBitmapFlags = NO_PLANEMASK;
-+ xaaptr->WriteBitmapFlags = NO_PLANEMASK | ROP_NEEDS_SOURCE;
- xaaptr->WriteBitmap = SavageWriteBitmapCPUToScreenColorExpand;
- #endif
-
-diff -urN XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_driver.c XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_driver.c Tue Feb 25 05:08:21 2003
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c Mon May 5 12:30:23 2003
-@@ -19,16 +19,12 @@
- #define DPMS_SERVER
- #include "extensions/dpms.h"
-
--#ifdef XvExtension
- #include "xf86xv.h"
--#endif
-
- #include "savage_driver.h"
- #include "savage_bci.h"
-
-
--
--
- /*
- * prototypes
- */
-@@ -82,10 +78,10 @@
- #define iabs(a) ((int)(a)>0?(a):(-(a)))
-
- #define DRIVER_NAME "savage"
--#define DRIVER_VERSION "1.1.26"
-+#define DRIVER_VERSION "1.1.27"
- #define VERSION_MAJOR 1
- #define VERSION_MINOR 1
--#define PATCHLEVEL 26
-+#define PATCHLEVEL 27
- #define SAVAGE_VERSION ((VERSION_MAJOR << 24) | \
- (VERSION_MINOR << 16) | \
- PATCHLEVEL)
-@@ -287,7 +283,6 @@
- "XAACopyROP_PM",
- "XAACreateInfoRec",
- "XAADestroyInfoRec",
-- "XAAFillSolidRects",
- "XAAHelpPatternROP",
- "XAAHelpSolidROP",
- "XAAInit",
-@@ -2363,10 +2358,8 @@
- if (xf86DPMSInit(pScreen, SavageDPMS, 0) == FALSE)
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "DPMS initialization failed\n");
-
--#ifdef XvExtension
- if( !psav->NoAccel && !SavagePanningCheck(pScrn) )
- SavageInitVideo( pScreen );
--#endif
-
- if (serverGeneration == 1)
- xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
-diff -urN XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_driver.h XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.h
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_driver.h Sat Jan 18 16:22:30 2003
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.h Mon May 5 12:30:23 2003
-@@ -140,11 +140,9 @@
- int YFactor; /* overlay Y factor */
- int displayXoffset; /* overlay X offset */
- int displayYoffset; /* overlay Y offset */
-- int XExpansion; /* expansion factor in x */
-- int XExp1;
-+ int XExp1; /* expansion ratio in x */
- int XExp2;
-- int YExpansion; /* expansion factor in x */
-- int YExp1;
-+ int YExp1; /* expansion ratio in x */
- int YExp2;
- int cxScreen;
- int TVSizeX;
-diff -urN XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_regs.h XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_regs.h
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_regs.h Wed Oct 2 22:39:55 2002
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_regs.h Mon May 5 12:30:23 2003
-@@ -216,7 +216,15 @@
- VGAOUT8(psav->vgaIOBase + 5, a); \
- }
-
-+#define HZEXP_COMP_1 0x54
-+#define HZEXP_BORDER 0x58
- #define HZEXP_FACTOR_IGA1 0x59
-+
-+#define VTEXP_COMP_1 0x56
-+#define VTEXP_BORDER 0x5a
- #define VTEXP_FACTOR_IGA1 0x5b
-
-+#define EC1_CENTER_ON 0x10
-+#define EC1_EXPAND_ON 0x0c
-+
- #endif /* _SAVAGE_REGS_H */
-diff -urN XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_vbe.c XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_vbe.c
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_vbe.c Wed Oct 2 22:39:55 2002
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_vbe.c Mon May 5 12:30:23 2003
-@@ -72,7 +72,7 @@
- SavageClearVM86Regs( psav->pInt10 );
- psav->pInt10->ax = 0x4f14; /* S3 extensions */
- psav->pInt10->bx = 0x0001; /* Set default refresh rate */
-- psav->pInt10->cx = n;
-+ psav->pInt10->cx = n & 0x3fff;
- psav->pInt10->di = Refresh & 0xffff;
-
- xf86ExecX86int10( psav->pInt10 );
-diff -urN XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_video.c XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_video.c
---- XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage.org/savage_video.c Sun Jan 12 04:55:49 2003
-+++ XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_video.c Mon May 5 12:30:24 2003
-@@ -17,11 +17,6 @@
-
- #define TIMER_MASK (OFF_TIMER | FREE_TIMER)
-
--#ifndef XvExtension
--void SavageInitVideo(ScreenPtr pScreen) {}
--void SavageResetVideo(ScrnInfoPtr pScrn) {}
--#else
--
- void myOUTREG( SavagePtr psav, unsigned long offset, unsigned long value );
-
- static XF86VideoAdaptorPtr SavageSetupImageVideo(ScreenPtr);
-@@ -79,7 +74,7 @@
- ) = NULL;
-
- static void OverlayParamInit(ScrnInfoPtr pScrn);
--static void InitStreamsForExpansion(SavagePtr psav);
-+static void InitStreamsForExpansion(ScrnInfoPtr pScrn);
-
- /*static void SavageBlockHandler(int, pointer, pointer, pointer);*/
-
-@@ -421,7 +416,6 @@
-
- /* Sequence stolen from streams.c in M7 NT driver */
-
--
- xf86EnableIO();
-
- /* Unlock extended registers. */
-@@ -430,10 +424,20 @@
- VGAOUT16(vgaCRIndex, 0xa039);
- VGAOUT16(0x3c4, 0x0608);
-
-+ if(
-+ S3_SAVAGE_MOBILE_SERIES(psav->Chipset) &&
-+ !psav->CrtOnly &&
-+ !psav->TvOn
-+ ) {
-+ OverlayParamInit( pScrn );
-+ }
-+
- VGAOUT8( vgaCRIndex, EXT_MISC_CTRL2 );
-
- if( S3_SAVAGE_MOBILE_SERIES(psav->Chipset) ||
-- (psav->Chipset == S3_SUPERSAVAGE) ||
-+#if 0 /* I don't think commenting this out is correct (EE) */
-+ (psav->Chipset == S3_SUPERSAVAGE) ||
-+#endif
- (psav->Chipset == S3_SAVAGE2000) )
- {
- jStreamsControl = VGAIN8( vgaCRReg ) | ENABLE_STREAM1;
-@@ -878,36 +882,6 @@
- }
-
-
--static Bool
--RegionsEqual(RegionPtr A, RegionPtr B)
--{
-- int *dataA, *dataB;
-- int num;
--
-- num = REGION_NUM_RECTS(A);
-- if(num != REGION_NUM_RECTS(B))
-- return FALSE;
--
-- if((A->extents.x1 != B->extents.x1) ||
-- (A->extents.x2 != B->extents.x2) ||
-- (A->extents.y1 != B->extents.y1) ||
-- (A->extents.y2 != B->extents.y2))
-- return FALSE;
--
-- dataA = (int*)REGION_RECTS(A);
-- dataB = (int*)REGION_RECTS(B);
--
-- while(num--) {
-- if((dataA[0] != dataB[0]) || (dataA[1] != dataB[1]))
-- return FALSE;
-- dataA += 2;
-- dataB += 2;
-- }
--
-- return TRUE;
--}
--
--
- /* SavageClipVideo -
-
- Takes the dst box in standard X BoxRec form (top and left
-@@ -992,9 +966,8 @@
-
- REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
-
-- SavageStreamsOff( pScrn );
--
- if(shutdown) {
-+ SavageStreamsOff( pScrn );
- if(pPriv->area) {
- xf86FreeOffscreenArea(pPriv->area);
- pPriv->area = NULL;
-@@ -1283,9 +1256,11 @@
- ssControl |= (1 << 24);
- OUTREG(SSTREAM_CONTROL_REG, ssControl);
-
-+#if 0
- /* Set color key on primary. */
-
- SavageSetColorKey( pScrn );
-+#endif
-
- /* Set FIFO L2 on second stream. */
-
-@@ -1358,10 +1333,10 @@
- !psav->CrtOnly &&
- !psav->TvOn
- ) {
-- drw_w = (float)(drw_w * psav->XExp1)/(float)psav->XExp2 + 1;
-- drw_h = (float)(drw_h * psav->YExp1)/(float)psav->YExp2 + 1;
-- dstBox->x1 = (float)(dstBox->x1 * psav->XExp1)/(float)psav->XExp2;
-- dstBox->y1 = (float)(dstBox->y1 * psav->YExp1)/(float)psav->YExp2;
-+ drw_w = (drw_w * psav->XExp1)/psav->XExp2 + 1;
-+ drw_h = (drw_h * psav->YExp1)/psav->YExp2 + 1;
-+ dstBox->x1 = (dstBox->x1 * psav->XExp1)/psav->XExp2;
-+ dstBox->y1 = (dstBox->y1 * psav->YExp1)/psav->YExp2;
- dstBox->x1 += psav->displayXoffset;
- dstBox->y1 += psav->displayYoffset;
- }
-@@ -1378,14 +1353,16 @@
- * are 2 bytes/pixel.
- */
-
-- OUTREG(SEC_STREAM_FBUF_ADDR0, (offset + (x1>>15)) & 0x3ffff0 );
-+ OUTREG(SEC_STREAM_FBUF_ADDR0, (offset + (x1>>15)) & 0x7ffff0 );
- OUTREG(SEC_STREAM_STRIDE, pitch & 0xfff );
- OUTREG(SEC_STREAM_WINDOW_START, ((dstBox->x1+1) << 16) | (dstBox->y1+1) );
- OUTREG(SEC_STREAM_WINDOW_SZ, ((drw_w) << 16) | drw_h );
-
-+#if 0
- /* Set color key on primary. */
-
- SavageSetColorKey( pScrn );
-+#endif
-
- /* Set FIFO L2 on second stream. */
-
-@@ -1424,6 +1401,20 @@
- int top, left, npixels, nlines;
- BoxRec dstBox;
- CARD32 tmp;
-+/* xf86ErrorFVerb(XVTRACE,"SavagePutImage\n"); */
-+
-+ if( psav->cxScreen != pScrn->currentMode->HDisplay )
-+ {
-+ /* The mode has changed. Recompute the offsets. */
-+
-+ if(
-+ S3_SAVAGE_MOBILE_SERIES(psav->Chipset) &&
-+ !psav->CrtOnly &&
-+ !psav->TvOn
-+ ) {
-+ OverlayParamInit( pScrn );
-+ }
-+ }
-
- if(drw_w > 16384) drw_w = 16384;
-
-@@ -1519,18 +1510,19 @@
- SavageCopyData(buf, dst_start, srcPitch, dstPitch, nlines, npixels);
- break;
- }
-+
-+ /* We need to enable the video before we draw the chroma color.
-+ Otherwise, we get blue flashes. */
-+
-+ SavageDisplayVideo(pScrn, id, offset, width, height, dstPitch,
-+ x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
-
- /* update cliplist */
-- if(!RegionsEqual(&pPriv->clip, clipBoxes)) {
-- REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
-+ if(!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) {
-+ REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
- /* draw these */
-- XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0,
-- REGION_NUM_RECTS(clipBoxes),
-- REGION_RECTS(clipBoxes));
-+ xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
- }
--
-- SavageDisplayVideo(pScrn, id, offset, width, height, dstPitch,
-- x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
-
- pPriv->videoStatus = CLIENT_VIDEO_ON;
-
-@@ -1692,6 +1684,7 @@
- XF86SurfacePtr surface
- ){
- OffscreenPrivPtr pPriv = (OffscreenPrivPtr)surface->devPrivate.ptr;
-+ xf86ErrorFVerb(XVTRACE,"SavageStopSurface\n");
-
- if(pPriv->isOn) {
- /*SavagePtr psav = SAVPTR(surface->pScrn);*/
-@@ -1754,6 +1747,7 @@
- SavagePortPrivPtr portPriv = GET_PORT_PRIVATE(pScrn);
- INT32 x1, y1, x2, y2;
- BoxRec dstBox;
-+ xf86ErrorFVerb(XVTRACE,"SavageDisplaySurface\n");
-
- x1 = src_x;
- x2 = src_x + src_w;
-@@ -1777,14 +1771,12 @@
- dstBox.y1 -= pScrn->frameY0;
- dstBox.y2 -= pScrn->frameY0;
-
-- XAAFillSolidRects(pScrn, portPriv->colorKey, GXcopy, ~0,
-- REGION_NUM_RECTS(clipBoxes),
-- REGION_RECTS(clipBoxes));
--
- SavageDisplayVideo(pScrn, surface->id, surface->offsets[0],
- surface->width, surface->height, surface->pitches[0],
- x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
-
-+ xf86XVFillKeyHelper(pScrn->pScreen, portPriv->colorKey, clipBoxes);
-+
- pPriv->isOn = TRUE;
- #if 0
- if(portPriv->videoStatus & CLIENT_VIDEO_ON) {
-@@ -1839,144 +1831,87 @@
- SavagePtr psav = SAVPTR(pScrn);
-
- psav = SAVPTR(pScrn);
-- psav->cxScreen = psav->iResX;
-- InitStreamsForExpansion(psav);
-+ psav->cxScreen = pScrn->currentMode->HDisplay;
-+ InitStreamsForExpansion(pScrn);
- }
-
--/* Function to calculate lcd expansion x,yfactor and offset for overlay
-+/* Function to calculate lcd expansion x,y factor and offset for overlay
- */
--static void InitStreamsForExpansion(SavagePtr psav)
-+static void InitStreamsForExpansion(ScrnInfoPtr pScrn)
- {
-+ SavagePtr psav = SAVPTR(pScrn);
- int PanelSizeX,PanelSizeY;
- int ViewPortWidth,ViewPortHeight;
-+ int XExpansion, YExpansion;
- int XFactor, YFactor;
-+ int Hstate, Vstate;
-+
-+ static CARD32 Xfactors[] = {
-+ 0x00010001,
-+ 0x00010001, /* 1 */
-+ 0,
-+ 0x00090008, /* 3 */
-+ 0x00050004, /* 4 */
-+ 0,
-+ 0x00030002, /* 6 */
-+ 0x00020001 /* 7 */
-+ };
-+
-+ static CARD32 Yfactors[] = {
-+ 0x00010001, 0x00010001,
-+ 0, 0x00060005,
-+ 0x00050004, 0x00040003,
-+ 0, 0x00030002,
-+ 0x00020001, 0x00050002,
-+ 0x000C0005, 0x00080003,
-+ 0x00090004, 0,
-+ 0x00030001, 0x00040001,
-+ };
-+
-+
-
- PanelSizeX = psav->PanelX;
- PanelSizeY = psav->PanelY;
-- ViewPortWidth = psav->iResX;
-- ViewPortHeight = psav->iResY;
-+ ViewPortWidth = pScrn->currentMode->HDisplay;
-+ ViewPortHeight = pScrn->currentMode->VDisplay;
-+
- if( PanelSizeX == 1408 )
- PanelSizeX = 1400;
-- psav->XExpansion = 0x00010001;
-- psav->YExpansion = 0x00010001;
-+
-+ XExpansion = 0x00010001;
-+ YExpansion = 0x00010001;
-+
- psav->displayXoffset = 0;
- psav->displayYoffset = 0;
-
-+ VGAOUT8(0x3C4, HZEXP_COMP_1);
-+ Hstate = VGAIN8(0x3C5);
-+ VGAOUT8(0x3C4, VTEXP_COMP_1);
-+ Vstate = VGAIN8(0x3C5);
- VGAOUT8(0x3C4, HZEXP_FACTOR_IGA1);
-- XFactor = VGAIN8(0x3C5) >> 4;
-+ XFactor = VGAIN8(0x3C5);
- VGAOUT8(0x3C4, VTEXP_FACTOR_IGA1);
-- YFactor = VGAIN8(0x3C5) >> 4;
-+ YFactor = VGAIN8(0x3C5);
-
-- switch( XFactor )
-+ if( Hstate & EC1_EXPAND_ON )
- {
-- case 1:
-- psav->XExpansion = 0x00010001;
-- psav->displayXoffset =
-- (((PanelSizeX - ViewPortWidth) / 2) + 0x7) & 0xFFF8;
-- break;
--
-- case 3:
-- psav->XExpansion = 0x00090008;
-- psav->displayXoffset =
-- (((PanelSizeX - ((9 * ViewPortWidth)/8)) / 2) + 0x7) & 0xFFF8;
-- break;
-+ XExpansion = Xfactors[XFactor>>4];
-+ }
-
-- case 4:
-- psav->XExpansion = 0x00050004;
-+ if( Vstate & EC1_EXPAND_ON )
-+ {
-+ YExpansion = Yfactors[YFactor>>4];
-+ }
-
-- if ((psav->cxScreen == 800) && (PanelSizeX !=1400))
-- {
-- psav->displayXoffset =
-- (((PanelSizeX - ((5 * ViewPortWidth)/4)) / 2) ) & 0xFFF8;
-- }
-- else
-- {
-- psav->displayXoffset =
-- (((PanelSizeX - ((5 * ViewPortWidth)/4)) / 2) +0x7) & 0xFFF8;
-- }
-- break;
-+ psav->XExp1 = XExpansion >> 16;
-+ psav->XExp2 = XExpansion & 0xFFFF;
-
-- case 6:
-- psav->XExpansion = 0x00030002;
-- psav->displayXoffset =
-- (((PanelSizeX - ((3 * ViewPortWidth)/2)) / 2) + 0x7) & 0xFFF8;
-- break;
-+ psav->YExp1 = YExpansion >> 16;
-+ psav->YExp2 = YExpansion & 0xFFFF;
-
-- case 7:
-- psav->XExpansion = 0x00020001;
-- psav->displayXoffset =
-- (((PanelSizeX - (2 * ViewPortWidth)) / 2) + 0x7) & 0xFFF8;
-- break;
-- }
--
-- switch( YFactor )
-- {
-- case 0:
-- psav->YExpansion = 0x00010001;
-- psav->displayYoffset = (PanelSizeY - ViewPortHeight) / 2;
-- break;
-- case 1:
-- psav->YExpansion = 0x00010001;
-- psav->displayYoffset = (PanelSizeY - ViewPortHeight) / 2;
-- break;
-- case 2:
-- psav->YExpansion = 0x00040003;
-- psav->displayYoffset = (PanelSizeY - ((4 * ViewPortHeight)/3)) / 2;
-- break;
-- case 4:
-- psav->YExpansion = 0x00050004;
-- psav->displayYoffset = (PanelSizeY - ((5 * ViewPortHeight)/4)) / 2;
-- break;
-- case 5:
-- psav->YExpansion = 0x00040003;
-+ psav->displayXoffset =
-+ ((PanelSizeX - (psav->XExp1 * ViewPortWidth) / psav->XExp2) / 2 + 7) & 0xfff8;
-+ psav->displayYoffset =
-+ ((PanelSizeY - (psav->YExp1 * ViewPortHeight) / psav->YExp2) / 2);
-
-- if((psav->cxScreen == 1024)&&(PanelSizeX ==1400))
-- {
-- psav->displayYoffset =
-- ((PanelSizeY - ((4 * ViewPortHeight)/3)) / 2) - 0x1 ;
-- }
-- else
-- {
-- psav->displayYoffset = (PanelSizeY - ((4 * ViewPortHeight)/3)) / 2;
-- }
-- break;
-- case 6:
-- psav->YExpansion = 0x00050004;
-- psav->displayYoffset = (PanelSizeY - ((5 * ViewPortHeight)/4)) / 2;
-- break;
-- case 7:
-- psav->YExpansion = 0x00030002;
-- psav->displayYoffset = (PanelSizeY - ((3 * ViewPortHeight)/2)) / 2;
-- break;
-- case 8:
-- psav->YExpansion = 0x00020001;
-- psav->displayYoffset = (PanelSizeY - (2 * ViewPortHeight)) /2;
-- break;
-- case 9:
-- psav->YExpansion = 0x00090004;
-- psav->displayYoffset = (PanelSizeY - ((9 * ViewPortHeight)/4)) /2;
-- break;
-- case 11:
-- psav->YExpansion = 0x00110005;
-- psav->displayYoffset = (PanelSizeY - ((11 * ViewPortHeight)/5)) /2;
-- break;
-- case 12:
-- psav->YExpansion = 0x00070003;
-- psav->displayYoffset = (PanelSizeY - ((7 * ViewPortHeight)/3)) /2;
-- break;
-- case 14:
-- psav->YExpansion = 0x00050002;
-- psav->displayYoffset = (PanelSizeY - ((5 * ViewPortHeight)/2)) /2;
-- break;
-- case 15:
-- psav->YExpansion = 0x00040001;
-- psav->displayYoffset = (PanelSizeY - (4 * ViewPortHeight)) /2;
-- break;
-- }
-- psav->XExp1 = psav->XExpansion >> 16;
-- psav->XExp2 = psav->XExpansion & 0xFFFF;
-- psav->YExp1 = psav->YExpansion >> 16;
-- psav->YExp2 = psav->YExpansion & 0xFFFF;
- } /* InitStreamsForExpansionPM */
--
--#endif /* XvExtension */
+++ /dev/null
---- XFree86-4.0/xc/config/cf/Imake.rules.shared Fri May 12 09:52:32 2000
-+++ XFree86-4.0/xc/config/cf/Imake.rules Fri May 12 09:57:14 2000
-@@ -3082,6 +3082,7 @@
- #ifndef LibraryModuleTarget
- #if MakeDllModules
- #define LibraryModuleTarget(module,objects) @@\
-+NormalLibraryTarget(module, objects) @@\
- DynamicModuleTarget(Concat3(lib,module,.so), objects)
- #else
- #define LibraryModuleTarget(module, objects) @@\
-@@ -3095,6 +3096,7 @@
- #ifndef DepLibraryModuleTarget
- #if MakeDllModules
- #define DepLibraryModuleTarget(module,deplist,objects) @@\
-+NormalDepLibraryTarget(module, deplist, objects) @@\
- DepDynamicModuleTarget(Concat3(lib,module,.so), deplist, objects)
- #else
- #define DepLibraryModuleTarget(module,deplist,objects) @@\
---- XFree86-4.0/xc/programs/Xserver/GL/Imakefile.shared Sat Feb 26 00:37:09 2000
-+++ XFree86-4.0/xc/programs/Xserver/GL/Imakefile Fri May 12 01:08:54 2000
-@@ -42,7 +42,7 @@
-
- ModuleObjectRule()
-
--NormalDepLibraryTarget(glx,$(SUBDIRS) $(DONES) $(MOBJS),$(OBJS))
-+DepLibraryModuleTarget(glx,$(SUBDIRS) $(DONES) $(MOBJS),$(OBJS))
-
- InstallLibraryModule(glx,$(MODULEDIR),extensions)
- ForceSubdirs($(SUBDIRS))
---- XFree86-4.0/xc/programs/Xserver/fb/Imakefile.shared Sat Feb 26 00:37:40 2000
-+++ XFree86-4.0/xc/programs/Xserver/fb/Imakefile Fri May 12 01:08:54 2000
-@@ -79,7 +79,7 @@
- ../mi/llib-lmi.ln
-
- NormalLibraryObjectRule()
--NormalLibraryTarget(fb,$(OBJS))
-+LibraryModuleTarget(fb,$(OBJS))
- LintLibraryTarget(fb,$(SRCS))
-
- NormalLintTarget($(SRCS))
---- XFree86-4.0/xc/programs/Xserver/Imakefile.shared Fri May 12 09:27:35 2000
-+++ XFree86-4.0/xc/programs/Xserver/Imakefile Fri May 12 09:30:32 2000
-@@ -527,13 +527,13 @@
- #if XF86Server
- XF86SERVER = XFree86
- #endif
--#if XnestServer && !MakeDllModules
-+#if XnestServer
- XNEST = Xnest
- #endif
--#if XVirtualFramebufferServer && !MakeDllModules
-+#if XVirtualFramebufferServer
- XVFB = Xvfb
- #endif
--#if defined(XF86Server) || (!MakeDllModules && (defined(XnestServer) || defined(XVirtualFramebufferServer)))
-+#if defined(XF86Server) || ((defined(XnestServer) || defined(XVirtualFramebufferServer)))
- MakeMutex($(XF86SERVER) $(XNEST) $(XVFB))
- #endif
- MakeMutex($(STDDIRS) mfb fb cfb cfb16 cfb24 cfb32)
-@@ -863,7 +863,7 @@
- KDRIVEDIRS=$(KDDIRS) $(FBDEVDIR) $(SAVAGEDIR) $(TRIDENTDIR) $(SIS530DIR) \
- $(TRIODIR) $(TS300DIR) $(ITSYDIR)
-
--#if XprtServer && !MakeDllModules
-+#if XprtServer
- XCOMM
- XCOMM Print Server
- XCOMM
-@@ -896,7 +896,7 @@
- ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS),$(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XPSYSLIBS))
- #endif /* XprtServer */
-
--#if XnestServer && !MakeDllModules
-+#if XnestServer
- XCOMM
- XCOMM Server with Xlib-based ddx
- XCOMM
-@@ -945,7 +945,7 @@
- #endif /* XnonServer */
-
-
--#if XVirtualFramebufferServer && !MakeDllModules
-+#if XVirtualFramebufferServer
- XCOMM
- XCOMM server with Virtual (malloced) framebuffer
- XCOMM
+++ /dev/null
-Index: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.c
-===================================================================
-RCS file: /srv/cvs/cvsup/xc/programs/Xserver/hw/xfree86/drivers/sis/init301.c,v
-retrieving revision 1.3
-retrieving revision 1.4
-diff -u -I.*XFree86: -r1.3 -r1.4
---- XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/sis/init301.c 2000/12/02 01:16:16 1.3
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/sis/init301.c 2001/02/14 19:08:32 1.4
-@@ -1355,7 +1355,7 @@
- USHORT oldREFIndex,CRT1ModeNo,oldModeIDOffset;
- long int longtemp;
-
-- USHORT LatencyFactor[48]={ 88, 80, 78, 72, 70, 00, /* 64 bit BQ=2 */
-+ static USHORT LatencyFactor[48]={ 88, 80, 78, 72, 70, 00, /* 64 bit BQ=2 */
- 00, 79, 77, 71, 69, 49, /* 64 bit BQ=1 */
- 88, 80, 78, 72, 70, 00, /* 128 bit BQ=2 */
- 00, 72, 70, 64, 62, 44, /* 128 bit BQ=1 */
+++ /dev/null
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/xf86config/Cards.sis Mon Sep 13 13:17:05 1999
-+++ XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/xf86config/Cards Mon Sep 13 13:17:27 1999
-@@ -2299,7 +2299,7 @@
- NAME SiS 6326
- CHIPSET SiS6326
- SERVER SVGA
--LINE # Option "no_accel" # Use this if acceleration is causing problems
-+LINE Option "no_accel" # Use this if acceleration is causing problems
- LINE # Option "fifo_moderate"
- LINE # Option "fifo_conserv"
- LINE # Option "fifo_aggresive"
+++ /dev/null
-This patch by David S. Miller.
-
---- XFree86-4.1.0/xc/config/cf/linux.cf.~1~ Sun Jun 3 19:44:40 2001
-+++ XFree86-4.1.0/xc/config/cf/linux.cf Sun Jun 3 19:44:48 2001
-@@ -720,7 +720,7 @@
- # endif
- # define LinuxMachineDefines -D__sparc__
- # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
--# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
-+# define ServerExtraDefines -DHAVE_DOMAINS -DGCCUSESGAS XFree86ServerDefines
- # define AsVISOption -Av9a
- # ifdef Sparc64Architecture
- # define AsOutputArchSize 64
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86.h.~1~ Sun Jun 3 19:44:40 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86.h Sun Jun 3 19:44:48 2001
-@@ -121,10 +121,18 @@
- resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes);
- resPtr xf86SetOperatingState(resList list, int entityIndex, int mask);
- void xf86EnterServerState(xf86State state);
--resRange xf86GetBlock(long type, memType size,
-+resRange xf86GetBlock(long type,
-+#ifdef HAVE_DOMAINS
-+ int domain,
-+#endif
-+ memType size,
- memType window_start, memType window_end,
- memType align_mask, resPtr avoid);
--resRange xf86GetSparse(long type, memType fixed_bits,
-+resRange xf86GetSparse(long type,
-+#ifdef HAVE_DOMAINS
-+ int domain,
-+#endif
-+ memType fixed_bits,
- memType decode_mask, memType address_mask,
- resPtr avoid);
- memType xf86ChkConflict(resRange *rgp, int entityIndex);
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c.~1~ Sun Jun 3 19:44:40 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c Sun Jun 3 19:44:48 2001
-@@ -393,6 +393,9 @@
- resPtr res = Acc;
-
- while (res) {
-+ /* NOTE: Assumes that entities live inside of a single
-+ * domain.
-+ */
- if (res->entityIndex == entityIndex &&
- (type & ResAccMask & res->res_type))
- {
-@@ -895,6 +898,14 @@
- memType val,tmp,prev;
- int i;
-
-+#ifdef HAVE_DOMAINS
-+ /* A resource cannot conflict with a range in a different
-+ * domain.
-+ */
-+ if (pRes->res_domain != range->domain)
-+ return 0;
-+#endif
-+
- switch (pRes->res_type & ResExtMask) {
- case ResBlock:
- if (range->rBegin < pRes->block_end &&
-@@ -953,6 +964,14 @@
- memType val, tmp, prev;
- int i;
-
-+#ifdef HAVE_DOMAINS
-+ /* A resource cannot conflict with a range in a different
-+ * domain.
-+ */
-+ if (pRes->res_domain != range->domain)
-+ return 0;
-+#endif
-+
- switch (pRes->res_type & ResExtMask) {
- case ResSparse:
- tmp = pRes->sparse_mask & range->rMask;
-@@ -1020,7 +1039,7 @@
- * depending on the types of the resource ranges and their locations
- */
- static Bool
--needCheck(resPtr pRes, long type, int entityIndex, xf86State state)
-+needCheck(resPtr pRes, long type, int domain, int entityIndex, xf86State state)
- {
- /* the same entity shouldn't conflict with itself */
- ScrnInfoPtr pScrn;
-@@ -1031,6 +1050,14 @@
- if (!(pRes->res_type & type & ResPhysMask))
- return FALSE;
-
-+#ifdef HAVE_DOMAINS
-+ /* A resource cannot conflict with something in a different
-+ * domain.
-+ */
-+ if (pRes->res_domain != domain)
-+ return FALSE;
-+#endif
-+
- /*
- * Resources set by BIOS (ResBios) are allowed to conflict
- * with resources marked (ResBios).
-@@ -1111,7 +1138,11 @@
- memType ret;
-
- while(pRes) {
-- if (!needCheck(pRes,rgp->type, entityIndex ,state)) {
-+ int domain = 0;
-+#ifdef HAVE_DOMAINS
-+ domain = rgp->domain;
-+#endif
-+ if (!needCheck(pRes,rgp->type,domain,entityIndex,state)) {
- pRes = pRes->next;
- continue;
- }
-@@ -1274,16 +1305,20 @@
- while (1) {
- while (list) {
- if ((list->res_type & ResPhysMask) == type) {
-+ int domain = 0;
-+#ifdef HAVE_DOMAINS
-+ domain = list->res_domain;
-+#endif
- switch (list->res_type & ResExtMask) {
- case ResBlock:
-- xf86ErrorFVerb(verb, "\t[%d] %d\t0x%08x - 0x%08x (0x%x)",
-- i, list->entityIndex, list->block_begin,
-+ xf86ErrorFVerb(verb, "\t[%d] %d %x\t0x%08x - 0x%08x (0x%x)",
-+ i, list->entityIndex, domain, list->block_begin,
- list->block_end,
- list->block_end - list->block_begin + 1);
- break;
- case ResSparse:
-- xf86ErrorFVerb(verb, "\t[%d] %d\t0x%08x - 0x%08x ",
-- i, list->entityIndex,
-+ xf86ErrorFVerb(verb, "\t[%d] %d %x\t0x%08x - 0x%08x ",
-+ i, list->entityIndex, domain,
- list->sparse_base,list->sparse_mask);
- break;
- default:
-@@ -1408,6 +1443,9 @@
- if (pRes != target
- && ((pRes->res_type & ResPhysMask) ==
- (target->res_type & ResPhysMask))
-+#ifdef HAVE_DOMAINS
-+ && pRes->res_domain == target->res_domain
-+#endif
- && pRes->block_begin <= target->block_end
- && pRes->block_end >= target->block_begin) {
- /* Possibly ignore estimated resources */
-@@ -1460,12 +1498,16 @@
- #define ALIGN(x,a) ((x) + a) &~(a)
-
- resRange
--xf86GetBlock(long type, memType size,
-+xf86GetBlock(long type,
-+#ifdef HAVE_DOMAINS
-+ int domain,
-+#endif
-+ memType size,
- memType window_start, memType window_end,
- memType align_mask, resPtr avoid)
- {
- memType min, max, tmp;
-- resRange r = {ResEnd,0,0};
-+ resRange r = _END;
- resPtr res_range = ResRange;
-
- if (!size) return r;
-@@ -1478,7 +1520,11 @@
- type = (type & ~(ResExtMask | ResBios | ResEstimated)) | ResBlock;
-
- while (res_range) {
-- if (type & res_range->res_type & ResPhysMask) {
-+ if ((type & res_range->res_type & ResPhysMask)
-+#ifdef HAVE_DOMAINS
-+ && (domain == res_range->res_domain)
-+#endif
-+ ) {
- if (res_range->block_begin > window_start)
- min = res_range->block_begin;
- else
-@@ -1490,7 +1536,7 @@
- min = ALIGN(min,align_mask);
- /* do not produce an overflow! */
- while (min < max && (max - min) >= (size - 1)) {
-- RANGE(r,min,min + size - 1,type);
-+ RANGE(r,min,min + size - 1,type,domain);
- tmp = ChkConflict(&r,Acc,SETUP);
- if (!tmp) {
- tmp = ChkConflict(&r,avoid,SETUP);
-@@ -1503,7 +1549,7 @@
- }
- res_range = res_range->next;
- }
-- RANGE(r,0,0,ResEnd);
-+ RANGE(r,0,0,ResEnd,domain);
- return r;
- }
-
-@@ -1557,10 +1603,14 @@
- }
-
- resRange
--xf86GetSparse(long type, memType fixed_bits,
-+xf86GetSparse(long type,
-+#ifdef HAVE_DOMAINS
-+ int domain,
-+#endif
-+ memType fixed_bits,
- memType decode_mask, memType address_mask, resPtr avoid)
- {
-- resRange r = {ResEnd,0,0};
-+ resRange r = _END;
- memType new_mask;
- memType mask1;
- memType base;
-@@ -1602,7 +1652,7 @@
- */
- while (1) {
- base = make_base(counter,new_mask) | fixed_bits;
-- RANGE(r,base,address_mask,type);
-+ RANGE(r,base,address_mask,type,domain);
- conflict = ChkConflict(&r,Acc,SETUP);
- if (!conflict) {
- conflict = ChkConflict(&r,avoid,SETUP);
-@@ -1617,7 +1667,7 @@
- if (counter > max_counter) break;
- }
- if (!new_mask && (new_mask == decode_mask)) {
-- RANGE(r,0,0,ResEnd);
-+ RANGE(r,0,0,ResEnd,domain);
- return r;
- }
- /*
-@@ -1640,7 +1690,7 @@
- counter1 = 0;
- while (1) {
- base = make_base(counter1,mask1);
-- RANGE(r,base,address_mask,type);
-+ RANGE(r,base,address_mask,type,domain);
- conflict = ChkConflict(&r,Acc,SETUP);
- if (!conflict) {
- conflict = ChkConflict(&r,avoid,SETUP);
-@@ -1655,7 +1705,7 @@
- counter ++;
- if (counter > max_counter) break;
- }
-- RANGE(r,0,0,ResEnd);
-+ RANGE(r,0,0,ResEnd,domain);
- return r;
- }
-
-@@ -2686,6 +2736,9 @@
- int i = 0;
-
- new.type = (range.type & ~ResExtMask) | ResSparse;
-+#ifdef HAVE_DOMAINS
-+ new.domain = range.domain;
-+#endif
-
- while (1) {
- if (val & 0x01) {
-@@ -2726,7 +2779,11 @@
-
- if (list1) {
- list = list1;
-- if (range.type & list->res_type & ResPhysMask) {
-+ if ((range.type & list->res_type & ResPhysMask)
-+#ifdef HAVE_DOMAINS
-+ && (range.domain == list->res_domain)
-+#endif
-+ ) {
- switch (range.type & ResExtMask) {
- case ResBlock:
- if ((list->res_type & ResExtMask) == ResBlock) {
-@@ -2736,21 +2793,21 @@
- else if (range.rBegin < list->block_begin
- && range.rEnd > list->block_end) {
- RANGE(range1, range.rBegin, list->block_begin - 1,
-- range.type);
-+ range.type, range.domain);
- RANGE(range2, list->block_end + 1, range.rEnd,
-- range.type);
-+ range.type, range.domain);
- return (x_isSubsetOf(range1,list->next,list2) &&
- x_isSubsetOf(range2,list->next,list2));
- }
- else if (range.rBegin >= list->block_begin
- && range.rBegin <= list->block_end) {
- RANGE(range1, list->block_end + 1, range.rEnd,
-- range.type);
-+ range.type, range.domain);
- return (x_isSubsetOf(range1,list->next,list2));
- } else if (range.rEnd >= list->block_begin
- && range.rEnd <= list->block_end) {
- RANGE(range1,range.rBegin, list->block_begin - 1,
-- range.type);
-+ range.type, range.domain);
- return (x_isSubsetOf(range1,list->next,list2));
- }
- }
-@@ -2791,7 +2848,7 @@
- | ((~list->sparse_base & list->sparse_mask)
- & ~range.rMask)) & range1.rMask,
- ((range.rMask | list->sparse_mask) & ~test)
-- | (1 << i), range.type);
-+ | (1 << i), range.type, range.domain);
- return (x_isSubsetOf(range1,list->next,list2));
- }
- }
-@@ -2885,7 +2942,11 @@
- resPtr new = NULL;
-
- while (list) {
-- if (Range.type & list->res_type & ResPhysMask) {
-+ if ((Range.type & list->res_type & ResPhysMask)
-+#ifdef HAVE_DOMAINS
-+ && (Range.domain == list->res_domain)
-+#endif
-+ ) {
- switch (Range.type & ResExtMask) {
- case ResBlock:
- switch (list->res_type & ResExtMask) {
-@@ -2900,6 +2961,9 @@
- range.rEnd = list->block_end;
- if (range.rEnd > range.rBegin) {
- range.type = Range.type;
-+#ifdef HAVE_DOMAINS
-+ range.domain = Range.domain;
-+#endif
- new = xf86AddResToList(new,&range,-1);
- }
- break;
-@@ -2917,7 +2981,7 @@
- | (~range.rMask & list->sparse_base)
- | (~list->sparse_mask & range.rBase),
- range.rMask | list->sparse_mask,
-- Range.type);
-+ Range.type, Range.domain);
- new = xf86AddResToList(new,&range,-1);
- }
- break;
-@@ -2956,11 +3020,11 @@
- switch (Range.type & ResExtMask) {
- case ResBlock:
- if (Range.rBegin > 0) {
-- RANGE(range, 0, Range.rBegin - 1, Range.type);
-+ RANGE(range, 0, Range.rBegin - 1, Range.type,Range.domain);
- new = xf86AddResToList(new,&range,-1);
- }
- if (Range.rEnd < (memType)~0) {
-- RANGE(range,Range.rEnd + 1, (memType)~0, Range.type);
-+ RANGE(range,Range.rEnd + 1, (memType)~0, Range.type, Range.domain);
- new = xf86AddResToList(new,&range,-1);
- }
- break;
-@@ -2968,7 +3032,7 @@
- tmp = Range.rMask;
- for (i = 0; i < sizeof(memType); i++) {
- if (tmp & 0x1) {
-- RANGE(range,(~Range.rMask & range.rMask),(1 << i), Range.type);
-+ RANGE(range,(~Range.rMask & range.rMask),(1 << i), Range.type, Range.domain);
- new = xf86AddResToList(new,&range,-1);
- }
- }
-@@ -2991,6 +3055,21 @@
- }
- return ret;
- }
-+
-+#ifdef HAVE_DOMAINS
-+resPtr
-+xf86ExtractDomainFromList(resPtr list, unsigned int domain)
-+{
-+ resPtr ret = NULL;
-+
-+ while (list) {
-+ if (list->res_domain == domain)
-+ ret = xf86AddResToList(ret,&(list->val),list->entityIndex);
-+ list = list->next;
-+ }
-+ return ret;
-+}
-+#endif
-
- /*------------------------------------------------------------*/
- static void CheckGenericGA(void);
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h.~1~ Sun Jun 3 19:44:40 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h Sun Jun 3 19:44:48 2001
-@@ -123,6 +123,9 @@
- Bool xf86IsSubsetOf(resRange range, resPtr list);
- Bool xf86IsListSubsetOf(resPtr list, resPtr BaseList);
- resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
-+#ifdef HAVE_DOMAINS
-+resPtr xf86ExtractDomainFromList(resPtr list, unsigned int domain);
-+#endif
- resPtr findIntersect(resRange Range, resPtr list);
- resPtr xf86FindIntersect(resRange Range, resPtr list);
- void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment,
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Resources.h~ Tue Jul 31 23:17:31 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Resources.h Tue Jul 31 23:17:33 2001
-@@ -6,78 +6,84 @@
-
- #include "xf86str.h"
-
--#define _END {ResEnd,0,0}
-+#ifdef HAVE_DOMAINS
-+#define DEFAULT_DOMAIN 0,
-+#else
-+#define DEFAULT_DOMAIN /**/
-+#endif
-+
-+#define _END {ResEnd, DEFAULT_DOMAIN 0,0}
-
- #define _VGA_EXCLUSIVE \
-- {ResExcMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResExcMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResExcMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
-- {ResExcIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
-- {ResExcIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
-+ {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
-+ {ResExcIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
-+ {ResExcIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
-
- #define _VGA_SHARED \
-- {ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
-- {ResShrIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
-- {ResShrIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
-+ {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
-+ {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
-
- #define _VGA_SHARED_MEM \
-- {ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF}
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF}
-
- #define _VGA_SHARED_IO \
-- {ResShrIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
-- {ResShrIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
-+ {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
-+ {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
-
- /*
- * Exclusive unused VGA: resources unneeded but cannot be disabled.
- * Like old Millennium.
- */
- #define _VGA_EXCLUSIVE_UNUSED \
-- {ResExcUusdMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResExcUusdMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResExcUusdMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
-- {ResExcUusdIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
-- {ResExcUusdIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
-+ {ResExcUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResExcUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResExcUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
-+ {ResExcUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
-+ {ResExcUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
-
- /*
- * Shared unused VGA: resources unneeded but cannot be disabled
- * independently. This is used to determine if a device needs RAC.
- */
- #define _VGA_SHARED_UNUSED \
-- {ResShrUusdMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResShrUusdMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResShrUusdMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
-- {ResShrUusdIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
-- {ResShrUusdIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
-+ {ResShrUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResShrUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResShrUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
-+ {ResShrUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
-+ {ResShrUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
-
- /*
- * Sparse versions of the above for those adapters that respond to all ISA
- * aliases of VGA ports.
- */
- #define _VGA_EXCLUSIVE_SPARSE \
-- {ResExcMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResExcMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResExcMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
-- {ResExcIoSparse | ResBios | ResBus, 0x03B0, 0x03F8},\
-- {ResExcIoSparse | ResBios | ResBus, 0x03B8, 0x03FC},\
-- {ResExcIoSparse | ResBios | ResBus, 0x03C0, 0x03E0}
-+ {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
-+ {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03F8},\
-+ {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B8, 0x03FC},\
-+ {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03E0}
-
- #define _VGA_SHARED_SPARSE \
-- {ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
-- {ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
-- {ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
-- {ResShrIoSparse | ResBios | ResBus, 0x03B0, 0x03F8},\
-- {ResShrIoSparse | ResBios | ResBus, 0x03B8, 0x03FC},\
-- {ResShrIoSparse | ResBios | ResBus, 0x03C0, 0x03E0}
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
-+ {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
-+ {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03F8},\
-+ {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B8, 0x03FC},\
-+ {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03E0}
-
- #define _8514_EXCLUSIVE \
-- {ResExcIoSparse | ResBios | ResBus, 0x02E8, 0x03F8}
-+ {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x02E8, 0x03F8}
-
- #define _8514_SHARED \
-- {ResShrIoSparse | ResBios | ResBus, 0x02E8, 0x03F8}
-+ {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x02E8, 0x03F8}
-
- /* predefined resources */
- extern resRange resVgaExclusive[];
-@@ -102,9 +108,9 @@
- #define RES_SHARED_8514 res8514Shared
-
- #define _PCI_AVOID_PC_STYLE \
-- {ResExcIoSparse | ResBus, 0x0100, 0x0300},\
-- {ResExcIoSparse | ResBus, 0x0200, 0x0200},\
-- {ResExcMemBlock | ResBus, 0xA0000,0xFFFFF}
-+ {ResExcIoSparse | ResBus, DEFAULT_DOMAIN 0x0100, 0x0300},\
-+ {ResExcIoSparse | ResBus, DEFAULT_DOMAIN 0x0200, 0x0200},\
-+ {ResExcMemBlock | ResBus, DEFAULT_DOMAIN 0xA0000,0xFFFFF}
-
- extern resRange PciAvoid[];
-
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c.~1~ Sun Jun 3 19:44:40 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c Sun Jun 3 19:44:48 2001
-@@ -91,9 +91,9 @@
- ? pciBusAddrToHostAddr(tag,PCI_MEM_SIZE,size) \
- : pciBusAddrToHostAddr(tag,PCI_IO_SIZE,size))
- #define PCI_M_RANGE(range,tag,begin,end,type) \
-- { RANGE(range,B2M(tag,begin),B2M(tag,end),type); }
-+ { RANGE(range,B2M(tag,begin),B2M(tag,end),type,xf86GetPciDomain(tag)); }
- #define PCI_I_RANGE(range,tag,begin,end,type) \
-- { RANGE(range,B2I(tag,begin),B2I(tag,end),type); }
-+ { RANGE(range,B2I(tag,begin),B2I(tag,end),type,xf86GetPciDomain(tag)); }
- #define PCI_X_RANGE(range,tag,begin,end,type) \
- { if (type & ResMem) PCI_M_RANGE(range,tag,begin,end,type); \
- else PCI_I_RANGE(range,tag,begin,end,type); }
-@@ -1039,9 +1039,15 @@
- PciBusPtr pbp = xf86PciBus, pbp1 = xf86PciBus;
- pciConfigPtr pcp;
- resPtr tmp;
-+#ifdef HAVE_DOMAINS
-+ int domain;
-+#endif
-
- if (!pvp) return FALSE;
- tag = pciTag(pvp->bus,pvp->device,pvp->func);
-+#ifdef HAVE_DOMAINS
-+ domain = xf86GetPciDomain(tag);
-+#endif
- pcp = pvp->thisCard;
-
- type &= ResAccMask;
-@@ -1232,12 +1238,20 @@
- #endif
- w_tmp = w;
- while (w) {
-- if (type & w->res_type & ResPhysMask) {
-+ if ((type & w->res_type & ResPhysMask)
-+#ifdef HAVE_DOMAINS
-+ && (domain == w->res_domain)
-+#endif
-+ ) {
- #ifdef DEBUG
- ErrorF("block_begin: 0x%lx block_end: 0x%lx\n",w->block_begin,
- w->block_end);
- #endif
-- range = xf86GetBlock(type,PCI_SIZE(type,tag,alignment + 1),
-+ range = xf86GetBlock(type,
-+#ifdef HAVE_DOMAINS
-+ domain,
-+#endif
-+ PCI_SIZE(type,tag,alignment + 1),
- w->block_begin, w->block_end,
- PCI_SIZE(type,tag,alignment),avoid);
- if (range.type != ResEnd)
-@@ -1250,12 +1264,20 @@
- if (range.type == ResEnd && w_2nd) {
- w_tmp = w_2nd;
- while (w_2nd) {
-- if (type & w_2nd->res_type & ResPhysMask) {
-+ if ((type & w_2nd->res_type & ResPhysMask)
-+#ifdef HAVE_DOMAINS
-+ && (domain == w_2nd->res_domain)
-+#endif
-+ ) {
- #ifdef DEBUG
- ErrorF("block_begin: 0x%lx block_end: 0x%lx\n",w_2nd->block_begin,
- w_2nd->block_end);
- #endif
-- range = xf86GetBlock(type,PCI_SIZE(type,tag,alignment + 1),
-+ range = xf86GetBlock(type,
-+#ifdef HAVE_DOMAINS
-+ domain,
-+#endif
-+ PCI_SIZE(type,tag,alignment + 1),
- w_2nd->block_begin, w_2nd->block_end,
- PCI_SIZE(type,tag,alignment),avoid);
- if (range.type != ResEnd)
-@@ -1323,7 +1345,7 @@
-
- Bool
- xf86FixPciResource(int entityIndex, int prt, memType alignment,
-- long type)
-+ long type)
- {
- pciVideoPtr pvp = xf86GetPciInfoForEntity(entityIndex);
- return fixPciResource(prt, alignment, pvp, type);
-@@ -1481,6 +1503,9 @@
- */
- while (m) {
- range = xf86GetBlock(ResExcMemBlock,
-+#ifdef HAVE_DOMAINS
-+ xf86GetPciDomain(TAG(pvp)),
-+#endif
- PCI_SIZE(ResMem, TAG(pvp), 1 << biosSize),
- m->block_begin, m->block_end,
- PCI_SIZE(ResMem, TAG(pvp), alignment),
-@@ -1730,10 +1755,9 @@
- PciBusPtr *pnPciBus = &PciBusBase;
- int MaxBus = 0;
- int i;
-+ int domain = 0;
- memType base, limit;
-
-- resPtr pciBusAccWindows = xf86PciBusAccWindowsFromOS();
--
- if (pciInfo == NULL) return NULL;
-
- /* Add each PCI-PCI bridge */
-@@ -1856,13 +1880,25 @@
- PciBus->secondary = -1; /* to be set below */
- PciBus->subclass = sub_class;
- PciBus->brcontrol = PCI_PCI_BRIDGE_VGA_EN;
-+#ifdef HAVE_DOMAINS
-+ domain = xf86GetPciDomain(pcrp->tag);
-+#endif
-+ /* XXX A memory leak has returned here... -DaveM */
- PciBus->preferred_io = xf86ExtractTypeFromList(
-- pciBusAccWindows,ResIo);
-+ xf86PciBusAccWindowsFromOS(domain),ResIo);
- PciBus->preferred_mem = xf86ExtractTypeFromList(
-- pciBusAccWindows,ResMem);
-+ xf86PciBusAccWindowsFromOS(domain),ResMem);
- PciBus->preferred_pmem = xf86ExtractTypeFromList(
-- pciBusAccWindows,ResMem);
-+ xf86PciBusAccWindowsFromOS(domain),ResMem);
- xf86MsgVerb(X_INFO,3,"Host-to-PCI bridge:\n");
-+#ifdef DEBUG
-+ xf86MsgVerb(X_INFO,3,"Preferred I/O:\n");
-+ xf86PrintResList(3,PciBus->preferred_io);
-+ xf86MsgVerb(X_INFO,3,"Preferred MEM:\n");
-+ xf86PrintResList(3,PciBus->preferred_mem);
-+ xf86MsgVerb(X_INFO,3,"Preferred Prefetchable MEM:\n");
-+ xf86PrintResList(3,PciBus->preferred_pmem);
-+#endif
- break;
- default:
- break;
-@@ -1892,12 +1928,23 @@
- PciBus->primary = -1;
- PciBus->secondary = i;
- PciBus->subclass = PCI_SUBCLASS_BRIDGE_HOST;
-+
-+#ifdef HAVE_DOMAINS
-+ /* Find a device on this bus. */
-+ for (pcrpp = pciInfo, pcrp = *pcrpp; pcrp; pcrp = *(++pcrpp)) {
-+ if (pcrp->busnum == i)
-+ break;
-+ }
-+
-+ if (pcrp) domain = xf86GetPciDomain(pcrp->tag);
-+#endif
-+ /* XXX A memory leak has returned here... -DaveM */
- PciBus->preferred_io = xf86ExtractTypeFromList(
-- pciBusAccWindows,ResIo);
-+ xf86PciBusAccWindowsFromOS(domain),ResIo);
- PciBus->preferred_mem = xf86ExtractTypeFromList(
-- pciBusAccWindows,ResMem);
-+ xf86PciBusAccWindowsFromOS(domain),ResMem);
- PciBus->preferred_pmem = xf86ExtractTypeFromList(
-- pciBusAccWindows,ResMem);
-+ xf86PciBusAccWindowsFromOS(domain),ResMem);
- xf86MsgVerb(X_INFO,3,"Host-to-PCI bridge:\n");
- }
- }
-@@ -1928,7 +1975,6 @@
- printBridgeInfo(PciBus);
- }
-
-- xf86FreeResList(pciBusAccWindows);
- return PciBusBase;
-
- }
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86str.h.~1~ Sun Jun 3 19:44:40 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86str.h Sun Jun 3 19:44:48 2001
-@@ -593,15 +593,27 @@
-
- typedef struct {
- long type; /* shared, exclusive, unused etc. */
-+#ifdef HAVE_DOMAINS
-+ unsigned int domain;
-+#endif
- memType a;
- memType b;
- } resRange, *resList;
-
--#define RANGE(r,u,v,t) {\
-+#ifdef HAVE_DOMAINS
-+#define RANGE(r,u,v,t,d) {\
- (r).a = (u);\
- (r).b = (v);\
- (r).type = t;\
-+ (r).domain = d;\
- }
-+#else
-+#define RANGE(r,u,v,t,d) {\
-+ (r).a = (u);\
-+ (r).b = (v);\
-+ (r).type = t;\
-+ }
-+#endif
-
- #define rBase a
- #define rMask b
-@@ -621,6 +633,9 @@
- #define block_begin val.rBegin
- #define block_end val.rEnd
- #define res_type val.type
-+#ifdef HAVE_DOMAINS
-+#define res_domain val.domain
-+#endif
-
- typedef struct {
- int numChipset;
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile Sun Jun 3 19:44:48 2001
-@@ -87,12 +87,12 @@
- # ifndef ATIAvoidCPIO
- # define ATIAvoidCPIO NO
- # endif
--#elif defined(SparcArchitecture) || 1
-+#elif 1
- # undef ATIAvoidCPIO /* Clobber any previous setting */
- # define ATIAvoidCPIO YES
- #endif
-
--#if defined(PpcArchitecture)
-+#if defined(PpcArchitecture) || defined(SparcArchitecture)
- # undef ATIAvoidNonPCI
- # define ATIAvoidNonPCI YES
- #elif !defined(ATIAvoidNonPCI)
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c Sun Jun 3 19:44:48 2001
-@@ -27,6 +27,7 @@
- #include "aticursor.h"
- #include "atioption.h"
- #include "atistruct.h"
-+#include "atichip.h"
-
- /*
- * Non-publicised XF86Config options.
-@@ -122,6 +123,11 @@
- }
-
- ReferenceClock = ((double)157500000.0) / ((double)11.0);
-+#ifdef __sparc__
-+ if (pATI->Chip == ATI_CHIP_264XL)
-+ ReferenceClock = ((double)315000000.0) / ((double)11.0);
-+ CSync = TRUE;
-+#endif
-
- #ifndef AVOID_CPIO
-
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64.c Sun Jun 3 19:44:48 2001
-@@ -1602,6 +1602,24 @@
- */
- switch (iDWord)
- {
-+#if X_BYTE_ORDER == X_BIG_ENDIAN
-+ case 0: xf86WriteMmio32Be(pDst + 0, 0, *(pSrc + 0));
-+ case 1: xf86WriteMmio32Be(pDst + 1, 0, *(pSrc + 1));
-+ case 2: xf86WriteMmio32Be(pDst + 2, 0, *(pSrc + 2));
-+ case 3: xf86WriteMmio32Be(pDst + 3, 0, *(pSrc + 3));
-+ case 4: xf86WriteMmio32Be(pDst + 4, 0, *(pSrc + 4));
-+ case 5: xf86WriteMmio32Be(pDst + 5, 0, *(pSrc + 5));
-+ case 6: xf86WriteMmio32Be(pDst + 6, 0, *(pSrc + 6));
-+ case 7: xf86WriteMmio32Be(pDst + 7, 0, *(pSrc + 7));
-+ case 8: xf86WriteMmio32Be(pDst + 8, 0, *(pSrc + 8));
-+ case 9: xf86WriteMmio32Be(pDst + 9, 0, *(pSrc + 9));
-+ case 10: xf86WriteMmio32Be(pDst + 10, 0, *(pSrc + 10));
-+ case 11: xf86WriteMmio32Be(pDst + 11, 0, *(pSrc + 11));
-+ case 12: xf86WriteMmio32Be(pDst + 12, 0, *(pSrc + 12));
-+ case 13: xf86WriteMmio32Be(pDst + 13, 0, *(pSrc + 13));
-+ case 14: xf86WriteMmio32Be(pDst + 14, 0, *(pSrc + 14));
-+ case 15: xf86WriteMmio32Be(pDst + 15, 0, *(pSrc + 15));
-+#else
- case 0: MMIO_OUT32(pDst + 0, 0, *(pSrc + 0));
- case 1: MMIO_OUT32(pDst + 1, 0, *(pSrc + 1));
- case 2: MMIO_OUT32(pDst + 2, 0, *(pSrc + 2));
-@@ -1618,6 +1636,7 @@
- case 13: MMIO_OUT32(pDst + 13, 0, *(pSrc + 13));
- case 14: MMIO_OUT32(pDst + 14, 0, *(pSrc + 14));
- case 15: MMIO_OUT32(pDst + 15, 0, *(pSrc + 15));
-+#endif
-
- default: /* Muffle compiler */
- break;
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c Sun Jun 3 19:44:48 2001
-@@ -17,22 +17,34 @@
-
- resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
-
-+#define MIN_SYSTEM_DOMAIN 0
-+#ifdef HAVE_DOMAINS
-+#define MAX_SYSTEM_DOMAIN 255
-+#else
-+#define MAX_SYSTEM_DOMAIN 0
-+#endif
-+#define ISA_SYSTEM_DOMAIN 0
-+
- resPtr
- xf86BusAccWindowsFromOS(void)
- {
- resPtr ret = NULL;
- resRange range;
-+ int domain;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-- ret = xf86AddResToList(ret, &range, -1);
-+ for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+ }
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
-- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-
- resPtr
--xf86PciBusAccWindowsFromOS(void)
-+xf86PciBusAccWindowsFromOS(int domain)
- {
- resPtr ret = NULL;
- resRange range;
-@@ -44,10 +56,10 @@
- * region 0x40000000-0xbfffffff for DMA but this only matters if
- * the bios screws up the pci region mappings.
- */
-- RANGE(range, 0x80000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x80000000, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-@@ -58,10 +70,10 @@
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-@@ -70,6 +82,14 @@
- xf86AccResFromOS(resPtr ret)
- {
- resRange range;
-+#ifdef HAVE_DOMAINS
-+ int domain = MIN_SYSTEM_DOMAIN;
-+#endif
-+
-+#ifdef HAVE_DOMAINS
-+ if (ret != NULL)
-+ domain = ret->res_domain;
-+#endif
-
- /*
- * Fallback is to claim the following areas:
-@@ -77,7 +97,7 @@
- * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS
- */
-
-- RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
-+ RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /*
-@@ -85,20 +105,20 @@
- * along with their sparse I/O aliases, but that's too imprecise. Instead
- * claim a bare minimum here.
- */
-- RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
-+ RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock, domain); /* For mainboard */
- ret = xf86AddResToList(ret, &range, -1);
-
- /*
- * At minimum, the top and bottom resources must be claimed, so that
- * resources that are (or appear to be) unallocated can be relocated.
- */
-- RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
--/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-+/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1); */
-- RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock);
-+ RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /* XXX add others */
-@@ -109,30 +129,38 @@
-
- resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
-
-+#define MIN_SYSTEM_DOMAIN 0
-+#define MAX_SYSTEM_DOMAIN 0
-+#define ISA_SYSTEM_DOMAIN 0
-+
- resPtr
- xf86BusAccWindowsFromOS(void)
- {
- resPtr ret = NULL;
- resRange range;
-+ int domain;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-- ret = xf86AddResToList(ret, &range, -1);
-+ for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+ }
-
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-
- resPtr
--xf86PciBusAccWindowsFromOS(void)
-+xf86PciBusAccWindowsFromOS(int domain)
- {
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile Sun Jun 3 19:44:48 2001
-@@ -14,8 +14,16 @@
- PCIDRVRSRC = axpPci.c
- PCIDRVROBJ = axpPci.o
-
--#elif (defined(LinuxArchitecture) || defined(SunArchitecture)) && \
-- defined(SparcArchitecture)
-+#elif defined(LinuxArchitecture) && defined(SparcArchitecture)
-+
-+XCOMM Sparc SBUS driver, generic linux PCI driver
-+
-+PCIDRVRSRC = linuxPci.c
-+PCIDRVROBJ = linuxPci.o
-+SBUSDRVSRC = Sbus.c
-+SBUSDRVOBJ = Sbus.o
-+
-+#elif defined(SunArchitecture) && defined(SparcArchitecture)
-
- XCOMM Sparc PCI driver
-
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c Sun Jun 3 19:44:48 2001
-@@ -1015,6 +1015,13 @@
-
- #if defined(INCLUDE_XF86_MAP_PCI_MEM)
-
-+#ifdef HAVE_DOMAINS
-+int xf86GetPciDomain(PCITAG Tag)
-+{
-+ return 0;
-+}
-+#endif
-+
- pointer
- xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
- unsigned long Size)
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h Sun Jun 3 19:44:48 2001
-@@ -152,9 +152,11 @@
- # if !defined(PowerMAX_OS)
- # define INCLUDE_XF86_MAP_PCI_MEM
- # endif
--#elif defined(__sparc__) && (defined(linux) || defined(sun))
-+#elif defined(__sparc__) && defined(sun)
- # define ARCH_PCI_INIT sparcPciInit
- # define INCLUDE_XF86_MAP_PCI_MEM
-+#elif defined(__sparc__) && defined(linux)
-+# define ARCH_PCI_INIT linuxPciInit
- #elif defined(__alpha__) && defined(linux)
- # define ARCH_PCI_INIT axpPciInit
- # define INCLUDE_XF86_MAP_PCI_MEM
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c Sun Jun 3 19:44:48 2001
-@@ -88,6 +88,13 @@
- #define PCI_CPU(val) (val)
- #endif
-
-+/* Ioctls for /proc/bus/pci/X/Y nodes. */
-+#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8)
-+#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */
-+#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */
-+#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
-+#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
-+
- void
- linuxPciInit()
- {
-@@ -167,3 +174,129 @@
- write(fd,&val,4);
- }
- }
-+
-+#ifndef INCLUDE_XF86_MAP_PCI_MEM
-+
-+#ifdef HAVE_DOMAINS
-+int xf86GetPciDomain(PCITAG Tag)
-+{
-+ int fd;
-+
-+ if (-1 != (fd = linuxPciOpenFile(Tag))) {
-+ int err = ioctl(fd, PCIIOC_CONTROLLER, 0);
-+
-+ if (err < 0)
-+ return 0;
-+
-+ return err;
-+ }
-+
-+ return 0;
-+}
-+#endif
-+
-+static pointer
-+xf86MapPciGeneric(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
-+ unsigned long Size, int io_space)
-+{
-+ int fd;
-+
-+ xf86InitVidMem();
-+
-+ if (-1 != (fd = linuxPciOpenFile(Tag))) {
-+ ADDRESS realBase, alignOff;
-+ pointer p;
-+ CARD32 save = 0;
-+ int err, mapflags;
-+
-+ if (io_space)
-+ err = ioctl(fd, PCIIOC_MMAP_IS_IO, 0);
-+ else
-+ err = ioctl(fd, PCIIOC_MMAP_IS_MEM, 0);
-+
-+ if (err < 0)
-+ goto fail;
-+
-+ if (Flags & VIDMEM_READSIDEEFFECT) {
-+ save = pciReadLong(Tag, PCI_CMD_STAT_REG);
-+ pciWriteLong(Tag, PCI_CMD_STAT_REG,
-+ save & ~PCI_CMD_MEM_ENABLE);
-+ }
-+
-+ mapflags = MAP_SHARED;
-+#if defined(__ia64__)
-+#ifndef MAP_WRITECOMBINED
-+#define MAP_WRITECOMBINED 0x00010000
-+#endif
-+#ifndef MAP_NONCACHED
-+#define MAP_NONCACHED 0x00020000
-+#endif
-+ if (Flags & VIDMEM_FRAMEBUFFER)
-+ mapflags |= MAP_WRITECOMBINED;
-+ else
-+ mapflags |= MAP_NONCACHED;
-+#else /* !(__ia64__) */
-+ err = ioctl(fd, PCIIOC_WRITE_COMBINE,
-+ (Flags & VIDMEM_FRAMEBUFFER) ? 1 : 0);
-+ if (err < 0)
-+ goto fail_restore_cmd_stat;
-+#endif
-+
-+ realBase = Base & ~(getpagesize() - 1);
-+ alignOff = Base - realBase;
-+
-+ p = mmap(NULL, Size + alignOff, PROT_READ | PROT_WRITE,
-+ mapflags, fd, realBase);
-+
-+ if (!p || p == (pointer) -1) {
-+ FatalError("xf86MapPciMem: Could not mmap PCI memory "
-+ "[base=0x%x,size=%x] (%s)\n",
-+ Base, Size, strerror(errno));
-+ goto fail_restore_cmd_stat;
-+ }
-+
-+ if (Flags & VIDMEM_READSIDEEFFECT) {
-+ xf86MapReadSideEffects(ScreenNum, Flags, p, Size);
-+ pciWriteLong(Tag, PCI_CMD_STAT_REG, save);
-+ }
-+
-+ xf86MakeNewMapping(ScreenNum, Flags, Base, Size, p);
-+
-+ return (pointer) ((char *)p + alignOff);
-+
-+ fail_restore_cmd_stat:
-+ if (Flags & VIDMEM_READSIDEEFFECT)
-+ pciWriteLong(Tag, PCI_CMD_STAT_REG, save);
-+
-+ return NULL;
-+ }
-+
-+fail:
-+ return NULL;
-+}
-+
-+pointer
-+xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
-+ unsigned long Size)
-+{
-+ return xf86MapPciGeneric(ScreenNum, Flags, Tag,
-+ Base, Size, 0);
-+}
-+
-+pointer
-+xf86MapPciIo(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
-+ unsigned long Size)
-+{
-+ return xf86MapPciGeneric(ScreenNum, Flags, Tag,
-+ Base, Size, 1);
-+}
-+
-+int
-+xf86ReadPciBIOS(unsigned long Offset, PCITAG Tag, int basereg,
-+ unsigned char *Buf, int Len)
-+{
-+ xf86Msg(X_WARNING, "xf86ReadPciBIOS: Unsupported on this platform.\n");
-+ return -1;
-+}
-+
-+#endif /* !(INCLUDE_XF86_MAP_PCI_MEM) */
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Pci.h.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Pci.h Sun Jun 3 19:44:48 2001
-@@ -647,6 +647,9 @@
- ADDRESS Base, unsigned long Size);
- int xf86ReadPciBIOS(unsigned long Offset, PCITAG Tag, int basereg,
- unsigned char *Buf, int Len);
-+#ifdef HAVE_DOMAINS
-+int xf86GetPciDomain(PCITAG Tag);
-+#endif
- pciConfigPtr *xf86scanpci(int flags);
-
- /* Old sytle PCI access functions (for compatibility) */
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c Sun Jun 3 19:44:48 2001
-@@ -15,22 +15,33 @@
- #ifdef __alpha__
- resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
-
-+#define MIN_SYSTEM_DOMAIN 0
-+#ifdef HAVE_DOMAINS
-+#define MAX_SYSTEM_DOMAIN 255
-+#else
-+#define MAX_SYSTEM_DOMAIN 0
-+#endif
-+#define ISA_SYSTEM_DOMAIN 0
-+
- resPtr
- xf86BusAccWindowsFromOS(void)
- {
- resPtr ret = NULL;
- resRange range;
-+ int domain;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-- ret = xf86AddResToList(ret, &range, -1);
-+ for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
-- ret = xf86AddResToList(ret, &range, -1);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+ }
- return ret;
- }
-
- resPtr
--xf86PciBusAccWindowsFromOS(void)
-+xf86PciBusAccWindowsFromOS(int domain)
- {
- resPtr ret = NULL;
- resRange range;
-@@ -39,75 +50,75 @@
- * sparse address space are an image of the ISA bus range
- */
- if (_bus_base_sparse()) {
-- RANGE(range, 0x00000000, 0x07ffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0x07ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x09000000, 0x0fffffff, ResExcMemBlock);
-+ RANGE(range, 0x09000000, 0x0fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x11000000, 0x17ffffff, ResExcMemBlock);
-+ RANGE(range, 0x11000000, 0x17ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x19000000, 0x1fffffff, ResExcMemBlock);
-+ RANGE(range, 0x19000000, 0x1fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x21000000, 0x27ffffff, ResExcMemBlock);
-+ RANGE(range, 0x21000000, 0x27ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x29000000, 0x2fffffff, ResExcMemBlock);
-+ RANGE(range, 0x29000000, 0x2fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x31000000, 0x37ffffff, ResExcMemBlock);
-+ RANGE(range, 0x31000000, 0x37ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x39000000, 0x3fffffff, ResExcMemBlock);
-+ RANGE(range, 0x39000000, 0x3fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x41000000, 0x47ffffff, ResExcMemBlock);
-+ RANGE(range, 0x41000000, 0x47ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x49000000, 0x4fffffff, ResExcMemBlock);
-+ RANGE(range, 0x49000000, 0x4fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x51000000, 0x57ffffff, ResExcMemBlock);
-+ RANGE(range, 0x51000000, 0x57ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x59000000, 0x5fffffff, ResExcMemBlock);
-+ RANGE(range, 0x59000000, 0x5fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x61000000, 0x67ffffff, ResExcMemBlock);
-+ RANGE(range, 0x61000000, 0x67ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x69000000, 0x6fffffff, ResExcMemBlock);
-+ RANGE(range, 0x69000000, 0x6fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x71000000, 0x77ffffff, ResExcMemBlock);
-+ RANGE(range, 0x71000000, 0x77ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x79000000, 0x7fffffff, ResExcMemBlock);
-+ RANGE(range, 0x79000000, 0x7fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x81000000, 0x87ffffff, ResExcMemBlock);
-+ RANGE(range, 0x81000000, 0x87ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x89000000, 0x8fffffff, ResExcMemBlock);
-+ RANGE(range, 0x89000000, 0x8fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x91000000, 0x97ffffff, ResExcMemBlock);
-+ RANGE(range, 0x91000000, 0x97ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x99000000, 0x9fffffff, ResExcMemBlock);
-+ RANGE(range, 0x99000000, 0x9fffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xa1000000, 0xa7ffffff, ResExcMemBlock);
-+ RANGE(range, 0xa1000000, 0xa7ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xa9000000, 0xafffffff, ResExcMemBlock);
-+ RANGE(range, 0xa9000000, 0xafffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xb1000000, 0xb7ffffff, ResExcMemBlock);
-+ RANGE(range, 0xb1000000, 0xb7ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xb9000000, 0xbfffffff, ResExcMemBlock);
-+ RANGE(range, 0xb9000000, 0xbfffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xc1000000, 0xc7ffffff, ResExcMemBlock);
-+ RANGE(range, 0xc1000000, 0xc7ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xc9000000, 0xcfffffff, ResExcMemBlock);
-+ RANGE(range, 0xc9000000, 0xcfffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xd1000000, 0xd7ffffff, ResExcMemBlock);
-+ RANGE(range, 0xd1000000, 0xd7ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xd9000000, 0xdfffffff, ResExcMemBlock);
-+ RANGE(range, 0xd9000000, 0xdfffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xe1000000, 0xe7ffffff, ResExcMemBlock);
-+ RANGE(range, 0xe1000000, 0xe7ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xe9000000, 0xefffffff, ResExcMemBlock);
-+ RANGE(range, 0xe9000000, 0xefffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xf1000000, 0xf7ffffff, ResExcMemBlock);
-+ RANGE(range, 0xf1000000, 0xf7ffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xf9000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0xf9000000, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- } else {
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- }
-- RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-@@ -118,10 +129,10 @@
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-@@ -130,6 +141,14 @@
- xf86AccResFromOS(resPtr ret)
- {
- resRange range;
-+#ifdef HAVE_DOMAINS
-+ int domain = MIN_SYSTEM_DOMAIN;
-+#endif
-+
-+#ifdef HAVE_DOMAINS
-+ if (ret != NULL)
-+ domain = ret->res_domain;
-+#endif
-
- /*
- * Fallback is to claim the following areas:
-@@ -137,7 +156,7 @@
- * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS
- */
-
-- RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
-+ RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /*
-@@ -145,20 +164,20 @@
- * along with their sparse I/O aliases, but that's too imprecise. Instead
- * claim a bare minimum here.
- */
-- RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
-+ RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock, domain); /* For mainboard */
- ret = xf86AddResToList(ret, &range, -1);
-
- /*
- * At minimum, the top and bottom resources must be claimed, so that
- * resources that are (or appear to be) unallocated can be relocated.
- */
-- RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
--/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-+/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1); */
-- RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock);
-+ RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /* XXX add others */
-@@ -172,9 +191,18 @@
- */
-
- #ifdef __sparc__
-+#ifndef HAVE_DOMAINS
-+#error This platform cannot operate correctly without HAVE_DOMAINS defined
-+#endif
- resRange PciAvoid[] = {_END};
-+#define MIN_SYSTEM_DOMAIN 0
-+#define MAX_SYSTEM_DOMAIN 255
-+#define ISA_SYSTEM_DOMAIN 0
- #else
- resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
-+#define MIN_SYSTEM_DOMAIN 0
-+#define MAX_SYSTEM_DOMAIN 0
-+#define ISA_SYSTEM_DOMAIN 0
- #endif
-
- resPtr
-@@ -182,32 +210,36 @@
- {
- resPtr ret = NULL;
- resRange range;
-+ int domain;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-- ret = xf86AddResToList(ret, &range, -1);
-+ for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-
- #ifdef __sparc__
-- RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock, domain);
- #else
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
- #endif
-- ret = xf86AddResToList(ret, &range, -1);
-+ ret = xf86AddResToList(ret, &range, -1);
-+ }
-+
- return ret;
- }
-
- resPtr
--xf86PciBusAccWindowsFromOS(void)
-+xf86PciBusAccWindowsFromOS(int domain)
- {
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- #ifdef __sparc__
-- RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock, domain);
- #else
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
- #endif
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
-@@ -219,13 +251,13 @@
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
-
- #ifdef __sparc__
-- RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
- #else
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
- #endif
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
-@@ -235,21 +267,29 @@
- xf86AccResFromOS(resPtr ret)
- {
- resRange range;
-+#ifdef HAVE_DOMAINS
-+ int domain = MIN_SYSTEM_DOMAIN;
-+#endif
-+
-+#ifdef HAVE_DOMAINS
-+ if (ret != NULL)
-+ domain = ret->res_domain;
-+#endif
-
- /*
- * At minimum, the top and bottom resources must be claimed, so that
- * resources that are (or appear to be) unallocated can be relocated.
- */
-- RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- #ifdef __sparc__
-- RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
-+ RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock, domain);
- #else
-- RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock, domain);
- #endif
- ret = xf86AddResToList(ret, &range, -1);
-
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c Sun Jun 3 19:44:48 2001
-@@ -20,34 +20,42 @@
- resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
- #endif
-
-+#define MIN_SYSTEM_DOMAIN 0
-+#define MAX_SYSTEM_DOMAIN 0
-+#define ISA_SYSTEM_DOMAIN 0
-+
- resPtr
- xf86StdBusAccWindowsFromOS(void)
- {
- /* Fallback is to allow addressing of all memory space */
- resPtr ret = NULL;
- resRange range;
-+ int domain;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-- ret = xf86AddResToList(ret, &range, -1);
-+ for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+
-+ /* Fallback is to allow addressing of all I/O space */
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
-+ ret = xf86AddResToList(ret, &range, -1);
-+ }
-
-- /* Fallback is to allow addressing of all I/O space */
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-
- resPtr
--xf86StdPciBusAccWindowsFromOS(void)
-+xf86StdPciBusAccWindowsFromOS(int domain)
- {
- /* Fallback is to allow addressing of all memory space */
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /* Fallback is to allow addressing of all I/O space */
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-@@ -59,11 +67,11 @@
- resPtr ret = NULL;
- resRange range;
-
-- RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
-
- /* Fallback is to allow addressing of all I/O space */
-- RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
- ret = xf86AddResToList(ret, &range, -1);
- return ret;
- }
-@@ -72,6 +80,14 @@
- xf86StdAccResFromOS(resPtr ret)
- {
- resRange range;
-+#ifdef HAVE_DOMAINS
-+ int domain = MIN_SYSTEM_DOMAIN;
-+#endif
-+
-+#ifdef HAVE_DOMAINS
-+ if (ret != NULL)
-+ domain = ret->res_domain;
-+#endif
-
- /*
- * Fallback is to claim the following areas:
-@@ -91,22 +107,22 @@
- */
-
- /* Fallback is to claim 0x0 - 0x9ffff and 0x100000 - 0x7fffffff */
-- RANGE(range, 0x00000000, 0x0009ffff, ResExcMemBlock);
-+ RANGE(range, 0x00000000, 0x0009ffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
-+ RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x000f0000, 0x000fffff, ResExcMemBlock);
-+ RANGE(range, 0x000f0000, 0x000fffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
- RANGE(range, 0x00100000, 0x3fffffff,
-- ResExcMemBlock | ResBios | ResEstimated);
-+ ResExcMemBlock | ResBios | ResEstimated, domain);
- ret = xf86AddResToList(ret, &range, -1);
- #if 0
-- RANGE(range, 0xfec00000, 0xfecfffff, ResExcMemBlock | ResBios);
-+ RANGE(range, 0xfec00000, 0xfecfffff, ResExcMemBlock | ResBios, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xfee00000, 0xfeefffff, ResExcMemBlock | ResBios);
-+ RANGE(range, 0xfee00000, 0xfeefffff, ResExcMemBlock | ResBios, domain);
- ret = xf86AddResToList(ret, &range, -1);
- #endif
-- RANGE(range, 0xffe00000, 0xffffffff, ResExcMemBlock | ResBios);
-+ RANGE(range, 0xffe00000, 0xffffffff, ResExcMemBlock | ResBios, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /*
-@@ -114,20 +130,20 @@
- * along with their sparse I/O aliases, but that's too imprecise. Instead
- * claim a bare minimum here.
- */
-- RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
-+ RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock, domain); /* For mainboard */
- ret = xf86AddResToList(ret, &range, -1);
-
- /*
- * At minimum, the top and bottom resources must be claimed, so that
- * resources that are (or appear to be) unallocated can be relocated.
- */
--/* RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
-+/* RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
-+ RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-- RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
-+ RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1); */
-- RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
-+ RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock, domain);
- ret = xf86AddResToList(ret, &range, -1);
-
- /* XXX add others */
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/vidmem.c.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/vidmem.c Sun Jun 3 19:44:48 2001
-@@ -135,6 +135,29 @@
- }
- }
-
-+void
-+xf86MakeNewMapping(int ScreenNum, int Flags, unsigned long Base, unsigned long Size, pointer Vbase)
-+{
-+ VidMapPtr vp;
-+ MappingPtr mp;
-+
-+ vp = getVidMapRec(ScreenNum);
-+ mp = newMapping(vp);
-+ mp->physBase = Base;
-+ mp->size = Size;
-+ mp->virtBase = Vbase;
-+ mp->flags = Flags;
-+}
-+
-+void
-+xf86InitVidMem(void)
-+{
-+ if (!vidMemInfo.initialised) {
-+ memset(&vidMemInfo, 0, sizeof(VidMemInfo));
-+ xf86OSInitVidMem(&vidMemInfo);
-+ }
-+}
-+
- pointer
- xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size)
- {
---- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h.~1~ Sun Jun 3 19:44:41 2001
-+++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h Sun Jun 3 19:44:48 2001
-@@ -137,6 +137,8 @@
- /* public functions */
- extern Bool xf86LinearVidMem(void);
- extern Bool xf86CheckMTRR(int);
-+extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer);
-+extern void xf86InitVidMem(void);
- extern pointer xf86MapVidMem(int, int, unsigned long, unsigned long);
- extern void xf86UnMapVidMem(int, pointer, unsigned long);
- extern void xf86MapReadSideEffects(int, int, pointer, unsigned long);
-@@ -235,13 +237,13 @@
- /* RAC-related privs */
- /* internal to os-support layer */
- resPtr xf86StdBusAccWindowsFromOS(void);
--resPtr xf86StdPciAccWindowsFromOS(void);
-+resPtr xf86StdPciAccWindowsFromOS(int domain);
- resPtr xf86StdIsaAccWindowsFromOS(void);
- resPtr xf86StdAccResFromOS(resPtr ret);
-
- /* available to the common layer */
- resPtr xf86BusAccWindowsFromOS(void);
--resPtr xf86PciBusAccWindowsFromOS(void);
-+resPtr xf86PciBusAccWindowsFromOS(int domain);
- resPtr xf86IsaBusAccWindowsFromOS(void);
- resPtr xf86AccResFromOS(resPtr ret);
- #endif /* NEED_OS_RAC_PROTOS */
+++ /dev/null
---- XFree86-4.3.0/xc/lib/font/Speedo/module/Imakefile.orig Wed Feb 13 21:32:47 2002
-+++ XFree86-4.3.0/xc/lib/font/Speedo/module/Imakefile Thu Mar 13 15:48:37 2003
-@@ -14,10 +14,10 @@
- out_scrn.o out_util.o reset.o set_spcs.o set_trns.o
-
- SRCS = spfuncs.c spfile.c spinfo.c sperr.c spfont.c spglyph.c \
-- spencode.c bics-unicode.c \
-+ bics-unicode.c \
- $(SPEEDOSRCS)
- OBJS = spfuncs.o spfile.o spinfo.o sperr.o spfont.o spglyph.o \
-- spencode.o bics-unicode.o \
-+ bics-unicode.o \
- $(SPEEDOOBJS)
-
- LinkSourceFile(bics-unicode.c,..)
+++ /dev/null
---- XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/xf86config/Cards.ssa50 Tue Aug 31 15:55:47 1999
-+++ XFree86-3.3.5/xc/programs/Xserver/hw/xfree86/xf86config/Cards Tue Aug 31 15:57:44 1999
-@@ -2334,6 +2334,9 @@
-
- NAME Diamond SpeedStar A50
- SEE SiS 6326
-+LINE Option "sw_cursor"
-+LINE Option "no_imageblt"
-+LINE Option "no_bitblt"
-
- NAME AOpen PA50D
- SEE SiS 6326
+++ /dev/null
---- xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c.tdfx-disable-dri-on-16Mb-cards-in-hires Mon May 21 17:43:55 2001
-+++ xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c Sun Mar 10 20:50:46 2002
-@@ -293,6 +293,22 @@
- return FALSE;
- }
-
-+ /* Disable DRI if using a 16Mb card with virtual resolution higher than
-+ * 1024x768 because DRI does not have enough memory available for textures
-+ * at higher resolutions, and will not operate correctly.
-+ */
-+ xf86DrvMsg(pScreen->myNum, X_INFO, "[dri] VideoRAM = %d, VirtualXres = %d, VirtualYres= %d,\n",
-+ pScrn->videoRam, pScrn->virtualX, pScrn->virtualY);
-+
-+ if ( (pTDFX->ChipType == PCI_CHIP_VOODOO3) || (pTDFX->ChipType == PCI_CHIP_BANSHEE) ) {
-+ if (pScrn->videoRam <= 16384 && ((pScrn->virtualX * pScrn->virtualY) > (1024 * 768)) ) {
-+ xf86DrvMsg(pScreen->myNum, X_WARNING,
-+ "[dri] To use DRI, with a 16Mb Voodoo 3 or Banshee card, you must\n"
-+ "\tinvoke the server using a maximum resolution of 1024x768 or lower.\n");
-+ return FALSE;
-+ }
-+ }
-+
- /* Check that the GLX, DRI, and DRM modules have been loaded by testing
- for canonical symbols in each module. */
- if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) return FALSE;
+++ /dev/null
---- xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c.tdfx-fix-compiler-warnings Sat Feb 16 00:51:27 2002
-+++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c Sun Feb 17 06:26:13 2002
-@@ -353,7 +353,7 @@
- FxI32 result[2];
-
- if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
-- fprintf( stderr, "%s( %p )\n", __FUNCTION__, fxMesa );
-+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *) fxMesa );
- }
-
- #if DEBUG_LOCKING
-@@ -457,7 +457,7 @@
- void tdfxDestroyContext( tdfxContextPtr fxMesa )
- {
- if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
-- fprintf( stderr, "%s( %p )\n", __FUNCTION__, fxMesa );
-+ fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *) fxMesa );
- }
-
- if ( fxMesa ) {
-@@ -547,8 +547,8 @@
- }
- }
-
--#define GET_FUNCTION(PTR, NAME) \
-- tmesa->Glide.PTR = dlsym(libHandle, NAME); \
-+#define GET_FUNCTION(PTR, NAME, TYPEOF) \
-+ tmesa->Glide.PTR = (TYPEOF) dlsym(libHandle, NAME); \
- if (!tmesa->Glide.PTR) { \
- char err[1000]; \
- sprintf(err, "couldn't find Glide function %s in %s.", \
-@@ -556,111 +556,195 @@
- __driMesaMessage(err); \
- }
-
-- GET_FUNCTION(grDrawPoint, "grDrawPoint");
-- GET_FUNCTION(grDrawLine, "grDrawLine");
-- GET_FUNCTION(grDrawTriangle, "grDrawTriangle");
-- GET_FUNCTION(grVertexLayout, "grVertexLayout");
-- GET_FUNCTION(grDrawVertexArray, "grDrawVertexArray");
-- GET_FUNCTION(grDrawVertexArrayContiguous, "grDrawVertexArrayContiguous");
-- GET_FUNCTION(grBufferClear, "grBufferClear");
-- /*GET_FUNCTION(grBufferSwap, "grBufferSwap");*/
-- GET_FUNCTION(grRenderBuffer, "grRenderBuffer");
-- GET_FUNCTION(grErrorSetCallback, "grErrorSetCallback");
-- GET_FUNCTION(grFinish, "grFinish");
-- GET_FUNCTION(grFlush, "grFlush");
-- GET_FUNCTION(grSstWinOpen, "grSstWinOpen");
-- GET_FUNCTION(grSstWinClose, "grSstWinClose");
-+ GET_FUNCTION(grDrawPoint, "grDrawPoint", void (*)(const void *));
-+ GET_FUNCTION(grDrawLine, "grDrawLine", void (*)(const void *, const void * ));
-+ GET_FUNCTION(grDrawTriangle, "grDrawTriangle", ( const void *a, const void *b, const void *c ));
-+ GET_FUNCTION(grVertexLayout, "grVertexLayout", (FxU32 param, FxI32 offset, FxU32 mode));
-+ GET_FUNCTION(grDrawVertexArray, "grDrawVertexArray", (FxU32 mode, FxU32 Count, void *pointers));
-+ GET_FUNCTION(grDrawVertexArrayContiguous, "grDrawVertexArrayContiguous",
-+ (FxU32 mode, FxU32 Count, void *pointers, FxU32 stride));
-+ GET_FUNCTION(grBufferClear, "grBufferClear", ( GrColor_t color, GrAlpha_t alpha, FxU32 depth ));
-+ /*GET_FUNCTION(grBufferSwap, "grBufferSwap", ( FxU32 swap_interval ));*/
-+ GET_FUNCTION(grRenderBuffer, "grRenderBuffer", ( GrBuffer_t buffer ));
-+ GET_FUNCTION(grErrorSetCallback, "grErrorSetCallback", ( GrErrorCallbackFnc_t fnc ));
-+ GET_FUNCTION(grFinish, "grFinish", (void));
-+ GET_FUNCTION(grFlush, "grFlush", (void));
-+ GET_FUNCTION(grSstWinOpen, "grSstWinOpen", (FxU32 hWnd,
-+ GrScreenResolution_t screen_resolution,
-+ GrScreenRefresh_t refresh_rate,
-+ GrColorFormat_t color_format,
-+ GrOriginLocation_t origin_location,
-+ int nColBuffers,
-+ int nAuxBuffers));
-+ GET_FUNCTION(grSstWinClose, "grSstWinClose", ( GrContext_t context ));
- #if 0
- /* Not in V3 lib, and not used anyway. */
-- GET_FUNCTION(grSetNumPendingBuffers, "grSetNumPendingBuffers");
-+ GET_FUNCTION(grSetNumPendingBuffers, "grSetNumPendingBuffers", (FxI32 NumPendingBuffers));
- #endif
-- GET_FUNCTION(grSelectContext, "grSelectContext");
-- GET_FUNCTION(grSstOrigin, "grSstOrigin");
-- GET_FUNCTION(grSstSelect, "grSstSelect");
-- GET_FUNCTION(grAlphaBlendFunction, "grAlphaBlendFunction");
-- GET_FUNCTION(grAlphaCombine, "grAlphaCombine");
-- GET_FUNCTION(grAlphaControlsITRGBLighting, "grAlphaControlsITRGBLighting");
-- GET_FUNCTION(grAlphaTestFunction, "grAlphaTestFunction");
-- GET_FUNCTION(grAlphaTestReferenceValue, "grAlphaTestReferenceValue");
-- GET_FUNCTION(grChromakeyMode, "grChromakeyMode");
-- GET_FUNCTION(grChromakeyValue, "grChromakeyValue");
-- GET_FUNCTION(grClipWindow, "grClipWindow");
-- GET_FUNCTION(grColorCombine, "grColorCombine");
-- GET_FUNCTION(grColorMask, "grColorMask");
-- GET_FUNCTION(grCullMode, "grCullMode");
-- GET_FUNCTION(grConstantColorValue, "grConstantColorValue");
-- GET_FUNCTION(grDepthBiasLevel, "grDepthBiasLevel");
-- GET_FUNCTION(grDepthBufferFunction, "grDepthBufferFunction");
-- GET_FUNCTION(grDepthBufferMode, "grDepthBufferMode");
-- GET_FUNCTION(grDepthMask, "grDepthMask");
-- GET_FUNCTION(grDisableAllEffects, "grDisableAllEffects");
-- GET_FUNCTION(grDitherMode, "grDitherMode");
-- GET_FUNCTION(grFogColorValue, "grFogColorValue");
-- GET_FUNCTION(grFogMode, "grFogMode");
-- GET_FUNCTION(grFogTable, "grFogTable");
-- GET_FUNCTION(grLoadGammaTable, "grLoadGammaTable");
-- GET_FUNCTION(grSplash, "grSplash");
-- GET_FUNCTION(grGet, "grGet");
-- GET_FUNCTION(grGetString, "grGetString");
-- GET_FUNCTION(grQueryResolutions, "grQueryResolutions");
-- GET_FUNCTION(grReset, "grReset");
-- GET_FUNCTION(grGetProcAddress, "grGetProcAddress");
-- GET_FUNCTION(grEnable, "grEnable");
-- GET_FUNCTION(grDisable, "grDisable");
-- GET_FUNCTION(grCoordinateSpace, "grCoordinateSpace");
-- GET_FUNCTION(grDepthRange, "grDepthRange");
-+ GET_FUNCTION(grSelectContext, "grSelectContext", ( GrContext_t context ));
-+ GET_FUNCTION(grSstOrigin, "grSstOrigin", (GrOriginLocation_t origin));
-+ GET_FUNCTION(grSstSelect, "grSstSelect", ( int which_sst ));
-+ GET_FUNCTION(grAlphaBlendFunction, "grAlphaBlendFunction",
-+ (GrAlphaBlendFnc_t rgb_sf,
-+ GrAlphaBlendFnc_t rgb_df,
-+ GrAlphaBlendFnc_t alpha_sf,
-+ GrAlphaBlendFnc_t alpha_df));
-+ GET_FUNCTION(grAlphaCombine, "grAlphaCombine",
-+ (GrCombineFunction_t function,
-+ GrCombineFactor_t factor,
-+ GrCombineLocal_t local, GrCombineOther_t other,
-+ FxBool invert));
-+ GET_FUNCTION(grAlphaControlsITRGBLighting, "grAlphaControlsITRGBLighting",
-+ ( FxBool enable ));
-+ GET_FUNCTION(grAlphaTestFunction, "grAlphaTestFunction", ( GrCmpFnc_t function ));
-+ GET_FUNCTION(grAlphaTestReferenceValue, "grAlphaTestReferenceValue",
-+ ( GrAlpha_t value ));
-+ GET_FUNCTION(grChromakeyMode, "grChromakeyMode", ( GrChromakeyMode_t mode ));
-+ GET_FUNCTION(grChromakeyValue, "grChromakeyValue", ( GrColor_t value ));
-+ GET_FUNCTION(grClipWindow, "grClipWindow", ( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy ));
-+ GET_FUNCTION(grColorCombine, "grColorCombine",
-+ ( GrCombineFunction_t function,
-+ GrCombineFactor_t factor,
-+ GrCombineLocal_t local,
-+ GrCombineOther_t other,
-+ FxBool invert ));
-+ GET_FUNCTION(grColorMask, "grColorMask", ( FxBool rgb, FxBool a ));
-+ GET_FUNCTION(grCullMode, "grCullMode", ( GrCullMode_t mode ));
-+ GET_FUNCTION(grConstantColorValue, "grConstantColorValue", ( GrColor_t value ));
-+ GET_FUNCTION(grDepthBiasLevel, "grDepthBiasLevel", ( FxI32 level ));
-+ GET_FUNCTION(grDepthBufferFunction, "grDepthBufferFunction", ( GrCmpFnc_t function ));
-+ GET_FUNCTION(grDepthBufferMode, "grDepthBufferMode", ( GrDepthBufferMode_t mode ));
-+ GET_FUNCTION(grDepthMask, "grDepthMask", ( FxBool mask ));
-+ GET_FUNCTION(grDisableAllEffects, "grDisableAllEffects", ( void ));
-+ GET_FUNCTION(grDitherMode, "grDitherMode", ( GrDitherMode_t mode ));
-+ GET_FUNCTION(grFogColorValue, "grFogColorValue", ( GrColor_t fogcolor ));
-+ GET_FUNCTION(grFogMode, "grFogMode", ( GrFogMode_t mode ));
-+ GET_FUNCTION(grFogTable, "grFogTable", ( const GrFog_t ft[] ));
-+ GET_FUNCTION(grLoadGammaTable, "grLoadGammaTable", ( FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue));
-+ GET_FUNCTION(grSplash, "grSplash", (float x, float y, float width, float height, FxU32 frame));
-+ GET_FUNCTION(grGet, "grGet", ( FxU32 pname, FxU32 plength, FxI32 *params ));
-+ GET_FUNCTION(grGetString, "grGetString", ( FxU32 pname ));
-+ GET_FUNCTION(grQueryResolutions, "grQueryResolutions",
-+ ( const GrResolution *resTemplate,
-+ GrResolution *output ));
-+ GET_FUNCTION(grReset, "grReset", ( FxU32 what ));
-+ GET_FUNCTION(grGetProcAddress, "grGetProcAddress", ( char *procName ));
-+ GET_FUNCTION(grEnable, "grEnable", ( GrEnableMode_t mode ));
-+ GET_FUNCTION(grDisable, "grDisable", ( GrEnableMode_t mode ));
-+ GET_FUNCTION(grCoordinateSpace, "grCoordinateSpace", ( GrCoordinateSpaceMode_t mode ));
-+ GET_FUNCTION(grDepthRange, "grDepthRange", ( FxFloat n, FxFloat f ));
- #if defined(__linux__) || defined(__FreeBSD__)
-- GET_FUNCTION(grStippleMode, "grStippleMode");
-- GET_FUNCTION(grStipplePattern, "grStipplePattern");
-+ GET_FUNCTION(grStippleMode, "grStippleMode", ( GrStippleMode_t mode ));
-+ GET_FUNCTION(grStipplePattern, "grStipplePattern", ( GrStipplePattern_t mode ));
- #endif /* __linux__ || __FreeBSD__ */
-- GET_FUNCTION(grViewport, "grViewport");
-- GET_FUNCTION(grTexCalcMemRequired, "grTexCalcMemRequired");
-- GET_FUNCTION(grTexTextureMemRequired, "grTexTextureMemRequired");
-- GET_FUNCTION(grTexMinAddress, "grTexMinAddress");
-- GET_FUNCTION(grTexMaxAddress, "grTexMaxAddress");
-- GET_FUNCTION(grTexNCCTable, "grTexNCCTable");
-- GET_FUNCTION(grTexSource, "grTexSource");
-- GET_FUNCTION(grTexClampMode, "grTexClampMode");
-- GET_FUNCTION(grTexCombine, "grTexCombine");
-- GET_FUNCTION(grTexDetailControl, "grTexDetailControl");
-- GET_FUNCTION(grTexFilterMode, "grTexFilterMode");
-- GET_FUNCTION(grTexLodBiasValue, "grTexLodBiasValue");
-- GET_FUNCTION(grTexDownloadMipMap, "grTexDownloadMipMap");
-- GET_FUNCTION(grTexDownloadMipMapLevel, "grTexDownloadMipMapLevel");
-- GET_FUNCTION(grTexDownloadMipMapLevelPartial, "grTexDownloadMipMapLevelPartial");
-- GET_FUNCTION(grTexDownloadTable, "grTexDownloadTable");
-- GET_FUNCTION(grTexDownloadTablePartial, "grTexDownloadTablePartial");
-- GET_FUNCTION(grTexMipMapMode, "grTexMipMapMode");
-- GET_FUNCTION(grTexMultibase, "grTexMultibase");
-- GET_FUNCTION(grTexMultibaseAddress, "grTexMultibaseAddress");
-- GET_FUNCTION(grLfbLock, "grLfbLock");
-- GET_FUNCTION(grLfbUnlock, "grLfbUnlock");
-- GET_FUNCTION(grLfbConstantAlpha, "grLfbConstantAlpha");
-- GET_FUNCTION(grLfbConstantDepth, "grLfbConstantDepth");
-- GET_FUNCTION(grLfbWriteColorSwizzle, "grLfbWriteColorSwizzle");
-- GET_FUNCTION(grLfbWriteColorFormat, "grLfbWriteColorFormat");
-- GET_FUNCTION(grLfbWriteRegion, "grLfbWriteRegion");
-- GET_FUNCTION(grLfbReadRegion, "grLfbReadRegion");
-- GET_FUNCTION(grGlideInit, "grGlideInit");
-- GET_FUNCTION(grGlideShutdown, "grGlideShutdown");
-- GET_FUNCTION(grGlideGetState, "grGlideGetState");
-- GET_FUNCTION(grGlideSetState, "grGlideSetState");
-- GET_FUNCTION(grGlideGetVertexLayout, "grGlideGetVertexLayout");
-- GET_FUNCTION(grGlideSetVertexLayout, "grGlideSetVertexLayout");
-+ GET_FUNCTION(grViewport, "grViewport", ( FxI32 x, FxI32 y, FxI32 width, FxI32 height ));
-+ GET_FUNCTION(grTexCalcMemRequired, "grTexCalcMemRequired",
-+ (GrLOD_t lodmin, GrLOD_t lodmax,
-+ GrAspectRatio_t aspect, GrTextureFormat_t fmt));
-+ GET_FUNCTION(grTexTextureMemRequired, "grTexTextureMemRequired",
-+ ( FxU32 evenOdd, GrTexInfo *info ));
-+ GET_FUNCTION(grTexMinAddress, "grTexMinAddress", ( GrChipID_t tmu ));
-+ GET_FUNCTION(grTexMaxAddress, "grTexMaxAddress", ( GrChipID_t tmu ));
-+ GET_FUNCTION(grTexNCCTable, "grTexNCCTable", ( GrNCCTable_t table ));
-+ GET_FUNCTION(grTexSource, "grTexSource",
-+ ( GrChipID_t tmu, FxU32 startAddress,
-+ FxU32 evenOdd, GrTexInfo *info ));
-+ GET_FUNCTION(grTexClampMode, "grTexClampMode", ( GrChipID_t tmu,
-+ GrTextureClampMode_t s_clampmode,
-+ GrTextureClampMode_t t_clampmode ));
-+ GET_FUNCTION(grTexCombine, "grTexCombine", ( GrChipID_t tmu,
-+ GrCombineFunction_t rgb_function,
-+ GrCombineFactor_t rgb_factor,
-+ GrCombineFunction_t alpha_function,
-+ GrCombineFactor_t alpha_factor,
-+ FxBool rgb_invert,
-+ FxBool alpha_invert));
-+ GET_FUNCTION(grTexDetailControl, "grTexDetailControl",
-+ ( GrChipID_t tmu, int lod_bias,
-+ FxU8 detail_scale, float detail_max ));
-+ GET_FUNCTION(grTexFilterMode, "grTexFilterMode", ( GrChipID_t tmu,
-+ GrTextureFilterMode_t minfilter_mode,
-+ GrTextureFilterMode_t magfilter_mode ));
-+ GET_FUNCTION(grTexLodBiasValue, "grTexLodBiasValue", (GrChipID_t tmu, float bias ));
-+ GET_FUNCTION(grTexDownloadMipMap, "grTexDownloadMipMap",
-+ ( GrChipID_t tmu, FxU32 startAddress,
-+ FxU32 evenOdd, GrTexInfo *info ));
-+ GET_FUNCTION(grTexDownloadMipMapLevel, "grTexDownloadMipMapLevel",
-+ ( GrChipID_t tmu,
-+ FxU32 startAddress,
-+ GrLOD_t thisLod,
-+ GrLOD_t largeLod,
-+ GrAspectRatio_t aspectRatio,
-+ GrTextureFormat_t format,
-+ FxU32 evenOdd,
-+ void *data ));
-+ GET_FUNCTION(grTexDownloadMipMapLevelPartial, "grTexDownloadMipMapLevelPartial",
-+ ( GrChipID_t tmu,
-+ FxU32 startAddress,
-+ GrLOD_t thisLod,
-+ GrLOD_t largeLod,
-+ GrAspectRatio_t aspectRatio,
-+ GrTextureFormat_t format,
-+ FxU32 evenOdd,
-+ void *data,
-+ int start,
-+ int end ));
-+ GET_FUNCTION(grTexDownloadTable, "grTexDownloadTable", ( GrTexTable_t type, void *data ));
-+ GET_FUNCTION(grTexDownloadTablePartial, "grTexDownloadTablePartial",
-+ ( GrTexTable_t type, void *data, int start, int end ));
-+ GET_FUNCTION(grTexMipMapMode, "grTexMipMapMode", ( GrChipID_t tmu,
-+ GrMipMapMode_t mode, FxBool lodBlend ));
-+ GET_FUNCTION(grTexMultibase, "grTexMultibase", ( GrChipID_t tmu, FxBool enable ));
-+ GET_FUNCTION(grTexMultibaseAddress, "grTexMultibaseAddress",
-+ ( GrChipID_t tmu, FxBool enable ));
-+ GET_FUNCTION(grLfbLock, "grLfbLock", ( GrLock_t type, GrBuffer_t buffer,
-+ GrLfbWriteMode_t writeMode,
-+ GrOriginLocation_t origin, FxBool pixelPipeline,
-+ GrLfbInfo_t *info ));
-+ GET_FUNCTION(grLfbUnlock, "grLfbUnlock", ( GrLock_t type, GrBuffer_t buffer ));
-+ GET_FUNCTION(grLfbConstantAlpha, "grLfbConstantAlpha", ( GrAlpha_t alpha ));
-+ GET_FUNCTION(grLfbConstantDepth, "grLfbConstantDepth", ( FxU32 depth ));
-+ GET_FUNCTION(grLfbWriteColorSwizzle, "grLfbWriteColorSwizzle", (FxBool swizzleBytes, FxBool swapWords));
-+ GET_FUNCTION(grLfbWriteColorFormat, "grLfbWriteColorFormat", (GrColorFormat_t colorFormat));
-+ GET_FUNCTION(grLfbWriteRegion, "grLfbWriteRegion",
-+ ( GrBuffer_t dst_buffer,
-+ FxU32 dst_x, FxU32 dst_y,
-+ GrLfbSrcFmt_t src_format,
-+ FxU32 src_width, FxU32 src_height,
-+ FxBool pixelPipeline,
-+ FxI32 src_stride, void *src_data ));
-+ GET_FUNCTION(grLfbReadRegion, "grLfbReadRegion",
-+ ( GrBuffer_t src_buffer,
-+ FxU32 src_x, FxU32 src_y,
-+ FxU32 src_width, FxU32 src_height,
-+ FxU32 dst_stride, void *dst_data ));
-+ GET_FUNCTION(grGlideInit, "grGlideInit", ( void ));
-+ GET_FUNCTION(grGlideShutdown, "grGlideShutdown", ( void ));
-+ GET_FUNCTION(grGlideGetState, "grGlideGetState", ( void *state ));
-+ GET_FUNCTION(grGlideSetState, "grGlideSetState", ( const void *state ));
-+ GET_FUNCTION(grGlideGetVertexLayout, "grGlideGetVertexLayout", ( void *layout ));
-+ GET_FUNCTION(grGlideSetVertexLayout, "grGlideSetVertexLayout", ( const void *layout ));
-
- /* Glide utility functions */
-- GET_FUNCTION(guFogGenerateExp, "guFogGenerateExp");
-- GET_FUNCTION(guFogGenerateExp2, "guFogGenerateExp2");
-- GET_FUNCTION(guFogGenerateLinear, "guFogGenerateLinear");
-+ GET_FUNCTION(guFogGenerateExp, "guFogGenerateExp", ( GrFog_t *fogtable, float density ));
-+ GET_FUNCTION(guFogGenerateExp2, "guFogGenerateExp2", ( GrFog_t *fogtable, float density ));
-+ GET_FUNCTION(guFogGenerateLinear, "guFogGenerateLinear", (GrFog_t *fogtable, float nearZ, float farZ ));
-
- /* DRI functions */
-- GET_FUNCTION(grDRIOpen, "grDRIOpen");
-- GET_FUNCTION(grDRIPosition, "grDRIPosition");
-- /*GET_FUNCTION(grDRILostContext, "grDRILostContext");*/
-- GET_FUNCTION(grDRIImportFifo, "grDRIImportFifo");
-- GET_FUNCTION(grDRIInvalidateAll, "grDRIInvalidateAll");
-- GET_FUNCTION(grDRIResetSAREA, "grDRIResetSAREA");
-- GET_FUNCTION(grDRIBufferSwap, "grDRIBufferSwap");
-+ GET_FUNCTION(grDRIOpen, "grDRIOpen", ( char *pFB, char *pRegs, int deviceID,
-+ int width, int height,
-+ int mem, int cpp, int stride,
-+ int fifoOffset, int fifoSize,
-+ int fbOffset, int backOffset, int depthOffset,
-+ int textureOffset, int textureSize,
-+ volatile int *fifoPtr, volatile int *fifoRead ));
-+ GET_FUNCTION(grDRIPosition, "grDRIPosition", ( int x, int y, int w, int h,
-+ int numClip, XF86DRIClipRectPtr pClip ));
-+ /*GET_FUNCTION(grDRILostContext, "grDRILostContext", ( void ));*/
-+ GET_FUNCTION(grDRIImportFifo, "grDRIImportFifo", ( int fifoPtr, int fifoRead ));
-+ GET_FUNCTION(grDRIInvalidateAll, "grDRIInvalidateAll", ( void ));
-+ GET_FUNCTION(grDRIResetSAREA, "grDRIResetSAREA", ( void ));
-+ GET_FUNCTION(grDRIBufferSwap, "grDRIBufferSwap", ( FxU32 swapInterval ));
-
- /*
- * Extension functions:
-@@ -668,22 +752,24 @@
- * not found.
- */
- /* PIXEXT extension */
-- tmesa->Glide.grStencilFunc = dlsym(libHandle, "grStencilFunc");
-- tmesa->Glide.grStencilMask = dlsym(libHandle, "grStencilMask");
-- tmesa->Glide.grStencilOp = dlsym(libHandle, "grStencilOp");
-- tmesa->Glide.grBufferClearExt = dlsym(libHandle, "grBufferClearExt");
-- tmesa->Glide.grColorMaskExt = dlsym(libHandle, "grColorMaskExt");
-+ tmesa->Glide.grStencilFunc = (void (*)( GrCmpFnc_t func, GrStencil_t ref, GrStencil_t mask )) dlsym(libHandle, "grStencilFunc");
-+ tmesa->Glide.grStencilMask = (void (*)( GrStencil_t mask )) dlsym(libHandle, "grStencilMask");
-+ tmesa->Glide.grStencilOp = (void (*)( GrStencilOp_t fail, GrStencilOp_t zfail,
-+ GrStencilOp_t zpass )) dlsym(libHandle, "grStencilOp");
-+ tmesa->Glide.grBufferClearExt = (void (*)( GrColor_t color, GrAlpha_t alpha,
-+ FxU32 depth, GrStencil_t stencil )) dlsym(libHandle, "grBufferClearExt");
-+ tmesa->Glide.grColorMaskExt = (void (*)( FxBool, FxBool, FxBool, FxBool )) dlsym(libHandle, "grColorMaskExt");
- /* COMBINE extension */
-- tmesa->Glide.grColorCombineExt = dlsym(libHandle, "grColorCombineExt");
-- tmesa->Glide.grTexColorCombineExt = dlsym(libHandle, "grTexColorCombineExt");
-- tmesa->Glide.grAlphaCombineExt = dlsym(libHandle, "grAlphaCombineExt");
-- tmesa->Glide.grTexAlphaCombineExt = dlsym(libHandle, "grTexAlphaCombineExt");
-- tmesa->Glide.grAlphaBlendFunctionExt = dlsym(libHandle, "grAlphaBlendFunctionExt");
-- tmesa->Glide.grConstantColorValueExt = dlsym(libHandle, "grConstantColorValueExt");
-+ tmesa->Glide.grColorCombineExt = (void (*)) dlsym(libHandle, "grColorCombineExt");
-+ tmesa->Glide.grTexColorCombineExt = (void (*)) dlsym(libHandle, "grTexColorCombineExt");
-+ tmesa->Glide.grAlphaCombineExt = (void (*)) dlsym(libHandle, "grAlphaCombineExt");
-+ tmesa->Glide.grTexAlphaCombineExt = (void (*)) dlsym(libHandle, "grTexAlphaCombineExt");
-+ tmesa->Glide.grAlphaBlendFunctionExt = (void (*)) dlsym(libHandle, "grAlphaBlendFunctionExt");
-+ tmesa->Glide.grConstantColorValueExt = (void (*)) dlsym(libHandle, "grConstantColorValueExt");
- /* Texus 2 */
-- tmesa->Glide.txImgQuantize = dlsym(libHandle, "txImgQuantize");
-- tmesa->Glide.txImgDequantizeFXT1 = dlsym(libHandle, "_txImgDequantizeFXT1");
-- tmesa->Glide.txErrorSetCallback = dlsym(libHandle, "txErrorSetCallback");
-+ tmesa->Glide.txImgQuantize = (void (*)) dlsym(libHandle, "txImgQuantize");
-+ tmesa->Glide.txImgDequantizeFXT1 = (void (*)) dlsym(libHandle, "_txImgDequantizeFXT1");
-+ tmesa->Glide.txErrorSetCallback = (void (*)) dlsym(libHandle, "txErrorSetCallback");
-
- return GL_TRUE;
- }
+++ /dev/null
-This patch reorders the code in the EnterVT function in the tdfx driver
-in an attempt to fix VT switch font corruption problems that are easily
-reproduceable, and often reported. The code is currently untested. It
-may also fix other VTswitch problems as well.
-
-Mike A. Harris <mharris@redhat.com>
-
---- xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c.tdfx-fix-vtswitch-font-corruption Sun Feb 3 08:40:10 2002
-+++ xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c Sun Feb 3 08:42:21 2002
-@@ -2326,12 +2326,15 @@
- TDFXTRACE("TDFXLeaveVT start\n");
- pScrn = xf86Screens[scrnIndex];
- hwp=VGAHWPTR(pScrn);
-- TDFXRestore(pScrn);
-- vgaHWLock(hwp);
- pScreen = screenInfo.screens[scrnIndex];
-+
- pTDFX = TDFXPTR(pScrn);
- pTDFX->sync(pScrn);
-+
-+ TDFXRestore(pScrn);
-+ vgaHWLock(hwp);
- TDFXShutdownFifo(pScreen);
-+
- #ifdef XF86DRI
- if (pTDFX->directRenderingEnabled) {
- DRILock(pScreen, 0);
+++ /dev/null
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c.chmou Tue Sep 19 17:34:43 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c Tue Sep 19 18:30:25 2000
-@@ -127,9 +127,10 @@
- }
- }
- if (i!=numConfigs) {
-- ErrorF("Incorrect initialization of visuals\n");
-+ xf86DrvMsg(pScreen->myNum, X_ERROR,
-+ "Incorrect initialization of visuals\n");
- return FALSE;
-- } else ErrorF("Created %d visuals\n", numConfigs);
-+ }
- break; /* 16bpp */
-
- case 24:
-@@ -224,7 +225,7 @@
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "Incorrect initialization of visuals\n");
- return FALSE;
-- } else ErrorF("Created %d visuals\n", numConfigs);
-+ }
- break;
- }
- pTDFX->numVisualConfigs = numConfigs;
-@@ -263,12 +264,21 @@
-
- switch (pScrn->bitsPerPixel) {
- case 8:
-+ xf86DrvMsg(pScreen->myNum, X_ERROR,
-+ "DRI not supported in 8 bpp mode, disabling DRI.\n");
- return FALSE;
- case 16:
- break;
- case 24:
-+ xf86DrvMsg(pScreen->myNum, X_ERROR,
-+ "DRI not supported in 24 bpp mode, disabling DRI.\n");
-+ return FALSE;
- case 32:
-- if (pTDFX->ChipType<=PCI_CHIP_VOODOO3) return FALSE;
-+ if (pTDFX->ChipType<=PCI_CHIP_VOODOO3) {
-+ xf86DrvMsg(pScreen->myNum, X_ERROR,
-+ "DRI requires Voodoo3 or later, disabling DRI.\n");
-+ return FALSE;
-+ }
- }
-
- /* Check that the GLX, DRI, and DRM modules have been loaded by testing
-@@ -295,8 +305,12 @@
- }
-
- pDRIInfo = DRICreateInfoRec();
-- if (!pDRIInfo)
-- return FALSE;
-+ if (!pDRIInfo) {
-+ xf86DrvMsg(pScreen->myNum, X_ERROR,
-+ "DRICreatInfoRect() failed, disabling DRI.\n");
-+ return FALSE;
-+ }
-+
- pTDFX->pDRIInfo = pDRIInfo;
-
- pDRIInfo->drmDriverName = TDFXKernelDriverName;
-@@ -336,13 +350,14 @@
- * in the SAREA header
- */
- if (sizeof(XF86DRISAREARec)+sizeof(TDFXSAREAPriv)>SAREA_MAX) {
-- xf86DrvMsg(pScreen->myNum, X_ERROR, "Data does not fit in SAREA\n");
-+ xf86DrvMsg(pScreen->myNum, X_ERROR, "Data does not fit in SAREA\n");
- return FALSE;
- }
- pDRIInfo->SAREASize = SAREA_MAX;
- #endif
-
- if (!(pTDFXDRI = (TDFXDRIPtr)xnfcalloc(sizeof(TDFXDRIRec),1))) {
-+ xf86DrvMsg(pScreen->myNum, X_ERROR, "DRI memory allocation failed, disabling DRI.\n");
- DRIDestroyInfoRec(pTDFX->pDRIInfo);
- pTDFX->pDRIInfo=0;
- return FALSE;
-@@ -363,6 +378,8 @@
- pDRIInfo->devPrivate=0;
- DRIDestroyInfoRec(pTDFX->pDRIInfo);
- pTDFX->pDRIInfo=0;
-+ xf86DrvMsg(pScreen->myNum, X_ERROR, "DRIScreenInit failed, disabling DRI.\n");
-+
- return FALSE;
- }
-
-@@ -391,6 +408,7 @@
- if (drmAddMap(pTDFX->drmSubFD, (drmHandle)pTDFX->MMIOAddr[0],
- pTDFXDRI->regsSize, DRM_REGISTERS, 0, &pTDFXDRI->regs)<0) {
- TDFXDRICloseScreen(pScreen);
-+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap failed, disabling DRI.\n");
- return FALSE;
- }
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08lx\n",
-@@ -398,6 +416,7 @@
-
- if (!(TDFXInitVisualConfigs(pScreen))) {
- TDFXDRICloseScreen(pScreen);
-+ xf86DrvMsg(pScreen->myNum, X_ERROR, "TDFXInitVisualConfigs failed, disabling DRI.\n");
- return FALSE;
- }
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" );
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c.chmou Tue Sep 19 17:34:43 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c Tue Sep 19 18:30:25 2000
-@@ -636,7 +636,6 @@
- ClockRangePtr clockRanges;
- int i;
- MessageType from;
-- char *mod=0, *reqSym=0;
- int flags24;
- rgb defaultWeight = {0, 0, 0};
- pciVideoPtr match;
-@@ -663,7 +662,7 @@
-
- if (flags & PROBE_DETECT) {
- TDFXProbeDDC(pScrn, pTDFX->pEnt->index);
-- return FALSE;
-+ return TRUE;
- }
-
- /* The vgahw module should be loaded here when needed */
-@@ -1195,7 +1194,10 @@
- maxm=24;
- } else {
- minm=1;
-- maxm=64;
-+ maxm=57; /* This used to be 64, alas it seems the last 8 (funny that ?)
-+ * values cause jittering at lower resolutions. I've not done
-+ * any calculations to what the adjustment affects clock ranges,
-+ * but I can still run at 1600x1200@75Hz */
- }
- for (n=1; n<256; n++) {
- f_cur=REFFREQ*(n+2);
-@@ -1604,15 +1606,6 @@
- pTDFX = TDFXPTR(pScrn);
- pTDFX->stride = pScrn->displayWidth*pTDFX->cpp;
-
-- /* Layout the memory. Start with all the ram */
-- memRemaining=pScrn->videoRam<<10;
-- /* Remove the cursor space */
-- memRemaining-=4096;
-- /* Remove the main screen and offscreen pixmaps */
-- memRemaining-=pTDFX->stride*(pScrn->virtualY+128);
-- /* Remove one scanline for page alignment */
-- memRemaining-=4095;
-- /* Remove the back and Z buffers */
- if (pTDFX->cpp!=3) {
- screenSizeInTiles=calcBufferSize(pScrn->virtualX, pScrn->virtualY,
- TRUE, pTDFX->cpp);
-@@ -1622,41 +1615,77 @@
- screenSizeInTiles=calcBufferSize(pScrn->virtualX, pScrn->virtualY,
- TRUE, 4);
- }
-- memRemaining-=screenSizeInTiles*2;
--
-- /* Give all the rest to textures, rounded down to a page */
-- texSize=memRemaining&~0xFFF;
--
-- /* Make sure fifo has CMDFIFO_PAGES<fifoSize<255 pages */
-- if (memRemaining-texSize<CMDFIFO_PAGES<<12)
-- texSize=(memRemaining-(CMDFIFO_PAGES<<12))&~0xFFF;
-- /* Fifo uses the remaining space up to 255 pages */
-- fifoSize = (memRemaining-texSize)&~0xFFF;
-- if (fifoSize>255<<12) fifoSize=255<<12;
--
-- /* Assign the variables */
-- /* Cursor */
-- pTDFX->cursorOffset=0; /* Size 1024 bytes */
--
-- /* Point the fifo at the first page */
-+ memRemaining=((pScrn->videoRam<<10) - 1) &~ 0xFFF;
-+ /* Note that a page is 4096 bytes, and a */
-+ /* tile is 32 x 128 = 4096 bytes. So, */
-+ /* page and tile boundaries are the same */
-+ /* Place the depth offset first, forcing */
-+ /* it to be on an *odd* page boundary. */
-+ pTDFX->depthOffset = (memRemaining - screenSizeInTiles) &~ 0xFFF;
-+ if ((pTDFX->depthOffset & (0x1 << 12)) == 0) {
-+#if 0
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "Changing depth offset from 0x%08x to 0x%08x\n",
-+ pTDFX->depthOffset,
-+ pTDFX->depthOffset - (0x1 << 12));
-+#endif
-+ pTDFX->depthOffset -= (0x1 << 12);
-+ }
-+ /* Now, place the back buffer, forcing it */
-+ /* to be on an *even* page boundary. */
-+ pTDFX->backOffset = (pTDFX->depthOffset - screenSizeInTiles) &~ 0xFFF;
-+ if (pTDFX->backOffset & (0x1 << 12)) {
-+#if 0
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "Changing back offset from 0x%08x to 0x%08x\n",
-+ pTDFX->backOffset,
-+ pTDFX->backOffset - (0x1 << 12));
-+#endif
-+ pTDFX->backOffset -= (0x1 << 12);
-+ }
-+ /* Now, place the front buffer, forcing */
-+ /* it to be on a page boundary too, just */
-+ /* for giggles. */
-+ pTDFX->fbOffset
-+ = (pTDFX->backOffset - (pScrn->virtualY+128)*pTDFX->stride) &~ 0xFFF;
-+ /* Give the cmd fifo at least */
-+ /* CMDFIFO_PAGES pages, but no more than */
-+ /* 255. */
-+ fifoSize = ((255 <= CMDFIFO_PAGES) ? 255 : CMDFIFO_PAGES) << 12;
-+ /* We give 4096 bytes to the cursor, fifoSize to the */
-+ /* FIFO, and everything to textures. */
-+ texSize = (pTDFX->fbOffset - fifoSize - 4096);
-+ pTDFX->texOffset = pTDFX->fbOffset - texSize;
-+ pTDFX->texSize = texSize;
- pTDFX->fifoOffset = 4096;
- pTDFX->fifoSize = fifoSize;
--
-- /* Textures */
-- pTDFX->texOffset = pTDFX->fifoOffset+fifoSize;
-- pTDFX->texSize = texSize;
--
-- /* Frame buffer */
-- pTDFX->fbOffset=pTDFX->texOffset+pTDFX->texSize;
--
-- /* Back buffer */
-- pTDFX->backOffset=pTDFX->fbOffset+(pScrn->virtualY+128)*pTDFX->stride;
-- /* Round off to a page */
-- pTDFX->backOffset=(pTDFX->backOffset+4095)&~0xFFF;
--
-- /* Depth buffer */
-- pTDFX->depthOffset=pTDFX->backOffset+screenSizeInTiles;
--
-+ pTDFX->cursorOffset = 0;
-+#if 0
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "Cursor Offset: [0x%08X,0x%08X)\n",
-+ pTDFX->cursorOffset,
-+ pTDFX->cursorOffset+1024);
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "Fifo Offset: [0x%08X, 0x%08X)\n",
-+ pTDFX->fifoOffset,
-+ pTDFX->fifoOffset+fifoSize);
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "Texture Offset: [0x%08X, 0x%08X)\n",
-+ pTDFX->texOffset,
-+ pTDFX->texOffset + texSize);
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "Front Buffer Offset: [0x%08X, 0x%08X)\n",
-+ pTDFX->fbOffset,
-+ pTDFX->fbOffset + (pScrn->virtualY+128)*pTDFX->stride);
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "BackOffset: [0x%08X, 0x%08X)\n",
-+ pTDFX->backOffset,
-+ pTDFX->backOffset+screenSizeInTiles);
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+ "DepthOffset: [0x%08X, 0x%08X)\n",
-+ pTDFX->depthOffset,
-+ pTDFX->depthOffset+screenSizeInTiles);
-+#endif /* 0/1 */
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Textures Memory %0.02f MB\n",
- (float)texSize/1024.0/1024.0);
- }
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c.chmou Tue Sep 19 17:34:43 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c Tue Sep 19 18:30:25 2000
-@@ -163,12 +163,22 @@
- } else {
- int chip;
- int stride, bits;
-+ int TileAperturePitch, lg2TileAperturePitch;
- if (pTDFX->cpp==2) stride=pTDFX->stride;
- else stride=4*pTDFX->stride/pTDFX->cpp;
- bits=pTDFX->backOffset>>12;
-+ for (lg2TileAperturePitch = 0, TileAperturePitch = 1024;
-+ (lg2TileAperturePitch < 5) &&
-+ TileAperturePitch < stride;
-+ lg2TileAperturePitch += 1, TileAperturePitch <<= 1);
-+#if 0
-+ fprintf(stderr, "Using %d (== lg2(%d)-10) for tile aperture pitch\n",
-+ lg2TileAperturePitch, TileAperturePitch);
-+ fprintf(stderr, "stride == %d\n", stride);
-+#endif
- for (chip=0; chip<pTDFX->numChips; chip++) {
- TDFXWriteChipLongMMIO(pTDFX, chip, LFBMEMORYCONFIG, (bits&0x1FFF) |
-- SST_RAW_LFB_ADDR_STRIDE_4K |
-+ SST_RAW_LFB_ADDR_STRIDE(lg2TileAperturePitch) |
- ((bits&0x6000)<<10) |
- ((stride+127)/128)<<SST_RAW_LFB_TILE_STRIDE_SHIFT);
- }
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_sli.c.chmou Tue Sep 19 17:34:43 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_sli.c Tue Sep 19 18:30:25 2000
-@@ -1,4 +1,3 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_sli.c,v 1.2 2000/06/17 18:23:23 dawes Exp $ */
-
- #include "xf86.h"
- #include "xf86_ansic.h"
---- XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h.chmou Tue Sep 19 17:34:43 2000
-+++ XFree86-4.0.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h Tue Sep 19 18:30:25 2000
-@@ -52,8 +52,26 @@
-
- #define MEM_TYPE_SGRAM 0
- #define MEM_TYPE_SDRAM 1
-+/*
-+ * SST_RAW_LFB_ADDR_STRIDE(Lg2SizeInK) takes the
-+ * lfbMemoryConfig value for SGRAMStrideInTiles. This
-+ * is given by this table:
-+ * SGRAMStrideInBytes lfbMemoryConfig Value
-+ * ================== =====================
-+ * 1k 0
-+ * 2k 1
-+ * 4k 2
-+ * 8k 3
-+ * 16k 4
-+ *
-+ * FWIW, the right hand column is log2(left hand column)-10
-+ */
- #define SST_RAW_LFB_ADDR_STRIDE_SHIFT 13
--#define SST_RAW_LFB_ADDR_STRIDE_4K 0x2<<SST_RAW_LFB_ADDR_STRIDE_SHIFT
-+#define SST_RAW_LFB_ADDR_STRIDE(Lg2SizeInK) \
-+ ((Lg2SizeInK)<<SST_RAW_LFB_ADDR_STRIDE_SHIFT)
-+#define SST_RAW_LFB_ADDR_STRIDE_4K SST_RAW_LFB_ADDR_STRIDE(2)
-+#define SST_RAW_LFB_ADDR_STRIDE_8K SST_RAW_LFB_ADDR_STRIDE(3)
-+#define SST_RAW_LFB_ADDR_STRIDE_16K SST_RAW_LFB_ADDR_STRIDE(4)
- #define SST_RAW_LFB_TILE_STRIDE_SHIFT 16
-
- #define BLIT_LEFT 1
+++ /dev/null
---- XFree86-4.0.2/xc/include/Xos.h.tm Wed Feb 14 19:43:19 2001
-+++ XFree86-4.0.2/xc/include/Xos.h Wed Feb 14 19:45:26 2001
-@@ -149,6 +149,14 @@ extern int sys_nerr;
- #endif /* CSRG_BASED */
-
- /*
-+ * Get struct tm
-+ */
-+
-+#if defined(__linux__)
-+#include <time.h>
-+#endif
-+
-+/*
- * Get struct timeval
- */
-
-
-
+++ /dev/null
---- XFree86-4.0.0/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c.cls Fri Feb 25 21:38:49 2000
-+++ XFree86-4.0.0/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c Sun Mar 12 18:30:45 2000
-@@ -642,6 +642,8 @@
- if (flags & PROBE_DETECT)
- return FALSE;
-
-+ drv->refCount++; /* we don't want X to unload us, we're special */
-+
- xf86XVRegisterGenericAdaptorDriver(V4LInit);
- return TRUE;
- }
+++ /dev/null
-diff -c -N -r xc.old/config/cf/X11.tmpl xc/config/cf/X11.tmpl
-*** xc.old/config/cf/X11.tmpl Mon Mar 2 03:55:22 1998
---- xc/config/cf/X11.tmpl Sat Apr 11 13:56:54 1998
-***************
-*** 202,207 ****
---- 202,213 ----
- #ifndef BuildXF86DGALibrary
- #define BuildXF86DGALibrary BuildXF86DGA
- #endif
-+ #ifndef BuildXF86RushExt
-+ #define BuildXF86RushExt NO
-+ #endif
-+ #ifndef BuildXF86RushLibrary
-+ #define BuildXF86RushLibrary BuildXF86RushExt
-+ #endif
- #ifndef BuildDPMSExt
- #define BuildDPMSExt NO
- #endif
-***************
-*** 992,997 ****
---- 998,1019 ----
- #endif
- #endif
-
-+ #if BuildXF86RushLibrary
-+ #ifndef SharedLibXxf86rush
-+ #define SharedLibXxf86rush YES
-+ #endif
-+ #ifndef NormalLibXxf86rush
-+ #define NormalLibXxf86rush YES
-+ #endif
-+ #ifndef DebugLibXxf86rush
-+ #define DebugLibXxf86rush NO
-+ #endif
-+ #ifndef ProfileLibXxf86rush
-+ #define ProfileLibXxf86rush NO
-+ #endif
-+ #endif
-+
-+
- #if BuildDPMSLibrary
- #ifndef SharedLibXdpms
- #define SharedLibXdpms NO
-***************
-*** 1078,1083 ****
---- 1100,1117 ----
- SharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev)
- #else
- ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir)
-+ #endif
-+ #endif
-+
-+ #if BuildXF86RushLibrary
-+ XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush
-+ #if SharedLibXxf86rush
-+ #ifndef SharedXxf86RushRev
-+ #define SharedXxf86RushRev 1.0
-+ #endif
-+ SharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),SOXXF86RUSHREV,SharedXxf86RushRev)
-+ #else
-+ ProjectUnsharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir)
- #endif
- #endif
-
-diff -c -N -r xc.old/config/cf/xfree86.cf xc/config/cf/xfree86.cf
-*** xc.old/config/cf/xfree86.cf Mon Mar 2 03:55:22 1998
---- xc/config/cf/xfree86.cf Sat Apr 11 15:34:02 1998
-***************
-*** 619,624 ****
---- 619,627 ----
- #ifndef BuildDPMSLibrary
- #define BuildDPMSLibrary YES
- #endif
-+ #ifndef BuildXF86RushLibrary
-+ #define BuildXF86RushLibrary YES
-+ #endif
-
- /*
- * Build the XFree86-VidMode extension
-***************
-*** 673,678 ****
---- 676,688 ----
- #define BuildDPMSExt YES
- #endif
-
-+ /*
-+ * Build the Rush extension support
-+ */
-+ #ifndef BuildXF86RushExt
-+ #define BuildXF86RushExt YES
-+ #endif
-+
- #if Malloc0ReturnsNull
- #ifndef XtMalloc0ReturnsNullDefines
- #define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC
-***************
-*** 764,769 ****
---- 774,785 ----
- #define XFree86DGADefines /**/
- #endif
-
-+ #if BuildXF86RushExt
-+ #define XFree86RushDefines -DXFreeXRUSH
-+ #else
-+ #define XFree86RushDefines /**/
-+ #endif
-+
- #ifndef MakeHasPosixVariableSubstitutions
- #if !HasBsdMake
- #define MakeHasPosixVariableSubstitutions NO
-***************
-*** 774,780 ****
-
- /* Server defines required for all OSs */
- #ifndef XFree86ServerDefines
-! #define XFree86ServerDefines -DSTATIC_COLOR -DAVOID_GLYPHBLT -DPIXPRIV LinkKitDefines XFree86DGADefines
- #endif
-
- #ifndef XFree86ServerOSDefines
---- 790,796 ----
-
- /* Server defines required for all OSs */
- #ifndef XFree86ServerDefines
-! #define XFree86ServerDefines -DSTATIC_COLOR -DAVOID_GLYPHBLT -DPIXPRIV LinkKitDefines XFree86DGADefines XFree86RushDefines
- #endif
-
- #ifndef XFree86ServerOSDefines
-*** xc.old/include/extensions/Imakefile Sun Jan 12 02:39:14 1997
---- xc/include/extensions/Imakefile Sun Apr 5 17:34:16 1998
-***************
-*** 14,19 ****
---- 14,22 ----
- #if BuildXF86DGALibrary
- XF86DGAHEADERS = xf86dga.h xf86dgastr.h
- #endif
-+ #if BuildXF86RushLibrary
-+ XF86RUSHHEADERS = xf86rush.h xf86rushstr.h
-+ #endif
- #if BuildLBX
- LBXHEADERS = lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h lbxstr.h lbxzlib.h
- #endif
-***************
-*** 21,27 ****
- DPMSHEADERS = dpms.h dpmsstr.h
- #endif
-
-! EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XF86MISCHEADERS) $(LBXHEADERS) $(DPMSHEADERS)
-
-
-
---- 24,30 ----
- DPMSHEADERS = dpms.h dpmsstr.h
- #endif
-
-! EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XF86RUSHHEADERS) $(XF86MISCHEADERS) $(LBXHEADERS) $(DPMSHEADERS)
-
-
-
-diff -c -N -r xc.old/include/extensions/xf86rush.h xc/include/extensions/xf86rush.h
-*** xc.old/include/extensions/xf86rush.h Wed Dec 31 16:00:00 1969
---- xc/include/extensions/xf86rush.h Sun Apr 19 15:56:23 1998
-***************
-*** 0 ****
---- 1,70 ----
-+ /* $$ */
-+ /*
-+
-+ Copyright (c) 1998 Daryll Strauss
-+
-+ */
-+
-+ #ifndef _XF86RUSH_H_
-+ #define _XF86RUSH_H_
-+
-+ #include <X11/Xfuncproto.h>
-+
-+ #define X_XF86RushQueryVersion 0
-+ #define X_XF86RushLockPixmap 1
-+ #define X_XF86RushUnlockPixmap 2
-+ #define X_XF86RushUnlockAllPixmaps 3
-+
-+ #define XF86RushNumberEvents 0
-+
-+ #define XF86RushClientNotLocal 0
-+ #define XF86RushNumberErrors (XF86RushClientNotLocal + 1)
-+
-+ #ifndef _XF86RUSH_SERVER_
-+
-+ _XFUNCPROTOBEGIN
-+
-+ Bool XF86RushQueryVersion(
-+ #if NeedFunctionPrototypes
-+ Display* /* dpy */,
-+ int* /* majorVersion */,
-+ int* /* minorVersion */
-+ #endif
-+ );
-+
-+ Bool XF86RushQueryExtension(
-+ #if NeedFunctionPrototypes
-+ Display* /* dpy */,
-+ int* /* event_base */,
-+ int* /* error_base */
-+ #endif
-+ );
-+
-+ Bool XF86RushLockPixmap(
-+ #if NeedFunctionPrototypes
-+ Display * /* dpy */,
-+ int /* screen */,
-+ Pixmap /* Pixmap */,
-+ void ** /* Return address */
-+ #endif
-+ );
-+
-+ Bool XF86RushUnlockPixmap(
-+ #if NeedFunctionPrototypes
-+ Display * /* dpy */,
-+ int /* screen */,
-+ Pixmap /* Pixmap */
-+ #endif
-+ );
-+
-+ Bool XF86RushUnlockAllPixmaps(
-+ #if NeedFunctionPrototypes
-+ Display * /* dpy */
-+ #endif
-+ );
-+
-+ _XFUNCPROTOEND
-+
-+ #endif /* _XF86RUSH_SERVER_ */
-+
-+ #endif /* _XF86RUSH_H_ */
-diff -c -N -r xc.old/include/extensions/xf86rushstr.h xc/include/extensions/xf86rushstr.h
-*** xc.old/include/extensions/xf86rushstr.h Wed Dec 31 16:00:00 1969
---- xc/include/extensions/xf86rushstr.h Sun Apr 5 21:44:32 1998
-***************
-*** 0 ****
---- 1,82 ----
-+ /* $$ */
-+ /*
-+
-+ Copyright (c) 1998 Daryll Strauss
-+
-+ */
-+
-+ #ifndef _XF86RUSHSTR_H_
-+ #define _XF86RUSHSTR_H_
-+
-+ #include "xf86rush.h"
-+
-+ #define XF86RUSHNAME "XFree86-Rush"
-+
-+ #define XF86RUSH_MAJOR_VERSION 1 /* current version numbers */
-+ #define XF86RUSH_MINOR_VERSION 0
-+
-+ typedef struct _XF86RushQueryVersion {
-+ CARD8 reqType; /* always RushReqCode */
-+ CARD8 rushReqType; /* always X_RushQueryVersion */
-+ CARD16 length B16;
-+ } xXF86RushQueryVersionReq;
-+ #define sz_xXF86RushQueryVersionReq 4
-+
-+ typedef struct {
-+ BYTE type; /* X_Reply */
-+ BOOL pad1;
-+ CARD16 sequenceNumber B16;
-+ CARD32 length B32;
-+ CARD16 majorVersion B16; /* major version of Rush protocol */
-+ CARD16 minorVersion B16; /* minor version of Rush protocol */
-+ CARD32 pad2 B32;
-+ CARD32 pad3 B32;
-+ CARD32 pad4 B32;
-+ CARD32 pad5 B32;
-+ CARD32 pad6 B32;
-+ } xXF86RushQueryVersionReply;
-+ #define sz_xXF86RushQueryVersionReply 32
-+
-+ typedef struct _XF86RushLockPixmap {
-+ CARD8 reqType; /* always RushReqCode */
-+ CARD8 rushReqType; /* always X_RushLockPixmap */
-+ CARD16 length B16;
-+ CARD16 screen B16;
-+ CARD16 pad B16;
-+ CARD32 pixmap B32;
-+ } xXF86RushLockPixmapReq;
-+ #define sz_xXF86RushLockPixmapReq 12
-+
-+ typedef struct {
-+ BYTE type;
-+ BOOL pad1;
-+ CARD16 sequenceNumber B16;
-+ CARD32 length B32;
-+ CARD32 addr B32;
-+ CARD32 pad2 B32;
-+ CARD32 pad3 B32;
-+ CARD32 pad4 B32;
-+ CARD32 pad5 B32;
-+ CARD32 pad6 B32;
-+ } xXF86RushLockPixmapReply;
-+ #define sz_xXF86RushLockPixmapReply 32
-+
-+ typedef struct _XF86RushUnlockPixmap {
-+ CARD8 reqType; /* always RushReqCode */
-+ CARD8 rushReqType; /* always X_RushUnlockPixmap */
-+ CARD16 length B16;
-+ CARD16 screen B16;
-+ CARD16 pad B16;
-+ CARD32 pixmap B32;
-+ } xXF86RushUnlockPixmapReq;
-+ #define sz_xXF86RushUnlockPixmapReq 12
-+
-+ typedef struct _XF86RushUnlockAllPixmaps {
-+ CARD8 reqType; /* always RushReqCode */
-+ CARD8 rushReqType; /* always X_RushUnlockAllPixmaps */
-+ CARD16 length B16;
-+ } xXF86RushUnlockAllPixmapsReq;
-+ #define sz_xXF86RushUnlockAllPixmapsReq 4
-+
-+ #endif /* _XF86RUSHSTR_H_ */
-+
-diff -c -N -r xc.old/lib/Imakefile xc/lib/Imakefile
-*** xc.old/lib/Imakefile Sat Jul 5 08:55:33 1997
---- xc/lib/Imakefile Sat Apr 11 13:24:59 1998
-***************
-*** 39,45 ****
- XF86DGALIB = Xxf86dga
- #endif
-
-! XF86EXTLIBS = $(XF86MISCLIB) $(XF86VMLIB) $(XF86DGALIB)
-
- #if BuildDPMSLibrary
- XDPMSLIBDIR = Xdpms
---- 39,49 ----
- XF86DGALIB = Xxf86dga
- #endif
-
-! #if BuildXF86RushLibrary
-! XF86RUSHLIB = Xxf86rush
-! #endif
-!
-! XF86EXTLIBS = $(XF86MISCLIB) $(XF86VMLIB) $(XF86DGALIB) $(XF86RUSHLIB)
-
- #if BuildDPMSLibrary
- XDPMSLIBDIR = Xdpms
-***************
-*** 61,67 ****
-
- #if !BuildServersOnly
- LINTSUBDIRS = Xau Xdmcp $(THRSTUBLIB) X11 oldX ICE SM Xext Xt \
-! $(SSLIB) $(XF86MISCLIB) $(XF86VMLIB) $(XF86DGALIB) \
- Xmu Xaw XIE Xi Xtst FS \
- PEX5 $(XKBLIBDIR) $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) \
- $(XDPMSLIBDIR) \
---- 65,71 ----
-
- #if !BuildServersOnly
- LINTSUBDIRS = Xau Xdmcp $(THRSTUBLIB) X11 oldX ICE SM Xext Xt \
-! $(SSLIB) $(XF86MISCLIB) $(XF86VMLIB) $(XF86DGALIB) $(XF86RUSHLIB) \
- Xmu Xaw XIE Xi Xtst FS \
- PEX5 $(XKBLIBDIR) $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) \
- $(XDPMSLIBDIR) \
-diff -c -N -r xc.old/lib/Xext/XF86Rush.c xc/lib/Xext/XF86Rush.c
-*** xc.old/lib/Xext/XF86Rush.c Wed Dec 31 16:00:00 1969
---- xc/lib/Xext/XF86Rush.c Sun Apr 5 18:01:55 1998
-***************
-*** 0 ****
---- 1,163 ----
-+ /* $$ */
-+ /*
-+
-+ Copyright (c) 1998 Daryll Strauss
-+
-+ */
-+
-+ /* THIS IS NOT AN X CONSORTIUM STANDARD */
-+
-+ #define NEED_EVENTS
-+ #define NEED_REPLIES
-+ #include "Xlibint.h"
-+ #include "xf86rushstr.h"
-+ #include "Xext.h"
-+ #include "extutil.h"
-+
-+ static XExtensionInfo _xf86rush_info_data;
-+ static XExtensionInfo *xf86rush_info = &_xf86rush_info_data;
-+ static char *xf86rush_extension_name = XF86RUSHNAME;
-+
-+ #define XF86RushCheckExtension(dpy,i,val) \
-+ XextCheckExtension (dpy, i, xf86rush_extension_name, val)
-+
-+ /*****************************************************************************
-+ * *
-+ * private utility routines *
-+ * *
-+ *****************************************************************************/
-+
-+ static int close_display();
-+ static /* const */ XExtensionHooks xf86rush_extension_hooks = {
-+ NULL, /* create_gc */
-+ NULL, /* copy_gc */
-+ NULL, /* flush_gc */
-+ NULL, /* free_gc */
-+ NULL, /* create_font */
-+ NULL, /* free_font */
-+ close_display, /* close_display */
-+ NULL, /* wire_to_event */
-+ NULL, /* event_to_wire */
-+ NULL, /* error */
-+ NULL, /* error_string */
-+ };
-+
-+ static XEXT_GENERATE_FIND_DISPLAY (find_display, xf86rush_info,
-+ xf86rush_extension_name,
-+ &xf86rush_extension_hooks,
-+ 0, NULL)
-+
-+ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86rush_info)
-+
-+
-+ /*****************************************************************************
-+ * *
-+ * public XFree86-DGA Extension routines *
-+ * *
-+ *****************************************************************************/
-+
-+ Bool XF86RushQueryExtension (dpy, event_basep, error_basep)
-+ Display *dpy;
-+ int *event_basep, *error_basep;
-+ {
-+ XExtDisplayInfo *info = find_display (dpy);
-+
-+ if (XextHasExtension(info)) {
-+ *event_basep = info->codes->first_event;
-+ *error_basep = info->codes->first_error;
-+ return True;
-+ } else {
-+ return False;
-+ }
-+ }
-+
-+ Bool XF86RushQueryVersion(dpy, majorVersion, minorVersion)
-+ Display* dpy;
-+ int* majorVersion;
-+ int* minorVersion;
-+ {
-+ XExtDisplayInfo *info = find_display (dpy);
-+ xXF86RushQueryVersionReply rep;
-+ xXF86RushQueryVersionReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+
-+ LockDisplay(dpy);
-+ GetReq(XF86RushQueryVersion, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->dgaReqType = X_XF86RushQueryVersion;
-+ if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return False;
-+ }
-+ *majorVersion = rep.majorVersion;
-+ *minorVersion = rep.minorVersion;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-+
-+ Bool XF86RushLockPixmap(dpy, screen, pixmap, addr)
-+ Display *dpy;
-+ int screen;
-+ Pixmap pixmap;
-+ void **addr;
-+ {
-+ XExtDisplayInfo *info = find_display (dpy);
-+ xXF86RushLockPixmapReply rep;
-+ xXF86RushLockPixmapReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+ LockDisplay(dpy);
-+ GetReq(XF86RushLockPixmap, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->dgaReqType = X_XF86RushLockPixmap;
-+ req->screen=screen;
-+ req->pixmap=pixmap;
-+ if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return False;
-+ }
-+ *addr=(void*)rep.addr;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-+
-+ Bool XF86RushUnlockPixmap(dpy, screen, pixmap)
-+ Display *dpy;
-+ int screen;
-+ Pixmap pixmap;
-+ {
-+ XExtDisplayInfo *info = find_display(dpy);
-+ xXF86RushUnlockPixmapReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+ LockDisplay(dpy);
-+ GetReq(XF86RushUnlockPixmap, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->dgaReqType = X_XF86RushUnlockPixmap;
-+ req->screen=screen;
-+ req->pixmap=pixmap;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-+
-+ Bool XF86RushUnlockAllPixmaps(dpy)
-+ Display *dpy;
-+ {
-+ XExtDisplayInfo *info = find_display(dpy);
-+ xXF86RushUnlockAllPixmapsReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+ LockDisplay(dpy);
-+ GetReq(XF86RushUnlockAllPixmaps, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->dgaReqType = X_XF86RushUnlockAllPixmaps;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-diff -c -N -r xc.old/lib/Xxf86rush/Imakefile xc/lib/Xxf86rush/Imakefile
-*** xc.old/lib/Xxf86rush/Imakefile Wed Dec 31 16:00:00 1969
---- xc/lib/Xxf86rush/Imakefile Sat Apr 11 13:29:38 1998
-***************
-*** 0 ****
---- 1,33 ----
-+ XCOMM $$
-+ #define DoNormalLib NormalLibXxf86rush
-+ #define DoSharedLib SharedLibXxf86rush
-+ #define DoDebugLib DebugLibXxf86rush
-+ #define DoProfileLib ProfileLibXxf86rush
-+ #define LibName Xxf86rush
-+ #define SoRev SOXXF86RUSHREV
-+ #define LibHeaders NO
-+
-+ #include <Threads.tmpl>
-+
-+ #ifdef SharedXxf86rushReqs
-+ REQUIREDLIBS = SharedXxf86rushReqs
-+ #endif
-+
-+ XF86RUSHSRCS = XF86Rush.c
-+ XF86RUSHOBJS = XF86Rush.o
-+
-+ #if Malloc0ReturnsNull
-+ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
-+ #endif
-+
-+ DEFINES = $(ALLOC_DEFINES)
-+ INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC)
-+ SRCS = $(XF86RUSHSRCS)
-+ OBJS = $(XF86RUSHOBJS)
-+ LINTLIBS = $(LINTXLIB)
-+
-+ #include <Library.tmpl>
-+
-+ DependTarget()
-+
-+
-diff -c -N -r xc.old/lib/Xxf86rush/XF86Rush.c xc/lib/Xxf86rush/XF86Rush.c
-*** xc.old/lib/Xxf86rush/XF86Rush.c Wed Dec 31 16:00:00 1969
---- xc/lib/Xxf86rush/XF86Rush.c Sat Apr 11 13:55:40 1998
-***************
-*** 0 ****
---- 1,163 ----
-+ /* $$ */
-+ /*
-+
-+ Copyright (c) 1998 Daryll Strauss
-+
-+ */
-+
-+ /* THIS IS NOT AN X CONSORTIUM STANDARD */
-+
-+ #define NEED_EVENTS
-+ #define NEED_REPLIES
-+ #include "Xlibint.h"
-+ #include "xf86rushstr.h"
-+ #include "Xext.h"
-+ #include "extutil.h"
-+
-+ static XExtensionInfo _xf86rush_info_data;
-+ static XExtensionInfo *xf86rush_info = &_xf86rush_info_data;
-+ static char *xf86rush_extension_name = XF86RUSHNAME;
-+
-+ #define XF86RushCheckExtension(dpy,i,val) \
-+ XextCheckExtension (dpy, i, xf86rush_extension_name, val)
-+
-+ /*****************************************************************************
-+ * *
-+ * private utility routines *
-+ * *
-+ *****************************************************************************/
-+
-+ static int close_display();
-+ static /* const */ XExtensionHooks xf86rush_extension_hooks = {
-+ NULL, /* create_gc */
-+ NULL, /* copy_gc */
-+ NULL, /* flush_gc */
-+ NULL, /* free_gc */
-+ NULL, /* create_font */
-+ NULL, /* free_font */
-+ close_display, /* close_display */
-+ NULL, /* wire_to_event */
-+ NULL, /* event_to_wire */
-+ NULL, /* error */
-+ NULL, /* error_string */
-+ };
-+
-+ static XEXT_GENERATE_FIND_DISPLAY (find_display, xf86rush_info,
-+ xf86rush_extension_name,
-+ &xf86rush_extension_hooks,
-+ 0, NULL)
-+
-+ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86rush_info)
-+
-+
-+ /*****************************************************************************
-+ * *
-+ * public XFree86-DGA Extension routines *
-+ * *
-+ *****************************************************************************/
-+
-+ Bool XF86RushQueryExtension (dpy, event_basep, error_basep)
-+ Display *dpy;
-+ int *event_basep, *error_basep;
-+ {
-+ XExtDisplayInfo *info = find_display (dpy);
-+
-+ if (XextHasExtension(info)) {
-+ *event_basep = info->codes->first_event;
-+ *error_basep = info->codes->first_error;
-+ return True;
-+ } else {
-+ return False;
-+ }
-+ }
-+
-+ Bool XF86RushQueryVersion(dpy, majorVersion, minorVersion)
-+ Display* dpy;
-+ int* majorVersion;
-+ int* minorVersion;
-+ {
-+ XExtDisplayInfo *info = find_display (dpy);
-+ xXF86RushQueryVersionReply rep;
-+ xXF86RushQueryVersionReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+
-+ LockDisplay(dpy);
-+ GetReq(XF86RushQueryVersion, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->rushReqType = X_XF86RushQueryVersion;
-+ if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return False;
-+ }
-+ *majorVersion = rep.majorVersion;
-+ *minorVersion = rep.minorVersion;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-+
-+ Bool XF86RushLockPixmap(dpy, screen, pixmap, addr)
-+ Display *dpy;
-+ int screen;
-+ Pixmap pixmap;
-+ void **addr;
-+ {
-+ XExtDisplayInfo *info = find_display (dpy);
-+ xXF86RushLockPixmapReply rep;
-+ xXF86RushLockPixmapReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+ LockDisplay(dpy);
-+ GetReq(XF86RushLockPixmap, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->rushReqType = X_XF86RushLockPixmap;
-+ req->screen=screen;
-+ req->pixmap=pixmap;
-+ if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return False;
-+ }
-+ *addr=(void*)rep.addr;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-+
-+ Bool XF86RushUnlockPixmap(dpy, screen, pixmap)
-+ Display *dpy;
-+ int screen;
-+ Pixmap pixmap;
-+ {
-+ XExtDisplayInfo *info = find_display(dpy);
-+ xXF86RushUnlockPixmapReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+ LockDisplay(dpy);
-+ GetReq(XF86RushUnlockPixmap, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->rushReqType = X_XF86RushUnlockPixmap;
-+ req->screen=screen;
-+ req->pixmap=pixmap;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-+
-+ Bool XF86RushUnlockAllPixmaps(dpy)
-+ Display *dpy;
-+ {
-+ XExtDisplayInfo *info = find_display(dpy);
-+ xXF86RushUnlockAllPixmapsReq *req;
-+
-+ XF86RushCheckExtension (dpy, info, False);
-+ LockDisplay(dpy);
-+ GetReq(XF86RushUnlockAllPixmaps, req);
-+ req->reqType = info->codes->major_opcode;
-+ req->rushReqType = X_XF86RushUnlockAllPixmaps;
-+ UnlockDisplay(dpy);
-+ SyncHandle();
-+ return True;
-+ }
-diff -c -N -r xc.old/programs/Xserver/Xext/Imakefile ./Xext/Imakefile
-*** xc.old/programs/Xserver/Xext/Imakefile Fri Jan 23 04:35:11 1998
---- xc/programs/Xserver/Xext/Imakefile Sun Apr 4 18:13:41 1999
-***************
-*** 32,37 ****
---- 32,42 ----
- DPMSOBJS = dpms.o
- #endif
-
-+ #if BuildXF86RushExt
-+ XF86RRUSHSRCS = xf86Rush.c
-+ XF86RUSHOBJS = xf86Rush.o
-+ #endif
-+
- #if BuildAppgroup
- APPGROUPSRCS = appgroup.c
- APPGROUPOBJS = appgroup.o
-***************
-*** 47,59 ****
- mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \
- bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \
- $(XF86MISCSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \
-! $(DPMSSRCS) \
- $(APPGROUPSRCS) xprint.c
- OBJS = shape.o $(SHMOBJS) mbuf.o \
- mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \
- bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \
- $(XF86MISCOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \
-! $(DPMSOBJS) \
- $(APPGROUPOBJS) xprint.o
-
- XF86INCLUDES = -I../hw/xfree86/common -I../hw/xfree86/os-support
---- 52,64 ----
- mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \
- bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \
- $(XF86MISCSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \
-! $(DPMSSRCS) $(XF86RUSHSRCS) \
- $(APPGROUPSRCS) xprint.c
- OBJS = shape.o $(SHMOBJS) mbuf.o \
- mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \
- bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \
- $(XF86MISCOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \
-! $(DPMSOBJS) $(XF86RUSHOBJS) \
- $(APPGROUPOBJS) xprint.o
-
- XF86INCLUDES = -I../hw/xfree86/common -I../hw/xfree86/os-support
-diff -c -N -r xc.old/programs/Xserver/Xext/xf86Rush.c ./Xext/xf86Rush.c
-*** xc.old/programs/Xserver/Xext/xf86Rush.c Wed Dec 31 16:00:00 1969
---- xc/programs/Xserver/Xext/xf86Rush.c Sun Apr 4 18:13:41 1999
-***************
-*** 0 ****
---- 1,213 ----
-+ /* $XFree86: $ */
-+
-+ /*
-+
-+ Copyright (c) 1998 Daryll Strauss
-+
-+ */
-+
-+ #define NEED_REPLIES
-+ #define NEED_EVENTS
-+ #include "X.h"
-+ #include "Xproto.h"
-+ #include "misc.h"
-+ #include "dixstruct.h"
-+ #include "extnsionst.h"
-+ #include "colormapst.h"
-+ #include "cursorstr.h"
-+ #include "scrnintstr.h"
-+ #include "servermd.h"
-+ #define _XF86RUSH_SERVER_
-+ #include "xf86rushstr.h"
-+ #include "swaprep.h"
-+ #include "../hw/xfree86/common/xf86.h"
-+ #include <dlfcn.h>
-+
-+ #include <X11/Xtrans.h>
-+ #include "../os/osdep.h"
-+ #include <X11/Xauth.h>
-+ #ifndef ESIX
-+ #ifndef Lynx
-+ #include <sys/socket.h>
-+ #else
-+ #include <socket.h>
-+ #endif
-+ #else
-+ #include <lan/socket.h>
-+ #endif
-+
-+ extern int xf86ScreenIndex;
-+ static unsigned char RushReqCode = 0;
-+ static int RushErrorBase;
-+
-+ static DISPATCH_PROC(ProcXF86RushDispatch);
-+ static DISPATCH_PROC(ProcRushQueryVersion);
-+ static DISPATCH_PROC(ProcRushLockPixmap);
-+ static DISPATCH_PROC(ProcRushUnlockPixmap);
-+ static DISPATCH_PROC(ProcRushUnlockAllPixmaps);
-+
-+ static DISPATCH_PROC(SProcXF86RushDispatch);
-+
-+ static void XF86RushResetProc(
-+ #if NeedFunctionPrototypes
-+ ExtensionEntry* /* extEntry */
-+ #endif
-+ );
-+
-+ void
-+ XFree86RushExtensionInit()
-+ {
-+ ExtensionEntry* extEntry;
-+
-+ if (
-+ (extEntry = AddExtension(XF86RUSHNAME,
-+ XF86RushNumberEvents,
-+ XF86RushNumberErrors,
-+ ProcXF86RushDispatch,
-+ SProcXF86RushDispatch,
-+ XF86RushResetProc,
-+ StandardMinorOpcode))) {
-+ RushReqCode = (unsigned char)extEntry->base;
-+ RushErrorBase = extEntry->errorBase;
-+ }
-+ }
-+
-+ /*ARGSUSED*/
-+ static void
-+ XF86RushResetProc (extEntry)
-+ ExtensionEntry* extEntry;
-+ {
-+ }
-+
-+ static int
-+ ProcRushQueryVersion(client)
-+ register ClientPtr client;
-+ {
-+ xXF86RushQueryVersionReply rep;
-+ register int n;
-+
-+ REQUEST_SIZE_MATCH(xXF86RushQueryVersionReq);
-+ rep.type = X_Reply;
-+ rep.length = 0;
-+ rep.sequenceNumber = client->sequence;
-+ rep.majorVersion = XF86RUSH_MAJOR_VERSION;
-+ rep.minorVersion = XF86RUSH_MINOR_VERSION;
-+ if (client->swapped) {
-+ swaps(&rep.sequenceNumber, n);
-+ swapl(&rep.length, n);
-+ }
-+ WriteToClient(client, sizeof(xXF86RushQueryVersionReply), (char *)&rep);
-+ return (client->noClientException);
-+ }
-+
-+ static int
-+ ProcXF86RushLockPixmap(client)
-+ register ClientPtr client;
-+ {
-+ REQUEST(xXF86RushLockPixmapReq);
-+ xXF86RushLockPixmapReply rep;
-+ ScrnInfoPtr vptr;
-+ PixmapPtr pix;
-+ void *handle;
-+ void *(*func)();
-+
-+ if (stuff->screen > screenInfo.numScreens)
-+ return BadValue;
-+
-+ vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr;
-+
-+ REQUEST_SIZE_MATCH(xXF86RushLockPixmapReq);
-+ rep.type = X_Reply;
-+ rep.length = 0;
-+ rep.sequenceNumber = client->sequence;
-+ pix = (PixmapPtr)SecurityLookupIDByType(client,
-+ stuff->pixmap, RT_PIXMAP,
-+ SecurityReadAccess);
-+ handle=dlopen(0, 0);
-+ if (handle) {
-+ func=(void*(*)())dlsym(handle, "xf86LockPixmap");
-+ dlclose(handle);
-+ }
-+ if (handle && func) rep.addr=(int)func(pix);
-+ else rep.addr = 0;
-+
-+ WriteToClient(client, SIZEOF(xXF86RushLockPixmapReply), (char*)&rep);
-+ return client->noClientException;
-+ }
-+
-+ static int
-+ ProcXF86RushUnlockPixmap(client)
-+ register ClientPtr client;
-+ {
-+ REQUEST(xXF86RushUnlockPixmapReq);
-+ ScrnInfoPtr vptr;
-+ PixmapPtr pix;
-+ void *handle;
-+ void (*func)();
-+
-+ if (stuff->screen > screenInfo.numScreens)
-+ return BadValue;
-+
-+ vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr;
-+ REQUEST_SIZE_MATCH(xXF86RushUnlockPixmapReq);
-+ pix = (PixmapPtr)SecurityLookupIDByType(client,
-+ stuff->pixmap, RT_PIXMAP,
-+ SecurityReadAccess);
-+ handle=dlopen(0, 0);
-+ if (handle) {
-+ func=(void(*)())dlsym(handle, "xf86UnlockPixmap");
-+ dlclose(handle);
-+ }
-+ if (handle && func) func(pix);
-+ return client->noClientException;
-+ }
-+
-+ static int
-+ ProcXF86RushUnlockAllPixmaps(client)
-+ register ClientPtr client;
-+ {
-+ void *handle;
-+ void (*func)();
-+
-+ REQUEST(xXF86RushUnlockAllPixmapsReq);
-+ REQUEST_SIZE_MATCH(xXF86RushUnlockAllPixmapsReq);
-+ handle=dlopen(0, 0);
-+ if (handle) {
-+ func=(void(*)())dlsym(handle, "xf86UnlockAllPixmaps");
-+ dlclose(handle);
-+ }
-+ if (handle && func) func();
-+ return client->noClientException;
-+ }
-+
-+ ProcXF86RushDispatch (client)
-+ register ClientPtr client;
-+ {
-+ REQUEST(xReq);
-+
-+ if (!LocalClient(client))
-+ return RushErrorBase + XF86RushClientNotLocal;
-+
-+ switch (stuff->data)
-+ {
-+ case X_XF86RushQueryVersion:
-+ return ProcRushQueryVersion(client);
-+ case X_XF86RushLockPixmap:
-+ return ProcXF86RushLockPixmap(client);
-+ case X_XF86RushUnlockPixmap:
-+ return ProcXF86RushUnlockPixmap(client);
-+ case X_XF86RushUnlockAllPixmaps:
-+ return ProcXF86RushUnlockAllPixmaps(client);
-+ default:
-+ return BadRequest;
-+ }
-+ }
-+
-+ SProcXF86RushDispatch (client)
-+ register ClientPtr client;
-+ {
-+ REQUEST(xReq);
-+
-+ return RushErrorBase + XF86RushClientNotLocal;
-+ }
-+
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/LinkKit/Imakefile ./hw/xfree86/LinkKit/Imakefile
-*** xc.old/programs/Xserver/hw/xfree86/LinkKit/Imakefile Sun Jan 12 02:41:28 1997
---- xc/programs/Xserver/hw/xfree86/LinkKit/Imakefile Sun Apr 4 18:13:41 1999
-***************
-*** 73,78 ****
---- 73,79 ----
- LimitBoolean("BuildXF86VidModeExt", NO, BuildXF86VidModeExt) >> $@
- LimitBoolean("BuildXF86MiscExt", NO, BuildXF86MiscExt) >> $@
- LimitBoolean("BuildXF86DGA", NO, BuildXF86DGA) >> $@
-+ LimitBoolean("BuildXF86RushExt", NO, BuildXF86RushExt) >> $@
- LimitBoolean("BuildDPMSExt", BuildDPMSExt, BuildDPMSExt) >> $@
-
- clean::
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/common/xf86Cursor.c ./hw/xfree86/common/xf86Cursor.c
-*** xc.old/programs/Xserver/hw/xfree86/common/xf86Cursor.c Sat Oct 31 12:13:18 1998
---- xc/programs/Xserver/hw/xfree86/common/xf86Cursor.c Sun Apr 4 18:13:41 1999
-***************
-*** 138,143 ****
---- 138,150 ----
- Bool frameChanged = FALSE;
- ScrnInfoPtr pScr = XF86SCRNINFO(pScreen);
-
-+ #ifdef XFreeXDGA
-+ /*
-+ * Since we're in DGA mode we need to trash this scroll request
-+ */
-+ if (pScr->directMode&XF86DGADirectGraphics)
-+ return;
-+ #endif
- /*
- * check wether (x,y) belongs to the visual part of the screen
- * if not, change the base of the displayed frame accoring
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/vga256/drivers/apm/apm_cursor.c ./hw/xfree86/vga256/drivers/apm/apm_cursor.c
-*** xc.old/programs/Xserver/hw/xfree86/vga256/drivers/apm/apm_cursor.c Sun Jan 18 02:35:30 1998
---- xc/programs/Xserver/hw/xfree86/vga256/drivers/apm/apm_cursor.c Sun Apr 4 18:13:42 1999
-***************
-*** 23,29 ****
- #include "apm.h"
-
- static void ApmShowCursor(void);
-! static void ApmHideCursor(void);
- static Bool ApmRealizeCursor(ScreenPtr pScr, CursorPtr pCurs);
- static Bool ApmUnrealizeCursor(ScreenPtr pScr, CursorPtr pCurs);
- static void ApmLoadCursorToCard(ScreenPtr pScr, CursorPtr pCurs, int x, int y);
---- 23,29 ----
- #include "apm.h"
-
- static void ApmShowCursor(void);
-! void ApmHideCursor(void);
- static Bool ApmRealizeCursor(ScreenPtr pScr, CursorPtr pCurs);
- static Bool ApmUnrealizeCursor(ScreenPtr pScr, CursorPtr pCurs);
- static void ApmLoadCursorToCard(ScreenPtr pScr, CursorPtr pCurs, int x, int y);
-***************
-*** 108,114 ****
- * This is also a local function, it's not called from outside.
- */
-
-! static void
- ApmHideCursor(void)
- {
- ApmCheckMMIO_Init();
---- 108,114 ----
- * This is also a local function, it's not called from outside.
- */
-
-! void
- ApmHideCursor(void)
- {
- ApmCheckMMIO_Init();
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/vga256/drivers/apm/apm_driver.c ./hw/xfree86/vga256/drivers/apm/apm_driver.c
-*** xc.old/programs/Xserver/hw/xfree86/vga256/drivers/apm/apm_driver.c Sun Feb 15 16:42:15 1998
---- xc/programs/Xserver/hw/xfree86/vga256/drivers/apm/apm_driver.c Sun Apr 4 18:13:42 1999
-***************
-*** 610,616 ****
---- 610,624 ----
-
- #ifdef XFreeXDGA
- if (vga256InfoRec.directMode&XF86DGADirectGraphics && !enter)
-+ {
-+ if (vgaHWCursor.Initialized == TRUE)
-+ {
-+ extern void ApmHideCursor(void);
-+ ApmHideCursor();
-+ }
- return;
-+ }
-+
- #endif
-
- if (enter)
-***************
-*** 965,970 ****
---- 973,985 ----
- */
- modinx(vgaIOBase + 4, 0x1c, 0x0f, (Base & 0x0f0000) >> 16);
-
-+ #ifdef XFreeXDGA
-+ if (vga256InfoRec.directMode & XF86DGADirectGraphics) {
-+ /* Wait until vertical retrace is in progress. */
-+ while (inb(vgaIOBase + 0xA) & 0x08);
-+ while (!(inb(vgaIOBase + 0xA) & 0x08));
-+ }
-+ #endif
- }
-
- /*
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/xaa/xf86cparea.c ./hw/xfree86/xaa/xf86cparea.c
-*** xc.old/programs/Xserver/hw/xfree86/xaa/xf86cparea.c Mon Nov 18 05:22:11 1996
---- xc/programs/Xserver/hw/xfree86/xaa/xf86cparea.c Tue Apr 6 23:51:36 1999
-***************
-*** 85,90 ****
---- 85,92 ----
- #include "xf86xaa.h"
- #include "xf86local.h"
-
-+ #include "xf86Priv.h"
-+ #include "xf86pcache.h"
-
- RegionPtr
- xf86CopyArea(pSrcDrawable, pDstDrawable,
-***************
-*** 96,105 ****
- int width, height;
- int dstx, dsty;
- {
-! if (pSrcDrawable->type == DRAWABLE_WINDOW
-! && pDstDrawable->type == DRAWABLE_WINDOW) {
- return (*xf86GCInfoRec.cfbBitBltDispatch)(
-! pSrcDrawable, pDstDrawable,
- pGC, srcx, srcy, width, height, dstx, dsty,
- xf86DoBitBlt, 0L);
- }
---- 98,110 ----
- int width, height;
- int dstx, dsty;
- {
-! if ((pDstDrawable->type == DRAWABLE_WINDOW) &&
-! ((pSrcDrawable->type == DRAWABLE_WINDOW) ||
-! ((xf86AccelInfoRec.Flags & PIXMAP_CACHE) &&
-! (pSrcDrawable->type == DRAWABLE_PIXMAP) &&
-! xf86CacheIsLocked((PixmapPtr)pSrcDrawable)))) {
- return (*xf86GCInfoRec.cfbBitBltDispatch)(
-! pSrcDrawable, pDstDrawable,
- pGC, srcx, srcy, width, height, dstx, dsty,
- xf86DoBitBlt, 0L);
- }
-***************
-*** 132,137 ****
---- 137,154 ----
- int xdir; /* 1 = left right, -1 = right left/ */
- int ydir; /* 1 = top down, -1 = bottom up */
- int careful;
-+ extern CacheInfoPtr xf86CacheInfo;
-+ int i, slot;
-+
-+ /* Handle locked pixmaps just like screen to screen blits */
-+ if (pSrc->type==DRAWABLE_PIXMAP) {
-+ slot=((xf86PixPrivPtr)((PixmapPtr)pSrc)->devPrivates[xf86PixmapIndex].ptr)->slot;
-+ pptTmp=pptSrc;
-+ for (i=0; i<REGION_NUM_RECTS(prgnDst); i++, pptTmp++) {
-+ pptTmp->x+=xf86CacheInfo[slot].x;
-+ pptTmp->y+=xf86CacheInfo[slot].y;
-+ }
-+ }
-
- /* XXX we have to err on the side of safety when both are windows,
- * because we don't know if IncludeInferiors is being used.
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/xaa/xf86pcache.c ./hw/xfree86/xaa/xf86pcache.c
-*** xc.old/programs/Xserver/hw/xfree86/xaa/xf86pcache.c Sun Feb 8 07:36:25 1998
---- xc/programs/Xserver/hw/xfree86/xaa/xf86pcache.c Tue Apr 13 12:21:33 1999
-***************
-*** 127,144 ****
-
- CacheInfoPtr xf86CacheInfo = NULL;
- static int MaxSlot;
- static int MaxWidth;
- static int MaxHeight;
- static unsigned int pixmap_cache_clock = 1;
- static int FirstWideSlot;
- static int MaxWideSlotHeight;
-
- void xf86InitPixmapCacheSlots()
- {
- ScrnInfoPtr infoRec;
- int memoryStart, memoryEnd;
-! int width_in_bytes, cache_start_y, i;
-! int height_left, standard_slots, wide_slots, wide_slot_width;
-
- infoRec = xf86AccelInfoRec.ServerInfoRec;
- memoryStart = xf86AccelInfoRec.PixmapCacheMemoryStart;
---- 127,147 ----
-
- CacheInfoPtr xf86CacheInfo = NULL;
- static int MaxSlot;
-+ static int MaxBigSlot;
- static int MaxWidth;
- static int MaxHeight;
- static unsigned int pixmap_cache_clock = 1;
- static int FirstWideSlot;
-+ static int FirstBigSlot;
- static int MaxWideSlotHeight;
-+ static int cache_start_y;
-
- void xf86InitPixmapCacheSlots()
- {
- ScrnInfoPtr infoRec;
- int memoryStart, memoryEnd;
-! int width_in_bytes, i;
-! int height_left, standard_slots, wide_slots, wide_slot_width, big_slots;
-
- infoRec = xf86AccelInfoRec.ServerInfoRec;
- memoryStart = xf86AccelInfoRec.PixmapCacheMemoryStart;
-***************
-*** 228,236 ****
- }
- }
-
- MaxSlot = standard_slots + wide_slots - 1;
-! xf86CacheInfo = (CacheInfoPtr)xcalloc(MaxSlot + 1, sizeof(CacheInfo));
- FirstWideSlot = standard_slots;
-
- ErrorF("%s %s: XAA: Using %d %dx%d ",
- XCONFIG_PROBED, infoRec->name, standard_slots, MaxWidth, MaxHeight);
---- 231,243 ----
- }
- }
-
-+ /* Arbitrarily say you can have 10 big slots */
-+ big_slots = 10;
- MaxSlot = standard_slots + wide_slots - 1;
-! MaxBigSlot = MaxSlot + big_slots;
-! xf86CacheInfo = (CacheInfoPtr)xcalloc(MaxBigSlot + 1, sizeof(CacheInfo));
- FirstWideSlot = standard_slots;
-+ FirstBigSlot = standard_slots + wide_slots;
-
- ErrorF("%s %s: XAA: Using %d %dx%d ",
- XCONFIG_PROBED, infoRec->name, standard_slots, MaxWidth, MaxHeight);
-***************
-*** 255,261 ****
- xf86CacheInfo[i + standard_slots].cache_height = min(32, height_left);
- }
-
-! for (i = 0; i <= MaxSlot; i++) {
- xf86CacheInfo[i].id = -1;
- xf86CacheInfo[i].lru = pixmap_cache_clock;
- xf86CacheInfo[i].fg_color = 0;
---- 262,268 ----
- xf86CacheInfo[i + standard_slots].cache_height = min(32, height_left);
- }
-
-! for (i = 0; i <= MaxBigSlot; i++) {
- xf86CacheInfo[i].id = -1;
- xf86CacheInfo[i].lru = pixmap_cache_clock;
- xf86CacheInfo[i].fg_color = 0;
-***************
-*** 315,321 ****
- #ifdef PIXPRIV
- devPriv = (xf86PixPrivPtr)(pix->devPrivates[xf86PixmapIndex].ptr);
-
-! if (devPriv->slot == MaxSlot + 1)
- /*
- * Special value indicates that this pattern was found to be
- * non-cachable.
---- 322,328 ----
- #ifdef PIXPRIV
- devPriv = (xf86PixPrivPtr)(pix->devPrivates[xf86PixmapIndex].ptr);
-
-! if (devPriv->slot == MaxBigSlot + 1)
- /*
- * Special value indicates that this pattern was found to be
- * non-cachable.
-***************
-*** 344,350 ****
- * pattern, but can't, and ScreenToScreencopy doesn't have
- * the required support for transparency.
- */
-! devPriv->slot = MaxSlot + 1;
- return 0;
- }
- devPriv->slot = slot;
---- 351,357 ----
- * pattern, but can't, and ScreenToScreencopy doesn't have
- * the required support for transparency.
- */
-! devPriv->slot = MaxBigSlot + 1;
- return 0;
- }
- devPriv->slot = slot;
-***************
-*** 893,898 ****
---- 900,906 ----
- pci->flags = 0;
- pci->lru = pixmap_cache_clock;
- pci->id = pix->drawable.serialNumber;
-+ pci->locked = FALSE;
-
- reducible_status = TILE_UNKNOWN;
-
-***************
-*** 1303,1305 ****
---- 1311,1483 ----
- return (pix->drawable.width <= MaxWidth &&
- pix->drawable.height <= MaxHeight);
- }
-+
-+ /* Rush extension support */
-+
-+ int testOverlap(pcipix)
-+ CacheInfoPtr pcipix;
-+ {
-+ int slot;
-+ CacheInfoPtr pcitest;
-+
-+ for (slot=FirstBigSlot; slot<=MaxBigSlot; slot++) {
-+ if (xf86CacheInfo[slot].id>0) {
-+ pcitest=&xf86CacheInfo[slot];
-+ if (!((pcipix->x+pcipix->w<pcitest->x ||
-+ pcipix->x>pcitest->x+pcitest->w) &&
-+ (pcipix->y+pcipix->h<pcitest->y ||
-+ pcipix->y>pcitest->y+pcitest->w)))
-+ return 1;
-+ }
-+ }
-+ return 0;
-+ }
-+
-+
-+ /*
-+ Dividing up the extra memory among X and Glide is difficult.
-+ We'll take what we're given and then try to stick up to big_slots
-+ pixmaps within it. big_slots should be small to keep this efficient.
-+ To fit the pixmap we'll try to put it next to and below each
-+ existing pixmap. Then we'll check if it overlaps anything.
-+ */
-+ static int
-+ findPosition(pci, pix)
-+ CacheInfoPtr pci;
-+ PixmapPtr pix;
-+ {
-+ int slot, bestx, besty;
-+
-+ bestx=-2;
-+ for (slot=FirstBigSlot; slot<=MaxBigSlot; slot++) {
-+ if (xf86CacheInfo[slot].id>0) {
-+ if (bestx==-2) bestx==-1;
-+ /* Check for fit to right */
-+ pci->x=xf86CacheInfo[slot].x+xf86CacheInfo[slot].w;
-+ pci->y=xf86CacheInfo[slot].y;
-+ if (bestx<0 || (bestx+besty>pci->x+pci->y)) {
-+ if (!testOverlap(pci, &xf86CacheInfo[slot])) {
-+ bestx=pci->x;
-+ besty=pci->y;
-+ }
-+ }
-+ /* Check for fit below */
-+ pci->x=xf86CacheInfo[slot].x;
-+ pci->y=xf86CacheInfo[slot].y+xf86CacheInfo[slot].h;
-+ if (bestx<0 || (bestx+besty>pci->x+pci->y)) {
-+ if (!testOverlap(pci, &xf86CacheInfo[slot])) {
-+ bestx=pci->x;
-+ besty=pci->y;
-+ }
-+ }
-+ }
-+ }
-+ if (bestx==-2) { /* Nothing in the list yet */
-+ bestx=0;
-+ besty=cache_start_y+MaxHeight;
-+ }
-+ if (bestx==-1) { /* Doesn't fit */
-+ return 0;
-+ }
-+ pci->x=bestx;
-+ pci->y=besty;
-+ }
-+
-+ void *
-+ xf86LockPixmap(pix)
-+ PixmapPtr pix;
-+ {
-+ xf86PixPrivPtr devPriv =
-+ (xf86PixPrivPtr)(pix->devPrivates[xf86PixmapIndex].ptr);
-+ int slot, size;
-+ ScrnInfoPtr infoRec;
-+ CacheInfoPtr pci;
-+
-+ switch (xf86AccelInfoRec.BitsPerPixel) {
-+ case 8:
-+ size=1;
-+ break;
-+ case 16:
-+ size=2;
-+ break;
-+ case 24:
-+ size=3;
-+ break;
-+ case 32:
-+ size=4;
-+ break;
-+ case 1:
-+ case 4:
-+ default:
-+ return 0;
-+ }
-+ for (slot=FirstBigSlot; slot<MaxBigSlot ; slot++) {
-+ if (slot==-1) break;
-+ }
-+ if (slot==MaxBigSlot) return 0;
-+ /* Assign the slot */
-+ IncrementCacheLRU(slot);
-+ devPriv->slot = slot;
-+ /* Fill in the cache entry */
-+ pci = &xf86CacheInfo[devPriv->slot];
-+ pci->pix_w = pix->drawable.width;
-+ pci->pix_h = pix->drawable.height;
-+ pci->nx = 1;
-+ pci->ny = 1;
-+ pci->w = pci->pix_w;
-+ pci->h = pci->pix_h;
-+ pci->fg_color = 0;
-+ pci->bg_color = 0;
-+ pci->flags = 0;
-+ pci->lru = pixmap_cache_clock;
-+ pci->locked = TRUE;
-+ /* Assign X & Y position */
-+ if (!findPosition(pci, pix)) return 0;
-+ pci->id = pix->drawable.serialNumber;
-+ xf86AccelInfoRec.ImageWrite(pci->x, pci->y, pci->pix_w, pci->pix_h,
-+ pix->devPrivate.ptr, pix->devKind, GXcopy,
-+ 0xFFFFFFFF);
-+ infoRec=xf86AccelInfoRec.ServerInfoRec;
-+ return (void*)(infoRec->physBase +
-+ (xf86CacheInfo[slot].x +
-+ xf86CacheInfo[slot].y*infoRec->displayWidth) * size);
-+ }
-+
-+ void
-+ xf86UnlockPixmap(pix)
-+ PixmapPtr pix;
-+ {
-+ xf86PixPrivPtr devPriv =
-+ (xf86PixPrivPtr)(pix->devPrivates[xf86PixmapIndex].ptr);
-+ if (devPriv->slot<0) return;
-+ xf86CacheInfo[devPriv->slot].locked = FALSE;
-+ xf86CacheInfo[devPriv->slot].id = -1;
-+ devPriv->slot = 0;
-+ }
-+
-+ void
-+ xf86UnlockAllPixmaps()
-+ {
-+ int i;
-+
-+ for (i=FirstBigSlot; i<=MaxBigSlot; i++) {
-+ if (xf86CacheInfo[i].id>0 && xf86CacheInfo[i].locked) {
-+ xf86CacheInfo[i].locked = FALSE;
-+ xf86CacheInfo[i].id = -1;
-+ }
-+ }
-+ }
-+
-+ int
-+ xf86CacheIsLocked(pix)
-+ PixmapPtr pix;
-+ {
-+ xf86PixPrivPtr devPriv =
-+ (xf86PixPrivPtr)(pix->devPrivates[xf86PixmapIndex].ptr);
-+ int slot;
-+
-+ slot=devPriv->slot;
-+ if (slot<FirstBigSlot || slot>MaxBigSlot) return 0;
-+ return xf86CacheInfo[slot].locked;
-+ }
-+
-diff -c -N -r xc.old/programs/Xserver/hw/xfree86/xaa/xf86pcache.h ./hw/xfree86/xaa/xf86pcache.h
-*** xc.old/programs/Xserver/hw/xfree86/xaa/xf86pcache.h Fri Jan 17 22:57:28 1997
---- xc/programs/Xserver/hw/xfree86/xaa/xf86pcache.h Sun Apr 4 18:13:42 1999
-***************
-*** 19,24 ****
---- 19,25 ----
- int pattern0; /* if fixed pattern, pattern 0 register contents */
- int pattern1; /* if fixed pattern, pattern 1 register contents */
- unsigned int lru; /* lru counter */
-+ Bool locked;
- } CacheInfo, *CacheInfoPtr;
-
- #ifdef PIXPRIV
-***************
-*** 43,45 ****
---- 44,47 ----
- void xf86InitPixmapCacheSlots();
-
- void xf86InvalidatePixmapCache();
-+
-diff -c -N -r xc.old/programs/Xserver/mi/Imakefile ./mi/Imakefile
-*** xc.old/programs/Xserver/mi/Imakefile Sat May 3 02:50:45 1997
---- xc/programs/Xserver/mi/Imakefile Sun Apr 4 18:13:42 1999
-***************
-*** 32,38 ****
- * Make sure XINPUT, XF86VidTune, etc aren't defined for the miinitext.o
- * used by Xnest, Xvfb
- */
-! EXT_DEFINES = ExtensionDefines -UXINPUT -UXF86VIDMODE -UXFreeXDGA -UXF86MISC
- #else
- EXT_DEFINES = ExtensionDefines
- #endif
---- 32,39 ----
- * Make sure XINPUT, XF86VidTune, etc aren't defined for the miinitext.o
- * used by Xnest, Xvfb
- */
-! EXT_DEFINES = ExtensionDefines -UXINPUT -UXF86VIDMODE -UXFreeXDGA -UXF86MISC \
-! -UXFreeXRUSH
- #else
- EXT_DEFINES = ExtensionDefines
- #endif
-diff -c -N -r xc.old/programs/Xserver/mi/miinitext.c ./mi/miinitext.c
-*** xc.old/programs/Xserver/mi/miinitext.c Thu May 22 07:00:46 1997
---- xc/programs/Xserver/mi/miinitext.c Sun Apr 4 18:13:42 1999
-***************
-*** 155,160 ****
---- 155,163 ----
- #ifdef XFreeXDGA
- extern void XFree86DGAExtensionInit(INITARGS);
- #endif
-+ #ifdef XFreeXRUSH
-+ extern void XFree86RushExtensionInit(INITARGS);
-+ #endif
- #ifdef DPMSExtension
- extern void DPMSExtensionInit(INITARGS);
- #endif
-***************
-*** 264,269 ****
---- 267,275 ----
- #endif
- #if defined(XFreeXDGA) && !defined(PRINT_ONLY_SERVER)
- XFree86DGAExtensionInit();
-+ #endif
-+ #if defined(XFreeXRUSH) && !defined(PRINT_ONLY_SERVER)
-+ XFree86RushExtensionInit();
- #endif
- #if defined(DPMSExtension) && !defined(PRINT_ONLY_SERVER)
- DPMSExtensionInit();
+++ /dev/null
---- XFree86-3.3.3.1/xc/programs/xdm/session.c~ Sat Jun 19 02:25:32 1999
-+++ XFree86-3.3.3.1/xc/programs/xdm/session.c Sat Jun 19 04:30:43 1999
-@@ -699,6 +699,32 @@
- #endif /* K5AUTH */
- bzero(passwd, strlen(passwd));
- SetUserAuthorization (d, verify);
-+#ifdef USE_PAM
-+{
-+ int i, j;
-+ const char *const *pam_env;
-+ char *tmp_pam_env;
-+
-+ pam_env = (const char *const *) pam_getenvlist((pam_handle_t *) pamh);
-+
-+ if (pam_env != NULL) {
-+ tmp_pam_env = malloc(4096);
-+ if (tmp_pam_env != NULL) {
-+ for (i = 0; pam_env[i]; i++) {
-+ Debug("env[%d] = %s\n", i, pam_env[i]);
-+ strncpy(tmp_pam_env, pam_env[i], 4095);
-+ tmp_pam_env[4095] = 0;
-+ j = 0;
-+ while (tmp_pam_env[j] != '=')
-+ j++;
-+ tmp_pam_env[j] = 0;
-+ verify->userEnviron = setEnv(verify->userEnviron, tmp_pam_env, &tmp_pam_env[j + 1]);
-+ }
-+ }
-+ free(tmp_pam_env);
-+ }
-+}
-+#endif
- home = getEnv (verify->userEnviron, "HOME");
- if (home)
- if (chdir (home) == -1) {
+++ /dev/null
-diff -urN xc.orig/programs/xdm/Imakefile xc/programs/xdm/Imakefile
---- xc.orig/programs/xdm/Imakefile Mon Dec 30 15:54:06 2002
-+++ xc/programs/xdm/Imakefile Mon Dec 30 18:33:35 2002
-@@ -256,9 +256,9 @@
- '-DDEF_SYSTEM_SHELL="$(BOURNE_SHELL)"' \
- '-DDEF_FAILSAFE_CLIENT="$(BINDIR)/xterm"' \
- '-DDEF_XDM_CONFIG="$(XDMDIR)/xdm-config"' \
-- '-DDEF_CHOOSER="$(XDMDIR)/chooser"' \
-- '-DDEF_AUTH_DIR="$(XDMDIR)"' \
-- '-DDEF_GREETER_LIB="$(XDMDIR)/libXdmGreet.so"'
-+ '-DDEF_CHOOSER="$(BINDIR)/chooser"' \
-+ '-DDEF_AUTH_DIR="$(XDMVARDIR)"' \
-+ '-DDEF_GREETER_LIB="$(USRLIBDIR)/libXdmGreet.so"'
-
- ComplexProgramTarget_1(xdm,$(LOCAL_LIBRARIES),NullParameter)
- LinkConfDirectory(xdm,.,xdm,.)
-@@ -277,7 +277,7 @@
- #if BuildChooser
- SpecialCObjectRule(chooser, $(ICONFIGFILES), $(SOCK_DEFINES))
- NormalProgramTarget(chooser,$(OBJS3),$(DEPLIBS3),$(LIBS3),NullParameter)
--InstallProgram(chooser,$(XDMDIR))
-+InstallProgram(chooser,$(BINDIR))
- InstallAppDefaults(Chooser)
- #endif
- #if BuildBoth
-diff -urN xc.orig/programs/xdm/config/Imakefile xc/programs/xdm/config/Imakefile
---- xc.orig/programs/xdm/config/Imakefile Mon Dec 30 15:54:07 2002
-+++ xc/programs/xdm/config/Imakefile Mon Dec 30 18:38:58 2002
-@@ -9,13 +9,7 @@
-
- all:: Xservers.ws xdm-config Xservers Xresources
-
--#if defined(i386Architecture) && (defined(KNetBSDArchitecture) || defined(KOpenBSDArchitecture))
--DEFAULTVT=vt05
--#endif
--
--#if defined(LinuxDistribution) && (LinuxDistribution == LinuxDebian)
--DEFAULTVT=vt7
--#endif
-+DEFAULTVT=vt9
-
- #ifndef XdmPixmap
- # define XdmPixmap XFree86.xpm
-@@ -39,7 +33,11 @@
- #endif
-
- CppFileTarget(Xservers.ws,Xserv.ws.cpp,-DBINDIR=$(BINDIR) -DDEFAULTVT=$(DEFAULTVT),NullParameter)
--CppFileTarget(xdm-config,xdm-conf.cpp,-DXDMDIR=$(XDMDIR) -DXDMLOGDIR=$(XDMLOGDIR) -DXDMPIDDIR=$(XDMPIDDIR) -DSU=$(SU),NullParameter)
-+#ifdef LinuxArchitecture
-+CppFileTarget(xdm-config,xdm-conf.cpp,$(XPM_DEFINES) -DLINUX=1 -DXDMDIR=$(XDMDIR) -DXDMLOGDIR=$(XDMLOGDIR) -DXDMPIDDIR=$(XDMPIDDIR) -DXDMVARDIR=$(XDMVARDIR),NullParameter)
-+#else
-+CppFileTarget(xdm-config,xdm-conf.cpp,$(XPM_DEFINES) -DXDMDIR=$(XDMDIR) -DXDMLOGDIR=$(XDMLOGDIR) -DXDMPIDDIR=$(XDMPIDDIR),NullParameter)
-+#endif /* LinuxArchitecture */
- CppFileTarget(Xresources,Xres.cpp,$(XPM_DEFINES),NullParameter)
-
- LinkFile(Xservers,Xservers.$(SERVERSTYPE))
-diff -urN xc.org/programs/xdm/config/Xres.cpp xc/programs/xdm/config/Xres.cpp
---- xc.org/programs/xdm/config/Xres.cpp 2003-11-23 23:32:35.000000000 +0100
-+++ xc/programs/xdm/config/Xres.cpp 2003-11-23 23:33:41.000000000 +0100
-@@ -41,9 +41,7 @@
- XHASHendif
- #endif /* XPM */
- XHASHifdef COLOR
--#ifndef XPM
--xlogin*greetColor: CadetBlue
--#else
-+#ifdef XPM
- xlogin*borderWidth: 1
- xlogin*frameWidth: 5
- xlogin*innerFramesWidth: 2
-@@ -52,6 +50,8 @@
- xlogin*background: grey
- !xlogin*foreground: darkgreen
- xlogin*greetColor: Blue3
-+#else
-+login*greetColor: CadetBlue
- #endif /* XPM */
- xlogin*failColor: red
- *Foreground: black
+++ /dev/null
-diff -Nur XFree86-4.0.2.org/xc/programs/xdm/greeter/verify.c XFree86-4.0.2/xc/programs/xdm/greeter/verify.c
---- XFree86-4.0.2.org/xc/programs/xdm/greeter/verify.c Wed Nov 29 17:46:09 2000
-+++ XFree86-4.0.2/xc/programs/xdm/greeter/verify.c Thu Dec 21 12:02:33 2000
-@@ -114,6 +114,7 @@
-
- #ifdef USE_PAM
- static char *PAM_password;
-+extern pam_handle_t *pamh;
- static int pam_error;
-
- static int PAM_conv (int num_msg,
-@@ -162,12 +163,8 @@
- Verify (struct display *d, struct greet_info *greet, struct verify_info *verify)
- {
- struct passwd *p;
--#ifdef USE_PAM
-- pam_handle_t **pamhp = thepamhp();
--#else
- #ifdef USESHADOW
- struct spwd *sp;
--#endif
- #endif
- #ifdef __OpenBSD__
- char *s;
-diff -Nur XFree86-4.0.2.org/xc/programs/xdm/session.c XFree86-4.0.2/xc/programs/xdm/session.c
---- XFree86-4.0.2.org/xc/programs/xdm/session.c Tue Dec 5 01:59:35 2000
-+++ XFree86-4.0.2/xc/programs/xdm/session.c Thu Dec 21 12:06:41 2000
-@@ -97,9 +97,9 @@
- extern char *crypt(CRYPT_ARGS);
- #endif
- #ifdef USE_PAM
-+pam_handle_t *pamh;
- pam_handle_t **thepamhp()
- {
-- static pam_handle_t *pamh = NULL;
- return &pamh;
- }
-
-@@ -472,9 +472,6 @@
- SessionExit (struct display *d, int status, int removeAuth)
- {
- #ifdef USE_PAM
-- pam_handle_t *pamh = thepamh();
--#endif
--#ifdef USE_PAM
- if (pamh) {
- /* shutdown PAM session */
- pam_close_session(pamh, 0);
-@@ -535,9 +532,6 @@
- int pid;
- #ifdef HAS_SETUSERCONTEXT
- struct passwd* pwd;
--#endif
--#ifdef USE_PAM
-- pam_handle_t *pamh = thepamh();
- #endif
-
- if (verify->argv) {
+++ /dev/null
---- XFree86-4.0.2/xc/programs/xdm/xdmcp.c~ Thu Dec 21 19:46:57 2000
-+++ XFree86-4.0.2/xc/programs/xdm/xdmcp.c Thu Dec 21 19:47:25 2000
-@@ -1128,7 +1128,7 @@
- XdmcpHeader header;
- ARRAY8 status;
-
-- sprintf (buf, "Session %ld failed for display %.100s: %.100s",
-+ snprintf (buf, sizeof(buf), "Session %ld failed for display %.100s: %.100s",
- (long) sessionID, name, reason);
- Debug ("Send failed %ld %s\n", (long) sessionID, buf);
- status.length = strlen (buf);
+++ /dev/null
-diff -Naur -x CVS xc.orig/config/cf/FreeBSD.cf xc/config/cf/FreeBSD.cf
---- XFree86-4.0.2.orig/xc/config/cf/FreeBSD.cf Mon Dec 4 13:49:09 2000
-+++ XFree86-4.0.2/xc/config/cf/FreeBSD.cf Mon Jan 22 14:49:12 2001
-@@ -59,6 +59,12 @@
- #define HasNCurses YES
- #define HasVarRun YES
- #define HasVarDb YES
-+
-+#if (OSMajorVersion > 1)
-+#define InstallXloadSetGID NO
-+#else
-+#define InstallXloadSetGID YES
-+#endif
-
- #define AvoidNullMakeCommand YES
- #define StripInstalledPrograms YES
-diff -Naur -x CVS xc.orig/config/cf/Imake.rules xc/config/cf/Imake.rules
---- XFree86-4.0.2.orig/xc/config/cf/Imake.rules Sat Dec 16 12:32:59 2000
-+++ XFree86-4.0.2/xc/config/cf/Imake.rules Sat Jan 27 15:08:17 2001
-@@ -1217,7 +1217,7 @@
- InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
- @@\
- install.man:: @@\
-- @(TMP=/tmp/tmp.$$$$; \ @@\
-+ @(TMP=#tmp.$$$$; \ @@\
- RemoveFile($${TMP}); \ @@\
- echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\
- for i in aliases; do (set -x; \ @@\
-@@ -1258,7 +1258,7 @@
- InstallHtmlManPageAliases(file,aliases,suffix) @@\
- @@\
- install.man:: @@\
-- @(TMP=/tmp/tmp.$$$$; \ @@\
-+ @(TMP=#tmp.$$$$; \ @@\
- RemoveFile($${TMP}); \ @@\
- echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\
- for i in aliases; do (set -x; \ @@\
-diff -Naur -x CVS xc.orig/config/cf/NetBSD.cf xc/config/cf/NetBSD.cf
---- XFree86-4.0.2.orig/xc/config/cf/NetBSD.cf Sun Dec 3 11:14:08 2000
-+++ XFree86-4.0.2/xc/config/cf/NetBSD.cf Mon Jan 22 14:49:14 2001
-@@ -71,6 +71,8 @@
-
- #define HasVarRun YES
- #define HasVarDb YES
-+
-+#define InstallXloadSetGID NO
-
- /* Defines for using the GNU pth thread library -- experimental */
-
-diff -Naur -x CVS xc.orig/config/cf/OpenBSD.cf xc/config/cf/OpenBSD.cf
---- XFree86-4.0.2.orig/xc/config/cf/OpenBSD.cf Sat Dec 2 15:15:03 2000
-+++ XFree86-4.0.2/xc/config/cf/OpenBSD.cf Mon Jan 22 14:49:15 2001
-@@ -71,6 +71,8 @@
-
- #define HasVarRun YES
- #define HasVarDb YES
-+
-+#define InstallXloadSetGID NO
-
- #ifndef HasLibPthread
- #define HasLibPthread NO
-diff -Naur -x CVS xc.orig/config/cf/X11.tmpl xc/config/cf/X11.tmpl
---- XFree86-4.0.2.orig/xc/config/cf/X11.tmpl Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/config/cf/X11.tmpl Mon Jan 22 14:49:17 2001
-@@ -339,6 +339,9 @@
- #ifndef InstallXtermSetUID
- #define InstallXtermSetUID YES /* xterm needs to be set uid */
- #endif
-+#ifndef InstallXloadSetGID
-+#define InstallXloadSetGID YES /* xload often needs set gid kmem */
-+#endif
- #ifndef InstallXinitConfig
- #define InstallXinitConfig NO /* install sample xinit config */
- #endif
-@@ -358,6 +361,12 @@
- #ifndef InstallAppDefFiles
- #define InstallAppDefFiles YES /* install application defaults */
- #endif
-+#ifndef UseConfDirForAppDefaults
-+#define UseConfDirForAppDefaults YES
-+#endif
-+#ifndef UseConfDirForXkb
-+#define UseConfDirForXkb YES
-+#endif
- #ifndef CompressAllFonts
- #define CompressAllFonts NO
- #endif
-@@ -2347,6 +2356,7 @@
- * if the InstallAppDefFiles configuration parameter is set.
- */
- #ifndef InstallAppDefaultsLong
-+#if UseConfDirForAppDefaults
- #if InstallAppDefFiles
- #define InstallAppDefaultsLong(file,class) @@\
- LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
-@@ -2356,6 +2366,15 @@
- LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
- InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
- #endif /* InstallAppDefFiles */
-+#else /* UseConfDirForAppDefaults */
-+#if InstallAppDefFiles
-+#define InstallAppDefaultsLong(file,class) @@\
-+InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
-+#else
-+#define InstallAppDefaultsLong(file,class) @@\
-+InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
-+#endif /* InstallAppDefFiles */
-+#endif /* UseConfDirForAppDefaults */
- #endif /* InstallAppDefaultsLong */
-
- /*
-diff -Naur -x CVS xc.orig/config/cf/linux.cf xc/config/cf/linux.cf
---- XFree86-4.0.2.orig/xc/config/cf/linux.cf Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/config/cf/linux.cf Mon Jan 22 14:49:19 2001
-@@ -215,6 +215,10 @@
- # ifndef HasLibCrypt
- # define HasLibCrypt NO
- # endif
-+#endif
-+
-+#ifndef InstallXloadSetGID
-+#define InstallXloadSetGID NO
- #endif
-
- /* <linux/input.h> support mainly for USB support */
-diff -Naur -x CVS xc.orig/config/cf/osf1.cf xc/config/cf/osf1.cf
---- XFree86-4.0.2.orig/xc/config/cf/osf1.cf Wed Jun 11 08:24:18 1997
-+++ XFree86-4.0.2/xc/config/cf/osf1.cf Mon Jan 22 14:49:23 2001
-@@ -35,6 +35,9 @@
- #define ShLibDir /usr/shlib
- #define SharedLibPex NO /* losing, no shared -lm */
- #endif
-+
-+#define InstallXloadSetGID NO
-+
- #define ThreadedX ModernOSF1
-
- #if ThreadedX
-diff -Naur -x CVS xc.orig/config/util/gccmdep.cpp xc/config/util/gccmdep.cpp
---- XFree86-4.0.2.orig/xc/config/util/gccmdep.cpp Tue Nov 14 16:59:21 2000
-+++ XFree86-4.0.2/xc/config/util/gccmdep.cpp Sat Jan 27 15:07:33 2001
-@@ -14,6 +14,18 @@
- LN=LNCMD
- MV=MVCMD
-
-+XCOMM Security: if $tmp exists exit immediately
-+rm -f ${TMP}
-+if [ -e ${TMP} ] ; then
-+ echo "$0: ${TMP} exists already, exit." 1>&2
-+ exit 1;
-+fi
-+#if defined(HAS_MKTEMP)
-+if [ -n "`type -p mktemp`" ] ; then
-+ TMP="`mktemp ${TMP}.XXXXXX`" || exit 1
-+fi
-+#endif
-+
- trap "$RM ${TMP}*; exit 1" 1 2 15
- trap "$RM ${TMP}*; exit 0" 1 2 13
-
-@@ -33,7 +45,7 @@
- -D*|-I*)
- args="$args '$1'"
- ;;
-- -g|-O*)
-+ -g|-O)
- ;;
- *)
- if [ "$endmarker"x = x ]; then
-diff -Naur -x CVS xc.orig/extras/rman/rman.c xc/extras/rman/rman.c
---- XFree86-4.0.2.orig/xc/extras/rman/rman.c Fri Dec 1 13:48:08 2000
-+++ XFree86-4.0.2/xc/extras/rman/rman.c Thu Dec 21 14:01:07 2000
-@@ -474,12 +474,14 @@
- {
- char *p0;
- static char *nonhref = "\">'";
-+ static char *punct = ".,:;)]}?!";
-
- while (*p==' ') p++;
- if (strincmp(p,"http",4)==0) {
- href="%s"; manrefname = p;
- p+=4;
- while (*p && !isspace(*p) && !strchr(nonhref,*p)) p++;
-+ while (strchr(punct, *(p - 1))) p--;
- } else {
- href = manRef;
-
-diff -Naur -x CVS xc.orig/lib/Xaw/AsciiSrc.c xc/lib/Xaw/AsciiSrc.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/AsciiSrc.c Tue Nov 28 12:25:09 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/AsciiSrc.c Sat Jan 27 15:06:11 2001
-@@ -1456,7 +1456,7 @@
- open_mode = O_WRONLY | O_CREAT | O_EXCL;
- fdopen_mode = "w";
- }
-- else
-+ else {
- /* O_NOFOLLOW is a FreeBSD & Linux extension */
- #ifdef O_NOFOLLOW
- open_mode = O_RDWR | O_NOFOLLOW;
-@@ -1464,6 +1464,7 @@
- open_mode = O_RDWR; /* unsafe; subject to race conditions */
- #endif /* O_NOFOLLOW */
- fdopen_mode = "r+";
-+ }
- break;
- default:
- XtErrorMsg("badMode", "asciiSourceCreate", "XawError",
-diff -Naur -x CVS xc.orig/lib/Xaw/Form.c xc/lib/Xaw/Form.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/Form.c Thu Oct 26 13:57:49 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/Form.c Fri Feb 9 21:33:13 2001
-@@ -582,6 +582,11 @@
- always_resize_children =
- ChangeFormGeometry((Widget)fw, False, maxx, maxy, NULL, NULL);
-
-+#ifdef OLDXAW
-+ fw->form.old_width = fw->core.width;
-+ fw->form.old_height = fw->core.height;
-+#endif
-+
- if (force_relayout)
- ret_val = True;
- else
-@@ -656,7 +661,6 @@
- static void
- LayoutChild(Widget w)
- {
-- FormWidget fw = (FormWidget)XtParent(w);
- FormConstraints form = (FormConstraints)w->core.constraints;
- Widget ref;
-
-@@ -684,22 +688,16 @@
- form->form.new_y = form->form.dy;
- if ((ref = form->form.horiz_base) != NULL) {
- FormConstraints ref_form = (FormConstraints)ref->core.constraints;
-- Dimension width;
-
- LayoutChild(ref);
-- width = fw->form.old_width ?
-- ref_form->form.virtual_width : XtWidth(ref);
-- form->form.new_x += ref_form->form.new_x + width +
-+ form->form.new_x += ref_form->form.new_x + XtWidth(ref) +
- (XtBorderWidth(ref) << 1);
- }
- if ((ref = form->form.vert_base) != NULL) {
- FormConstraints ref_form = (FormConstraints)ref->core.constraints;
-- Dimension height;
-
- LayoutChild(ref);
-- height = fw->form.old_height ?
-- ref_form->form.virtual_height : XtHeight(ref);
-- form->form.new_y += ref_form->form.new_y + height +
-+ form->form.new_y += ref_form->form.new_y + XtHeight(ref) +
- (XtBorderWidth(ref) << 1);
- }
-
-@@ -891,8 +889,6 @@
- * The window will be updated when no_refigure is set back
- * to False
- */
-- form->form.virtual_width = XtWidth(w);
-- form->form.virtual_height = XtHeight(w);
- form->form.deferred_resize = True;
- ret_val = XtGeometryDone;
- }
-@@ -902,6 +898,8 @@
- /*
- * Resets everything.
- */
-+ fw->form.old_width = XtWidth(fw);
-+ fw->form.old_height = XtHeight(fw);
- for (childP = children; childP - children < num_children; childP++) {
- Widget nw = *childP;
-
-@@ -916,8 +914,6 @@
- nform->form.virtual_height = XtHeight(nw);
- }
- }
-- fw->form.old_width = XtWidth(fw);
-- fw->form.old_height = XtHeight(fw);
- }
- else {
- XtWidth(w) = old_width;
-@@ -1022,23 +1018,21 @@
- (*((FormWidgetClass)w->core.widget_class)->form_class.layout)
- (fw, XtWidth(w), XtHeight(w), True);
-
-- if (!fw->form.old_width || !fw->form.old_height) {
-- fw->form.old_width = XtWidth(w);
-- fw->form.old_height = XtHeight(w);
-- for (children = childP = fw->composite.children;
-- childP - children < num_children;
-- childP++) {
-- child = *childP;
-- if (!XtIsManaged(child))
-- continue;
-- form = (FormConstraints)child->core.constraints;
-+ fw->form.old_width = XtWidth(w);
-+ fw->form.old_height = XtHeight(w);
-+ for (children = childP = fw->composite.children;
-+ childP - children < num_children;
-+ childP++) {
-+ child = *childP;
-+ if (!XtIsManaged(child))
-+ continue;
-+ form = (FormConstraints)child->core.constraints;
- #ifndef OLDXAW
-- form->form.virtual_x = XtX(child);
-- form->form.virtual_y = XtY(child);
-+ form->form.virtual_x = XtX(child);
-+ form->form.virtual_y = XtY(child);
- #endif
-- form->form.virtual_width = XtWidth(child);
-- form->form.virtual_height = XtHeight(child);
-- }
-+ form->form.virtual_width = XtWidth(child);
-+ form->form.virtual_height = XtHeight(child);
- }
- }
-
-diff -Naur -x CVS xc.orig/lib/Xaw/MultiSrc.c xc/lib/Xaw/MultiSrc.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/MultiSrc.c Mon Jul 19 09:36:02 1999
-+++ XFree86-4.0.2/xc/lib/Xaw/MultiSrc.c Sat Jan 27 15:06:56 2001
-@@ -67,6 +67,10 @@
- #include "XawI18n.h"
- #include "Private.h"
-
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+
- #define MAGIC_VALUE ((XawTextPosition)-1)
- #define streq(a, b) (strcmp((a), (b)) == 0)
-
-@@ -1158,7 +1162,9 @@
- static FILE *
- InitStringOrFile(MultiSrcObject src, Bool newString)
- {
-- char *open_mode = NULL;
-+ mode_t open_mode;
-+ const char *fdopen_mode = NULL;
-+ int fd;
- FILE *file;
- char fileName[TMPSIZ];
- Display *d = XtDisplayOfObject((Widget)src);
-@@ -1208,7 +1214,8 @@
- XtErrorMsg("NoFile", "multiSourceCreate", "XawError",
- "Creating a read only disk widget and no file specified.",
- NULL, 0);
-- open_mode = "r";
-+ open_mode = O_RDONLY;
-+ fdopen_mode = "r";
- break;
- case XawtextAppend:
- case XawtextEdit:
-@@ -1218,10 +1225,18 @@
-
- (void)tmpnam((char *)src->multi_src.string);
- src->multi_src.is_tempfile = True;
-- open_mode = "w";
-+ open_mode = O_WRONLY | O_CREAT | O_EXCL;
-+ fdopen_mode = "w";
-+ }
-+ else {
-+/* O_NOFOLLOW is a BSD & Linux extension */
-+#ifdef O_NOFOLLOW
-+ open_mode = O_RDWR | O_NOFOLLOW;
-+#else
-+ open_mode = O_RDWR; /* unsafe; subject to race conditions */
-+#endif
-+ fdopen_mode = "r+";
- }
-- else
-- open_mode = "r+";
- break;
- default:
- XtErrorMsg("badMode", "multiSourceCreate", "XawError",
-@@ -1243,12 +1258,14 @@
- }
-
- if (!src->multi_src.is_tempfile) {
-- if ((file = fopen((char *)src->multi_src.string, open_mode)) != NULL) {
-- (void)fseek(file, 0, 2);
-- src->multi_src.length = ftell(file);
-- return file;
-+ if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != 0) {
-+ if ((file = fdopen(fd, fdopen_mode)) != NULL) {
-+ (void)fseek(file, 0, SEEK_END);
-+ src->multi_src.length = (XawTextPosition)ftell(file);
-+ return(file);
-+ }
- }
-- else {
-+ {
- String params[2];
- Cardinal num_params = 2;
-
-@@ -1258,7 +1275,7 @@
- "openError", "multiSourceCreate", "XawWarning",
- "Cannot open file %s; %s", params, &num_params);
- }
-- }
-+ }
- src->multi_src.length = 0;
- return (NULL);
- }
-diff -Naur -x CVS xc.orig/lib/Xaw/Pixmap.c xc/lib/Xaw/Pixmap.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/Pixmap.c Tue Sep 26 11:56:54 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/Pixmap.c Fri Feb 9 21:33:13 2001
-@@ -437,7 +437,7 @@
- cache = (XawCache **)bsearch(screen, xaw->elems,
- xaw->num_elems, sizeof(XtPointer),
- bcmp_long);
-- if (!cache)
-+ if (!cache || !(*cache)->num_elems)
- return (NULL);
- if (flags == FIND_SCREEN)
- return (*cache);
-@@ -446,7 +446,7 @@
- cache = (XawCache **)bsearch((void *)colormap, (*cache)->elems,
- (*cache)->num_elems, sizeof(XtPointer),
- bcmp_long);
-- if (!cache)
-+ if (!cache || !(*cache)->num_elems)
- return (NULL);
- if (flags == FIND_COLORMAP)
- return (*cache);
-@@ -456,7 +456,7 @@
- (*cache)->num_elems, sizeof(XtPointer),
- bcmp_long);
-
-- if (!cache)
-+ if (!cache || !(*cache)->num_elems)
- return (NULL);
- return (*cache);
- }
-diff -Naur -x CVS xc.orig/lib/Xaw/Text.c xc/lib/Xaw/Text.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/Text.c Thu Dec 7 15:26:12 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/Text.c Fri Feb 9 21:33:13 2001
-@@ -805,6 +805,7 @@
- XtRealizeWidget(vbar);
- XtMapWidget(vbar);
- }
-+ XtSetKeyboardFocus(vbar, (Widget)ctx);
- }
-
- /*
-@@ -863,6 +864,7 @@
- XtRealizeWidget(hbar);
- XtMapWidget(hbar);
- }
-+ XtSetKeyboardFocus(hbar, (Widget)ctx);
- }
-
- /*
-diff -Naur -x CVS xc.orig/lib/Xaw/TextAction.c xc/lib/Xaw/TextAction.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/TextAction.c Thu Dec 7 15:26:12 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/TextAction.c Fri Feb 9 21:33:13 2001
-@@ -2835,12 +2835,23 @@
- EndAction((TextWidget)w);
- }
-
-+/* This is kind of a hack, but, only one text widget can have focus at
-+ * a time on one display. There is a problem in the implementation of the
-+ * text widget, the scrollbars can not be adressed via editres, since they
-+ * are not children of a subclass of composite.
-+ * The focus variable is required to make sure only one text window will
-+ * show a block cursor at one time.
-+ */
-+struct _focus { Display *display; Widget widget; };
-+static struct _focus *focus;
-+static Cardinal num_focus;
- /*ARGSUSED*/
- static void
- TextFocusIn(Widget w, XEvent *event, String *p, Cardinal *n)
- {
- TextWidget ctx = (TextWidget)w;
- Bool display_caret = ctx->text.display_caret;
-+ int i;
-
- if (event->xfocus.detail == NotifyPointer)
- return;
-@@ -2853,6 +2864,25 @@
- ctx->text.hasfocus = TRUE;
- if (display_caret)
- EndAction(ctx);
-+
-+ for (i = 0; i < num_focus; i++)
-+ if (focus[i].display == XtDisplay(w))
-+ break;
-+ if (i >= num_focus) {
-+ focus = (struct _focus*)
-+ XtRealloc((XtPointer)focus, sizeof(struct _focus) * (num_focus + 1));
-+ i = num_focus;
-+ focus[i].widget = w;
-+ focus[i].display = XtDisplay(w);
-+ num_focus++;
-+ }
-+ if (focus[i].widget != w) {
-+ Widget old = focus[i].widget;
-+
-+ focus[i].widget = w;
-+ if (old != NULL)
-+ TextFocusOut(old, event, p, n);
-+ }
- }
-
- /*ARGSUSED*/
-@@ -2861,8 +2891,24 @@
- {
- TextWidget ctx = (TextWidget)w;
- Bool display_caret = ctx->text.display_caret;
-+ Widget shell;
-+ Window window;
-+ int i, revert;
-+
-+ shell = w;
-+ while (shell) {
-+ if (XtIsShell(shell))
-+ break;
-+ shell = XtParent(shell);
-+ }
-
-- if (event->xfocus.detail == NotifyPointer)
-+ for (i = 0; i < num_focus; i++)
-+ if (focus[i].display == XtDisplay(w))
-+ break;
-+ XGetInputFocus(XtDisplay(w), &window, &revert);
-+ if ((XtWindow(shell) == window &&
-+ (i < num_focus && focus[i].widget == w))
-+ || event->xfocus.detail == NotifyPointer)
- return;
-
- /* Let the input method know focus has left.*/
-@@ -3110,6 +3156,8 @@
- FD_ZERO(&fds);
- FD_SET(ConnectionNumber(XtDisplay(w)), &fds);
- (void)select(FD_SETSIZE, &fds, NULL, NULL, &tmval);
-+ if (tmval.tv_usec != 500000)
-+ usleep(40000);
-
- StartAction(ctx, NULL);
- #ifndef OLDXAW
-@@ -3342,8 +3390,9 @@
- return;
- }
- else {
-- mult = mult * 10 + params[0][0] - '0';
-- ctx->text.mult = ctx->text.mult * 10 + params[0][0] - '0';
-+ mult = mult * 10 + (params[0][0] - '0') * (mult < 0 ? -1 : 1);
-+ ctx->text.mult = ctx->text.mult * 10 + (params[0][0] - '0') *
-+ (mult < 0 ? -1 : 1);
- }
- if (mult != ctx->text.mult || mult >= 32767) { /* checks for overflow */
- XBell(XtDisplay(w), 0);
-diff -Naur -x CVS xc.orig/lib/Xaw/TextPop.c xc/lib/Xaw/TextPop.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/TextPop.c Thu May 18 12:29:52 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/TextPop.c Fri Feb 9 21:33:13 2001
-@@ -837,7 +837,7 @@
- static Bool
- DoSearch(struct SearchAndReplace *search)
- {
-- char msg[BUFSIZ];
-+ char msg[37];
- Widget tw = XtParent(search->search_popup);
- XawTextPosition pos;
- XawTextScanDirection dir;
-@@ -875,11 +875,27 @@
- GetString to get a tame version */
-
- if (pos == XawTextSearchError) {
-- (void)XmuSnprintf(msg, sizeof(msg),
-- "Could not find string ``%s''.",
-- GetString(search->search_text));
-+ char *ptr;
-+ int len;
-+
-+ ptr = GetString(search->search_text);
-+ len = strlen(ptr);
-+ (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr);
-+
-+ ptr = strchr(msg, '\n');
-+ if (ptr != NULL || sizeof(msg) - 1 < len) {
-+ if (ptr != NULL)
-+ len = ptr - msg + 4;
-+ else
-+ len = strlen(msg);
-+
-+ if (len < 4)
-+ strcpy(msg, "...");
-+ else
-+ strcpy(msg + len - 4, "...");
-+ }
- XawTextUnsetSelection(tw);
-- SetSearchLabels(search, msg, "", True);
-+ SetSearchLabels(search, "Could not find string", msg, True);
-
- return (False);
- }
-@@ -1019,15 +1035,26 @@
-
- if (new_pos == XawTextSearchError) {
- if (count == 0) {
-- char msg[BUFSIZ];
--
-- /* The Raw string in find.ptr may be WC I can't use here,
-- so I call GetString to get a tame version */
--
-- (void)XmuSnprintf(msg, sizeof(msg),
-- "Error: Could not find string ``%s''",
-- GetString(search->search_text));
-- SetSearchLabels(search, msg, "", True);
-+ char msg[37];
-+ char *ptr;
-+ int len;
-+
-+ ptr = GetString(search->search_text);
-+ len = strlen(ptr);
-+ (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr);
-+ ptr = strchr(msg, '\n');
-+ if (ptr != NULL || sizeof(msg) - 1 < len) {
-+ if (ptr != NULL)
-+ len = ptr - msg + 4;
-+ else
-+ len = strlen(msg);
-+
-+ if (len < 4)
-+ strcpy(msg, "...");
-+ else
-+ strcpy(msg + len - 4, "...");
-+ }
-+ SetSearchLabels(search, "Could not find string", msg, True);
-
- if (redisplay) {
- XawTextSetInsertionPoint(tw, ipos);
-@@ -1047,7 +1074,7 @@
- XawTextGetSelectionPos(tw, &pos, &end_pos);
-
- if (search->selection_changed) {
-- SetSearchLabels(search, "Selection has been modified, aborting.",
-+ SetSearchLabels(search, "Selection modified, aborting.",
- "", True);
- if (redisplay) {
- XawTextSetInsertionPoint(tw, ipos);
-@@ -1067,11 +1094,7 @@
- }
-
- if (XawTextReplace(tw, pos, end_pos, &replace) != XawEditDone) {
-- char msg[BUFSIZ];
--
-- (void)XmuSnprintf(msg, sizeof(msg),
-- "'%s' with '%s'", find.ptr, replace.ptr);
-- SetSearchLabels(search, "Error while replacing", msg, True);
-+ SetSearchLabels(search, "Error while replacing.", "", True);
- if (redisplay) {
- XawTextSetInsertionPoint(tw, ipos);
- XawTextEnableRedisplay(tw);
-diff -Naur -x CVS xc.orig/lib/Xaw/TextSrc.c xc/lib/Xaw/TextSrc.c
---- XFree86-4.0.2.orig/xc/lib/Xaw/TextSrc.c Tue Sep 26 11:56:55 2000
-+++ XFree86-4.0.2/xc/lib/Xaw/TextSrc.c Fri Feb 9 21:33:13 2001
-@@ -1022,9 +1022,9 @@
- XtFree((XtPointer)entity);
- if (entity == anchor->entities) {
- if ((anchor->entities = enext) == NULL) {
-+ eprev = NULL;
- anchor = XawTextSourceRemoveAnchor(w, anchor);
- entity = anchor ? anchor->entities : NULL;
-- eprev = NULL;
- }
- else
- eprev = entity = enext;
-@@ -1053,6 +1053,7 @@
- XtFree((XtPointer)entity);
- anchor->cache = NULL;
- if (entity == anchor->entities) {
-+ eprev = NULL;
- if ((anchor->entities = enext) == NULL) {
- if (i == 0)
- ++i;
-@@ -1069,7 +1070,6 @@
- break;
- }
- anchor = src->textSrc.anchors[i];
-- eprev = NULL;
- entity = anchor->entities;
- continue;
- }
-diff -Naur -x CVS xc.orig/programs/Xserver/dix/events.c xc/programs/Xserver/dix/events.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/dix/events.c Sun Oct 22 17:12:09 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/dix/events.c Fri Feb 9 21:33:13 2001
-@@ -2783,6 +2783,44 @@
- if (deactivateGrab)
- (*keybd->DeactivateGrab)(keybd);
- }
-+
-+#ifdef XKB
-+/* This function is used to set the key pressed or key released state -
-+ this is only used when the pressing of keys does not cause
-+ CoreProcessKeyEvent to be called, as in for example Mouse Keys.
-+*/
-+void
-+FixKeyState (xE, keybd)
-+ register xEvent *xE;
-+ register DeviceIntPtr keybd;
-+{
-+ int key, bit;
-+ register BYTE *kptr;
-+ register KeyClassPtr keyc = keybd->key;
-+
-+ key = xE->u.u.detail;
-+ kptr = &keyc->down[key >> 3];
-+ bit = 1 << (key & 7);
-+#ifdef DEBUG
-+ if ((xkbDebugFlags&0x4)&&
-+ ((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
-+ ErrorF("FixKeyState: Key %d %s\n",key,
-+ (xE->u.u.type==KeyPress?"down":"up"));
-+ }
-+#endif
-+ switch (xE->u.u.type)
-+ {
-+ case KeyPress:
-+ *kptr |= bit;
-+ break;
-+ case KeyRelease:
-+ *kptr &= ~bit;
-+ break;
-+ default:
-+ FatalError("Impossible keyboard event");
-+ }
-+}
-+#endif
-
- void
- #ifdef XKB
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/CHANGELOG xc/programs/Xserver/hw/xfree86/CHANGELOG
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/CHANGELOG Tue Dec 19 08:12:29 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/CHANGELOG Sat Feb 10 09:37:49 2001
-@@ -1,3 +1,40 @@
-+XFree86 4.0.2a (?? February 2001)
-+1224. Make acceleration work on the Trident Cyber9388 (Alan Hourihane).
-+1223. Make some changes to the clock selection for trident driver
-+ (Alan Hourihane).
-+1222. Ensure Video is unavailable when no acceleration available in the
-+ trident driver (Alan Hourihane).
-+1221. Allow xf86ClaimPciSlot to be called with a NULL GDevPtr, as it was
-+ previously (Alan Hourihane).
-+1220. Correct some problems with xedit c-mode. Fix geometry management
-+ incompatibilites with Xaw 6 in the Form widget.
-+ Fix problem in libxf86config when comparing float and double and
-+ small fix to xf86cfg when converting a HorizSync or VertRefresh
-+ specification string to format used internally by libxf86config.
-+ Adds dvorak keyboard and fixes Ukranian in rules/xfree86.lst.
-+ Fix problems in the xkb interface of xf86cfg and fix autorepeat with
-+ MouseKeys, based on patches and suggestion of Stephen Montgomery-Smith
-+ (Paulo César Pereira de Andrade).
-+1219. Undo s3virge changes in 4.0.2 for Xv support on ViRGE chipsets since
-+ they caused problems with plain ViRGE cards. Xv is still supported
-+ for the ViRGE DX (#4414, 4430, Kevin Brosius).
-+1218. Fix incorrect driverName fields in the cyrix, i810 and sis drivers.
-+ This was causing 'XFree86 -configure' to get the driver name wrong.
-+ Also fix the documentation of this field in the DESIGN doc (David Dawes).
-+1217. [SECURITY] Fix temp files vulnerabilites in xman on systems with
-+ mkstemp(). (Matthieu Herrb).
-+1216. [SECURITY] Fix temp vulnerabilities in Xaw/MultiSrc.c using the technique
-+ in patch #4279 (Branden Robinson). Fix temp file vulnerability in
-+ gccmakedep based on report from Alan Cox. Fix temp file vulnerability
-+ in Imake.rules, InstallManPageAliases (Matthieu Herrb).
-+1215. Fix Neomagic 2200 screen corruption (Egbert Eich).
-+1214. Add an imake control for determining when xload should be installed
-+ set-gid (David Dawes).
-+1213. Add some imake controls for installing Xkb and app-defaults files
-+ in the traditional location rather than under /etc/X11 (Red Hat does
-+ that) (David Dawes).
-+1212. Misc bindist updates.
-+
- XFree86 4.0.2 (18 December 2000)
- 1211. Fix a problem introduced recently when using the "ps/2" protocol for
- mice on FreeBSD (David Dawes).
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/common/xf86Bus.c xc/programs/Xserver/hw/xfree86/common/xf86Bus.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c Wed Dec 6 10:35:07 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c Sat Feb 10 09:37:49 2001
-@@ -1,4 +1,4 @@
--/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.56 2000/12/06 15:35:07 eich Exp $ */
-+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.56.2.1 2001/02/10 10:23:53 alanh Exp $ */
- /*
- * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
- */
-@@ -443,7 +443,8 @@
- pEnt->chipset = xf86Entities[entityIndex]->chipset;
- pEnt->resources = xf86Entities[entityIndex]->resources;
- pEnt->driver = xf86Entities[entityIndex]->driver;
-- if (xf86Entities[entityIndex]->devices[0]) {
-+ if ( (xf86Entities[entityIndex]->devices) &&
-+ (xf86Entities[entityIndex]->devices[0]) ) {
- for (i = 0; i < xf86Entities[entityIndex]->numInstances; i++)
- if (xf86Entities[entityIndex]->devices[i]->screen == 0)
- break;
-@@ -469,7 +470,8 @@
- int i;
-
- /* We might not use AddDevtoEntity */
-- if (!xf86Entities[entityIndex]->devices[0])
-+ if ( (!xf86Entities[entityIndex]->devices) ||
-+ (!xf86Entities[entityIndex]->devices[0]) )
- return NULL;
-
- if (entityIndex >= xf86NumEntities ||
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/common/xf86pciBus.c xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c Fri Dec 8 15:13:35 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c Sat Feb 10 09:37:49 2001
-@@ -2343,7 +2343,8 @@
- p->pciBusId.func = func;
- p->active = active;
- p->inUse = FALSE;
-- xf86AddDevToEntity(num, dev);
-+ if (dev)
-+ xf86AddDevToEntity(num, dev);
- /* Here we initialize the access structure */
- p->access = xnfcalloc(1,sizeof(EntityAccessRec));
- while (ppaccp && *ppaccp) {
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/BugReport xc/programs/Xserver/hw/xfree86/doc/BugReport
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/BugReport Thu Aug 3 08:24:02 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/BugReport Tue Dec 19 13:13:35 2000
-@@ -5,7 +5,7 @@
-
- VERSION:
-
--4.0.1a
-+4.0.2
-
- VIDEO DRIVER:
-
-@@ -54,4 +54,4 @@
-
-
-
--$XFree86: xc/programs/Xserver/hw/xfree86/doc/BugReport,v 1.3 2000/08/03 12:24:02 dawes Exp $
-+$XFree86: xc/programs/Xserver/hw/xfree86/doc/BugReport,v 1.3.2.1 2000/12/19 18:13:35 dawes Exp $
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/DESIGN xc/programs/Xserver/hw/xfree86/doc/DESIGN
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/DESIGN Mon Dec 4 14:47:21 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/DESIGN Fri Feb 9 21:33:14 2001
-@@ -408,12 +408,12 @@
- points required during the early phase of InitOutput(). xf86AddDriver() adds
- it to the global xf86DriverList[] array.
-
--The DriverRec contains the driver's version, a short descriptive message, the
--Identify(), Probe() and AvailableOptions() function entry points as well as a
--pointer to the driver's module (as returned from the loader when the driver
--was loaded) and a reference count which keeps track of how many screens are
--using the driver. The entry driver entry points are those required prior to
--the driver allocating and filling in its ScrnInfoRec.
-+The DriverRec contains the driver canonical name, the Identify(), Probe() and
-+AvailableOptions() function entry points as well as a pointer to the driver's
-+module (as returned from the loader when the driver was loaded) and a refer-
-+ence count which keeps track of how many screens are using the driver. The
-+entry driver entry points are those required prior to the driver allocating
-+and filling in its ScrnInfoRec.
-
- For a static server, the xf86DriverList[] array is initialised at build time,
- and the loading of modules is not done.
-@@ -5368,7 +5368,7 @@
-
- DriverRec ZZZ = {
- VERSION,
-- "unaccelerated driver for ZZZ Zzzzzy cards",
-+ ZZZ_DRIVER_NAME,
- ZZZIdentify,
- ZZZProbe,
- ZZZAvailableOptions,
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml Mon Dec 4 13:49:54 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml Fri Feb 9 21:33:14 2001
-@@ -517,8 +517,8 @@
- &s.code;InitOutput()&e.code;. &s.code;xf86AddDriver()&e.code; adds
- it to the global &s.code;xf86DriverList[]&e.code; array.
-
-- The &s.code;DriverRec&e.code; contains the driver's version, a short
-- descriptive message, the &s.code;Identify()&e.code;,
-+ The &s.code;DriverRec&e.code; contains the driver canonical name,
-+ the &s.code;Identify()&e.code;,
- &s.code;Probe()&e.code; and &s.code;AvailableOptions()&e.code;
- function entry points as well as a pointer
- to the driver's module (as returned from the loader when the driver
-@@ -6336,7 +6336,7 @@
- <code>
- DriverRec ZZZ = {
- VERSION,
-- "unaccelerated driver for ZZZ Zzzzzy cards",
-+ ZZZ_DRIVER_NAME,
- ZZZIdentify,
- ZZZProbe,
- ZZZAvailableOptions,
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/sgml/README.sgml xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml Sat Dec 16 12:33:01 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml Fri Feb 9 21:33:14 2001
-@@ -31,8 +31,22 @@
- <sect>What is XFree86 &relvers;?
- <p>
-
--XFree86 &relvers; is the third full release in the <![ %earlyrel; [new]]>
--XFree86 4 series.
-+<![ %updaterel [
-+XFree86 &relvers; is the &whichupdaterel; update to &fullrelvers;,
-+the &whichfullrel; full release in the <![ %earlyrel; [new]]> XFree86
-+4 series.
-+
-+Update releases are taken from a stable/maintenance branch. They are
-+designed to be installed on top of the full release that they are
-+updating. They contain fixes for serious problems, most commonly
-+fixes for security issues, fixes for driver bugs, and fixes that improve
-+stability.
-+]]>
-+
-+<![ %fullrel [
-+XFree86 &relvers; is the &whichfullrel; full release in the <![ %earlyrel;
-+[new]]> XFree86 4 series.
-+]]>
-
- <p>
- XFree86 release 4 is a major re-design of the basic architectural
-@@ -47,9 +61,10 @@
- The road to XFree86 release 4 began as an architectural concept in mid
- 1997, with the serious framework being implemented in code the beginning
- of 1998. There were several snapshots on the road to 4.0 which are now
--part of the 4.0 base release. The &relvers; version is an upgrade to
-+part of the 4.0 base release.
-+<![ %fullrel [The &relvers; version is an upgrade to
- &prevrelvers;, which include more hardware ports, code enhancements and
--bug fixes.
-+bug fixes.]]>
-
- Release 4 also included the long-awaited integration of the DRI (Direct
- Rendering Infrastructure). This upgrade into the code base gives
-@@ -195,113 +210,134 @@
- obtaining the release in source form is given below.
- ]]>
-
--The source for version &relvers; is split into three tarballs:
--<tt>X&srcvers;src-1.tgz</tt>, <tt>X&srcvers;src-2.tgz</tt>,
--<tt>X&srcvers;src-3.tgz</tt>. The first contains everything except the
-+<![ %updaterel; [
-+The source for version &relvers; is available as a patch relative to
-+&prevrelvers;.
-+The patch file is <tt>&prevrelvers;-&relvers;.diff.gz</tt>.
-+
-+The patch
-+should be applied to a clean &prevrelvers; source tree, working from
-+the directory containing the <tt>xc/</tt> directory. The patch should
-+be applied by running:
-+
-+<tscreen><verb>
-+gzip -d < &prevrelvers;-&relvers;.diff.gz | patch -p0 -E
-+</verb></tscreen>
-+
-+Information about getting the source for &prevrelvers can be found in the
-+README file for that version, which can be found on the
-+<url name="XFree86 web site" url="http://www.xfree86.org/pub/XFree86/&prevrelvers;/README.html">.
-+.
-+]]>
-+
-+<![ %fullrel [
-+The source for version &fullrelvers; is split into three tarballs:
-+<tt>X&fullsrcvers;src-1.tgz</tt>, <tt>X&fullsrcvers;src-2.tgz</tt>,
-+<tt>X&fullsrcvers;src-3.tgz</tt>. The first contains everything except the
- fonts and general X11 documentation. It is sufficient for building
- XFree86 is you already have a set of fonts. The second contains the
- fonts and the source for the general X11 documentation. The third
- contains the general X11 documentation in hardcopy format.
-
- <![ %onediff; [
--A source patch relative to version &prevrelvers; is also available.
--The patch file is <tt>&prevrelvers;-&relvers;.diff.gz</tt>.
-+A source patch relative to version &prevfullrelvers; is also available.
-+The patch file is <tt>&prevfullrelvers;-&fullrelvers;.diff.gz</tt>.
- <![ %difftar; [
- There is also a tarball that contains some files that have components that
--can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
-+can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
- ]]>
- The patch
--should be applied to a clean &prevrelvers; source tree, working from
-+should be applied to a clean &prevfullrelvers; source tree, working from
- the directory containing the <tt>xc/</tt> directory. The patch should
- be applied by running:
-
- <tscreen><verb>
--gzip -d < &prevrelvers;-&relvers;.diff.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff.gz | patch -p0 -E
- </verb></tscreen>
- <![ %difftar; [
- <tscreen><verb>
--gzip -d < &relvers;.tgz | tar vxf -
-+gzip -d < &fullrelvers;.tgz | tar vxf -
- </verb></tscreen>
- ]]>
- ]]>
-
- <![ %twodiffs; [
--A source patch relative to version &prevrelvers; is also available.
-+A source patch relative to version &prevfullrelvers; is also available.
- Because of its size, it is split into two parts.
--The patch files are <tt>&prevrelvers;-&relvers;.diff1.gz</tt> and
--<tt>&prevrelvers;-&relvers;.diff2.gz</tt>.
-+The patch files are <tt>&prevfullrelvers;-&fullrelvers;.diff1.gz</tt> and
-+<tt>&prevfullrelvers;-&fullrelvers;.diff2.gz</tt>.
- <![ %difftar; [
- There is also a tarball that contains some files that have components that
--can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
-+can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
- ]]>
- These patches should
--be applied to a clean &prevrelvers; source tree, working from the directory
-+be applied to a clean &prevfullrelvers; source tree, working from the directory
- containing the <tt>xc/</tt> directory. The patches should be applied by
- running:
-
- <tscreen><verb>
--gzip -d < &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
--gzip -d < &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
- </verb></tscreen>
- <![ %difftar; [
- <tscreen><verb>
--gzip -d < &relvers;.tgz | tar vxf -
-+gzip -d < &fullrelvers;.tgz | tar vxf -
- </verb></tscreen>
- ]]>
- ]]>
-
- <![ %threediffs; [
--A source patch relative to version &prevrelvers; is also available.
-+A source patch relative to version &prevfullrelvers; is also available.
- Because of its size, it is split into three parts.
--The patch files are <tt>&prevrelvers;-&relvers;.diff1.gz</tt>,
--<tt>&prevrelvers;-&relvers;.diff2.gz</tt> and
--<tt>&prevrelvers;-&relvers;.diff3.gz</tt>.
-+The patch files are <tt>&prevfullrelvers;-&fullrelvers;.diff1.gz</tt>,
-+<tt>&prevfullrelvers;-&fullrelvers;.diff2.gz</tt> and
-+<tt>&prevfullrelvers;-&fullrelvers;.diff3.gz</tt>.
- <![ %difftar; [
- There is also a tarball that contains some files that have components that
--can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
-+can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
- ]]>
- These patches should
--be applied to a clean &prevrelvers; source tree, working from the directory
-+be applied to a clean &prevfullrelvers; source tree, working from the directory
- containing the <tt>xc/</tt> directory. The patches should be applied by
- running:
-
- <tscreen><verb>
--gzip -d < &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
--gzip -d < &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
--gzip -d < &prevrelvers;-&relvers;.diff3.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff3.gz | patch -p0 -E
- </verb></tscreen>
- <![ %difftar; [
- <tscreen><verb>
--gzip -d < &relvers;.tgz | tar vxf -
-+gzip -d < &fullrelvers;.tgz | tar vxf -
- </verb></tscreen>
- ]]>
- ]]>
-
- <![ %fourdiffs; [
--A source patch relative to version &prevrelvers; is also available.
-+A source patch relative to version &prevfullrelvers; is also available.
- Because of its size, it is split into four parts.
--The patch files are <tt>&prevrelvers;-&relvers;.diff1.gz</tt>,
--<tt>&prevrelvers;-&relvers;.diff2.gz</tt>,
--<tt>&prevrelvers;-&relvers;.diff3.gz</tt> and
--<tt>&prevrelvers;-&relvers;.diff4.gz</tt>.
-+The patch files are <tt>&prevfullrelvers;-&fullrelvers;.diff1.gz</tt>,
-+<tt>&prevfullrelvers;-&fullrelvers;.diff2.gz</tt>,
-+<tt>&prevfullrelvers;-&fullrelvers;.diff3.gz</tt> and
-+<tt>&prevfullrelvers;-&fullrelvers;.diff4.gz</tt>.
- <![ %difftar; [
- There is also a tarball that contains some files that have components that
--can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
-+can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
- ]]>
- These patches should
--be applied to a clean &prevrelvers; source tree, working from the directory
-+be applied to a clean &prevfullrelvers; source tree, working from the directory
- containing the <tt>xc/</tt> directory. The patches should be applied by
- running:
-
- <tscreen><verb>
--gzip -d < &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
--gzip -d < &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
--gzip -d < &prevrelvers;-&relvers;.diff3.gz | patch -p0 -E
--gzip -d < &prevrelvers;-&relvers;.diff4.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff3.gz | patch -p0 -E
-+gzip -d < &prevfullrelvers;-&fullrelvers;.diff4.gz | patch -p0 -E
- </verb></tscreen>
- <![ %difftar; [
- <tscreen><verb>
--gzip -d < &relvers;.tgz | tar vxf -
-+gzip -d < &fullrelvers;.tgz | tar vxf -
- </verb></tscreen>
- ]]>
- ]]>
-@@ -311,6 +347,7 @@
-
- To format the XFree86 documentation use the latest version of our doctools
- package available as <tt>doctools-&doctoolsvers;.tgz</tt>.
-+]]> <!-- fullrel -->
-
- <sect>Reporting Bugs
- <p>
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c Sat Dec 2 10:30:37 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c Fri Feb 9 21:33:14 2001
-@@ -112,7 +112,7 @@
-
- DriverRec CYRIX = {
- VERSION,
-- "accelerated driver for Cyrix integrated processors",
-+ CYRIX_DRIVER_NAME,
- CYRIXIdentify,
- CYRIXProbe,
- CYRIXAvailableOptions,
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Sat Dec 2 10:30:42 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Fri Feb 9 21:33:14 2001
-@@ -92,7 +92,7 @@
-
- DriverRec I810 = {
- I810_VERSION,
-- "Accelerated driver for Intel i810 cards",
-+ I810_DRIVER_NAME,
- I810Identify,
- I810Probe,
- I810AvailableOptions,
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c Tue Oct 17 17:36:15 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c Mon Jan 22 14:59:11 2001
-@@ -337,8 +337,8 @@
- NEOACLPtr nAcl = NEOACLPTR(pScrn);
-
- if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
-- if (((dstX < 64) && ((srcX + w) == pScrn->displayWidth)) ||
-- ((dstX == 0) && (w > (pScrn->displayWidth - 64)))) {
-+ if ((((dstX < 64) && ((srcX + w) == pScrn->displayWidth)) ||
-+ ((dstX == 0) && (w > (pScrn->displayWidth - 64)))) && (w > 64)) {
-
- int srcX1 = srcX + 64;
- int dstX1 = dstX + 64;
-@@ -368,9 +368,9 @@
- OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
- }
- } else {
-- if ((((dstX + w) > (pScrn->displayWidth - 64)) && (srcX == 0))
-+ if (((((dstX + w) > (pScrn->displayWidth - 64)) && (srcX == 0))
- || (((dstX + w) == pScrn->displayWidth)
-- && (w > (pScrn->displayWidth - 64)))) {
-+ && (w > (pScrn->displayWidth - 64)))) && (w > 64)) {
- int srcX1, dstX1;
-
- w -= 64;
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES Tue Nov 28 15:59:17 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES Fri Feb 9 21:33:14 2001
-@@ -1,7 +1,7 @@
- S3 ViRGE 4.0 devel notes
-
- rev:
--27 Nov 2000 KJB
-+3 Jan 2001 KJB
-
-
- Function Implemented
-@@ -23,6 +23,11 @@
-
- Status
- ------
-+1/03/01 KJB
-+Ver 1.6.0
-+Revert ViRGE to pre-Xv changes. ViRGE DX still supports Xv, but changes
-+added for Xv and ViRGE caused problems with normal display.
-+
- 11/27/00 KJB
- Ver 1.5.0
- Clean up, bump version for 4.0.2 submission.
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c Fri Feb 9 21:33:14 2001
-@@ -116,9 +116,9 @@
-
- #define S3VIRGE_NAME "S3VIRGE"
- #define S3VIRGE_DRIVER_NAME "s3virge"
--#define S3VIRGE_VERSION_NAME "1.5.0"
-+#define S3VIRGE_VERSION_NAME "1.6.0"
- #define S3VIRGE_VERSION_MAJOR 1
--#define S3VIRGE_VERSION_MINOR 5
-+#define S3VIRGE_VERSION_MINOR 6
- #define S3VIRGE_PATCHLEVEL 0
- #define S3VIRGE_DRIVER_VERSION ((S3VIRGE_VERSION_MAJOR << 24) | \
- (S3VIRGE_VERSION_MINOR << 16) | \
-@@ -3073,7 +3073,7 @@
- S3VCommonCalcClock(dclk, 1, 1, 31, 0, 4,
- 230000, 460000, &new->SR13, &new->SR12);
- } /* end TRIO_3D if() */
-- else { /* Is this correct for DX/GX as well? */
-+ else if(ps3v->Chipset == S3_ViRGE_DXGX) {
- if (pScrn->bitsPerPixel == 8) {
- if(dclk > 80000) { /* We need pixmux */
- new->CR67 = 0x10;
-@@ -3110,7 +3110,39 @@
- }
- S3VCommonCalcClock(dclk, 1, 1, 31, 0, 3,
- 135000, 270000, &new->SR13, &new->SR12);
-- }
-+ } /* end DXGX if() */
-+ else { /* Everything else ... (only ViRGE) */
-+ if (pScrn->bitsPerPixel == 8) {
-+ if(dclk > 80000) { /* We need pixmux */
-+ new->CR67 = 0x10;
-+ new->SR15 |= 0x10; /* Set DCLK/2 bit */
-+ new->SR18 = 0x80; /* Enable pixmux */
-+ }
-+ }
-+ else if ((pScrn->bitsPerPixel == 16) && (pScrn->weight.green == 5)) {
-+ new->CR67 = 0x30; /* 15bpp */
-+ }
-+ else if (pScrn->bitsPerPixel == 16) {
-+ new->CR67 = 0x50;
-+ }
-+ else if (pScrn->bitsPerPixel == 24) {
-+ new->CR67 = 0xd0 | 0x0c;
-+ /* Flag STREAMS proc. required */
-+ ps3v->NeedSTREAMS = TRUE;
-+ S3VInitSTREAMS(pScrn, new->STREAMS, mode);
-+ new->MMPR0 = 0xc000; /* Adjust FIFO slots */
-+ }
-+ else if (pScrn->bitsPerPixel == 32) {
-+ new->CR67 = 0xd0 | 0x0c;
-+ /* Flag STREAMS proc. required */
-+ ps3v->NeedSTREAMS = TRUE;
-+ S3VInitSTREAMS(pScrn, new->STREAMS, mode);
-+ new->MMPR0 = 0x10000; /* Still more FIFO slots */
-+ }
-+ S3VCommonCalcClock(dclk, 1, 1, 31, 0, 3,
-+ 135000, 270000, &new->SR13, &new->SR12);
-+ } /* end great big if()... */
-+
-
- /* Now adjust the value of the FIFO based upon options specified */
- if( ps3v->fifo_moderate ) {
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c Tue Nov 28 15:59:18 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c Fri Feb 9 21:33:14 2001
-@@ -106,9 +106,9 @@
- (pScrn->bitsPerPixel == 16)
- )
- &&
-- ((ps3v->Chipset == S3_ViRGE_DXGX) ||
-+ ((ps3v->Chipset == S3_ViRGE_DXGX) /* || */
- /* S3_ViRGE_GX2_SERIES(ps3v->Chipset) || */
-- (ps3v->Chipset == S3_ViRGE)
-+ /* (ps3v->Chipset == S3_ViRGE) */
- )
- && !ps3v->NoAccel
- )
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c Sat Dec 2 10:30:51 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c Fri Feb 9 21:33:14 2001
-@@ -117,7 +117,7 @@
-
- DriverRec SIS = {
- SIS_CURRENT_VERSION,
-- "accelerated driver for SiS chipsets",
-+ SIS_DRIVER_NAME,
- SISIdentify,
- SISProbe,
- SISAvailableOptions,
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident.h xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h Fri Dec 8 04:05:16 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h Sat Feb 10 09:37:50 2001
-@@ -266,8 +266,7 @@
- #define HAS_DST_TRANS ((pTrident->Chipset == PROVIDIA9682) || \
- (pTrident->Chipset == PROVIDIA9685))
-
--#define Is3Dchip ((pTrident->Chipset == CYBER9388) || \
-- (pTrident->Chipset == CYBER9397) || \
-+#define Is3Dchip ((pTrident->Chipset == CYBER9397) || \
- (pTrident->Chipset == CYBER9397DVD) || \
- (pTrident->Chipset == CYBER9520) || \
- (pTrident->Chipset == CYBER9525DVD) || \
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c Thu Dec 7 11:48:04 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c Sat Feb 10 09:37:50 2001
-@@ -158,7 +158,8 @@
- infoPtr->SubsequentScreenToScreenCopy =
- TridentSubsequentScreenToScreenCopy;
-
-- if (!(pTrident->Chipset == PROVIDIA9685 && pScrn->bitsPerPixel > 8)) {
-+ if (!((pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) && pScrn->bitsPerPixel > 8)) {
- infoPtr->Mono8x8PatternFillFlags = NO_PLANEMASK |
- HARDWARE_PATTERN_SCREEN_ORIGIN |
- BIT_ORDER_IN_BYTE_MSBFIRST;
-@@ -282,7 +283,8 @@
-
- REPLICATE(transparency_color);
- if (transparency_color != -1) {
-- if (pTrident->Chipset == PROVIDIA9685) {
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) {
- dst |= 1<<16;
- } else {
- TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
-@@ -294,7 +296,8 @@
- if ((pTrident->Chipset == PROVIDIA9682) ||
- (pTrident->Chipset == TGUI9680))
- dst |= FASTMODE;
-- if (pTrident->Chipset == PROVIDIA9685)
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388)
- dst |= 1<<21;
- }
-
-@@ -332,7 +335,8 @@
- pTrident->BltScanDirection = 0;
- REPLICATE(color);
- TGUI_FMIX(XAAPatternROP[rop]);
-- if (pTrident->Chipset == PROVIDIA9685) {
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) {
- TGUI_FPATCOL(color);
- if (rop == GXcopy)
- pTrident->BltScanDirection |= 1<<21;
-@@ -404,10 +408,12 @@
- if ((pTrident->Chipset == PROVIDIA9682 ||
- pTrident->Chipset == TGUI9680) && rop == GXcopy)
- pTrident->BltScanDirection |= FASTMODE;
-- if (pTrident->Chipset == PROVIDIA9685 && rop == GXcopy)
-+ if ((pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) && rop == GXcopy)
- pTrident->BltScanDirection |= 1<<21;
- REPLICATE(fg);
-- if (pTrident->Chipset == PROVIDIA9685) {
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) {
- TGUI_FPATCOL(fg);
- if (bg == -1) {
- pTrident->BltScanDirection |= 1<<12;
-@@ -463,7 +469,8 @@
- TGUI_FMIX(XAAPatternROP[rop]);
- if ((pTrident->Chipset == PROVIDIA9682 ||
- pTrident->Chipset == TGUI9680) && rop == GXcopy) drawflag = FASTMODE;
-- if (pTrident->Chipset == PROVIDIA9685) {
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) {
- if (rop == GXcopy) drawflag |= 1<<21;
- TGUI_FPATCOL(color);
- } else {
-@@ -522,26 +529,30 @@
- int drawflag = 0;
-
- REPLICATE(fg);
-- if (pTrident->Chipset == PROVIDIA9685)
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388)
- TGUI_FPATCOL(fg);
- else
- TGUI_FCOLOUR(fg);
-
- if (bg == -1) {
- drawflag |= 1<<12;
-- if (pTrident->Chipset == PROVIDIA9685)
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388)
- TGUI_BPATCOL(~fg);
- else
- TGUI_BCOLOUR(~fg);
- } else {
- REPLICATE(bg);
-- if (pTrident->Chipset == PROVIDIA9685)
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388)
- TGUI_BPATCOL(bg);
- else
- TGUI_BCOLOUR(bg);
- }
-
-- if (pTrident->Chipset == PROVIDIA9685) {
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) {
- drawflag |= 7<<18;
- if (rop == GXcopy) drawflag |= 1<<21;
- }
-@@ -584,7 +595,8 @@
-
- REPLICATE(transparency_color);
- if (transparency_color != -1) {
-- if (pTrident->Chipset == PROVIDIA9685) {
-+ if (pTrident->Chipset == PROVIDIA9685 ||
-+ pTrident->Chipset == CYBER9388) {
- drawflag |= 1<<16;
- } else {
- TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c Sat Feb 10 09:37:50 2001
-@@ -333,7 +333,6 @@
- case CYBER9525DVD:
- case CYBER9397DVD:
- case CYBER9397:
-- case CYBER9388:
- case IMAGE975:
- case IMAGE985:
- if (pScrn->bitsPerPixel >= 8)
-@@ -344,9 +343,12 @@
- pReg->tridentRegs3x4[PreEndFetch] = 0xFF;
- /* Fall Through */
- case PROVIDIA9685:
-+ case CYBER9388:
-+ case CYBER9385:
- pReg->tridentRegs3x4[Enhancement0] = 0x40;
- /* Fall Through */
- case PROVIDIA9682:
-+ case CYBER9382:
- if (pTrident->UsePCIRetry)
- pReg->tridentRegs3x4[PCIRetry] = 0xDF;
- else
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c Fri Dec 8 04:05:16 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c Sat Feb 10 09:37:50 2001
-@@ -418,6 +418,7 @@
- "XAACreateInfoRec",
- "XAAHelpPatternROP",
- "XAAHelpSolidROP",
-+ "XAAFillSolidRects",
- "XAACopyROP",
- "XAAPatternROP",
- "XAAInit",
-@@ -1635,9 +1636,9 @@
- case CYBERBLADEI7:
- pTrident->ddc1Read = Tridentddc1Read;
- ramtype = "SDRAM";
-- pTrident->IsCyber = TRUE;
-+ /* pTrident->IsCyber = TRUE; VIA MVP4 integrated Desktop version */
- Support24bpp = TRUE;
-- chipset = "CyberBlade/i7";
-+ chipset = "CyberBlade/i7/VIA MVP4";
- pTrident->NewClockCode = TRUE;
- pTrident->frequency = NTSC;
- break;
-@@ -2579,13 +2580,10 @@
- pScrn->fbOffset = 0;
-
- #ifdef XvExtension
-- if (pTrident->Chipset >= CYBER9397)
-+ if ((pTrident->Chipset >= CYBER9397) && (!pTrident->NoAccel))
- TRIDENTInitVideo(pScreen);
- #endif
-
-- if(pTrident->BlockHandler)
-- pScreen->BlockHandler = pTrident->BlockHandler;
--
- pTrident->CloseScreen = pScreen->CloseScreen;
- pScreen->CloseScreen = TRIDENTCloseScreen;
- pScreen->SaveScreen = TRIDENTSaveScreen;
-@@ -2744,6 +2742,9 @@
- if (pTrident->DGAModes)
- xfree(pTrident->DGAModes);
- pScrn->vtSema = FALSE;
-+
-+ if(pTrident->BlockHandler)
-+ pScreen->BlockHandler = pTrident->BlockHandler;
-
- pScreen->CloseScreen = pTrident->CloseScreen;
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c Sat Feb 10 09:37:50 2001
-@@ -46,8 +46,7 @@
- int freq, ffreq;
- int m, n, k;
- int p, q, r, s;
-- int startn, endn;
-- int endm, endk;
-+ int endn, endm, endk, startk;
-
- p = q = r = s = 0;
-
-@@ -55,23 +54,25 @@
-
- if (pTrident->NewClockCode)
- {
-- startn = 64;
- endn = 255;
- endm = 63;
-- endk = 3;
-+ endk = 2;
-+ if (clock >= 100000) startk = 0;
-+ if (clock < 100000) startk = 1;
-+ if (clock < 50000) startk = 2;
- }
- else
- {
-- startn = 0;
- endn = 121;
- endm = 31;
- endk = 1;
-+ startk = 0;
- }
-
- freq = clock;
-
-- for (k=endk;k>=0;k--)
-- for (n=startn;n<=endn;n++)
-+ for (k=startk;k<=endk;k++)
-+ for (n=0;n<=endn;n++)
- for (m=1;m<=endm;m++)
- {
- ffreq = ( ( ((n + 8) * pTrident->frequency) / ((m + 2) * powerup[k]) ) * 1000);
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c Mon Jun 12 22:28:34 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c Fri Feb 9 21:33:14 2001
-@@ -37,7 +37,7 @@
-
- DriverRec V4L = {
- 40000,
-- "Xv driver for video4linux",
-+ "v4l",
- V4LIdentify, /* Identify*/
- V4LProbe, /* Probe */
- V4LAvailableOptions,
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/etc/bindist/common/host.def xc/programs/Xserver/hw/xfree86/etc/bindist/common/host.def
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/etc/bindist/common/host.def Sat Dec 16 12:36:43 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/bindist/common/host.def Tue Dec 19 13:13:36 2000
-@@ -21,5 +21,6 @@
-
- #define InstallHardcopyDocs YES
- #define HardcopyDocDirs RX XIE XKB XPRINT
-+#define InstallMiscManPages YES
-
-
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/parser/Monitor.c xc/programs/Xserver/hw/xfree86/parser/Monitor.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/parser/Monitor.c Tue Dec 5 14:06:53 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/parser/Monitor.c Fri Feb 9 21:33:15 2001
-@@ -434,7 +434,7 @@
- break;
- case DASH:
- if (xf86getToken (NULL) != NUMBER ||
-- val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)
-+ (float)val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)
- Error (HORIZSYNC_MSG, NULL);
- ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum;
- break;
-@@ -468,7 +468,7 @@
- break;
- case DASH:
- if (xf86getToken (NULL) != NUMBER ||
-- val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
-+ (float)val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
- Error (VERTREFRESH_MSG, NULL);
- ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum;
- break;
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/Imakefile xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile Sat Dec 16 12:33:00 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile Fri Feb 9 21:33:15 2001
-@@ -96,7 +96,7 @@
- #endif
-
- DEFINES = -DXF86CONFIG=\"XConfigFile\" $(MODULEDEFINES) \
-- $(CURSESDEFINES)
-+ $(CURSESDEFINES) -DPROJECT_ROOT=\"ProjectRoot\"
-
- #if HasDlopen
- DLLIB = DlLibrary
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad Thu Nov 30 15:55:16 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad Fri Feb 9 21:39:41 2001
-@@ -1338,7 +1338,7 @@
- <tt><b>Apply changes</b></tt> button there is no way to undo your changes.</font>
-
-
--*Expert.geometry: 800x600
-+*Expert.geometry: 640x460
- *Expert*vpane.min: 64
- *Expert*vpane.max: 64
- *Expert*vpane.showGrip: False
-@@ -1767,3 +1767,4 @@
- *expert*tree*buffers.flagsL.fromVert: size
- *expert*tree*buffers.flags.fromVert: size
- *expert*tree*buffers.flags.fromHoriz: flagsL
-+*Expert*close.label: Close
-\ No newline at end of file
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/accessx.c xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c Fri Oct 20 10:59:05 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c Fri Feb 9 21:39:41 2001
-@@ -179,15 +179,12 @@
- XtNstate,
- (xkb_info->xkb->ctrls->enabled_ctrls &
- (XkbAccessXKeysMask | XkbStickyKeysMask |
-- XkbMouseKeysMask | XkbMouseKeysAccelMask |
-- XkbRepeatKeysMask | XkbSlowKeysMask |
-- XkbBounceKeysMask)) != 0, NULL, 0);
-+ XkbSlowKeysMask | XkbBounceKeysMask)) != 0, NULL, 0);
-
- apply = XtCreateManagedWidget("apply", commandWidgetClass, accessx, NULL, 0);
- XtAddCallback(apply, XtNcallback, ApplyCallback, NULL);
-
- form = XtCreateManagedWidget("Accessx", formWidgetClass, accessx, NULL, 0);
-- XtAddCallback(enable, XtNcallback, EnableCallback, (XtPointer)form);
- timeoutToggle = XtVaCreateManagedWidget("timeoutToggle", toggleWidgetClass,
- form, XtNstate,
- xkb_info->xkb->ctrls->ax_timeout > 60
-@@ -450,7 +447,6 @@
-
- XtSetArg(args[0], XtNstate, &state);
- XtGetValues(enable, args, 1);
-- EnableCallback(enable, (XtPointer)form, (XtPointer)(long)state);
- }
-
- void
-@@ -471,7 +467,7 @@
- static void
- EnableCallback(Widget w, XtPointer user_data, XtPointer call_data)
- {
-- XtSetSensitive(user_data, (long)call_data);
-+ XtSetSensitive((Widget)user_data, (long)call_data);
- }
-
- /*ARGSUSED*/
-@@ -534,162 +530,148 @@
- XtSetArg(args[0], XtNstate, &state);
- XtGetValues(enable, args, 1);
- if (state) {
-- xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask;
- xkb_info->config.initial_ctrls |= XkbAccessXKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask;
-+ }
-+ else {
-+ xkb_info->config.initial_ctrls &= ~XkbAccessXKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbAccessXKeysMask;
-+ }
-+
-+ /* Timeout */
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(timeoutToggle, args, 1);
-+ if (state)
-+ xkb_info->config.ax_timeout =
-+ xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60;
-+ else
-+ xkb_info->config.ax_timeout =
-+ xkb_info->xkb->ctrls->ax_timeout = 65535;
-+
-+ /* Enable StickyKeys */
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(sticky, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_ctrls |= XkbStickyKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask;
-+ }
-+ else {
-+ xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
-+ }
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(stickyAuto, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
-+ xkb_info->config.initial_opts &= ~XkbAX_LatchToLockMask;
-+ xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
-+ xkb_info->xkb->ctrls->ax_options &= ~XkbAX_LatchToLockMask;
-+ }
-+ else {
-+ xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
-+ xkb_info->config.initial_opts |= XkbAX_LatchToLockMask;
-+ xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
-+ xkb_info->xkb->ctrls->ax_options |= XkbAX_LatchToLockMask;
-+ }
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(stickyBeep, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask;
-+ xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask;
-+ }
-+ else {
-+ xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask;
-+ xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask;
-+ }
-+
-+ /* Enable MouseKeys */
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(mouse, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_ctrls |= XkbMouseKeysAccelMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls |= XkbMouseKeysMask |
-+ XkbMouseKeysAccelMask;
-+ xkb_info->config.mk_delay =
-+ xkb_info->xkb->ctrls->mk_delay = mouseDelay->value * 100;
-+ xkb_info->config.mk_interval =
-+ xkb_info->xkb->ctrls->mk_interval = 40;
-+ xkb_info->config.mk_time_to_max =
-+ xkb_info->xkb->ctrls->mk_time_to_max =
-+ (mouseTime->value * 1000) / xkb_info->xkb->ctrls->mk_interval;
-+ xkb_info->config.mk_max_speed =
-+ xkb_info->xkb->ctrls->mk_max_speed =
-+ mouseSpeed->value * mouseTime->value;
-+ xkb_info->config.mk_curve = xkb_info->xkb->ctrls->mk_curve = 0;
-+ }
-+ else {
-+ xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask |
-+ XkbMouseKeysAccelMask);
-+ xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask |
-+ XkbMouseKeysAccelMask);
-+ }
-+
-+ /* Enable RepeatKeys */
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(repeat, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_ctrls |= XkbRepeatKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask;
-+ xkb_info->config.repeat_interval =
-+ xkb_info->xkb->ctrls->repeat_interval = repeatRate->value * 1000;
-+ xkb_info->config.repeat_delay =
-+ xkb_info->xkb->ctrls->repeat_delay = repeatDelay->value * 1000;
-+ }
-+ else {
-+ xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask;
-+ }
-
-- /* Timeout */
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(timeoutToggle, args, 1);
-- if (state)
-- xkb_info->config.ax_timeout =
-- xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60;
-- else
-- xkb_info->config.ax_timeout =
-- xkb_info->xkb->ctrls->ax_timeout = 65535;
--
-- /* Enable StickyKeys */
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(sticky, args, 1);
-- if (state) {
-- xkb_info->config.initial_ctrls |= XkbStickyKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask;
-- }
-- else {
-- xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
-- }
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(stickyAuto, args, 1);
-- if (state) {
-- xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
-- xkb_info->config.initial_opts &= ~XkbAX_LatchToLockMask;
-- xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
-- xkb_info->xkb->ctrls->ax_options &= ~XkbAX_LatchToLockMask;
-- }
-- else {
-- xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
-- xkb_info->config.initial_opts |= XkbAX_LatchToLockMask;
-- xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
-- xkb_info->xkb->ctrls->ax_options |= XkbAX_LatchToLockMask;
-- }
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(stickyBeep, args, 1);
-- if (state) {
-- xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask;
-- xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask;
-- }
-- else {
-- xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask;
-- xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask;
-- }
--
-- /* Enable MouseKeys */
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(mouse, args, 1);
-- if (state) {
-- xkb_info->config.initial_ctrls |= XkbMouseKeysMask |
-- XkbMouseKeysAccelMask;
-- xkb_info->xkb->ctrls->enabled_ctrls |= XkbMouseKeysMask |
-- XkbMouseKeysAccelMask;
-- xkb_info->config.mk_delay =
-- xkb_info->xkb->ctrls->mk_delay = mouseDelay->value * 100;
-- xkb_info->config.mk_interval =
-- xkb_info->xkb->ctrls->mk_interval = 40;
-- xkb_info->config.mk_time_to_max =
-- xkb_info->xkb->ctrls->mk_time_to_max =
-- (mouseTime->value * 1000) / xkb_info->xkb->ctrls->mk_interval;
-- xkb_info->config.mk_max_speed =
-- xkb_info->xkb->ctrls->mk_max_speed =
-- mouseSpeed->value * mouseTime->value;
-- xkb_info->config.mk_curve = xkb_info->xkb->ctrls->mk_curve = 0;
-- }
-- else {
-- xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask |
-- XkbMouseKeysAccelMask);
-- xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask |
-- XkbMouseKeysAccelMask);
-- }
--
-- /* Enable RepeatKeys */
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(repeat, args, 1);
-- if (state) {
-- xkb_info->config.initial_ctrls |= XkbRepeatKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask;
-- xkb_info->config.repeat_interval =
-- xkb_info->xkb->ctrls->repeat_interval = repeatRate->value * 1000;
-- xkb_info->config.repeat_delay =
-- xkb_info->xkb->ctrls->repeat_delay = repeatDelay->value * 1000;
-- }
-- else {
-- xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask;
-- }
--
-- /* Enable SlowKeys */
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(slowToggle, args, 1);
-- if (state) {
-- xkb_info->config.initial_ctrls |= XkbSlowKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls |= XkbSlowKeysMask;
-- xkb_info->config.slow_keys_delay =
-- xkb_info->xkb->ctrls->slow_keys_delay = slow->value * 1000;
-- }
-- else {
-- xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask;
-- }
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(slowPressed, args, 1);
-- if (state) {
-- xkb_info->config.initial_opts |= XkbAX_SKPressFBMask;
-- xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask;
-- }
-- else {
-- xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask;
-- xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask;
-- }
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(slowAccepted, args, 1);
-- if (state) {
-- xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask;
-- xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask;
-- }
-- else {
-- xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask;
-- xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask;
-- }
--
-- /* Enable BounceKeys */
-- XtSetArg(args[0], XtNstate, &state);
-- XtGetValues(bounceToggle, args, 1);
-- if (state) {
-- xkb_info->config.initial_ctrls |= XkbBounceKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls |= XkbBounceKeysMask;
-- xkb_info->config.debounce_delay =
-- xkb_info->xkb->ctrls->debounce_delay = bounce->value * 1000;
-- }
-- else {
-- xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask;
-- xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask;
-- }
-- }
-- else {
-- xkb_info->config.initial_ctrls &=
-- ~(XkbAccessXKeysMask | XkbStickyKeysMask | XkbMouseKeysMask |
-- XkbMouseKeysAccelMask | XkbRepeatKeysMask | XkbSlowKeysMask |
-- XkbBounceKeysMask);
-- xkb_info->config.initial_opts &=
-- ~(XkbAX_TwoKeysMask | XkbAX_LatchToLockMask | XkbAX_StickyKeysFBMask |
-- XkbAX_SKPressFBMask | XkbAX_SKAcceptFBMask);
--
-- xkb_info->xkb->ctrls->enabled_ctrls &=
-- ~(XkbAccessXKeysMask | XkbStickyKeysMask | XkbMouseKeysMask |
-- XkbMouseKeysAccelMask | XkbRepeatKeysMask | XkbSlowKeysMask |
-- XkbBounceKeysMask);
-- xkb_info->xkb->ctrls->ax_options &=
-- ~(XkbAX_TwoKeysMask | XkbAX_LatchToLockMask | XkbAX_StickyKeysFBMask |
-- XkbAX_SKPressFBMask | XkbAX_SKAcceptFBMask);
-+ /* Enable SlowKeys */
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(slowToggle, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_ctrls |= XkbSlowKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls |= XkbSlowKeysMask;
-+ xkb_info->config.slow_keys_delay =
-+ xkb_info->xkb->ctrls->slow_keys_delay = slow->value * 1000;
-+ }
-+ else {
-+ xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask;
-+ }
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(slowPressed, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_opts |= XkbAX_SKPressFBMask;
-+ xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask;
-+ }
-+ else {
-+ xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask;
-+ xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask;
-+ }
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(slowAccepted, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask;
-+ xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask;
-+ }
-+ else {
-+ xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask;
-+ xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask;
-+ }
-+
-+ /* Enable BounceKeys */
-+ XtSetArg(args[0], XtNstate, &state);
-+ XtGetValues(bounceToggle, args, 1);
-+ if (state) {
-+ xkb_info->config.initial_ctrls |= XkbBounceKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls |= XkbBounceKeysMask;
-+ xkb_info->config.debounce_delay =
-+ xkb_info->xkb->ctrls->debounce_delay = bounce->value * 1000;
-+ }
-+ else {
-+ xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask;
-+ xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask;
- }
-
- XkbSetControls(DPY, XkbAllControlsMask, xkb_info->xkb);
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/expert.c xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c Sat Dec 2 10:31:02 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c Fri Feb 9 21:39:42 2001
-@@ -4615,6 +4615,9 @@
- XtNtreeParent, config, NULL, 0);
- node->next = NewNode(mainNode, flags, NULL, config, NULL);
- node = node->next;
-+ if (XF86Config->conf_flags == NULL)
-+ XF86Config->conf_flags = (XF86ConfFlagsPtr)
-+ XtCalloc(1, sizeof(XF86ConfFlagsRec));
- XtAddCallback(flags, XtNcallback, OptionsCallback,
- (XtPointer)&(XF86Config->conf_flags->flg_option_lst));
-
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/interface.c xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c Fri Dec 8 21:23:26 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c Fri Feb 9 21:39:42 2001
-@@ -61,7 +61,11 @@
- #include "stubs.h"
-
- #define randomize() srand((unsigned)time((time_t*)NULL))
-+#ifdef PROJECT_ROOT
-+#define DefaultXFree86Dir PROJECT_ROOT
-+#else
- #define DefaultXFree86Dir "/usr/X11R6"
-+#endif
-
- /*
- * Prototypes
-diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c Thu Nov 30 15:55:18 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c Fri Feb 9 21:39:42 2001
-@@ -275,6 +275,7 @@
- range[i].lo = range[i].hi = val;
- if (++i >= nrange || *str == '\0')
- break;
-+ continue;
- }
- else if (*str != '-')
- return (0);
-diff -Naur -x CVS xc.orig/programs/Xserver/xkb/Imakefile xc/programs/Xserver/xkb/Imakefile
---- XFree86-4.0.2.orig/xc/programs/Xserver/xkb/Imakefile Fri Oct 20 10:59:09 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/xkb/Imakefile Mon Jan 22 14:49:33 2001
-@@ -67,6 +67,8 @@
- LinkSourceFile(XKBAlloc.c,$(XLIBSRC))
- LinkSourceFile(XKBGAlloc.c,$(XLIBSRC))
-
-+#if UseConfDirForXkb
- LinkConfDirectory(xkb,.,xkb,.)
-+#endif
-
- DependTarget()
-diff -Naur -x CVS xc.orig/programs/Xserver/xkb/xkbActions.c xc/programs/Xserver/xkb/xkbActions.c
---- XFree86-4.0.2.orig/xc/programs/Xserver/xkb/xkbActions.c Tue Apr 4 15:25:23 2000
-+++ XFree86-4.0.2/xc/programs/Xserver/xkb/xkbActions.c Fri Feb 9 21:39:42 2001
-@@ -1318,6 +1318,9 @@
- }
- else CoreProcessPointerEvent(xE,dev,count);
- }
-+ else if (keyEvent)
-+ FixKeyState(xE,dev);
-+
- xkbi->prev_state= oldState;
- XkbComputeDerivedState(xkbi);
- keyc->prev_state= keyc->state;
-diff -Naur -x CVS xc.orig/programs/xedit/c-mode.c xc/programs/xedit/c-mode.c
---- XFree86-4.0.2.orig/xc/programs/xedit/c-mode.c Mon Sep 27 02:30:08 1999
-+++ XFree86-4.0.2/xc/programs/xedit/c-mode.c Fri Feb 9 21:39:43 2001
-@@ -383,7 +383,7 @@
- rtmp = MAX(rtmp, pright);
- }
- right = anchor->position + entity->offset;
-- while (entity && ++count < 3) {
-+ while (entity && count++ < 3) {
- if (entity->property == Qerror) {
- right = anchor->position + entity->offset + entity->length;
- count = 0;
-diff -Naur -x CVS xc.orig/programs/xedit/ispell.c xc/programs/xedit/ispell.c
---- XFree86-4.0.2.orig/xc/programs/xedit/ispell.c Tue Sep 26 11:57:24 2000
-+++ XFree86-4.0.2/xc/programs/xedit/ispell.c Fri Feb 9 21:39:43 2001
-@@ -339,14 +339,31 @@
- static void
- IspellSetRepeated(Bool state)
- {
-+ static char *mispelled, *repeated;
-+ Arg args[1];
-+
-+ if (mispelled == NULL) {
-+ XtSetArg(args[0], XtNlabel, &mispelled);
-+ XtGetValues(ispell.mispelled, args, 1);
-+ mispelled = XtNewString(mispelled);
-+ }
-+ if (repeated == NULL) {
-+ XtSetArg(args[0], XtNlabel, &repeated);
-+ XtGetValues(ispell.repeated, args, 1);
-+ repeated = XtNewString(repeated);
-+ }
- XtSetSensitive(ispell.replaceAll, !state);
- XtSetSensitive(ispell.ignoreAll, !state);
- XtSetSensitive(ispell.add, !state);
- XtSetSensitive(ispell.addUncap, !state);
-- if (state && XtIsManaged(ispell.mispelled))
-- XtChangeManagedSet(&ispell.mispelled, 1, NULL, NULL, &ispell.repeated, 1);
-- else if (!state && XtIsManaged(ispell.repeated))
-- XtChangeManagedSet(&ispell.repeated, 1, NULL, NULL, &ispell.mispelled, 1);
-+ if (!state) {
-+ XtSetArg(args[0], XtNlabel, mispelled);
-+ XtSetValues(ispell.mispelled, args, 1);
-+ }
-+ else {
-+ XtSetArg(args[0], XtNlabel, repeated);
-+ XtSetValues(ispell.mispelled, args, 1);
-+ }
- }
-
- static void
-diff -Naur -x CVS xc.orig/programs/xkbcomp/rules/xfree86.lst xc/programs/xkbcomp/rules/xfree86.lst
---- XFree86-4.0.2.orig/xc/programs/xkbcomp/rules/xfree86.lst Wed Dec 6 15:18:08 2000
-+++ XFree86-4.0.2/xc/programs/xkbcomp/rules/xfree86.lst Fri Feb 9 21:39:43 2001
-@@ -38,6 +38,7 @@
- ca Canadian
- cs Czechoslovakian
- dk Danish
-+ dvorak Dvorak
- ee Estonian
- fi Finnish
- fr French
-@@ -64,7 +65,7 @@
- es Spanish
- se Swedish
- th Thai
-- uk Ukrainian
-+ ua Ukrainian
- gb United Kingdom
- vn Vietnamese
- nec/jp PC-98xx Series
-diff -Naur -x CVS xc.orig/programs/xload/Imakefile xc/programs/xload/Imakefile
---- XFree86-4.0.2.orig/xc/programs/xload/Imakefile Tue Nov 14 13:20:39 2000
-+++ XFree86-4.0.2/xc/programs/xload/Imakefile Mon Jan 22 14:49:35 2001
-@@ -27,7 +27,7 @@
- AllTarget(ProgramTargetName(xload))
- NormalProgramTarget(xload,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),NullParameter)
-
--#if defined(OSF1Architecture) || defined(NetBSDArchitecture) || (defined(FreeBSDArchitecture) && OSMajorVersion > 1) || defined(OpenBSDArchitecture)
-+#if !InstallXloadSetGID
- InstallProgram(xload,$(BINDIR))
- #else
- InstallProgramWithFlags(xload,$(BINDIR),$(INSTKMEMFLAGS))
-diff -Naur -x CVS xc.orig/programs/xman/Imakefile xc/programs/xman/Imakefile
---- XFree86-4.0.2.orig/xc/programs/xman/Imakefile Fri Feb 11 22:55:14 2000
-+++ XFree86-4.0.2/xc/programs/xman/Imakefile Sat Jan 27 15:09:05 2001
-@@ -11,10 +11,13 @@
- #endif
- MANPATHS = $(SYSMANPATH) $(LOCALMANPATH)
- HELPFILE = -DHELPFILE=\"$(LIBDIR)$(PATHSEP)xman.help\"
-+#if HasMkstemp
-+MKSTEMP = -DHAS_MKSTEMP
-+#endif
-
- OSMAJORVERSION = OSMajorVersion
- OSMINORVERSION = OSMinorVersion
-- DEFINES = -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) $(HELPFILE) $(MANPATHS)
-+ DEFINES = -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) $(HELPFILE) $(MANPATHS) $(MKSTEMP)
- DEPLIBS = XawClientDepLibs
- LOCAL_LIBRARIES = XawClientLibs
- SRCS = ScrollByL.c handler.c man.c buttons.c help.c \
-diff -Naur -x CVS xc.orig/programs/xman/misc.c xc/programs/xman/misc.c
---- XFree86-4.0.2.orig/xc/programs/xman/misc.c Tue Jun 13 19:15:53 2000
-+++ XFree86-4.0.2/xc/programs/xman/misc.c Sat Jan 27 15:09:06 2001
-@@ -45,8 +45,18 @@
- #include <X11/Shell.h>
-
- static FILE * Uncompress(ManpageGlobals * man_globals, char * filename);
--static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output);
--static Boolean UncompressUnformatted(ManpageGlobals * man_globals, char * entry, char * filename);
-+#ifndef HAS_MKSTEMP
-+static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename,
-+ char * output);
-+static Boolean UncompressUnformatted(ManpageGlobals * man_globals,
-+ char * entry, char * filename);
-+#else
-+static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename,
-+ char * output, FILE ** output_fd);
-+static Boolean UncompressUnformatted(ManpageGlobals * man_globals,
-+ char * entry, char * filename,
-+ FILE **file);
-+#endif
-
- #if defined(ISC) || defined(SCO)
- static char *uncompress_format = NULL;
-@@ -279,14 +289,23 @@
- char tmp_file[BUFSIZ], error_buf[BUFSIZ];
- FILE * file;
-
-+#ifndef HAS_MKSTEMP
- if ( !UncompressNamed(man_globals, filename, tmp_file) )
- return(NULL);
-
- else if ((file = fopen(tmp_file, "r")) == NULL) {
-- sprintf(error_buf, "Something went wrong in retrieving the %s",
-- "uncompressed manual page try cleaning up /tmp.");
-- PopupWarning(man_globals, error_buf);
-+ sprintf(error_buf, "Something went wrong in retrieving the %s",
-+ "uncompressed manual page try cleaning up /tmp.");
-+ PopupWarning(man_globals, error_buf);
- }
-+#else
-+ if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
-+ sprintf(error_buf, "Something went wrong in retrieving the %s",
-+ "uncompressed manual page try cleaning up /tmp.");
-+ PopupWarning(man_globals, error_buf);
-+ return(NULL);
-+ }
-+#endif
-
- unlink(tmp_file); /* remove name in tree, it will remain
- until we close the fd, however. */
-@@ -302,11 +321,20 @@
- * Returns:; TRUE if the file was found.
- */
-
-+#ifndef HAS_MKSTEMP
- static Boolean
- UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output)
-+#else
-+static Boolean
-+UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
-+ FILE ** output_fd)
-+#endif
- {
- char tmp[BUFSIZ], cmdbuf[BUFSIZ], error_buf[BUFSIZ];
- struct stat junk;
-+#ifdef HAS_MKSTEMP
-+ int fd;
-+#endif
-
- if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
- if (errno != ENOENT) {
-@@ -323,7 +351,16 @@
- */
-
- strcpy(tmp, MANTEMP); /* get a temp file. */
-+#ifndef HAS_MKSTEMP
- (void) mktemp(tmp);
-+#else
-+ fd = mkstemp(tmp);
-+ if (fd < 0) {
-+ PopupWarning(man_globals, "Error creating a temp file");
-+ return FALSE;
-+ }
-+ *output_fd = fdopen(fd, "r");
-+#endif
- strcpy(output, tmp);
-
- #ifdef GZIP_EXTENSION
-@@ -357,6 +394,9 @@
- Format(ManpageGlobals * man_globals, char * entry)
- {
- FILE * file;
-+#ifdef HAS_MKSTEMP
-+ int fd;
-+#endif
- Widget manpage = man_globals->manpagewidgets.manpage;
- char cmdbuf[BUFSIZ], tmp[BUFSIZ], filename[BUFSIZ], error_buf[BUFSIZ];
- char path[BUFSIZ];
-@@ -364,7 +404,11 @@
- Position x,y; /* location to pop up the
- "would you like to save" widget. */
-
-+#ifndef HAS_MKSTEMP
- if ( !UncompressUnformatted(man_globals, entry, filename) ) {
-+#else
-+ if ( !UncompressUnformatted(man_globals, entry, filename, &file) ) {
-+#endif
- /* We Really could not find it, this should never happen, yea right. */
- sprintf(error_buf, "Could not open manual page, %s", entry);
- PopupWarning(man_globals, error_buf);
-@@ -372,7 +416,11 @@
- return(NULL);
- }
-
-+#ifndef HAS_MKSTEMP
- if ((file = fopen(filename, "r")) != NULL) {
-+#else
-+ if (file != NULL) {
-+#endif
- char line[BUFSIZ];
-
- if (fgets(line, sizeof(line), file) != NULL) {
-@@ -408,13 +456,23 @@
- XFlush(XtDisplay(man_globals->standby));
-
- strcpy(tmp,MANTEMP); /* Get a temp file. */
-+#ifndef HAS_MKSTEMP
- (void) mktemp(tmp);
-+#else
-+ fd = mkstemp(tmp);
-+ file = fdopen(fd, "r");
-+#endif
- strcpy(man_globals->tempfile, tmp);
-
- ParseEntry(entry, path, NULL, NULL);
-
-+#ifndef HAS_MKSTEMP
- sprintf(cmdbuf,"cd %s ; %s %s %s > %s %s", path, TBL,
- filename, FORMAT, man_globals->tempfile, "2> /dev/null");
-+#else
-+ sprintf(cmdbuf,"cd %s ; %s %s %s >> %s %s", path, TBL,
-+ filename, FORMAT, man_globals->tempfile, "2> /dev/null");
-+#endif
-
- if(system(cmdbuf) != 0) { /* execute search. */
- sprintf(error_buf,
-@@ -423,12 +481,14 @@
- file = NULL;
- }
- else {
-+#ifndef HAS_MKSTEMP
- if ((file = fopen(man_globals->tempfile,"r")) == NULL) {
- sprintf(error_buf, "Something went wrong in retrieving the %s",
- "temp file, try cleaning up /tmp");
- PopupWarning(man_globals, error_buf);
- }
- else {
-+#endif
-
- XtPopdown( XtParent(man_globals->standby) );
-
-@@ -460,7 +520,9 @@
- else
- unlink(man_globals->tempfile);
- }
-+#ifndef HAS_MKSTEMP
- }
-+#endif
- }
-
- if (man_globals->compress || man_globals->gzip) /* If the original
-@@ -481,7 +543,13 @@
- */
-
- static Boolean
--UncompressUnformatted(ManpageGlobals * man_globals, char * entry, char * filename)
-+#ifndef HAS_MKSTEMP
-+UncompressUnformatted(ManpageGlobals * man_globals, char * entry,
-+ char * filename)
-+#else
-+UncompressUnformatted(ManpageGlobals * man_globals, char * entry,
-+ char * filename, FILE **file)
-+#endif
- {
- char path[BUFSIZ], page[BUFSIZ], section[BUFSIZ], input[BUFSIZ];
- int len_cat = strlen(CAT), len_man = strlen(MAN);
-@@ -505,7 +573,11 @@
- * Then for compressed files in an uncompressed directory.
- */
- sprintf(input, "%s.%s", filename, COMPRESSION_EXTENSION);
-+#ifndef HAS_MKSTEMP
- if ( UncompressNamed(man_globals, input, filename) ) {
-+#else
-+ if ( UncompressNamed(man_globals, input, filename, file) ) {
-+#endif
- man_globals->compress = TRUE;
- sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
- CAT, section + len_cat, page, COMPRESSION_EXTENSION);
-@@ -514,7 +586,11 @@
- #ifdef GZIP_EXTENSION
- else {
- sprintf(input, "%s.%s", filename, GZIP_EXTENSION);
-+#ifndef HAS_MKSTEMP
- if ( UncompressNamed(man_globals, input, filename) ) {
-+#else
-+ if ( UncompressNamed(man_globals, input, filename, file) ) {
-+#endif
- man_globals->compress = TRUE;
- man_globals->gzip = TRUE;
- sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
-@@ -542,7 +618,11 @@
- */
-
- sprintf(input, "%s.%s", filename, COMPRESSION_EXTENSION);
-+#ifndef HAS_MKSTEMP
- if ( UncompressNamed(man_globals, input, filename) ) {
-+#else
-+ if ( UncompressNamed(man_globals, input, filename, file) ) {
-+#endif
- man_globals->compress = TRUE;
- sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
- CAT, section + len_cat, page, COMPRESSION_EXTENSION);
-@@ -551,7 +631,11 @@
- #ifdef GZIP_EXTENSION
- else {
- sprintf(input, "%s.%s", filename, GZIP_EXTENSION);
-+#ifndef HAS_MKSTEMP
- if ( UncompressNamed(man_globals, input, filename) ) {
-+#else
-+ if ( UncompressNamed(man_globals, input, filename, file) ) {
-+#endif
- man_globals->compress = TRUE;
- man_globals->gzip = TRUE;
- sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
-@@ -566,7 +650,11 @@
-
- sprintf(input, "%s/%s%s.%s/%s", path,
- MAN, section + len_man, COMPRESSION_EXTENSION, page);
-+#ifndef HAS_MKSTEMP
- if ( UncompressNamed(man_globals, input, filename) ) {
-+#else
-+ if ( UncompressNamed(man_globals, input, filename, file) ) {
-+#endif
- man_globals->compress = TRUE;
- sprintf(man_globals->save_file, "%s/%s%s.%s/%s", path,
- CAT, section + len_cat, COMPRESSION_EXTENSION, page);
-diff -Naur -x CVS xc.orig/programs/xman/search.c xc/programs/xman/search.c
---- XFree86-4.0.2.orig/xc/programs/xman/search.c Tue Jun 13 19:15:53 2000
-+++ XFree86-4.0.2/xc/programs/xman/search.c Sat Jan 27 15:09:06 2001
-@@ -149,11 +149,14 @@
- FILE *
- DoSearch(ManpageGlobals * man_globals, int type)
- {
-- char cmdbuf[BUFSIZ],*mantmp;
-+ char cmdbuf[BUFSIZ],*mantmp, *manpath;
- char tmp[BUFSIZ],path[BUFSIZ];
- char string_buf[BUFSIZ], cmp_str[BUFSIZ], error_buf[BUFSIZ];
- char * search_string = SearchString(man_globals);
- FILE * file;
-+#ifdef HAS_MKSTEMP
-+ int fd;
-+#endif
- int count;
- Boolean flag;
-
-@@ -171,13 +174,37 @@
- return(NULL);
- }
-
-- strcpy(tmp, MANTEMP); /* get a temp file. */
-- (void) mktemp(tmp);
-- mantmp = tmp;
--
- if (type == APROPOS) {
- char label[BUFSIZ];
-
-+ strcpy(tmp, MANTEMP); /* get a temp file. */
-+#ifdef HAS_MKSTEMP
-+ fd = mkstemp(tmp);
-+ if (fd < 0) {
-+ PopupWarning(man_globals, "Cant create temp file");
-+ return NULL;
-+ }
-+#else
-+ (void)mktemp(tmp);
-+#endif
-+ mantmp = tmp;
-+
-+ manpath=getenv("MANPATH");
-+ if (manpath == NULL || streq(manpath,"") ) {
-+#ifdef MANCONF
-+ if (!ReadManConfig(path))
-+#endif
-+ {
-+ strcpy(path,SYSMANPATH);
-+#ifdef LOCALMANPATH
-+ strcat(path,":");
-+ strcat(path,LOCALMANPATH);
-+#endif
-+ }
-+ } else {
-+ strcpy(path,manpath);
-+ }
-+
- sprintf(label,"Results of apropos search on: %s", search_string);
-
- #ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
-@@ -191,7 +218,11 @@
- PopupWarning(man_globals, error_buf);
- }
-
-+#ifdef HAS_MKSTEMP
-+ if ((file = fdopen(fd, "r")) == NULL)
-+#else
- if((file = fopen(mantmp,"r")) == NULL)
-+#endif
- PrintError("lost temp file? out of temp space?");
-
- /*
-diff -Naur -x CVS xc.orig/programs/xman/vendor.h xc/programs/xman/vendor.h
---- XFree86-4.0.2.orig/xc/programs/xman/vendor.h Tue Aug 1 14:53:07 2000
-+++ XFree86-4.0.2/xc/programs/xman/vendor.h Sat Jan 27 15:09:07 2001
-@@ -135,10 +135,18 @@
- # define NO_COMPRESS
- # else
- # define COMPRESSION_EXTENSION "Z"
--# define UNCOMPRESS_FORMAT "zcat < %s > %s"
-+# ifndef HAS_MKSTEMP
-+# define UNCOMPRESS_FORMAT "zcat < %s > %s"
-+# else
-+# define UNCOMPRESS_FORMAT "zcat < %s >> %s"
-+# endif
- # define COMPRESS "compress"
- # define GZIP_EXTENSION "gz"
--# define GUNZIP_FORMAT "gzip -c -d < %s > %s"
-+# ifndef HAS_MKSTEMP
-+# define GUNZIP_FORMAT "gzip -c -d < %s > %s"
-+# else
-+# define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
-+# endif
- # define GZIP_COMPRESS "gzip"
- # endif /* ISC */
- # endif /* UTEK */
-@@ -154,10 +162,19 @@
- # define NO_MANPATH_SUPPORT
- #endif
-
--#ifdef NO_MANPATH_SUPPORT
--# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
-+#ifndef HAS_MKSTEMP
-+# ifdef NO_MANPATH_SUPPORT
-+# define APROPOS_FORMAT ("man -k %s | pr -h Apropos > %s")
-+# else
-+# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
-+# endif
- #else
--# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
-+/* with mkstemp the temp output file is already created */
-+# ifdef NO_MANPATH_SUPPORT
-+# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
-+# else
-+# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
-+# endif
- #endif
-
- #ifdef ultrix
+++ /dev/null
---- xc/programs/xfs/difs/charinfo.c.fred Fri Dec 17 08:05:34 1999
-+++ xc/programs/xfs/difs/charinfo.c Mon Dec 20 09:25:58 1999
-@@ -493,6 +493,8 @@
- #define LSBBitLeft(b,c) ((b) >> (c))
- #define LSBBitRight(b,c) ((b) << (c))
-
-+ if (srcp) {
-+
- if (dst_off == src_off)
- {
- if (srcbpr == dstbpr && src_left_bytes == dst_left_bytes)
-@@ -573,6 +575,7 @@
- dstp += dst_extra;
- srcp += src_extra;
- }
-+ }
- }
- /* skip the amount we just filled in */
- gd += l->length;
+++ /dev/null
-diff -Nur xc/programs/xfs.org/difs/main.c xc/programs/xfs/difs/main.c
---- xc/programs/xfs.org/difs/main.c Fri Apr 7 10:14:45 2000
-+++ xc/programs/xfs/difs/main.c Fri Apr 7 10:02:01 2000
-@@ -56,6 +56,7 @@
- #include "dispatch.h"
- #include "extentst.h"
- #include "difs.h"
-+#include "debug.h"
-
- char *ConnectionInfo;
- int ConnInfoLen;
-@@ -77,6 +80,7 @@
- static Bool create_connection_block(void);
-
- char *configfilename;
-+int debug_level;
- extern Bool drone_server;
-
- extern OldListenRec *OldListen;
-@@ -92,6 +96,7 @@
- int i, oldumask;
-
- argcGlobal = argc;
-+ debug_level = 0;
- argvGlobal = argv;
-
- configfilename = DEFAULT_CONFIG_FILE;
-diff -Nur xc/programs/xfs.org/include/debug.h xc/programs/xfs/include/debug.h
---- xc/programs/xfs.org/include/debug.h Thu Jan 1 01:00:00 1970
-+++ xc/programs/xfs/include/debug.h Fri Apr 7 10:02:35 2000
-@@ -0,0 +1 @@
-+/* debug.h */
-\ No newline at end of file
-diff -Nur xc/programs/xfs.org/os/utils.c xc/programs/xfs/os/utils.c
---- xc/programs/xfs.org/os/utils.c Fri Apr 7 10:14:45 2000
-+++ xc/programs/xfs/os/utils.c Fri Apr 7 10:04:38 2000
-@@ -91,6 +91,7 @@
- #include <stdlib.h>
-
- extern char *configfilename;
-+extern int debug_level;
- static Bool dropPriv = FALSE; /* whether or not to drop root privileges */
- #ifdef DEFAULT_DAEMON
- static Bool becomeDaemon = TRUE; /* whether to become a daemon or not */
-@@ -191,7 +192,7 @@
- static void
- usage(void)
- {
-- fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon] [-nodaemon] [-user user_name] [-ls listen_socket]\n",
-+ fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon] [-nodaemon] [-user user_name] [-ls listen_socket] [-d debug_level]\n",
- progname);
- exit(1);
- }
-@@ -295,6 +296,8 @@
- ProcessLSoption (argv[++i]);
- else
- usage();
-+ } else if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {
-+ debug_level = atoi(argv[++i]);
- } else if (!strcmp(argv[i], "-droppriv")) {
- droppriv = 1;
- } else if (!strcmp(argv[i], "-daemon")) {
+++ /dev/null
-diff -Nur XFree86-4.0.2.org/xc/programs/xfs/difs/fonts.c XFree86-4.0.2/xc/programs/xfs/difs/fonts.c
---- XFree86-4.0.2.org/xc/programs/xfs/difs/fonts.c Thu Dec 14 20:54:53 2000
-+++ XFree86-4.0.2/xc/programs/xfs/difs/fonts.c Thu Dec 21 09:26:42 2000
-@@ -108,6 +108,113 @@
- }
-
- /*
-+ * xf86GetPathElem --
-+ * Extract a single element from the font path string starting at
-+ * pnt. The font path element will be returned, and pnt will be
-+ * updated to point to the start of the next element, or set to
-+ * NULL if there are no more.
-+ */
-+char *
-+xf86GetPathElem(pnt)
-+ char **pnt;
-+{
-+ char *p1;
-+
-+ p1 = *pnt;
-+ *pnt = index(*pnt, ',');
-+ if (*pnt != NULL) {
-+ **pnt = '\0';
-+ *pnt += 1;
-+ }
-+ return(p1);
-+}
-+
-+/*
-+ * xf86ValidateFontPath --
-+ * Validates the user-specified font path. Each element that
-+ * begins with a '/' is checked to make sure the directory exists.
-+ * If the directory exists, the existence of a file named 'fonts.dir'
-+ * is checked. If either check fails, an error is printed and the
-+ * element is removed from the font path.
-+ */
-+#define DIR_FILE "/fonts.dir"
-+#define CHECK_TYPE(mode, type) ((S_IFMT & (mode)) == (type))
-+static char *
-+xf86ValidateFontPath(path)
-+ char *path;
-+{
-+ char *tmp_path, *out_pnt, *path_elem, *next, *p1, *dir_elem;
-+ struct stat stat_buf;
-+ int flag;
-+ int dirlen;
-+
-+ tmp_path = (char *)calloc(1,strlen(path)+1);
-+ out_pnt = tmp_path;
-+ path_elem = NULL;
-+ next = path;
-+ while (next != NULL) {
-+ path_elem = xf86GetPathElem(&next);
-+#ifndef __EMX__
-+ if (*path_elem == '/') {
-+ dir_elem = (char *)calloc(1, strlen(path_elem) + 1);
-+ if ((p1 = strchr(path_elem, ':')) != 0)
-+#else
-+ /* OS/2 must prepend X11ROOT */
-+ if (*path_elem == '/') {
-+ path_elem = (char*)__XOS2RedirRoot(path_elem);
-+ dir_elem = (char*)calloc(1, strlen(path_elem) + 1);
-+ if (p1 = strchr(path_elem+2, ':'))
-+#endif
-+ dirlen = p1 - path_elem;
-+ else
-+ dirlen = strlen(path_elem);
-+ strncpy(dir_elem, path_elem, dirlen);
-+ dir_elem[dirlen] = '\0';
-+ flag = stat(dir_elem, &stat_buf);
-+ if (flag == 0)
-+ if (!CHECK_TYPE(stat_buf.st_mode, S_IFDIR))
-+ flag = -1;
-+ if (flag != 0) {
-+ printf("warning!\n");
-+ ErrorF("Warning: The directory \"%s\" does not exist.\n", dir_elem);
-+ ErrorF(" Entry deleted from font path.\n");
-+ continue;
-+ }
-+ else {
-+ p1 = (char *)malloc(strlen(dir_elem)+strlen(DIR_FILE)+1);
-+ strcpy(p1, dir_elem);
-+ strcat(p1, DIR_FILE);
-+ flag = stat(p1, &stat_buf);
-+ if (flag == 0)
-+ if (!CHECK_TYPE(stat_buf.st_mode, S_IFREG))
-+ flag = -1;
-+#ifndef __EMX__
-+ free(p1);
-+#endif
-+ if (flag != 0) {
-+ ErrorF("Warning: 'fonts.dir' not found (or not valid) in \"%s\".\n",
-+ dir_elem);
-+ ErrorF(" Entry deleted from font path.\n");
-+ ErrorF(" (Run 'mkfontdir' on \"%s\").\n", dir_elem);
-+ continue;
-+ }
-+ }
-+ free(dir_elem);
-+ }
-+
-+ /*
-+ * Either an OK directory, or a font server name. So add it to
-+ * the path.
-+ */
-+ if (out_pnt != tmp_path)
-+ *out_pnt++ = ',';
-+ strcat(out_pnt, path_elem);
-+ out_pnt += strlen(path_elem);
-+ }
-+ return(tmp_path);
-+}
-+
-+/*
- * note that the font wakeup queue is not refcounted. this is because
- * an fpe needs to be added when it's inited, and removed when it's finally
- * freed, in order to handle any data that isn't requested, like FS events.
-@@ -744,8 +851,12 @@
- *end,
- *p;
- int err;
-+ char *fixedpath;
-+
-+ fixedpath = xf86ValidateFontPath(str);
-
-- len = strlen(str) + 1;
-+ len = strlen(fixedpath) + 1;
-+ str = fixedpath;
- paths = p = (char *) ALLOCATE_LOCAL(len);
- npaths = 0;
-
-@@ -765,6 +876,7 @@
-
- err = set_font_path_elements(npaths, paths, badpath);
-
-+ free(fixedpath);
- DEALLOCATE_LOCAL(paths);
-
- return err;
+++ /dev/null
---- XFree86-3.3.5/xc/programs/mkfontdir/mkfontdir.c.xfsftfontdir Fri Nov 13 09:17:34 1998
-+++ XFree86-3.3.5/xc/programs/mkfontdir/mkfontdir.c Thu Aug 19 10:01:45 1999
-@@ -111,6 +111,7 @@
- #include <X11/X.h>
- #include <X11/Xproto.h>
- #include "fntfilst.h"
-+#include "fontenc.h"
-
- #include <errno.h>
- #ifdef X_NOT_STDC_ENV
-@@ -122,16 +123,67 @@
- #include <X11/keysymdef.h>
-
- char *progName;
-+char *prefix = "";
-+Bool relative = FALSE;
-+
-+/* The possible extensions for encoding files, in decreasing priority */
-+#ifdef X_GZIP_FONT_COMPRESSION
-+#define NUMENCODINGEXTENSIONS 2
-+char *encodingExtensions[]={".gz", ".Z"};
-+#else
-+#define NUMENCODINGEXTENSIONS 1
-+char *encodingExtensions[]={".Z"};
-+#endif
-+
-+typedef struct _nameBucket {
-+ struct _nameBucket *next;
-+ char *name;
-+ FontRendererPtr renderer;
-+} NameBucketRec, *NameBucketPtr;
-+
-+typedef struct _encodingBucket {
-+ struct _encodingBucket *next;
-+ char *name;
-+ char *fileName;
-+ int priority;
-+} EncodingBucketRec, *EncodingBucketPtr;
-+
-+#define HASH_SIZE 1024
-+/* should be a divisor of HASH_SIZE */
-+#define ENCODING_HASH_SIZE 256
-+
-+
-+static Bool WriteFontTable ( char *dirName, FontTablePtr table,
-+ EncodingBucketPtr *encodings, int count);
-+static char * NameForAtomOrNone ( Atom a );
-+static Bool GetFontName ( char *file_name, char *font_name );
-+static char * FontNameExists ( FontTablePtr table, char *font_name );
-+int AddEntry ( FontTablePtr table, char *fontName, char *fileName );
-+static Bool ProcessFile ( char *dirName, char *fileName, FontTablePtr table );
-+static void Estrip ( char *ext, char *name );
-+char * MakeName ( char *name );
-+int Hash ( char *name );
-+Bool LoadEncodings(EncodingBucketPtr *encodings, char *dirName, int priority);
-+static Bool LoadDirectory ( char *dirName, FontTablePtr table );
-+int LoadScalable ( char *dirName, FontTablePtr table );
-+static Bool DoDirectory(char *dirName,
-+ EncodingBucketPtr *encodings, int count);
-+int GetDefaultPointSize ( void );
-+void RegisterFPEFunctions ( void );
-+void ErrorF ( void );
-
- static Bool
--WriteFontTable(dirName, table)
-+WriteFontTable(dirName, table, encodings, count)
- char *dirName;
- FontTablePtr table;
-+ EncodingBucketPtr *encodings;
-+ int count;
- {
- int i;
- FILE *file;
- char full_name[PATH_MAX];
- FontEntryPtr entry;
-+ EncodingBucketPtr encoding;
-
- sprintf (full_name, "%s/%s", dirName, FontDirFile);
-
-@@ -155,6 +207,30 @@
- fprintf (file, "%s %s\n", entry->u.bitmap.fileName, entry->name.name);
- }
- fclose (file);
-+
-+
-+ /* Write out encodings directory */
-+
-+ sprintf (full_name, "%s/%s", dirName, "encodings.dir");
-+ if (unlink(full_name) < 0 && errno != ENOENT)
-+ {
-+ fprintf(stderr, "%s: warning: cannot unlink %s\n", progName, full_name);
-+ return TRUE; /* non fatal error */
-+ }
-+ if(!count) return TRUE;
-+ file = fopen (full_name, "w");
-+ if (!file)
-+ {
-+ fprintf (stderr, "%s: can't create directory %s\n", progName, full_name);
-+ return TRUE;
-+ }
-+ fprintf(file, "%d\n", count);
-+ for(i=0; i<ENCODING_HASH_SIZE; i++)
-+ for(encoding=encodings[i]; encoding; encoding=encoding->next)
-+ fprintf(file, "%s %s%s\n",
-+ encoding->name, prefix, encoding->fileName);
-+ fclose(file);
-+
- return TRUE;
- }
-
-@@ -215,6 +291,7 @@
- return 0;
- }
-
-+int
- AddEntry (table, fontName, fileName)
- FontTablePtr table;
- char *fontName, *fileName;
-@@ -249,7 +326,7 @@
-
- CopyISOLatin1Lowered (font_name, font_name, strlen(font_name));
-
-- if (existing = FontNameExists (table, font_name))
-+ if ((existing = FontNameExists (table, font_name)) != 0)
- {
- fprintf (stderr, "%s: Duplicate font names %s\n", progName, font_name);
- fprintf (stderr, "\t%s %s\n", existing, fileName);
-@@ -259,6 +336,7 @@
- }
-
- static
-+void
- Estrip(ext,name)
- char *ext;
- char *name;
-@@ -268,16 +346,8 @@
-
- /***====================================================================***/
-
--typedef struct _nameBucket {
-- struct _nameBucket *next;
-- char *name;
-- FontRendererPtr renderer;
--} NameBucketRec, *NameBucketPtr;
--
- #define New(type,count) ((type *) malloc (count * sizeof (type)))
-
--#define HASH_SIZE 1024
--
- char *
- MakeName(name)
- char *name;
-@@ -297,7 +367,7 @@
- char c;
-
- i = 0;
-- while (c = *name++)
-+ while ((c = *name++) != 0)
- i = (i << 1) ^ c;
- return i & (HASH_SIZE - 1);
- }
-@@ -319,7 +389,6 @@
- int hash;
- char *extension;
- NameBucketPtr *hashTable, bucket, *prev, next;
-- Bool status;
-
- #ifdef WIN32
- if ((dirh = FindFirstFile("*.*", &file)) == INVALID_HANDLE_VALUE)
-@@ -435,8 +504,141 @@
- }
-
- static Bool
--DoDirectory(dirName)
-+CompareEncodingFiles(char *name1, char *name2)
-+{
-+ int len, len1, len2, p1, p2, i;
-+ char *extension;
-+
-+ len1=strlen(name1);
-+ len2=strlen(name2);
-+ p1=p2=-1;
-+
-+ for(extension=encodingExtensions[0], i=0;
-+ i<NUMENCODINGEXTENSIONS;
-+ extension++, i++) {
-+ len=strlen(extension);
-+ if(p1<0 && len1>=len && !strcmp(name1+len1-len, extension))
-+ p1=i;
-+ if(p2<0 && len2>=len && !strcmp(name2+len2-len, extension))
-+ p2=i;
-+ }
-+
-+ if(p1<0)
-+ return FALSE;
-+ else if(p2<0)
-+ return TRUE;
-+ else
-+ return(p1<p2);
-+}
-+
-+static Bool
-+InsertEncoding(EncodingBucketPtr *encodings,
-+ char *name, char *fileName, int priority)
-+{
-+ int bucket;
-+ EncodingBucketPtr encoding;
-+
-+ bucket=Hash(name)%ENCODING_HASH_SIZE;
-+
-+ for(encoding=encodings[bucket]; encoding; encoding=encoding->next) {
-+ if(!strcmp(name, encoding->name)) {
-+ if(encoding->priority<priority)
-+ return TRUE;
-+ else if(encoding->priority>priority)
-+ break;
-+ else if(CompareEncodingFiles(fileName, encoding->fileName))
-+ break;
-+ else
-+ return TRUE;
-+
-+ }
-+ }
-+
-+ if(!encoding) {
-+ /* Need to insert new bucket */
-+ if((encoding=New(EncodingBucketRec, 1))==NULL)
-+ return FALSE;
-+ encoding->next=encodings[bucket];
-+ encodings[bucket]=encoding;
-+ }
-+
-+ /* Now encoding points to a bucket to fill in */
-+ encoding->name=name;
-+ encoding->fileName=fileName;
-+ encoding->priority=priority;
-+ return TRUE;
-+}
-+
-+Bool
-+LoadEncodings(EncodingBucketPtr *encodings, char *dirName, int priority)
-+{
-+ EncodingBucketPtr new;
-+ char *filename;
-+ char **names;
-+ char **name;
-+ char fullname[MAXFONTFILENAMELEN];
-+ int len;
-+#ifdef WIN32
-+ HANDLE dirh;
-+ WIN32_FIND_DATA file;
-+#else
-+ DIR *dirp;
-+ struct dirent *file;
-+#endif
-+
-+ if (strcmp(dirName, ".") == 0) {
-+ len=0;
-+ } else {
-+ len=strlen(dirName);
-+ strcpy(fullname, dirName);
-+ if(fullname[len-1]!='/')
-+ fullname[len++]='/';
-+ }
-+
-+
-+#ifdef WIN32
-+ if ((dirh = FindFirstFile("*.*", &file)) == INVALID_HANDLE_VALUE)
-+ return FALSE;
-+#else
-+ if ((dirp = opendir (dirName)) == NULL)
-+ return FALSE;
-+#endif
-+#ifdef WIN32
-+ do {
-+#else
-+ while ((file = readdir (dirp)) != NULL) {
-+#endif
-+ if(len+strlen(FileName(file))>=MAXFONTFILENAMELEN) {
-+ fprintf(stderr, "%s: warning: filename `%s/%s' too long, ignored\n",
-+ progName, dirName, FileName(file));
-+ continue;
-+ }
-+ strcpy(fullname+len, FileName(file));
-+ names=identifyEncodingFile(fullname);
-+ if(names) {
-+ if((filename=New(char, strlen(fullname)+1))==NULL) {
-+ fprintf(stderr, "%s: warning: out of memory.\n", progName);
-+ break;
-+ }
-+ strcpy(filename, fullname);
-+ for(name=names; *name; name++)
-+ if(!InsertEncoding(encodings, *name, filename, priority))
-+ fprintf(stderr, "%s: warning: failed to insert encoding %s\n", *name);
-+ /* Only free the spine -- the names themselves may be used */
-+ free(names);
-+ }
-+ }
-+#ifdef WIN32
-+ while (FindNextFile(dirh, &file));
-+#endif
-+ return TRUE;
-+}
-+
-+static Bool
-+DoDirectory(dirName, encodings, count)
- char *dirName;
-+ EncodingBucketPtr *encodings;
-+ int count;
- {
- FontTableRec table;
- Bool status;
-@@ -455,42 +657,113 @@
- }
- status = TRUE;
- if (table.used >= 0)
-- status = WriteFontTable (dirName, &table);
-+ status = WriteFontTable (dirName, &table, encodings, count);
- FontFileFreeTable (&table);
- return status;
- }
-
--GetDefaultPointSize ()
-+int
-+GetDefaultPointSize (void)
- {
- return 120;
- }
-
--FontResolutionPtr GetClientResolutions ()
-+FontResolutionPtr GetClientResolutions (num)
-+ int *num;
- {
- return 0;
- }
-
--RegisterFPEFunctions ()
-+void
-+RegisterFPEFunctions (void)
- {
- }
-
--ErrorF ()
-+void
-+ErrorF (void)
- {
- }
-
- /***====================================================================***/
-
-+int
- main (argc, argv)
- int argc;
- char **argv;
- {
-- int i;
-+ int argn, i, count;
-+ char *dirname, fulldirname[MAXFONTFILENAMELEN];
-+ EncodingBucketPtr *encodings, encoding;
-+ char **name;
-
- BitmapRegisterFontFileFunctions ();
- progName = argv[0];
-- if (argc == 1)
-+ if((encodings=New(EncodingBucketPtr, ENCODING_HASH_SIZE))==NULL) {
-+ fprintf(stderr, "%s: out of memory\n", progName);
-+ exit(2);
-+ }
-+ for(i=0; i<ENCODING_HASH_SIZE; i++)
-+ encodings[i]=NULL;
-+
-+ for(argn=1; argn<argc; argn++) {
-+ if(argv[argn][0]=='\0' || argv[argn][0]!='-')
-+ break;
-+ if(argv[argn][1]=='-') {
-+ argn++;
-+ break;
-+ } else if(argv[argn][1]=='e') {
-+ if(argv[argn][2]=='\0') {
-+ argn++;
-+ if (argn < argc)
-+ dirname=argv[argn];
-+ else {
-+ fprintf(stderr, "%s: -e requires an argument\n", progName);
-+ break;
-+ }
-+ } else
-+ dirname=argv[argn]+2;
-+ if(dirname[0]=='/' || relative)
-+ LoadEncodings(encodings, dirname, argn);
-+ else {
-+ if(getcwd(fulldirname, MAXFONTFILENAMELEN)==NULL) {
-+ fprintf(stderr, "%s: failed to get cwd\n", progName);
-+ break;
-+ }
-+ i=strlen(fulldirname);
-+ if(i+1+strlen(dirname)>=MAXFONTFILENAMELEN-1) {
-+ fprintf(stderr, "%s: directory name `%s' too long\n", progName,
-+ dirname);
-+ break;
-+ }
-+ fulldirname[i++]='/';
-+ strcpy(fulldirname+i, dirname);
-+ LoadEncodings(encodings, fulldirname, argn);
-+ }
-+ } else if(argv[argn][1]=='p') {
-+ if(argv[argn][2]=='\0') {
-+ argn++;
-+ prefix=argv[argn];
-+ } else
-+ prefix=argv[argn]+2;
-+ } else if(argv[argn][1]=='r') {
-+ if(argv[argn][2]=='\0')
-+ relative=TRUE;
-+ else {
-+ fprintf(stderr, "%s: unknown option `%s'\n", progName, argv[argn]);
-+ continue;
-+ }
-+ } else
-+ fprintf(stderr, "%s: unknown option `%s'\n", progName, argv[argn]);
-+ }
-+
-+ count=0;
-+ for(i=0; i<ENCODING_HASH_SIZE; i++)
-+ for(encoding=encodings[i]; encoding; encoding=encoding->next)
-+ count++;
-+
-+ if (argc == argc)
- {
-- if (!DoDirectory("."))
-+ if (!DoDirectory(".", encodings, count))
- {
- fprintf (stderr, "%s: failed to create directory in %s\n",
- progName, ".");
-@@ -498,11 +771,11 @@
- }
- }
- else
-- for (i = 1; i < argc; i++) {
-- if (!DoDirectory(argv[i]))
-+ for (; argn < argc; argn++) {
-+ if (!DoDirectory(argv[argn], encodings, count))
- {
- fprintf (stderr, "%s: failed to create directory in %s\n",
-- progName, argv[i]);
-+ progName, argv[argn]);
- exit (1);
- }
- }
---- XFree86-3.3.5/xc/programs/mkfontdir/mkfontdir.man.xfsftfontdir Sat Dec 21 23:11:23 1996
-+++ XFree86-3.3.5/xc/programs/mkfontdir/mkfontdir.man Wed Aug 18 17:23:04 1999
-@@ -26,12 +26,22 @@
- .\" from the X Consortium.
- .TH MKFONTDIR 1 "Release 6.3" "X Version 11"
- .SH NAME
--mkfontdir, fonts.dir, fonts.scale, fonts.alias \- create an index of X font files in a directory
-+mkfontdir, fonts.dir, fonts.scale, fonts.alias, encodings.dir \- create an index of X font files in a directory
- .SH SYNOPSIS
- .B "mkfontdir"
--[\fIdirectory-name\fP .\|.\|. ]
-+.RB [ \-r ]
-+.RB [ \-p
-+.IR prefix ]
-+.RB [ \-e
-+.IR encoding-directory-name ]
-+\|.\|.\|.
-+.RB [ \-\- ]
-+.RI [ directory-name
-+\|.\|.\|. ]
- .SH DESCRIPTION
--For each directory argument, \fImkfontdir\fP reads all of the font files in the
-+For each directory argument,
-+.Imkfontdir
-+reads all of the font files in the
- directory searching for properties named "FONT", or (failing that) the name
- of the file stripped of its suffix. These are converted to lower case and
- used as font names, and,
-@@ -39,7 +49,9 @@
- written out to the file "fonts.dir" in the directory.
- The X server and font server use "fonts.dir" to find font files.
- .PP
--The kinds of font files read by \fImkfontdir\fP depend on configuration
-+The kinds of font files read by
-+.Imkfontdir
-+depend on configuration
- parameters, but typically include PCF (suffix ".pcf"), SNF (suffix ".snf")
- and BDF (suffix ".bdf"). If a font exists in multiple formats,
- .I mkfontdir
-@@ -53,7 +65,8 @@
- Because scalable font files do not usually include the X font name, the
- file "fonts.scale" can be used to name the scalable fonts in the
- directory.
--The fonts listed in it are copied to fonts.dir by \fImkfontdir\fP.
-+The fonts listed in it are copied to fonts.dir by
-+.Imkfontdir .
- "fonts.scale" has the same format as the "fonts.dir" file.
- .SH "FONT NAME ALIASES"
- The file "fonts.alias", which can be put in any directory of the font-path, is
-@@ -83,6 +96,48 @@
- If the string "FILE_NAMES_ALIASES" stands alone on a line, each file-name
- in the directory (stripped of its suffix) will be used as an alias for
- that font.
-+.SH ENCODING FILES
-+The option
-+.B -e
-+can be used to specify a directory with encoding files. Every such
-+directory is scanned for encoding files, the list of which is then
-+written to an "encodings.dir" file in every font directory. The
-+"encodings.dir" file is used by the server to find encoding
-+information.
-+.PP
-+The "encodings.dir" file has the same format as "fonts.dir".
-+It maps encoding names (strings of the form
-+.BI CHARSET_REGISTRY \- CHARSET_ENCODING
-+) to encoding file names.
-+.SH OPTIONS
-+The following options are supported:
-+.TP
-+.B \-e
-+Specify a directory containing encoding files. The
-+.B \-e
-+option may be specified multiple times, and all the specified
-+directories will be read. The order of the entries is significant, as
-+encodings found in earlier directories override those in later ones;
-+encoding files in the same directory are discriminated by preferring
-+compressed versions.
-+.TP
-+.B \-p
-+Specify a prefix that is prepended to the encoding file path names
-+when the are written to the "encodings.dir" file. The prefix is
-+prepended as-is. If a `/' is required between the prefix and the path
-+names, it must be supplied explicitly as part of the prefix.
-+.TP
-+.B \-r
-+Keep non-absolute encoding directories in their relative form when
-+writing the "encodings.dir" file. The default is to convert relative
-+encoding directories to absolute directories by prepending the current
-+directory. The positioning of this options is significant, as this
-+option only applies to subsequent
-+.B \-e
-+options.
-+.TP
-+.B \-\-
-+End options.
- .SH FILES
- .TP 15
- .B fonts.dir
-@@ -98,5 +153,10 @@
- List of font name aliases.
- Read by the X server and font server each
- time the font path is set (see xset(1)).
-+.TP 15
-+.B encodings.dir
-+List of known encodings and the files they are stored in.
-+Created by \fImkfontdir\fP. Read by the X server and font server each
-+time a font with an unknown charset is opened.
- .SH "SEE ALSO"
- X(1), Xserver(1), xfs(1), xset(1)
+++ /dev/null
---- xc/programs/xfs/difs/fonts.c.xfsredhat Sun Aug 22 15:29:55 1999
-+++ xc/programs/xfs/difs/fonts.c Tue Mar 14 12:10:39 2000
-@@ -108,6 +108,113 @@
- }
-
- /*
-+ * xf86GetPathElem --
-+ * Extract a single element from the font path string starting at
-+ * pnt. The font path element will be returned, and pnt will be
-+ * updated to point to the start of the next element, or set to
-+ * NULL if there are no more.
-+ */
-+char *
-+xf86GetPathElem(pnt)
-+ char **pnt;
-+{
-+ char *p1;
-+
-+ p1 = *pnt;
-+ *pnt = index(*pnt, ',');
-+ if (*pnt != NULL) {
-+ **pnt = '\0';
-+ *pnt += 1;
-+ }
-+ return(p1);
-+}
-+
-+/*
-+ * xf86ValidateFontPath --
-+ * Validates the user-specified font path. Each element that
-+ * begins with a '/' is checked to make sure the directory exists.
-+ * If the directory exists, the existence of a file named 'fonts.dir'
-+ * is checked. If either check fails, an error is printed and the
-+ * element is removed from the font path.
-+ */
-+#define DIR_FILE "/fonts.dir"
-+#define CHECK_TYPE(mode, type) ((S_IFMT & (mode)) == (type))
-+static char *
-+xf86ValidateFontPath(path)
-+ char *path;
-+{
-+ char *tmp_path, *out_pnt, *path_elem, *next, *p1, *dir_elem;
-+ struct stat stat_buf;
-+ int flag;
-+ int dirlen;
-+
-+ tmp_path = (char *)calloc(1,strlen(path)+1);
-+ out_pnt = tmp_path;
-+ path_elem = NULL;
-+ next = path;
-+ while (next != NULL) {
-+ path_elem = xf86GetPathElem(&next);
-+#ifndef __EMX__
-+ if (*path_elem == '/') {
-+ dir_elem = (char *)calloc(1, strlen(path_elem) + 1);
-+ if ((p1 = strchr(path_elem, ':')) != 0)
-+#else
-+ /* OS/2 must prepend X11ROOT */
-+ if (*path_elem == '/') {
-+ path_elem = (char*)__XOS2RedirRoot(path_elem);
-+ dir_elem = (char*)calloc(1, strlen(path_elem) + 1);
-+ if (p1 = strchr(path_elem+2, ':'))
-+#endif
-+ dirlen = p1 - path_elem;
-+ else
-+ dirlen = strlen(path_elem);
-+ strncpy(dir_elem, path_elem, dirlen);
-+ dir_elem[dirlen] = '\0';
-+ flag = stat(dir_elem, &stat_buf);
-+ if (flag == 0)
-+ if (!CHECK_TYPE(stat_buf.st_mode, S_IFDIR))
-+ flag = -1;
-+ if (flag != 0) {
-+ printf("warning!\n");
-+ ErrorF("Warning: The directory \"%s\" does not exist.\n", dir_elem);
-+ ErrorF(" Entry deleted from font path.\n");
-+ continue;
-+ }
-+ else {
-+ p1 = (char *)malloc(strlen(dir_elem)+strlen(DIR_FILE)+1);
-+ strcpy(p1, dir_elem);
-+ strcat(p1, DIR_FILE);
-+ flag = stat(p1, &stat_buf);
-+ if (flag == 0)
-+ if (!CHECK_TYPE(stat_buf.st_mode, S_IFREG))
-+ flag = -1;
-+#ifndef __EMX__
-+ free(p1);
-+#endif
-+ if (flag != 0) {
-+ ErrorF("Warning: 'fonts.dir' not found (or not valid) in \"%s\".\n",
-+ dir_elem);
-+ ErrorF(" Entry deleted from font path.\n");
-+ ErrorF(" (Run 'mkfontdir' on \"%s\").\n", dir_elem);
-+ continue;
-+ }
-+ }
-+ free(dir_elem);
-+ }
-+
-+ /*
-+ * Either an OK directory, or a font server name. So add it to
-+ * the path.
-+ */
-+ if (out_pnt != tmp_path)
-+ *out_pnt++ = ',';
-+ strcat(out_pnt, path_elem);
-+ out_pnt += strlen(path_elem);
-+ }
-+ return(tmp_path);
-+}
-+
-+/*
- * note that the font wakeup queue is not refcounted. this is because
- * an fpe needs to be added when it's inited, and removed when it's finally
- * freed, in order to handle any data that isn't requested, like FS events.
-@@ -734,8 +841,12 @@
- *end,
- *p;
- int err;
-+ char *fixedpath;
-+
-+ fixedpath = xf86ValidateFontPath(str);
-
-- len = strlen(str) + 1;
-+ len = strlen(fixedpath) + 1;
-+ str = fixedpath;
- paths = p = (char *) ALLOCATE_LOCAL(len);
- npaths = 0;
-
-@@ -755,6 +866,7 @@
-
- err = set_font_path_elements(npaths, paths, badpath);
-
-+ free(fixedpath);
- DEALLOCATE_LOCAL(paths);
-
- return err;
---- xc/programs/xfs/difs/main.c.xfsredhat Sun Mar 7 15:50:25 1999
-+++ xc/programs/xfs/difs/main.c Tue Mar 14 12:10:39 2000
-@@ -56,12 +56,18 @@
- #include "dispatch.h"
- #include "extentst.h"
- #include "difs.h"
-+#include <unistd.h>
-+#include <pwd.h>
-+#include <sys/types.h>
-
- char *ConnectionInfo;
- int ConnInfoLen;
-
- Cache serverCache;
-
-+int droppriv; /* whether or not to drop root privileges at startup */
-+int becomeDaemon; /* whether or not to become a daemon */
-+
- #ifndef DEFAULT_CONFIG_FILE
- #define DEFAULT_CONFIG_FILE "/usr/lib/X11/fs/config"
- #endif
-@@ -80,15 +86,43 @@
- main(int argc, char *argv[])
- {
- int i;
-+ struct passwd *pwent;
-
- argcGlobal = argc;
- argvGlobal = argv;
-+ droppriv = 0;
-+ becomeDaemon = 0;
-
- configfilename = DEFAULT_CONFIG_FILE;
-
- /* init stuff */
- ProcessCmdLine(argc, argv);
- InitErrors();
-+
-+ /* become xfs user, if possible */
-+ if ((geteuid() == 0) && droppriv) {
-+ pwent = getpwnam("xfs");
-+ if (pwent) {
-+ if (setgid(pwent->pw_gid)) {
-+ ErrorF("fatal: couldn't set groupid to xfs user's group\n");
-+ exit(1);
-+ }
-+
-+ if (setgroups(0, 0)) {
-+ ErrorF("fatal: couldn't drop supplementary groups\n");
-+ exit(1);
-+ }
-+
-+ if (setuid(pwent->pw_uid)) {
-+ ErrorF("fatal: couldn't set userid to xfs user\n");
-+ exit(1);
-+ }
-+ }
-+ } else if (droppriv) {
-+ ErrorF("fatal: droppriv flag specified, but xfs not run as root\n");
-+ exit(1);
-+ }
-+
- /*
- * do this first thing, to get any options that only take effect at
- * startup time. it is erad again each time the server resets
-@@ -97,6 +131,10 @@
- ErrorF("fatal: couldn't read config file\n");
- exit(1);
- }
-+
-+ /* become a daemon if explicitly requested to do so. */
-+ if (becomeDaemon)
-+ daemon(0, 0);
-
- while (1) {
- serverGeneration++;
---- xc/programs/xfs/os/utils.c.xfsredhat Sun Mar 7 15:50:30 1999
-+++ xc/programs/xfs/os/utils.c Tue Mar 14 12:10:39 2000
-@@ -91,6 +91,8 @@
- #endif
-
- extern char *configfilename;
-+extern int droppriv; /* whether or not to drop root privileges */
-+extern int becomeDaemon; /* whether to become a daemon or not */
- char *progname;
- Bool CloneSelf;
-
-@@ -189,7 +191,7 @@
- static void
- usage(void)
- {
-- fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port]\n",
-+ fprintf(stderr, "usage: %s [-config config_file] [-port tcp_port] [-droppriv] [-daemon]\n",
- progname);
- exit(1);
- }
-@@ -293,6 +295,10 @@
- ProcessLSoption (argv[++i]);
- else
- usage();
-+ } else if (!strcmp(argv[i], "-droppriv")) {
-+ droppriv = 1;
-+ } else if (!strcmp(argv[i], "-daemon")) {
-+ becomeDaemon = 1;
- } else if (!strcmp(argv[i], "-cf") || !strcmp(argv[i], "-config")) {
- if (argv[i + 1])
- configfilename = argv[++i];
---- xc/programs/xfs/os/Imakefile.xfsredhat Sun Feb 13 08:54:42 2000
-+++ xc/programs/xfs/os/Imakefile Tue Mar 14 12:10:39 2000
-@@ -23,7 +23,7 @@
- SOCK_DEFINES = -DBSD44SOCKETS
- #endif
-
--/* ERROR_DEFINES = -DUSE_SYSLOG */
-+ERROR_DEFINES = -DUSE_SYSLOG
-
- OS_DEFINES = ServerOSDefines
-
---- xc/programs/xfs/os/error.c.xfsredhat Sun Oct 25 14:59:57 1998
-+++ xc/programs/xfs/os/error.c Tue Mar 14 13:29:26 2000
-@@ -76,6 +76,7 @@
-
- Bool UseSyslog;
- char ErrorFile[PATH_MAX];
-+int log_open = 0;
-
- static void
- abort_server(void)
-@@ -142,17 +143,21 @@
-
- #ifdef USE_SYSLOG
- if (UseSyslog) {
-- syslog(LOG_NOTICE, f, s0, s1, s2, s3, s4, s5, s6, s7, s8, s9);
-+ va_list args;
-+ va_start(args, f);
-+ syslog(LOG_NOTICE, f, args);
-+ va_end(args);
- return;
- }
- #endif
--
-+ {
- /* XXX should Notices just be ignored if not using syslog? */
- va_list args;
- va_start(args, f);
- fprintf(stderr, "%s notice: ", progname);
- vfprintf(stderr, f, args);
- va_end(args);
-+ }
- }
-
- /*
-@@ -164,15 +169,20 @@
- {
- #ifdef USE_SYSLOG
- if (UseSyslog) {
-- syslog(LOG_ERR, f, s0, s1, s2, s3, s4, s5, s6, s7, s8, s9);
-+ va_list args;
-+ va_start(args, f);
-+ syslog(LOG_ERR, f, args);
-+ va_end(args);
- return;
- }
- #endif
-+ {
- va_list args;
- va_start(args, f);
- fprintf(stderr, "%s error: ", progname);
- vfprintf(stderr, f, args);
- va_end(args);
-+ }
- }
-
- /* VARARGS1 */
+++ /dev/null
---- XFree86-3.3.4.orig/xc/programs/xinit/xinit.c Sun Jun 27 12:32:26 1999
-+++ XFree86-3.3.4/xc/programs/xinit/xinit.c Sun Aug 8 22:28:20 1999
-@@ -596,30 +596,40 @@
- serverpid = -1;
- break;
- }
-- /*
-- * kludge to avoid race with TCP, giving server time to
-- * set his socket options before we try to open it,
-- * either use the 15 second timeout, or await SIGUSR1.
-+
-+ /*
-+ * before we try the below kludge, see if we are already
-+ * ready to connect. Fast CPUs with cached filesystems
-+ * shouldn't have to wait 15 seconds.
- *
-- * If your machine is substantially slower than 15 seconds,
-- * you can easily adjust this value.
-+ * pbrown@redhat.com - 06/08/1999
- */
-- alarm (15);
-+ if (waitforserver() == 0) {
-+ /*
-+ * kludge to avoid race with TCP, giving server time to
-+ * set his socket options before we try to open it,
-+ * either use the 15 second timeout, or await SIGUSR1.
-+ *
-+ * If your machine is substantially slower than 15 seconds,
-+ * you can easily adjust this value.
-+ */
-+ alarm (15);
-
- #ifndef X_NOT_POSIX
-- sigsuspend(&old);
-- alarm (0);
-- sigprocmask(SIG_SETMASK, &old, NULL);
-+ sigsuspend(&old);
-+ alarm (0);
-+ sigprocmask(SIG_SETMASK, &old, NULL);
- #else
-- sigpause (old);
-- alarm (0);
-- sigsetmask (old);
-+ sigpause (old);
-+ alarm (0);
-+ sigsetmask (old);
- #endif
-
-- if (waitforserver() == 0) {
-- Error("unable to connect to X server\r\n");
-- shutdown();
-- serverpid = -1;
-+ if (waitforserver() == 0) {
-+ Error("unable to connect to X server\r\n");
-+ shutdown();
-+ serverpid = -1;
-+ }
- }
- break;
- }
+++ /dev/null
---- XFree86-4.2.0/xc/programs/xkbcomp/symbols/us_intl.xkb-us_intl-missing-commas Sat Feb 9 14:37:36 2002
-+++ XFree86-4.2.0/xc/programs/xkbcomp/symbols/us_intl Sat Feb 9 14:39:35 2002
-@@ -40,22 +40,21 @@
- [ asciicircum, asciicircum ] };
- key <AC11> { [ dead_acute, dead_diaeresis ],
- [ apostrophe, quotedbl ] };
--
-- key <AE09> { [ 9, parenleft ]
-+ key <AE09> { [ 9, parenleft ],
- [ dead_breve, dead_breve ] };
-- key <AE10> { [ 0, parenright ]
-+ key <AE10> { [ 0, parenright ],
- [ dead_abovering, dead_abovering ] };
- key <AE11> { [ minus, underscore ],
- [ dead_macron, dead_belowdot ] };
- key <AE12> { [ equal, plus ],
- [ dead_doubleacute, dead_horn ] };
-- key <AC10> { [ semicolon, colon ]
-+ key <AC10> { [ semicolon, colon ],
- [ dead_ogonek, dead_diaeresis ] };
-- key <AB08> { [ comma, less ]
-+ key <AB08> { [ comma, less ],
- [ dead_cedilla, dead_caron ] };
-- key <AB09> { [ period, greater ]
-+ key <AB09> { [ period, greater ],
- [ dead_abovedot, dead_circumflex ] };
-- key <AB10> { [ slash, question ]
-+ key <AB10> { [ slash, question ],
- [ dead_hook, dead_hook ] };
-
-
+++ /dev/null
-
-The following patch fixes a problem in _XomGenericTextEscapement().
-The problem is that the font used when
-
-To reproduce the bug, load the following fontset:
-
- "-*-helvetica-bold-r-normal--10-*-*-*-p-*-*-*," \
- "-*-*-bold-r-normal-*-10-*-*-*-*-*-*-*,*"
-
-And then (in a Latin-1 locale) compare the results of measuring the
-string with actually drawing the font on the screen. Though helvetica
-is drawn on the screen, the width will not be the width from the
-helvetica font, but from a different font from matching on the '*'.
-
-The patch below fixes selecting the font for measuring the text
-escapement to work the same way as selecting the font for drawing.
-
-I've added another comment in a different portion of code that appears
-somewhat dubious to me; the entries in font_set->font_data are getting
-filled in with bogus fonts. Loading these fonts is unecessary
-overhead, and having them there is likely to produce odd bugs like
-this one.
-
-(I have to say that reading this code makes me more and more happy
-that I decided to ignore and bypass it for Pango.)
-
-Regards,
- Owen
-
---- xc/lib/X11/omGeneric.c.ots Wed Jul 12 12:02:04 2000
-+++ xc/lib/X11/omGeneric.c Wed Jul 12 12:09:15 2000
-@@ -1031,6 +1031,15 @@
-
- found_num++;
- is_found = True;
-+ /* We almost certainly should have 'break' here and should ignore
-+ * the rest of the patterns. The problem is that we'll overwrite
-+ * font_data->font and font_data->xlfd_name with later matches.
-+ * But the general expectation would be that font_data->xlfd_name
-+ * would correspond to to the returned value. (It's not clear
-+ * why this routine modifies font_data and has a font_data_return...)
-+ *
-+ * Owen Taylor <otaylor@redhat.com> 12 Jul 2000
-+ */
- }
-
- switch(class) {
---- xc/lib/X11/omTextEsc.c.ots Wed Jul 12 11:57:58 2000
-+++ xc/lib/X11/omTextEsc.c Wed Jul 12 12:07:41 2000
-@@ -151,10 +151,27 @@
- is_xchar2b, FONTSCOPE);
- if(ptr_len <= 0)
- break;
-+
-+ /* First, see if the "Best Match" font for the FontSet was set.
-+ * If it was, use that font. If it was not set, then use the
-+ * font defined by font_set->font_data[0] (which is what
-+ * _XomGetFontDataFromFontSet() always seems to return for
-+ * non-VW text). Note that given the new algorithm in
-+ * parse_fontname() and parse_fontdata(), fs->font will
-+ * *always* contain good data. We should probably remove
-+ * the check for "fd->font", but we won't :-) -- jjw/pma (HP)
-+ *
-+ * Above comment and way this is done propagated from omText.c
-+ * Note that fd->font is junk so using the result of the
-+ * above call /needs/ to be ignored.
-+ *
-+ * Owen Taylor <otaylor@redhat.com> 12 Jul 2000
-+ *
-+ */
- if(fd == (FontData) NULL ||
-- (font = fd->font) == (XFontStruct *) NULL) {
-+ (font = font_set->font) == (XFontStruct *) NULL) {
-
-- if((font = font_set->font) == (XFontStruct *) NULL)
-+ if((font = fd->font) == (XFontStruct *) NULL)
- break;
- }
-
+++ /dev/null
---- XFree86-4.2.99.901/xc/programs/xman/vendor.h.orig Sun Mar 17 01:50:17 2002
-+++ XFree86-4.2.99.901/xc/programs/xman/vendor.h Sun Mar 17 01:54:57 2002
-@@ -77,7 +77,7 @@
- # define SYSMANPATH "/usr/catman/u_man:/usr/catman/a_man"
- #elif defined(__bsdi__)
- # define SYSMANPATH "/usr/share/man:/usr/contrib/man:/usr/contrib/isode/man:/usr/local/man"
--#elif defined(__OpenBSD__) || defined(__DARWIN__)
-+#elif defined(__OpenBSD__) || defined(__DARWIN__) || defined(linux)
- # define SYSMANPATH "/usr/share/man:/usr/local/man:/usr/X11R6/man"
- #elif defined(SVR4) || defined(__osf__) || (defined(BSD) && (BSD >= 199103))
- # define SYSMANPATH "/usr/share/man"
+++ /dev/null
-diff -urN xc.orig/programs/xman/Imakefile xc/programs/xman/Imakefile
---- xc.orig/programs/xman/Imakefile Mon Dec 30 15:54:14 2002
-+++ xc/programs/xman/Imakefile Mon Dec 30 18:21:38 2002
-@@ -26,7 +26,7 @@
- # if defined(LinuxDistribution) && (LinuxDistribution == LinuxRedHat)
- MANCONF = -DMANCONF=\"/etc/man.config\"
- # else
-- MANCONF = -DMANCONF=\"/etc/man.conf\"
-+ MANCONF = -DMANCONF=\"/etc/man.config\"
- # endif
- #elif defined(OpenBSDArchitecture) || defined(NetBSDArchitecture) || \
- defined(DarwinArchitecture)
-diff -urN xc.orig/programs/xman/xman.man xc/programs/xman/xman.man
---- xc.orig/programs/xman/xman.man Mon Dec 30 15:54:14 2002
-+++ xc/programs/xman/xman.man Mon Dec 30 18:12:17 2002
-@@ -93,8 +93,8 @@
- .SH "BSD AND LINUX SYSTEMS"
- .PP
- In newer BSD and Linux systems, \fIXman\fP will search for a file named
--\fI/etc/man.conf\fP which will contain the list of directories containing
--manual pages. See \fIman.conf\fP(5) for a complete description of the file
-+\fI/etc/man.config\fP which will contain the list of directories containing
-+manual pages. See \fIman.config\fP(5) for a complete description of the file
- format.
- .SH "THE MANDESC FILE"
- .PP
+++ /dev/null
---- XFree86-4.3.99.11/xc/programs/xterm/Imakefile.orig Sun Oct 5 14:30:54 2003
-+++ XFree86-4.3.99.11/xc/programs/xterm/Imakefile Sun Oct 5 14:36:29 2003
-@@ -18,6 +18,7 @@
-
- #define UseUtempter
-
-+COLORS_256 = -DOPT_256_COLORS=1
- /*
- * Fixes to allow compile with X11R5
- */
-@@ -118,7 +119,7 @@
- MISC_DEFINES = /* -DALLOWLOGGING -DALLOWLOGFILEEXEC */
- XKB_DEFINES = XkbClientDefines
- PATH_DEFINES = -DPROJECTROOT=$(PROJECTROOT)
-- DEFINES = -I. -I/usr/include/ncurses $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(TRACEDEF)
-+ DEFINES = -I. -I/usr/include/ncurses $(COLORS_256) $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(TRACEDEF)
- INCLUDES = $(XRFINCLUDES)
-
- #ifdef OS2Architecture
+++ /dev/null
---- XFree86-4.3.0/xc/programs/xterm/charproc.c.xterm-can-2003-0063 2003-02-06 18:09:42.000000000 -0500
-+++ XFree86-4.3.0/xc/programs/xterm/charproc.c 2003-02-25 05:10:42.000000000 -0500
-@@ -3867,11 +3867,16 @@
- break;
-
- case 21: /* Report the window's title */
-+/* This code block is disabled to fix a security issue reported
-+ * in CAN-2003-0063
-+ */
-+#if 0
- report_win_label(screen, 'l', &text,
- XGetWMName(
- screen->display,
- VShellWindow,
- &text));
-+#endif
- break;
-
- default: /* DECSLPP (24, 25, 36, 48, 72, 144) */
+++ /dev/null
---- XFree86-3.3.3.1/xc/programs/xterm/xterm.h~ Sat Oct 24 09:58:29 1998
-+++ XFree86-3.3.3.1/xc/programs/xterm/xterm.h Sat Jun 19 03:54:49 1999
-@@ -25,7 +25,7 @@
- #endif
-
- #ifndef DFT_TERMTYPE
--#define DFT_TERMTYPE "xterm"
-+#define DFT_TERMTYPE "xterm-color"
- #endif
-
- #ifndef X_NOT_POSIX
+++ /dev/null
---- XFree86-4.0/xc/programs/xterm/Imakefile~ Mon May 8 01:11:10 2000
-+++ XFree86-4.0/xc/programs/xterm/Imakefile Mon May 8 01:15:01 2000
-@@ -16,6 +16,8 @@
- /* Define UTF8support to compile-in support for UTF-8 */
- #define UTF8support
-
-+#define UseUtempter
-+
- /*
- * Fixes to allow compile with X11R5
- */
+++ /dev/null
-
-# TODO:
-# - separate XFS to be standalone - is it possible without duplicated files?
-# - there should be imake and XFree86-devel BuildRequires but it's a little
-# strange idea. It's waiting for the right way execution (c) wrobell ;)
-
-#
-# Conditional build:
-# _without_tdfx - disables tdfx drivers building
-#
-
-%define _sver %(echo %{version} | tr -d .)
-%define _synaptics_ver 0.12.1
-
-Summary: XFree86 Window System servers and basic programs
-Summary(de): XFree86 Window-System-Server und grundlegende Programme
-Summary(es): Programas básicos y servidores para el sistema de ventanas XFree86
-Summary(fr): Serveurs du système XFree86 et programmes de base
-Summary(ja): XFree86 window system ¤Î¥µ¡¼¥Ð¤È´ðËÜŪ¤Ê¥×¥í¥°¥é¥à
-Summary(ko): X¿¡ ÇÊ¿äÇÑ ±âº»ÀûÀÎ ±Û²Ã°ú ÇÁ·Î±×·¥°ú ¹®¼µé
-Summary(pl): XFree86 Window System wraz z podstawowymi programami
-Summary(tr): XFree86 Pencereleme Sistemi sunucularý ve temel programlar
-Summary(pt_BR): Programas básicos e servidores para o sistema de janelas XFree86
-Summary(ru): âÁÚÏ×ÙÅ ÛÒÉÆÔÙ, ÐÒÏÇÒÁÍÍÙ É ÄÏËÕÍÅÎÔÁÃÉÑ ÄÌÑ ÒÁÂÏÞÅÊ ÓÔÁÎÃÉÉ ÐÏÄ X
-Summary(uk): âÁÚÏצ ÛÒÉÆÔÉ, ÐÒÏÇÒÁÍÉ ÔÁ ÄÏËÕÍÅÎÔÁÃ¦Ñ ÄÌÑ ÒÏÂÏÞϧ ÓÔÁÎæ§ Ð¦Ä X
-Summary(zh_CN): XFree86 ´°¿Úϵͳ·þÎñÆ÷ºÍ»ù±¾³ÌÐò
-Name: XFree86
-Version: 4.3.99.901
-Release: 0.2
-Epoch: 1
-License: MIT
-Group: X11/XFree86
-Source0: ftp://ftp.xfree86.org/pub/XFree86/develsnaps/%{name}-%{version}.tar.bz2
-# Source0-md5: 110b2eb9ca59fc2794e6ab46ec5c86a8
-#Source1: ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/X430src-2.tgz
-#Source2: ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/X430src-3.tgz
-Source3: ftp://ftp.pld-linux.org/software/xinit/xdm-xinitrc-0.2.tar.bz2
-# Source3-md5: 0a15b1c374256b5cad7961807baa3896
-Source4: xdm.pamd
-Source5: xserver.pamd
-Source6: xdm.init
-Source7: xfs.init
-Source8: xfs.config
-Source9: XTerm.ad-pl
-Source10: xdm.sysconfig
-Source11: xfs.sysconfig
-Source20: twm.desktop
-Source21: xeyes.desktop
-Source22: xedit.desktop
-Source23: xterm.desktop
-Source24: xclipboard.desktop
-Source25: xclock.desktop
-Source26: oclock.desktop
-Source27: xconsole.desktop
-Source30: xlogo64.png
-Source31: xeyes.png
-Source32: xedit.png
-Source33: xterm.png
-Source34: xclipboard.png
-Source35: xclock.png
-Source36: oclock.png
-Source37: xconsole.png
-Source38: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-Xman-pages.tar.bz2
-# Source38-md5: a184106bb83cb27c6963944d9243ac3f
-#Source39: cvs://anonymous@cvs.gatos.sourceforge.net/cvsroot/gatos/ati.2-20021001.tar.bz2
-# http://w1.894.telia.com/~u89404340/touchpad/index.html
-Source40: http://w1.894.telia.com/~u89404340/touchpad/files/synaptics-%{_synaptics_ver}.tar.bz2
-# Source40-md5: 7106431c76d363f11c3cc29d66c19b85
-Source41: http://www.linux.org.uk/~alan/S3.zip
-# Source41-md5: 8b754fc6bbded60b683563b945e384b0
-Source42: twm-xsession.desktop
-Source43: xcalc.desktop
-Source44: xload.desktop
-Source45: xmag.desktop
-Source46: xcalc.png
-Source47: xload.png
-Source48: xmag.png
-Source49: http://oss.sgi.com/projects/ogl-sample/ABI/glext.h
-# NoSource49-md5: bf9b05a66798796b53ed1a050049b2ee
-Patch0: %{name}-PLD.patch
-Patch1: %{name}-HasZlib.patch
-Patch2: %{name}-DisableDebug.patch
-Patch3: %{name}-Xwrapper.patch
-Patch4: %{name}-xfs.patch
-Patch5: %{name}-xfs-fix.patch
-Patch6: %{name}-xfs-logger.patch
-Patch7: %{name}-xterm-utempter.patch
-Patch8: %{name}-app_defaults_dir.patch
-Patch9: %{name}-v4l.patch
-Patch10: %{name}-broken-includes.patch
-Patch11: %{name}-alpha-pcibus-lemming.patch
-Patch12: %{name}-fhs.patch
-Patch13: %{name}-xdmsecurity.patch
-Patch14: %{name}-xman.patch
-Patch15: %{name}-HasXdmAuth.patch
-Patch16: %{name}-xdm-fixes.patch
-Patch17: %{name}-imake-kernel-version.patch
-Patch18: %{name}-no-kernel-modules.patch
-Patch19: %{name}-parallelmake.patch
-Patch20: %{name}-pic.patch
-Patch21: %{name}-r128-busmstr2.patch
-Patch22: %{name}-neomagic_swcursor.patch
-Patch23: %{name}-mga-busmstr.patch
-Patch24: %{name}-agpgart-load.patch
-Patch26: %{name}-HasFreetype2.patch
-Patch27: %{name}-config-s3.patch
-Patch28: %{name}-sparc_pci_domains.patch
-Patch29: %{name}-XTerm.ad.patch
-Patch30: %{name}-alpha_GLX_align_fix.patch
-Patch32: %{name}-xman-manpaths.patch
-Patch33: %{name}-clearrts.patch
-Patch34: %{name}-fix-07-s3trio64v2gx+netfinity.patch
-Patch35: %{name}-i740-driver-update-cvs-20020617.patch
-Patch36: %{name}-tdfx-disable-dri-on-16Mb-cards-in-hires.patch
-Patch38: %{name}-tdfx-fix-compiler-warnings.patch
-Patch39: %{name}-tdfx-fix-vtswitch-font-corruption.patch
-Patch40: %{name}-Xfont-Type1-large-DoS.patch
-# "strip -g libGLcore.a" leaves empty objects m_debug_*.o, which cause
-# warnings during GLcore loading ("m_debug_*.o: no symbols") - shut up them
-Patch41: %{name}-GLcore-strip-a-workaround.patch
-Patch42: %{name}-disable_glide.patch
-Patch43: %{name}-expat.patch
-Patch44: %{name}-pkgconfig.patch
-# spencode.o in libspeedo.a is empty - patch like for libGLcore.a
-Patch45: %{name}-spencode-nowarning.patch
-# Small (maybe buggy) patch to resolve problems with totem 0.97.0
-Patch46: %{name}-lock.patch
-Patch47: %{name}-linux-version.patch
-Patch48: %{name}-new-s3-nodebug.patch
-Patch49: %{name}-mandir-fix.patch
-Patch50: %{name}-xterm-256colors.patch
-Patch51: %{name}-new-s3-pScreen.patch
-URL: http://www.xfree86.org/
-BuildRequires: %{_bindir}/perl
-%ifarch %{ix86} alpha
-%{!?_without_tdfx:BuildRequires: Glide3-DRI-devel}
-%endif
-# Required by xc/programs/Xserver/hw/xfree86/drivers/glide/glide_driver.c
-%ifarch %{ix86}
-%{!?_without_tdfx:BuildRequires: Glide2x_SDK}
-%endif
-BuildRequires: bison
-BuildRequires: ed
-BuildRequires: expat-devel
-BuildRequires: flex
-BuildRequires: freetype-devel >= 2.0.0
-BuildRequires: libpng-devel
-BuildRequires: libstdc++-devel
-BuildRequires: ncurses-devel
-BuildRequires: pam-devel
-BuildRequires: rpmbuild(macros) >= 1.122
-BuildRequires: tcl-devel
-BuildRequires: unzip
-BuildRequires: utempter-devel
-BuildRequires: zlib-devel
-Requires: %{name}-libs = %{epoch}:%{version}
-Requires: xauth
-Requires: pam >= 0.77.3
-ExclusiveArch: %{ix86} alpha sparc m68k armv4l noarch ppc
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes: xpm-progs
-Obsoletes: xterm
-
-%ifarch sparc sparc64
-Obsoletes: X11R6.1
-%endif
-
-%define _prefix /usr/X11R6
-%define _mandir %{_prefix}/man
-%define _soundsdir /usr/share/sounds
-%define _themesdir /usr/share/themes
-%define _wmpropsdir /usr/share/wm-properties
-%define _xsessdir /usr/share/xsessions
-%define _appdefsdir %{_libdir}/X11/app-defaults
-
-# avoid Mesa dependency in XFree86-OpenGL-libs
-# Glide3 (libglide3.so.3) can be provided by Glide_V3-DRI or Glide_V5-DRI
-%define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.3.3 libglide3.so.3
-
-%description
-The X Window System provides the base technology for developing
-graphical user interfaces. Simply stated, X draws the elements of the
-GUI on the user's screen and builds methods for sending user
-interactions back to the application. X also supports remote
-application deployment--running an application on another computer
-while viewing the input/output on your machine. X is a powerful
-environment which supports many different applications, such as games,
-programming tools, graphics programs, text editors, etc. XFree86 is
-the version of X which runs on Linux, as well as other platforms.
-
-This package contains the basic fonts, programs and documentation for
-an X workstation. However, this package doesn't provide the program
-which you will need to drive your video hardware. To control your
-video card, you'll need the particular X server package which
-corresponds to your computer's video card.
-
-%description -l de
-X-Window ist eine voll funktionsfähige grafische Benutzeroberfläche
-mit mehreren Fenstern, mehreren Clients und verschiedenen Arten von
-Fenstern. Es kommt auf den meisten Unix-Plattformen zum Einsatz. Die
-Clients lassen sich auch mit Hilfe anderer Fenstersysteme anzeigen.
-Das X-Protokoll gestattet die Ausführung der Applikationen direkt auf
-lokalen Rechnern oder über ein Netz und bietet große Flexibilität bei
-Client-Server-Implementierungen.
-
-%description -l es
-X Window es una interface gráfica completa con múltiples ventanas,
-múltiples clientes y diferentes estilos de ventanas. Se usa en la
-mayoría de las plataformas Unix, y los clientes también pueden
-ejecutar en otros sistemas de ventanas populares. El protocolo X
-permite que las aplicaciones puedan ejecutarse tanto en la máquina
-local como a través de la red, y proveer flexibilidad en
-implementaciones cliente/servidor. Este paquete contiene las fuentes
-básicas, programas y documentación para una estación de trabajo X. No
-ofrece un servidor X que acceda tu hardware de vídeo -- estos son
-puestos a disposición en otro paquete.
-
-%description -l pl
-X Window System jest graficznym interfejsem u¿ytkownika; cechuje siê
-mo¿liwo¶ci± pracy w wielu oknach, z wieloma klientami i do tego w
-ró¿nych wystrojach okien. :) Jest u¿ywany na wiêkszo¶ci platform
-sytemów Unix, a klienci mog± byæ uruchamiani tak¿e pod innymi
-popularnymi systemami okienkowymi. Protokó³ X pozwala na uruchamianie
-aplikacji zarówno z lokalnej maszyny jak i poprzez sieæ - daj±c przez
-to elastyczn± implementacjê architektury klient/serwer.
-
-Pakiet ten nie zawiera X serwera który jest po¶rednikiem z Twoj± kart±
-graficzn± (jest on w innym pakiecie).
-
-%description -l tr
-X Window sistemi, çoklu pencere, çoklu istemci ve çeþitli pencere
-stilleriyle geniþ özelliklere sahip bir Grafik Kullanýcý Arabirimidir.
-Çoðu UNIX sisteminde çalýþtýðý gibi istemcileri de birçok pencereleme
-sistemiyle çalýþabilir. X protokolu kullanan uygulamalarýn yerel
-makina veya bilgisayar aðý üzerinden çalýþtýrýlabilmesi esnek bir
-istemci/sunucu ortamý saðlar. Bu paket bir X istasyonu için gerekli
-olan temel yazýtiplerini, programlarý ve belgeleri sunar. Ekran
-kartýnýzý sürmek için gerekli olan X sunucusu bu pakete dahil
-deðildir.
-
-%description -l pt_BR
-X Window é uma interface gráfica completa com múltiplas janelas,
-múltiplos clientes e diferentes estilos de janelas. É usado na maioria
-das plataformas Unix, e clientes também podem rodar em outros sistemas
-de janelas populares. O protocolo X permite que aplicações possam
-rodar tanto na máquina local como através da rede, provendo
-flexibilidade em implementações cliente/servidor.
-
-Este pacote contém as fontes básicas, programas e documentação para
-uma estação de trabalho X. Ele não fornece um servidor X que acessa
-seu hardware de vídeo -- estes são disponibilizados em outro pacote.
-
-%description -l ru
-X Window System ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ÂÁÚÕ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÇÒÁÆÉÞÅÓËÉÈ
-ÉÎÔÅÒÆÅÊÓÏ× ÐÏÌØÚÏ×ÁÔÅÌÑ. ðÏÐÒÏÓÔÕ ÇÏ×ÏÒÑ, X ÒÉÓÕÅÔ ÜÌÅÍÅÎÔÙ GUI ÎÁ
-ÜËÒÁÎÅ ÐÏÌØÚÏ×ÁÔÅÌÑ É ÓÔÏÉÔ ÍÅÔÏÄÙ ÄÌÑ ÐÅÒÅÄÁÞÉ ÄÅÊÓÔ×ÉÊ ÐÏÌØÚÏ×ÁÔÅÌÑ
-ÐÒÉËÌÁÄÎÙÍ ÐÒÏÇÒÁÍÍÁÍ. X ÔÁËÖÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÒÁÓÐÒÅÄÅÌÅÎÉÅ ÐÒÉÌÏÖÅÎÉÊ -
-ÚÁÐÕÓË ÐÒÏÇÒÁÍÍ ÎÁ ÕÄÁÌÅÎÎÏÍ ËÏÍÐØÀÔÅÒÅ Ó ××ÏÄÏÍ/×Ù×ÏÄÏÍ ÎÁ
-ÐÏÌØÚÏ×ÁÔÅÌØÓËÕÀ ÍÁÛÉÎÕ. X - ÜÔÏ ÍÏÝÎÁÑ ÓÒÅÄÁ, ÐÏÄÄÅÒÖÉ×ÁÀÝÁÑ
-ÍÎÏÖÅÓÔ×Ï ÐÒÉÌÏÖÅÎÉÊ, ÔÁËÉÈ ËÁË ÉÇÒÙ, ÉÎÓÔÒÕÍÅÎÔÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÓÔÁ,
-ÇÒÁÆÉÞÅÓËÉÅ ÐÒÏÇÒÁÍÍÙ, ÔÅËÓÔÏ×ÙÅ ÒÅÄÁËÔÏÒÙ É Ô.Ð. XFree86 - ÜÔÏ ×ÅÒÓÉÑ
-X, ÒÁÂÏÔÁÀÝÁÑ ÎÁ Linux É ÄÒÕÇÉÈ ÓÉÓÔÅÍÁÈ.
-
-üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÂÁÚÏ×ÙÅ ÛÒÉÆÔÙ, ÐÒÏÇÒÁÍÍÙ É ÄÏËÕÍÅÎÔÁÃÉÀ ÄÌÑ
-ÒÁÂÏÞÅÊ ÓÔÁÎÃÉÉ X.
-
-äÏÐÏÌÎÉÔÅÌØÎÏ ÎÅÏÂÈÏÄÉÍÏ ÕÓÔÁÎÏ×ÉÔØ ÐÁËÅÔÙ Xconfigurator, ÆÏÎÔÓÅÒ×ÅÒ
-xfs É ÂÉÂÌÉÏÔÅËÉ XFree86-libs. ÷ÏÚÍÏÖÎÏ ÐÒÉÄÅÔÓÑ ÕÓÔÁÎÏ×ÉÔØ ÔÁËÖÅ ÏÄÉÎ
-ÉÌÉ ÂÏÌÅÅ ÐÁËÅÔÏ× ÛÒÉÆÔÏ× XFree86.
-
-îÕ É, ÎÁËÏÎÅÃ, ÅÓÌÉ ×Ù ÓÏÂÉÒÁÅÔÅÓØ ÒÁÚÒÁÂÁÔÙ×ÁÔØ ÐÒÉÌÏÖÅÎÉÑ,
-ÒÁÂÏÔÁÀÝÉÅ ËÁË X-ËÌÉÅÎÔÙ, ×ÁÍ ÔÁËÖÅ ÎÁÄÏ ÂÕÄÅÔ ÕÓÔÁÎÏ×ÉÔØ
-XFree86-devel.
-
-%description -l uk
-X Window System ÎÁÄÁ¤ ÂÁÚÕ ÄÌÑ ÒÏÚÒÏÂËÉ ÇÒÁƦÞÎÉÈ ¦ÎÔÅÒÆÅÊÓ¦×
-ËÏÒÉÓÔÕ×ÁÞÁ. ðÒÏÓÔ¦ÛÅ ËÁÖÕÞÉ, X ÍÁÌÀ¤ ÅÌÅÍÅÎÔÉ GUI ÎÁ ÅËÒÁΦ
-ËÏÒÉÓÔÕ×ÁÞÁ ÔÁ ÂÕÄÕ¤ ÍÅÔÏÄÉ ÄÌÑ ÐÅÒÅÄÁÞ¦ Ä¦Ê ËÏÒÉÓÔÕ×ÁÞÁ ÐÒÉËÌÁÄÎÉÍ
-ÐÒÏÇÒÁÍÁÍ. X ÔÁËÏÖ Ð¦ÄÔÒÉÍÕ¤ ÒÏÚÐÏÄ¦Ì ÐÒÉËÌÁÄÎÉÈ ÐÒÏÇÒÁÍ - ÚÁÐÕÓË
-ÐÒÏÇÒÁÍ ÎÁ צÄÄÁÌÅÎÏÍÕ ËÏÍÐ'ÀÔÅÒ¦ Ú ××ÏÄÏÍ/×É×ÏÄÏÍ ÎÁ ÍÁÛÉÎÕ
-ËÏÒÉÓÔÕ×ÁÞÁ. X - ÃÅ ÐÏÔÕÖÎÅ ÓÅÒÅÄÏ×ÉÝÅ, ÑËŠЦÄÔÒÉÍÕ¤ ×ÅÌÉËÕ Ë¦ÌØ˦ÓÔØ
-Ò¦ÚÎÉÈ ÐÒÏÇÒÁÍ, ÔÁËÉÈ ÑË ¦ÇÒÉ, ¦ÎÓÔÒÕÍÅÎÔÉ ÄÌÑ ÐÒÏÇÒÁͦÓÔÁ, ÇÒÁƦÞΦ
-ÐÒÏÇÒÁÍÉ, ÔÅËÓÔÏצ ÒÅÄÁËÔÏÒÉ ¦ Ô.¦. XFree86 - ÃÅ ×ÅÒÓ¦Ñ X, ÑËÁ ÐÒÁÃÀ¤
-ÎÁ Linux ÔÁ ¦ÎÛÉÈ ÓÉÓÔÅÍÁÈ.
-
-ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÂÁÚÏצ ÛÒÉÆÔÉ, ÐÒÏÇÒÁÍÉ ÔÁ ÄÏËÕÍÅÎÔÁæÀ ÄÌÑ ÒÏÂÏÞϧ
-ÓÔÁÎæ§ X.
-
-äÏÄÁÔËÏ×Ï ÎÅÏÂȦÄÎÏ ×ÓÔÁÎÏ×ÉÔÉ ÐÁËÅÔÉ Xconfigurator, ÆÏÎÔÓÅÒ×ÅÒ xfs ÔÁ
-¦Â̦ÏÔÅËÉ XFree86-libs. íÏÖÌÉ×Ï ÔÁËÏÖ ÐÒÉÊÄÅÔØÓÑ ×ÓÔÁÎÏ×ÉÔÉ ÏÄÉÎ ÁÂÏ
-ÄÅ˦ÌØËÁ ÐÁËÅÔ¦× ÛÒÉÆÔ¦× XFree86.
-
-îÕ ¦, ÎÁÒÅÛÔ¦, ÑËÝÏ ×É ÚÂÉÒÁ¤ÔÅÓØ ÒÏÚÒÏÂÌÑÔÉ ÐÒÉËÌÁÄΦ ÐÒÏÇÒÁÍÉ, ÝÏ
-ÐÒÁÃÀÀÔØ ÑË X-Ë̦¤ÎÔÉ, ×ÁÍ ÔÁËÏÖ ÔÒÅÂÁ ÂÕÄÅ ×ÓÔÁÎÏ×ÉÔÉ XFree86-devel.
-
-%package common
-Summary: XFree86 files required both on server and client side
-Summary(pl): Pliki XFree86 wymagane zarówno po stronie serwera jak i klienta
-Group: X11/XFree86
-
-%description common
-XFree86 files required both on server and client side.
-
-%description common -l pl
-Pliki XFree86 wymagane zarówno po stronie serwera jak i klienta.
-
-%package DPS
-Summary: Display PostScript
-Summary(pl): Display PostScript
-Group: X11/XFree86
-Provides: DPS
-Obsoletes: dgs
-
-%description DPS
-X-Window Display PostScript is device-independent imaging model for
-displaying information on a screen.
-
-%description DPS -l pl
-X-Window Display PostScript to niezale¿ny od urz±dzenia model
-wy¶wietlania informacji na ekranie.
-
-%package DPS-devel
-Summary: Header files for Display PostScript
-Summary(pl): Pliki nag³ówkowe dla Display PostScript
-Group: X11/XFree86
-Requires: %{name}-DPS = %{epoch}:%{version}
-Obsoletes: dgs-devel
-
-%description DPS-devel
-Header files for develop X-Window Display Postscript.
-
-%description DPS-devel -l pl
-Pliki nag³ówkowe biblioteki X-Window Display PostScript.
-
-%package DPS-static
-Summary: Display PostScript static libraries
-Summary(pl): Biblioteki statyczne Display PostScript
-Group: X11/XFree86
-Requires: %{name}-DPS-devel = %{epoch}:%{version}
-Obsoletes: dgs-static
-
-%description DPS-static
-X-Window Display PostScript static libraries.
-
-%description DPS-static -l pl
-Statyczne biblioteki X-Window Display PostScript.
-
-%package OpenGL-core
-Summary: OpenGL support for X11R6
-Summary(pl): Wsparcie OpenGL dla systemu X11R6
-Group: X11/Libraries
-Requires: %{name}-libs = %{epoch}:%{version}
-Requires: XFree86-OpenGL-libGL
-Obsoletes: XFree86-driver-nvidia
-
-%description OpenGL-core
-OpenGL support for X11R6 system.
-
-%description OpenGL-core -l pl
-Wsparcie OpenGL dla systemu X11R6.
-
-%package OpenGL-libGL
-Summary: OpenGL support for X11R6 - GL library
-Summary(pl): Wsparcie OpenGL dla systemu X11R6 - biblioteka GL
-Group: X11/Libraries
-Requires: XFree86-OpenGL-core = %{epoch}:%{version}
-Obsoletes: XFree86-driver-firegl
-Conflicts: OpenGL-core < 4.3.99.12
-
-%description OpenGL-libGL
-OpenGL support for X11R6 system - GL library.
-
-%description OpenGL-libGL -l pl
-Wsparcie OpenGL dla systemu X11R6 - biblioteka GL.
-
-%package OpenGL-devel
-Summary: OpenGL for X11R6 development
-Summary(pl): Pliki nag³ówkowe OpenGL dla systemu X11R6
-Group: X11/Development/Libraries
-Requires: OpenGL-devel-base
-Requires: %{name}-OpenGL-libs = %{epoch}:%{version}
-Requires: %{name}-devel
-Provides: OpenGL-devel
-Obsoletes: Mesa-devel
-Obsoletes: XFree86-OpenGL-doc
-Obsoletes: glxMesa-devel
-
-%description OpenGL-devel
-Headers and man pages for OpenGL for X11R6.
-
-%description OpenGL-devel -l pl
-Pliki nag³ówkowe i manuale do OpenGL dla systemu X11R6.
-
-%package OpenGL-devel-base
-Summary: OpenGL for X11R6 development (only gl?.h)
-Summary(pl): Pliki nag³ówkowe OpenGL dla systemu X11R6 (tylko gl?.h)
-Group: X11/Development/Libraries
-Requires: OpenGL-devel
-Requires: %{name}-OpenGL-libs = %{epoch}:%{version}
-Requires: %{name}-devel
-Provides: OpenGL-devel-base
-
-%description OpenGL-devel-base
-Base headers (only gl?.h) for OpenGL for X11R6.
-
-%description OpenGL-devel-base -l pl
-Podstawowe pliki nag³ówkowe (tylko gl?.h) OpenGL dla systemu X11R6.
-
-%package OpenGL-libs
-Summary: OpenGL libraries for X11R6
-Summary(pl): Biblioteki OpenGL dla systemu X11R6
-Group: X11/Libraries
-Requires: %{name}-OpenGL-core
-Requires: %{name}-libs = %{epoch}:%{version}
-Provides: OpenGL
-Obsoletes: %{name}-OpenGL
-Obsoletes: Mesa
-
-%description OpenGL-libs
-OpenGL libraries for X11R6 system.
-
-%description OpenGL-libs -l pl
-Biblioteki OpenGL dla systemu X11R6.
-
-%package OpenGL-static
-Summary: X11R6 static libraries with OpenGL
-Summary(pl): Biblioteki statyczne do X11R6 ze wsparciem dla OpenGL
-Group: X11/Development/Libraries
-Requires: %{name}-OpenGL-devel = %{epoch}:%{version}
-Provides: OpenGL-static
-Obsoletes: Mesa-static
-
-%description OpenGL-static
-X11R6 static libraries with OpenGL.
-
-%description OpenGL-static -l pl
-Biblioteki statyczne zawieraj±ce wsparcie dla OpenGL do X11R6.
-
-%package Xnest
-Summary: XFree86 Xnest server
-Summary(pl): Serwer XFree86 Xnest
-Summary(ru): "÷ÌÏÖÅÎÎÙÊ" ÓÅÒ×ÅÒ XFree86
-Summary(uk): "÷ËÌÁÄÅÎÉÊ" ÓÅÒ×ÅÒ XFree86
-Group: X11/XFree86/Servers
-Requires: %{name}-common /usr/X11R6/lib/X11/rgb.txt
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-fonts-base
-
-%description Xnest
-Xnest is an X Window System server which runs in an X window. Xnest is
-a 'nested' window server, actually a client of the real X server,
-which manages windows and graphics requests for Xnest, while Xnest
-manages the windows and graphics requests for its own clients.
-
-You will need to install Xnest if you require an X server which will
-run as a client of your real X server (perhaps for testing purposes).
-
-%description Xnest -l pl
-Xnest jest X serwerem uruchamianym w okienku innego X serwera. Xnest
-zachowuje siê jak X klient w stosunku do prawdziwego X serwera, a jak
-X serwer dla w³asnych klientów.
-
-%description Xnest -l ru
-Xnest - ÜÔÏ ÓÅÒ×ÅÒ X Window System, ËÏÔÏÒÙÊ ÒÁÂÏÔÁÅÔ × ÏËÎÅ X. îÁ
-ÓÁÍÏÍ ÄÅÌÅ ÜÔÏ ËÌÉÅÎÔ ÒÅÁÌØÎÏÇÏ X-ÓÅÒ×ÅÒÁ, ËÏÔÏÒÙÊ ÕÐÒÁ×ÌÑÅÔ ÏËÎÁÍÉ É
-ÇÒÁÆÉÞÅÓËÉÍÉ ÚÁÐÒÏÓÁÍÉ ÄÌÑ Xnest × ÔÏ ×ÒÅÍÑ, ËÁË Xnest ÕÐÒÁ×ÌÑÅÔ
-ÏËÎÁÍÉ É ÇÒÁÆÉÞÅÓËÉÍÉ ÚÁÐÒÏÓÁÍÉ ÄÌÑ Ó×ÏÉÈ ÓÏÂÓÔ×ÅÎÎÙÈ ËÌÉÅÎÔÏ×.
-
-÷ÁÍ ÎÁÄÏ ÕÓÔÁÎÏ×ÉÔØ Xnest ÅÓÌÉ ×ÁÍ ÎÕÖÅÎ X-ÓÅÒ×ÅÒ, ËÏÔÏÒÙÊ ÒÁÂÏÔÁÅÔ
-ËÁË ËÌÉÅÎÔ ×ÁÛÅÇÏ ÒÅÁÌØÎÏÇÏ X-ÓÅÒ×ÅÒÁ (ÓËÏÒÅÅ ×ÓÅÇÏ, × ÔÅÓÔÏ×ÙÈ
-ÃÅÌÑÈ).
-
-%description Xnest -l uk
-Xnest - ÃÅ ÓÅÒ×ÅÒ X Window System, ÑËÉÊ ÐÒÁÃÀ¤ Õ ×¦ËΦ X. æÁËÔÉÞÎÏ ÃÅ
-Ë̦¤ÎÔ ÒÅÁÌØÎÏÇÏ X-ÓÅÒ×ÅÒÁ, ÑËÉÊ ËÅÒÕ¤ צËÎÁÍÉ ÔÁ ÇÒÁƦÞÎÉÍÉ ÚÁÐÉÔÁÍÉ
-ÄÌÑ Xnest × ÔÏÊ ÞÁÓ, ÑË Xnest ËÅÒÕ¤ צËÎÁÍÉ ÔÁ ÇÒÁƦÞÎÉÍÉ ÚÁÐÉÔÁÍÉ ÄÌÑ
-Ó×Ï§È ×ÌÁÓÎÉÈ Ë̦¤ÎÔ¦×.
-
-÷ÁÍ ÔÒÅÂÁ ×ÓÔÁÎÏ×ÉÔÉ Xnest ÑËÝÏ ×ÁÍ ÐÏÔÒ¦ÂÅÎ X-ÓÅÒ×ÅÒ, ÑËÉÊ ÐÒÁÃÀ¤ ÑË
-Ë̦¤ÎÔ ×ÁÛÏÇÏ ÒÅÁÌØÎÏÇÏ X-ÓÅÒ×ÅÒÁ (ÓËÏÒÛÅ ×ÓØÏÇÏ, Õ ÔÅÓÔÏ×ÉÈ Ã¦ÌÑÈ).
-
-%package Xprt
-Summary: X print server
-Summary(pl): X serwer z rozszerzeniem Xprint
-Group: X11/XFree86/Servers
-PreReq: xprint-initrc
-Requires: %{name}-common /usr/X11R6/lib/X11/rgb.txt
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-fonts-base
-
-%description Xprt
-Xprt provides an X server with the print extension and special DDX
-implementation.
-
-%description Xprt -l pl
-Xprt jest X serwerem z rozszerzeniem Xprint.
-
-%package Xserver
-Summary: XFree86 X display server
-Summary(de): XFree86 Server
-Summary(fr): Serveur XFree86
-Summary(pl): Serwer XFree86
-Summary(tr): XFree86 sunucusu
-Group: X11/XFree86/Servers
-Requires: %{name}-common /usr/X11R6/lib/X11/rgb.txt
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-fonts-base
-Requires: pam
-Obsoletes: XFree86-Mono
-Obsoletes: XFree86-SVGA
-Obsoletes: XFree86-VGA16
-# obsoleted by many drivers: suncg3,suncg6,suncg14,sunffb,sunleo,suntcx
-Obsoletes: XFree86-Sun
-Obsoletes: XFree86-Sun24
-# still not supported in 4.2.0:
-#Obsoletes: XFree86-Mach8 XFree86-8514 XFree86-AGX XFree86-P9000
-# (and many drivers from XF86_SVGA server... and some from others)
-Obsoletes: XFree86-XF86Setup
-Obsoletes: Xconfigurator
-
-%description Xserver
-Generally used X server which uses display hardware. It requires
-proper driver for your display hardware - package itself contains only
-drivers for VGA and VESA-compliant cards (without acceleration). Other
-drivers can be found in XFree86-driver-* packages.
-
-%description Xserver -l de
-X-Server für die elementarsten Framebuffer-SVGA-Geräte, einschließlich
-Karten, die aus ET4000-Chips, Cirrus Logic-Chips, Chips and
-Technologies Laptop-Chips sowie Trident 8900 und 9000 Chips gebaut
-sind. Funktioniert mit Diamond Speedstar, Orchid Kelvins, STB Nitros
-und Horizons, Genoa 8500VL, den meisten Actix-Karten sowie Spider VLB
-Plus und außerdem mit vielen anderen Chips und Karten. Es lohnt sich,
-diesen Server auszuprobieren, wenn Sie Probleme haben.
-
-%description Xserver -l fr
-Serveur X pour les circuits SVGA les plus simples, dont les cartes
-construites avec les circuits ET4000, Cirrus Logic, Chips and
-Technologies laptop, Trident 8900 et 9000. Fonctionne pour les cartes
-Diamond Speedstar, Orchid Kelvins, STB Nitros et Horizons, Genoa
-8500VL, la plupart des Actix et la Spider VLB Plus. Fonctionne aussi
-pour de nombreux autres circuits et cartes. Essayez ce serveur si vous
-avez des problèmes.
-
-%description Xserver -l pl
-Jest to podstawowy Xserwer wy¶wietlaj±cy obraz na karcie graficznej.
-Do dzia³ania wymaga odpowiedniego sterownika - sam pakiet zawiera
-tylko odpowiedni dla kart VGA oraz SVGA zgodnych z VESA (bez
-akceleracji). Inne sterowniki mo¿na znale¼æ w pakietach
-XFree86-driver-*.
-
-%description Xserver -l tr
-ET4000, Cirrus Logic, Chips and Technologies dizüstü, Trident 8900 ve
-9000 gibi basit 'framebuffer' SVGA kullananan kartlar için X sunucusu.
-Ayný zamanda Diamond Speedstar, Orchid Kelvins, STB Nitros / Horizons,
-Genoa 8500VL, çoðu Actix kartlarý, Spider VLB Plus gibi kartlar ve
-birçok diðer kart ile de çalýþýr. Herhangi bir sorun yaþarsanýz bu
-sunucuyu deneyin.
-
-%package Xvfb
-Summary: XFree86 Xvfb server
-Summary(pl): Serwer XFree86 Xvfb
-Summary(ru): óÅÒ×ÅÒ XFree86 ÄÌÑ ×ÉÒÔÕÁÌØÎÏÇÏ ÆÒÅÊÍÂÕÆÅÒÁ
-Summary(uk): óÅÒ×ÅÒ XFree86 ÄÌÑ ×¦ÒÔÕÁÌØÎÏÇÏ ÆÒÅÊÍÂÕÆÅÒÁ
-Group: X11/XFree86/Servers
-Requires: %{name}-common /usr/X11R6/lib/X11/rgb.txt
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-fonts-base
-
-%description Xvfb
-Xvfb (X Virtual Frame Buffer) is an X Window System server that is
-capable of running on machines with no display hardware and no
-physical input devices. Xvfb emulates a dumb framebuffer using virtual
-memory. Xvfb doesn't open any devices, but behaves otherwise as an X
-display. Xvfb is normally used for testing servers. Using Xvfb, the
-mfb or cfb code for any depth can be exercised without using real
-hardware that supports the desired depths. Xvfb has also been used to
-test X clients against unusual depths and screen configurations, to do
-batch processing with Xvfb as a background rendering engine, to do
-load testing, to help with porting an X server to a new platform, and
-to provide an unobtrusive way of running applications which really
-don't need an X server but insist on having one.
-
-If you need to test your X server or your X clients, you may want to
-install Xvfb for that purpose.
-
-%description Xvfb -l pl
-Xvfb (X Virtual Frame Buffer) jest X serwerem, który mo¿na uruchamiaæ
-na maszynach bez urz±dzeñ wy¶wietlaj±cych ani fizycznych urz±dzeñ
-wej¶ciowych. Xvfb emuluje prosty framebuffer w pamiêci. Zwykle jest
-u¿ywany do testowania X serwerów, mo¿e te¿ byæ u¿ywany do testowania X
-klientów w rzadko u¿ywanych konfiguracjach ekranu. Mo¿na te¿ u¿yæ Xvfb
-do uruchomienia aplikacji, które w rzeczywisto¶ci nie wymagaj± X
-serwera, ale odmawiaj± uruchomienia bez niego.
-
-%description Xvfb -l ru
-Xvfb (X Virtual Frame Buffer) - ÜÔÏ X-ÓÅÒ×ÅÒ, ËÏÔÏÒÙÊ ÓÐÏÓÏÂÅÎ
-ÒÁÂÏÔÁÔØ ÎÁ ÍÁÛÉÎÁÈ ÂÅÚ ÄÉÓÐÌÅÊÎÏÊ ÁÐÐÁÒÁÔÕÒÙ É ÆÉÚÉÞÅÓËÉÈ ÕÓÔÒÏÊÓÔ×
-××ÏÄÁ. Xvfb ÜÍÕÌÉÒÕÅÔ ÐÒÏÓÔÅÊÛÉÊ ÆÒÅÊÍÂÕÆÅÒ ÉÓÐÏÌØÚÕÑ ×ÉÒÔÕÁÌØÎÕÀ
-ÐÁÍÑÔØ. Xvfb ÎÅ ÏÔËÒÙ×ÁÅÔ ÎÉËÁËÉÈ ÕÓÔÒÏÊÓÔ×, ×ÅÄÑ ÓÅÂÑ ËÁË ÎÏÒÍÁÌØÎÙÊ
-X-ÓÅÒ×ÅÒ ×Ï ×ÓÅÍ ÏÓÔÁÌØÎÏÍ. ïÂÙÞÎÏ ÏÎ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÐÒÏ×ÅÒËÉ
-ÓÅÒ×ÅÒÏ×. éÓÐÏÌØÚÕÑ Xvfb, ÍÏÖÎÏ ÔÅÓÔÉÒÏ×ÁÔØ ËÏÄ mfb ÉÌÉ cfb ÄÌÑ ÌÀÂÏÊ
-ÇÌÕÂÉÎÙ Ã×ÅÔÁ ÂÅÚ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÒÅÁÌØÎÏÊ ÁÐÐÁÒÁÔÕÒÙ, ÐÏÄÄÅÒÖÉ×ÁÀÝÅÊ
-ÔÁËÕÀ ÇÌÕÂÉÎÕ. Xvfb ÔÁËÖÅ ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÄÌÑ ÐÒÏ×ÅÒËÉ X-ËÌÉÅÎÔÏ× Ó
-ÎÅÏÂÙÞÎÙÍÉ ÇÌÕÂÉÎÁÍÉ Ã×ÅÔÁ É ËÏÎÆÉÇÕÒÁÃÉÑÍÉ ÜËÒÁÎÁ, ÐÒÏÉÚ×ÏÄÉÔØ
-ÐÁËÅÔÎÕÀ ÏÂÒÁÂÏÔËÕ Ó Xvfb × ËÁÞÅÓÔ×Å ÆÏÎÏ×ÏÇÏ ÒÅÎÄÅÒÅÒÁ, ÐÒÏ×ÏÄÉÔØ
-ÎÁÇÒÕÚÏÞÎÙÅ ÔÅÓÔÙ, ÄÌÑ ÐÏÍÏÝÉ × ÐÏÒÔÉÒÏ×ÁÎÉÉ X-ÓÅÒ×ÅÒÁ ÎÁ ÎÏ×ÕÀ
-ÐÌÁÔÆÏÒÍÕ É ÄÌÑ ÈÉÔÒÏÕÍÎÏÇÏ ÚÁÐÕÓËÁ ÐÒÉÌÏÖÅÎÉÊ, ËÏÔÏÒÙÍ ÒÅÁÌØÎÏ ÎÅ
-ÎÕÖÅÎ X-ÓÅÒ×ÅÒ, ÎÏ ËÏÔÏÒÙÅ ÎÁÓÔÁÉ×ÁÀÔ ÎÁ ÔÏÍ, ÞÔÏ ÏÎ ÂÙÌ ÄÏÓÔÕÐÅÎ.
-
-åÓÌÉ ×ÁÍ ÎÁÄÏ ÔÅÓÔÉÒÏ×ÁÔØ ×ÁÛÉ X-ÓÅÒ×ÅÒÁ ÉÌÉ X-ËÌÉÅÎÔÙ, ×Ù ÍÏÖÅÔÅ
-ÕÓÔÁÎÏ×ÉÔØ ÄÌÑ ÜÔÏÊ ÃÅÌÉ Xvfb.
-
-%description Xvfb -l uk
-Xvfb (X Virtual Frame Buffer) - ÃÅ X-ÓÅÒ×ÅÒ, ÚÄÁÔÎÉÊ ÐÒÁÃÀ×ÁÔÉ ÎÁ
-ÍÁÛÉÎÁÈ ÂÅÚ ÄÉÓÐÌÅÊÎϧ ÁÐÁÒÁÔÕÒÉ ÔÁ צÚÉÞÎÉÈ ÐÒÉÓÔÒÏ§× ××ÏÄÕ. Xvfb
-ÅÍÕÌÀ¤ ÎÁÊÐÒÏÓÔ¦ÛÉÊ ÆÒÅÊÍÂÕÆÅÒ ×ÉËÏÒÉÓÔÏ×ÕÀÞÉ ×¦ÒÔÕÁÌØÎÕ ÐÁÍ'ÑÔØ. Xvfb
-ΊצÄËÒÉ×Á¤ ΦÑËÉÈ ÐÒÉÓÔÒϧ×, ×ÅÄÕÞÉ ÓÅÂÅ ÑË ÎÏÒÍÁÌØÎÉÊ X-ÓÅÒ×ÅÒ Õ
-ÒÅÛÔ¦ צÄÎÏÛÅÎØ. úÁÚ×ÉÞÁÊ ÊÏÇÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÌÑ ÐÅÒÅצÒËÉ ÓÅÒ×ÅÒ¦×.
-÷ÉËÏÒÉÓÔÏ×ÕÀÞÉ Xvfb, ÍÏÖÎÁ ÔÅÓÔÕ×ÁÔÉ ËÏÄ mfb ÁÂÏ cfb ÄÌÑ ÂÕÄØ-ÑËϧ
-ÇÌÉÂÉÎÉ ËÏÌØÏÒÕ ÔÁ ËÏÎƦÇÕÒÁæ§ ÅËÒÁÎÕ ÂÅÚ ×ÉËÏÒÉÓÔÁÎÎÑ ÒÅÁÌØÎϧ
-ÁÐÁÒÁÔÕÒÉ, ÑËÁ ЦÄÔÒÉÍÕ¤ ÔÁ˦ ÒÅÖÉÍÉ. ôÁËÏÖ Xvfb ÍÏÖÎÁ ×ÉËÏÒÉÓÔÁÔÉ ÄÌÑ
-ÐÅÒÅצÒËÉ X-Ë̦¤ÎÔ¦× Ú ÎÅÚ×ÉÞÎÉÍÉ ÇÌÉÂÉÎÁÍÉ ËÏÌØÏÒÕ ÔÁ ËÏÎƦÇÕÒÁæÑÍÉ
-ÅËÒÁÎÕ, ÐÒÏ×ÏÄÉÔÉ ÐÁËÅÔÎÕ ÏÂÒÏÂËÕ Ú Xvfb Õ ÑËÏÓÔ¦ ÆÏÎÏ×ÏÇÏ ÒÅÎÄÅÒÅÒÁ,
-ÐÒÏ×ÏÄÉÔÉ ÎÁÇÒÕÚÏÞΦ ÔÅÓÔÉ, ÄÌÑ ÄÏÐÏÍÏÇÉ Õ ÐÏÒÔÕ×ÁÎΦ X-ÓÅÒ×ÅÒÁ ÎÁ
-ÎÏ×Õ ÐÌÁÔÆÏÒÍÕ ÔÁ ÚÁÐÕÓËÕ ÐÒÏÇÒÁÍ, ÑËÉÍ ÒÅÁÌØÎÏ ÎÅ ÐÏÔÒ¦ÂÅÎ X-ÓÅÒ×ÅÒ,
-ÁÌÅ Ñ˦ ÎÁÐÏÌÑÇÁÀÔØ ÎÁ ÔÏÍÕ, ÝÏ צΠÂÕ× ÄÏÓÔÕÐÎÉÊ.
-
-ñËÝÏ ×ÁÍ ÐÏÔÒ¦ÂÎÏ ÔÅÓÔÕ×ÁÔÉ ×ÁÛ¦ X-ÓÅÒ×ÅÒÉ ÁÂÏ X-Ë̦¤ÎÔÉ, ×É ÍÏÖÅÔÅ
-×ÓÔÁÎÏ×ÉÔÉ ÄÌÑ Ã¦¤§ æ̦ Xvfb.
-
-%package devel
-Summary: X11R6 headers and programming man pages
-Summary(de): X11R6 Headers und man pages für Programmierer
-Summary(fr): Pages man de programmation
-Summary(pl): Pliki nag³ówkowe X11R6
-Summary(ru): âÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÈÅÄÅÒÁ É ÄÏËÕÍÅÎÔÁÃÉÑ ÐÏ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÀ X11R6
-Summary(tr): X11R6 ile geliþtirme için gerekli dosyalar
-Summary(uk): â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÈÅÄÅÒÉ ÔÁ ÄÏËÕÍÅÎÔÁÃ¦Ñ ÐÏ ÐÒÏÇÒÁÍÕ×ÁÎÎÀ X11R6
-Group: X11/Development/Libraries
-Requires: %{name}-libs = %{epoch}:%{version}
-Requires: imake = %{epoch}:%{version}
-Provides: xpm-devel
-Obsoletes: xpm-devel
-%ifarch sparc sparc64
-Obsoletes: X11R6.1-devel
-%endif
-
-%description devel
-Libraries, header files, and documentation for developing programs
-that run as X clients. It includes the base Xlib library as well as
-the Xt and Xaw widget sets. For information on programming with these
-libraries, PLD recommends the series of books on X Programming
-produced by O'Reilly and Associates.
-
-%description devel -l de
-Libraries, Header-Dateien und Dokumentation zum Entwickeln von
-Programmen, die als X-Clients laufen. Enthält die Xlib-Library und die
-Widget-Sätze Xt und Xaw. Information zum Programmieren mit diesen
-Libraries finden Sie in der Buchreihe zur X-Programmierung von
-O'Reilly and Associates.
-
-%description devel -l fr
-Bibliothéques, fichiers d'en-tête, et documentation pour développer
-des programmes s'exécutant en clients X. Cela comprend la Bibliothéque
-Xlib de base aussi bien que les ensembles de widgets Xt et Xaw. Pour
-des informations sur la programmation avec ces Bibliothéques, Red Hat
-recommande la série d'ouvrages sur la programmation X editée par
-O'Reilly and Associates.
-
-%description devel -l pl
-Pliki nag³ówkowe, dokumentcja dla programistów rozwijaj±cych aplikacje
-klienckie pod X Window. Zawiera podstawow± bibliotekê Xlib a tak¿e Xt
-i Xaw. Wiêcej informacji nt. pisania programów przy u¿yciu tych
-bibliotek mo¿esz znale¼æ w ksi±¿kach wydawnictwa O'Reilly and
-Associates (X Programming) polecanych przez Red Hata.
-
-%description devel -l ru
-XFree86-devel ×ËÌÀÞÁÅÔ ÂÉÂÌÉÏÔÅËÉ, ÈÅÄÅÒÁ É ÄÏËÕÍÅÎÔÁÃÉÀ, ÎÅÏÂÈÏÄÉÍÙÅ
-ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ ËÁË X-ËÌÉÅÎÔÙ. XFree86-devel
-×ËÌÀÞÁÅÔ ÂÁÚÏ×ÕÀ ÂÉÂÌÉÏÔÅËÕ Xlib É ÎÁÂÏÒÙ ÐÒÉÍÉÔÉ×Ï× Xt É Xaw.
-
-õÓÔÁÎÏ×ÉÔÅ XFree86-devel ÅÓÌÉ ×Ù ÓÏÂÉÒÁÅÔÅÓØ ÒÁÚÒÁÂÁÔÙ×ÁÔØ ÐÒÏÇÒÁÍÍÙ,
-ËÏÔÏÒÙÅ ÂÕÄÕÔ ÒÁÂÏÔÁÔØ ËÁË X-ËÌÉÅÎÔÙ.
-
-%description devel -l tr
-X istemcisi olarak çalýþacak programlar geliþtirmek için gereken
-statik kitaplýklar, baþlýk dosyalarý ve belgeler. Xlib kitaplýðýnýn
-yanýsýra Xt ve Xaw arayüz kitaplýklarýný da içerir.
-
-%description devel -l uk
-XFree86-devel ͦÓÔÉÔØ Â¦Â̦ÏÔÅËÉ, ÈÅÄÅÒÉ ÔÁ ÄÏËÕÍÅÎÔÁæÀ, ÎÅÏÂȦÄΦ
-ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, Ñ˦ ÐÒÁÃÀÀÔØ ÑË X-Ë̦¤ÎÔÉ. XFree86-devel ͦÓÔÉÔØ
-ÂÁÚÏ×Õ Â¦Â̦ÏÔÅËÕ Xlib ÔÁ ÎÁÂÏÒÉ ÐÒÉͦÔÉ×¦× Xt ÔÁ Xaw.
-
-÷ÓÔÁÎÏצÔØ XFree86-devel ÑËÝÏ ×É ÚÂÉÒÁ¤ÔÅÓØ ÒÏÚÒÏÂÌÑÔÉ ÐÒÏÇÒÁÍÉ, Ñ˦
-ÂÕÄÕÔØ ÐÒÁÃÀ×ÁÔÉ ÑË X-Ë̦¤ÎÔÉ.
-
-%package Xserver-devel
-Summary: Header files for XFree86 Xserver drivers/extensions development
-Summary(pl): Pliki nag³ówkowe do tworzenia sterowników/rozszerzeñ X serwera XFree86
-Group: X11/Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}
-
-%description Xserver-devel
-Header files for XFree86 Xserver drivers and extensions development.
-
-%description Xserver-devel -l pl
-Pliki nag³ówkowe do tworzenia sterowników i rozszerzeñ X serwera
-XFree86.
-
-%package driver-apm
-Summary: Alliance Promotion video driver
-Summary(pl): Sterownik do kart Alliance Promotion
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-Alliance
-
-%description driver-apm
-Alliance Promotion driver.
-
-%description driver-apm -l pl
-Sterownik do kart Alliance Promotion.
-
-%package driver-ark
-Summary: Ark Logic video driver
-Summary(pl): Sterownik do kart Ark Logic
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-ark
-Ark Logic driver.
-
-%description driver-ark -l pl
-Sterownik do kart Ark Logic.
-
-%package driver-ati
-Summary: ATI video driver
-Summary(pl): Sterownik do kart ATI
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-ATI
-Obsoletes: XFree86-Mach32
-Obsoletes: XFree86-Mach64
-
-%description driver-ati
-ATI video driver.
-
-%description driver-ati -l pl
-Sterownik do kart ATI.
-
-%package driver-r128
-Summary: ATI Rage 128 video driver
-Summary(pl): Sterownik do kart ATI Rage 128
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Conflicts: XFree86-driver-nvidia
-Obsoletes: XFree86-Rage128
-
-%description driver-r128
-ATI Rage 128 video driver.
-
-%description driver-r128 -l pl
-Sterownik do kart ATI Rage 128.
-
-%package driver-radeon
-Summary: ATI Radeon video driver
-Summary(pl): Sterownik do kart ATI Radeon
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-driver-ati
-Conflicts: XFree86-driver-nvidia
-
-%description driver-radeon
-ATI Radeon video driver.
-
-%description driver-radeon -l pl
-Sterownik do kart ATI Radeon.
-
-%package driver-ati.2
-Summary: ATI video driver (ATI.2)
-Summary(pl): Sterownik do kart ATI (ATI.2)
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-ATI
-Obsoletes: XFree86-Mach32
-Obsoletes: XFree86-Mach64
-
-%description driver-ati.2
-ATI video driver (ATI.2) from gatos (http://gatos.sourceforge.net/).
-
-%description driver-ati.2 -l pl
-Sterownik do kart ATI (ATI.2) projektu gatos
-(http://gatos.sourceforge.net/).
-
-%package driver-r128.2
-Summary: ATI Rage 128 video driver (ATI.2)
-Summary(pl): Sterownik do kart ATI Rage 128 (ATI.2)
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-driver-ati.2
-Conflicts: XFree86-driver-nvidia
-Obsoletes: XFree86-Rage128
-
-%description driver-r128.2
-ATI Rage 128 video driver (ATI.2) from gatos
-(http://gatos.sourceforge.net/).
-
-%description driver-r128.2 -l pl
-Sterownik do kart ATI Rage 128 (ATI.2) projektu gatos
-(http://gatos.sourceforge.net/).
-
-%package driver-radeon.2
-Summary: ATI Radeon video driver (ATI.2)
-Summary(pl): Sterownik do kart ATI Radeon (ATI.2)
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-driver-ati.2
-Conflicts: XFree86-driver-nvidia
-
-%description driver-radeon.2
-ATI Radeon video driver (ATI.2) from gatos
-(http://gatos.sourceforge.net/).
-
-%description driver-radeon.2 -l pl
-Sterownik do kart ATI Radeon (ATI.2) projektu gatos
-(http://gatos.sourceforge.net/).
-
-%package driver-chips
-Summary: Chips and Technologies video driver
-Summary(pl): Sterownik do kart na uk³adach Chips and Technologies
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-ChipsTechnologies
-
-%description driver-chips
-Chips and Technologies video driver.
-
-%description driver-chips -l pl
-Sterownik do kart na uk³adach Chips and Technologies.
-
-%package driver-cirrus
-Summary: Cirrus Logic video driver
-Summary(pl): Sterownik do kart Cirrus Logic
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-Cirrus
-
-%description driver-cirrus
-Cirrus Logic video driver.
-
-%description driver-cirrus -l pl
-Sterownik do kart Cirrus Logic.
-
-%package driver-cyrix
-Summary: Cyrix video driver
-Summary(pl): Sterownik do grafiki na uk³adzie Cyrix MediaGX
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-Cyrix
-
-%description driver-cyrix
-Cyrix video driver.
-
-%description driver-cyrix -l pl
-Sterownik do grafiki na uk³adzie Cyrix MediaGX.
-
-%package driver-fbdev
-Summary: Video driver for framebuffer device
-Summary(pl): Sterownik korzystaj±cy z framebuffera
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-FBDev
-
-%description driver-fbdev
-Non-accelerated video driver for framebuffer device.
-
-%description driver-fbdev -l pl
-Nieakcelerowany sterownik korzystaj±cy z framebuffera.
-
-%package driver-ffb
-Summary: Video driver for DRI sparc framebuffer device
-Summary(pl): Sterownik do framebuffera DRI na sparc
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-ffb
-Video driver for DRI sparc framebuffer device.
-
-%description driver-ffb -l pl
-Sterownik do framebuffera DRI na sparc.
-
-%package driver-glide
-Summary: 3Dfx Voodoo1 and Voodoo2 video driver
-Summary(pl): Sterownik do kart 3Dfx Voodoo1 i Voodoo2
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-glide
-Voodoo1 and Voodoo2 video driver.
-
-%description driver-glide -l pl
-Sterownik do kart Voodoo1 i Voodoo2 firmy 3Dfx.
-
-%package driver-glint
-Summary: GLINT/Permedia video driver
-Summary(pl): Sterownik do kart GLINT i Permedia
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Conflicts: XFree86-driver-nvidia
-Obsoletes: XFree86-3DLabs
-
-%description driver-glint
-GLINT/Permedia video driver.
-
-%description driver-glint -l pl
-Sterownik do kart GLINT i Permedia.
-
-%package driver-i128
-Summary: Number 9 I128 video driver
-Summary(pl): Sterownik do kart Number 9 I128
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-I128
-
-%description driver-i128
-Number 9 I128 video driver.
-
-%description driver-i128 -l pl
-Sterownik do kart Number 9 I128.
-
-%package driver-i740
-Summary: Intel i740 video driver
-Summary(pl): Sterownik do kart na uk³adzie Intel i740
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-i740
-
-%description driver-i740
-Intel i740 video driver.
-
-%description driver-i740 -l pl
-Sterownik do kart na uk³adzie Intel i740.
-
-%package driver-i810
-Summary: Intel i810/i815/i830 video driver
-Summary(pl): Sterownik do grafiki na uk³adach Intel i810/i815/i830
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Conflicts: XFree86-driver-nvidia
-Obsoletes: XFree86-i810
-
-%description driver-i810
-Intel i810/i815/i830 video driver.
-
-%description driver-i810 -l pl
-Sterownik do grafiki na uk³adach Intel i810/i815/i830.
-
-%package driver-imstt
-Summary: Integrated Micro Solutions Twin Turbo 128 driver
-Summary(pl): Sterownik do kart Integrated Micro Solutions Twin Turbo 128
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-imstt
-Integrated Micro Solutions Twin Turbo 128 driver.
-
-%description driver-imstt -l pl
-Sterownik do kart Integrated Micro Solutions Twin Turbo 128.
-
-%package driver-mga
-Summary: Matrox video driver
-Summary(pl): Sterownik do kart Matrox
-Group: X11/XFree86
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Conflicts: XFree86-driver-nvidia
-Obsoletes: XFree86-mga
-
-%description driver-mga
-Matrox video driver.
-
-%description driver-mga -l pl
-Sterownik do kart Matrox.
-
-%package driver-neomagic
-Summary: NeoMagic video driver
-Summary(pl): Sterownik do kart NeoMagic
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-NeoMagic
-
-%description driver-neomagic
-NeoMagic video driver.
-
-%description driver-neomagic -l pl
-Sterownik do kart NeoMagic.
-
-%package driver-newport
-Summary: Newport (XL) adapters video driver
-Summary(pl): Sterownik do kart Newport (XL)
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-newport
-Newport (XL) adapters video driver (found primarily in SGI Indy and
-Indigo2 machines).
-
-%description driver-newport -l pl
-Sterownik do kart Newport (XL) (wystêpuj±cych g³ównie w komputerach
-SGI Indy i Indigo).
-
-%package driver-nsc
-Summary: National Semiconductors GEODE family video driver
-Summary(pl): Sterownik dla kart na uk³adach z rodziny GEODE firmy National Semiconductors
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-nsc
-National Semiconductors GEODE family video driver. Supports GXLV (5530
-companion chip), SC1200, SC1400 and GX2 (5535 companion chip).
-
-%description driver-nsc -l pl
-Sterownik dla kart na uk³adach z rodziny GEODE firmy National
-Semiconductors. Obs³uguje GXLV (uk³ad towarzysz±cy 5530), SC1200,
-SC1400 oraz GX2 (uk³ad towarzysz±cy 5535).
-
-%package driver-nv
-Summary: nVidia video driver
-Summary(pl): Sterownik do kart na uk³adach firmy nVidia
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-NVidia
-
-%description driver-nv
-nVidia video driver. Supports Riva128, RivaTNT, GeForce.
-
-%description driver-nv -l pl
-Sterownik do kart na uk³adach firmy nVidia: Riva128, RivaTNT, GeForce.
-
-%package driver-rendition
-Summary: Rendition video driver
-Summary(pl): Sterownik do kart Rendition
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-Rendition
-
-%description driver-rendition
-Rendition/Micron video driver.
-
-%description driver-rendition -l pl
-Sterownik do kart Verite firmowanych przez Rendition/Micron.
-
-%package driver-s3virge
-Summary: S3 ViRGE/Trio3D video driver
-Summary(pl): Sterownik do kart na uk³adach S3 ViRGE i Trio3D
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-S3V
-
-%description driver-s3virge
-S3 ViRGE/Trio3D video driver.
-
-%description driver-s3virge -l pl
-Sterownik do kart na uk³adach S3 ViRGE i Trio3D.
-
-%package driver-s3
-Summary: S3 Trio video driver
-Summary(pl): Sterownik do kart na uk³adach S3 Trio
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-S3
-
-%description driver-s3
-S3 Trio video driver.
-
-%description driver-s3 -l pl
-Sterownik do kart na uk³adach S3 Trio.
-
-%package driver-savage
-Summary: S3 Savage video driver
-Summary(pl): Sterownik do kart na uk³adach S3 Savage
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-savage
-S3 Savage video driver.
-
-%description driver-savage -l pl
-Sterownik do kart na uk³adach S3 Savage.
-
-%package driver-siliconmotion
-Summary: Silicon Motion video driver
-Summary(pl): Sterownik do kart na uk³adach Silicon Motion
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-siliconmotion
-Silicon Motion video driver.
-
-%description driver-siliconmotion -l pl
-Sterownik do kart na uk³adach Lynx firmy Silicon Motion.
-
-%package driver-sis
-Summary: SiS video driver
-Summary(pl): Sterownik do kart na uk³adach SiS
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-SiS
-
-%description driver-sis
-SiS video driver.
-
-%description driver-sis -l pl
-Sterownik do kart na uk³adach SiS.
-
-%package driver-sunbw2
-Summary: sunbw2 - Sun BW2 video driver
-Summary(pl): Sterownik do monochromatycznego framebuffera BW2 na Sunie
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-SunMono
-
-%description driver-sunbw2
-sunbw2 - Sun BW2 video driver.
-
-%description driver-sunbw2 -l pl
-Sterownik do monochromatycznego framebuffera BW2 na Sunie.
-
-%package driver-suncg14
-Summary: suncg14 - Sun CG14 video driver
-Summary(pl): Sterownik do kolorowego framebuffera CG14 na Sunie
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-suncg14
-suncg14 - Sun CG14 video driver.
-
-%description driver-suncg14 -l pl
-Sterownik do kolorowego framebuffera CG14 na Sunie.
-
-%package driver-suncg3
-Summary: suncg3 - Sun CG3 video cards driver
-Summary(pl): Sterownik do kolorowego framebuffera CG3 na Sunie
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-suncg3
-suncg3 - Sun CG3 video cards driver.
-
-%description driver-suncg3 -l pl
-Sterownik do kolorowego framebuffera CG3 na Sunie.
-
-%package driver-suncg6
-Summary: suncg6 - Sun GX and Turbo GX video driver
-Summary(pl): Sterownik do grafiki GX i Turbo GX na Sunie
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-suncg6
-suncg6 - Sun GX and Turbo GX video driver.
-
-%description driver-suncg6 -l pl
-Sterownik do grafiki GX i Turbo GX na Sunie.
-
-%package driver-sunffb
-Summary: sunffb - Sun Creator, Creator 3D and Elite 3D video cards driver
-Summary(pl): Sterownik do kart Sun Creator, Creator 3D, Elite 3D
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-sunffb
-sunffb - Sun Creator, Creator 3D and Elite 3D video cards driver.
-
-%description driver-sunffb -l pl
-Sterownik do kart Sun Creator, Creator 3D, Elite 3D.
-
-%package driver-sunleo
-Summary: sunleo - Sun Leo (ZX) video cards driver
-Summary(pl): Sterownik do kart Sun Leo (ZX)
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-sunleo
-sunleo - Sun Leo (ZX) video cards driver.
-
-%description driver-sunleo -l pl
-Sterownik do kart Sun Leo (ZX).
-
-%package driver-suntcx
-Summary: suntcx - Sun TCX video cards driver
-Summary(pl): Sterownik do kart Sun TCX
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-suntcx
-suntcx - Sun TCX video cards driver.
-
-%description driver-suntcx -l pl
-Sterownik do kart Sun TCX.
-
-%package driver-tdfx
-Summary: 3Dfx video driver
-Summary(pl): Sterownik do kart 3Dfx
-Group: X11/XFree86
-Requires: Glide3-DRI
-Requires: OpenGL
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Conflicts: XFree86-driver-nvidia
-Obsoletes: XFree86-3dfx
-
-%description driver-tdfx
-3Dfx video driver. Supports Voodoo Banshee, Voodoo3, Voodoo4, Voodoo5.
-For Banshee or Voodoo3, DRI driver requires Glide_V3-DRI package, for
-Voodoo4 or Voodoo5 it requires Glide_V5-DRI package.
-
-%description driver-tdfx -l pl
-Sterownik do kart 3Dfx: Voodoo Banshee, Voodoo3, Voodoo4, Voodoo5.
-Sterownik DRI wymaga pakietu Glide_V3-DRI do kart Banshee lub Voodoo3,
-a Glide_V5-DRI do kart Voodoo4 lub Voodoo5.
-
-%package driver-tga
-Summary: TGA video driver
-Summary(pl): Sterownik do kart TGA
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-TGA
-
-%description driver-tga
-TGA video driver.
-
-%description driver-tga -l pl
-Sterownik do kart TGA.
-
-%package driver-trident
-Summary: Trident video driver
-Summary(pl): Sterownik do kart Trident
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-Trident
-
-%description driver-trident
-Trident video driver.
-
-%description driver-trident -l pl
-Sterownik do kart Trident.
-
-%package driver-tseng
-Summary: Tseng Labs video driver
-Summary(pl): Sterownik do kart Tseng Labs
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Obsoletes: XFree86-Tseng XFree86-W32
-
-%description driver-tseng
-Tseng Labs video driver.
-
-%description driver-tseng -l pl
-Sterownik do kart firmy Tseng Labs.
-
-%package driver-via
-Summary: VIA CLE266 driver
-Summary(pl): Sterownik do kart VIA CLE266
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-via
-VIA CLE266 driver.
-
-%description driver-via -l pl
-Sterownik do kart VIA CLE266.
-
-%package driver-vmware
-Summary: VMWare SVGA emulated video driver
-Summary(pl): Sterownik do emulacji karty SVGA dostêpnej pod VMware
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-
-%description driver-vmware
-VMware emulated SVGA video driver. Necessary if you run Linux on
-VMware virtual machine.
-
-%description driver-vmware -l pl
-Sterownik do emulacji karty SVGA dostêpnej pod VMware. Przydatny,
-je¶li uruchamiasz Linuksa na wirtualnej maszynie VMware.
-
-%package libs
-Summary: X11R6 shared libraries
-Summary(de): X11R6 shared Libraries
-Summary(es): Bibliotecas compartidas X11R6
-Summary(fr): Bibliothèques partagées X11R6
-Summary(pl): Biblioteki dzielone dla X11R6
-Summary(pt_BR): Bibliotecas compartilhadas X11R6
-Summary(ru): òÁÚÄÅÌÑÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ X Window System (X11R6.4)
-Summary(uk): â¦Â̦ÏÔÅËÉ ÓЦÌØÎÏÇÏ ×ÉËÏÒÉÓÔÁÎÎÑ ÄÌÑ X Window System (X11R6.4)
-Group: X11/XFree86
-Requires(post,postun): /sbin/ldconfig
-Requires(post,postun): grep
-Requires(postun): fileutils
-Requires: %{name}-common = %{epoch}:%{version}
-Provides: xpm
-Obsoletes: xpm
-
-%ifarch sparc sparc64
-Obsoletes: X11R6.1-libs
-%endif
-
-%description libs
-XFree86-libs contains the shared libraries that most X programs need
-to run properly. These shared libraries are in a separate package in
-order to reduce the disk space needed to run X applications on a
-machine without an X server (i.e, over a network).
-
-If you are installing the X Window System on your machine, you will
-need to install XFree86-libs. You will also need to install the
-XFree86 package, XFree86-Xserver, one of the XFree86-driver-*,
-XFree86-fonts, XFree86-fonts-ISO8859-1, optionally some of the other
-fonts (choose 75dpi or 100dpi depending upon your monitor's
-resolution), the XFree86-setup and the XFree86-tools. And, finally, if
-you are going to be developing applications that run as X clients, you
-will also need to install XFree86-devel.
-
-%description libs -l de
-Dieses Paket enthält die zur gemeinsamen Nutzung vorgesehenen
-Libraries, die die meisten X-Programme für den einwandfreien Betrieb
-benötigen. Sie wurden in einem separaten Paket untergebracht, um den
-Festplattenspeicherplatz auf Computern zu reduzieren, die ohne einen
-X- Server (über ein Netz) arbeiten.
-
-%description libs -l es
-Este paquete contiene bibliotecas compartidas que la mayoría de los
-programas X necesitan para ejecutarse correctamente. Están en un
-paquete a parte, para reducir el espacio en disco necesario para
-ejecutar aplicaciones X en una máquina sin un servidor X (a través de
-la red).
-
-%description libs -l fr
-Ce paquetage contient les bibliothèques partagées nécessaires à de
-nombreux programmes X. Elles se trouvent dans un paquetage séparé afin
-de réduire l'espace disque nécessaire à l'exécution des applications X
-sur une machine sans serveur X (en réseau).
-
-%description libs -l pl
-Pakiet zawieraj±cy podstawowe biblioteki potrzebne wiêkszo¶ci
-programów korzystaj±cych z systemu X Window. Wydzielony w celu
-oszczêdno¶ci miejsca potrzebnego do uruchamiania aplikacji X Window na
-komputerach bez X serwera (np. przez sieæ).
-
-%description libs -l pt_BR
-Este pacote contém bibliotecas compartilhadas que a maioria dos
-programas X precisam para rodar corretamente. Eles estão em um pacote
-separado para reduzir o espaço em disco necessário para rodar
-aplicações X em uma máquina sem um servidor X (através da rede).
-
-%description libs -l tr
-Bu paket X programlarýnýn düzgün çalýþabilmeleri için gereken
-kitaplýklarý içerir. Bunlar, X programlarýný (sunucu olsun olmasýn)
-çalýþtýrmak için gerekli disk alanýný azaltmak için ayrý bir paket
-olarak sunulmuþtur.
-
-%description libs -l ru
-XFree86-libs ÓÏÄÅÒÖÉÔ ÒÁÚÄÅÌÑÅÍÙÅ ÂÉÂÌÉÏÔÅËÉ, ËÏÔÏÒÙÅ ÎÅÏÂÈÏÄÉÍÙ ÄÌÑ
-ÒÁÂÏÔÙ ÂÏÌØÛÉÎÓÔ×Õ ÐÒÏÇÒÁÍÍ ÄÌÑ X. üÔÉ ÂÉÂÌÉÏÔÅËÉ ×ÙÎÅÓÅÎÙ × ÏÔÄÅÌØÎÙÊ
-ÐÁËÅÔ ÞÔÏÂÙ ÓÜËÏÎÏÍÉÔØ ÄÉÓËÏ×ÏÅ ÐÒÏÓÔÒÁÎÓÔ×Ï, ÎÅÏÂÈÏÄÉÍÏÅ ÄÌÑ ÚÁÐÕÓËÁ
-ÐÒÉÌÏÖÅÎÉÊ X ÎÁ ÍÁÛÉÎÁÈ ÂÅÚ X-ÓÅÒ×ÅÒÁ (ÎÁÐÒÉÍÅÒ, ÐÏ ÓÅÔÉ).
-
-åÓÌÉ ×Ù ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÅ X Window System ÎÁ ×ÁÛÅÊ ÍÁÛÉÎÅ, ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ
-ÕÓÔÁÎÏ×ÉÔØ XFree86-libs. ôÁËÖÅ ÎÅÏÂÈÏÄÉÍÏ ÕÓÔÁÎÏ×ÉÔØ ÓÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ:
-XFree86, ÏÄÉÎ ÉÌÉ ÎÅÓËÏÌØËÏ ÐÁËÅÔÏ× ÛÒÉÆÔÏ× XFree86, Xconfigurator,
-XFree86-xfs.
-
-åÓÌÉ ×Ù ÓÏÂÉÒÁÅÔÅÓØ ÒÁÚÒÁÂÁÔÙ×ÁÔØ ÐÒÏÇÒÁÍÍÙ, ÒÁÂÏÔÁÀÝÉÅ ËÁË X-ËÌÉÅÎÔÙ,
-×ÁÍ ÔÁËÖÅ ÎÁÄÏ ÕÓÔÁÎÏ×ÉÔØ XFree86-devel.
-
-%description libs -l uk
-XFree86-libs ͦÓÔÉÔØ Â¦Â̦ÏÔÅËÉ ÓЦÌØÎÏÇÏ ×ÉËÏÒÉÓÔÁÎÎÑ, ËÏÔÒ¦
-ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÂÏÔÉ Â¦ÌØÛÏÓÔ¦ ÐÒÉËÌÁÄÎÉÈ ÐÒÏÇÒÁÍ ÄÌÑ X. 㦠¦Â̦ÏÔÅËÉ
-×ÉÎÅÓÅΦ × ÏËÒÅÍÉÊ ÐÁËÅÔ ÄÌÑ ÅËÏÎÏͦ§ ÄÉÓËÏ×ÏÇÏ ÐÒÏÓÔÏÒÕ, ÎÅÏÂȦÄÎÏÇÏ
-ÄÌÑ ÚÁÐÕÓËÕ ÐÒÉËÌÁÄÎÉÈ ÐÒÏÇÒÁÍ X ÎÁ ÍÁÛÉÎÁÈ ÂÅÚ X-ÓÅÒ×ÅÒÕ (ÎÁÐÒÉËÌÁÄ,
-ÐÏ ÍÅÒÅÖ¦).
-
-ñËÝÏ ×É ×ÓÔÁÎÏ×ÌÀ¤ÔÅ X Window System ÎÁ ×ÁÛ¦Ê ÍÁÛÉΦ, ×ÁÍ ÎÅÏÂȦÄÎÏ
-×ÓÔÁÎÏ×ÉÔÉ XFree86-libs. ôÁËÏÖ ÎÅÏÂȦÄÎÏ ×ÓÔÁÎÏ×ÉÔÉ ÔÁ˦ ÐÁËÅÔÉ:
-XFree86, ÏÄÉÎ ÁÂÏ ÄÅ˦ÌØËÁ ÐÁËÅÔ¦× ÛÒÉÆÔ¦× XFree86, Xconfigurator,
-XFree86-xfs.
-
-ñËÝÏ ×É ÚÂÉÒÁ¤ÔÅÓØ ÒÏÚÒÏÂÌÑÔÉ ÐÒÏÇÒÁÍÉ, Ñ˦ ÐÒÁÃÀÀÔØ ÑË X-Ë̦¤ÎÔÉ, ×ÁÍ
-ÔÁËÏÖ ÎÅÏÂȦÄÎÏ ×ÓÔÁÎÏ×ÉÔÉ XFree86-devel.
-
-%package modules
-Summary: Modules with X servers extensions
-Summary(pl): Wspólne dla wszystkich X serwerów modu³y rozszerzeñ
-Group: X11/XFree86
-
-%description modules
-Modules with X servers extensions.
-
-%description modules -l pl
-Wspólne dla wszystkich X serwerów modu³y rozszerzeñ.
-
-%package setup
-Summary: Graphical configuration tool for XFree86
-Summary(pl): Graficzny konfigurator dla XFree86
-Summary(ru): õÔÉÌÉÔÁ ÄÌÑ ËÏÎÆÉÇÕÒÁÃÉÉ XFree86
-Summary(uk): õÔÉ̦ÔÁ ÄÌÑ ËÏÎƦÇÕÒÕ×ÁÎÎÑ XFree86
-Group: X11/XFree86
-Requires: %{name}-Xserver = %{epoch}:%{version}
-Obsoletes: XFree86-xf86cfg
-
-%description setup
-Setup containst a configuration tool for the XFree86 family of
-servers. It allows you to configure video settings, keyboard layouts,
-mouse type, and other miscellaneous options. It is slow however, and
-requires the generic VGA 16 color server be available.
-
-%description setup -l pl
-Pakiet setup zawiera narzêdzia do konfiguracji XFree86. Pozwala na
-skonfigurowanie ustawieñ obrazu, klawiatury, typu myszki i innych
-ró¿nych rzeczy. Jednak¿e jest wolny i wymaga dostêpno¶ci serwera do
-standardowej 16-kolorowej VGA.
-
-%description setup -l ru
-õÔÉÌÉÔÁ ÄÌÑ ËÏÎÆÉÇÕÒÁÃÉÉ XFree86.
-
-%description setup -l uk
-õÔÉ̦ÔÁ ÄÌÑ ËÏÎƦÇÕÒÕ×ÁÎÎÑ XFree86.
-
-%package static
-Summary: X11R6 static libraries
-Summary(pl): Biblioteki statyczne X11R6
-Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ X11R6
-Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ X11R6
-Group: X11/Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}
-%ifarch sparc sparc64
-Obsoletes: X11R6.1-devel
-%endif
-Obsoletes: xpm-static
-#Obsoletes: Mesa-static
-
-%description static
-X11R6 static libraries.
-
-%description static -l pl
-Biblioteki statyczne X11R6.
-
-%description static -l ru
-XFree86-static ×ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
-ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ ËÁË X-ËÌÉÅÎÔÙ. ÓÏÂÒÁÎÎÙÅ ÐÒÏÇÒÁÍÍÙ,
-ËÏÔÏÒÙÅ ÂÕÄÕÔ ÒÁÂÏÔÁÔØ ËÁË X-ËÌÉÅÎÔÙ.
-
-%description static -l uk
-XFree86-static ͦÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ
-ÐÒÏÇÒÁÍ, Ñ˦ ÐÒÁÃÀÀÔØ ÑË X-Ë̦¤ÎÔÉ.
-
-%package tools
-Summary: Various tools for XFree86
-Summary(pl): Ró¿ne narzêdzia dla XFree86
-Summary(ru): òÁÚÎÏÏÂÒÁÚÎÙÅ ÕÔÉÌÉÔÙ ÄÌÑ XFree86
-Summary(uk): ò¦ÚÎÏÍÁΦÔΦ ÕÔÉ̦ÔÉ ÄÌÑ XFree86
-Group: X11/XFree86
-Requires: %{name} >= %{version}
-Requires: %{name}-libs = %{epoch}:%{version}
-Requires: man-config
-Obsoletes: X11R6-contrib
-
-%description tools
-Various tools for X, including listres, xbiff, xedit, xeyes, xcalc,
-xload and xman, among others.
-
-If you're using X, you should install XFree86-tools. You will also
-need to install the XFree86 package, the XFree86 package which
-corresponds to your video card, some of the XFree86 fonts packages,
-the XFree86-setup package and the XFree86-libs package.
-
-Finally, if you are going to develop applications that run as X
-clients, you will also need to install XFree86-devel.
-
-This package contains all applications that used to be in
-X11R6-contrib in older releases.
-
-%description tools -l pl
-Ró¿ne narzêdzia dla X, w tym listres, xbiff, xedit, xeyes, xcalc,
-xload, xman i inne.
-
-Je¶li u¿ywasz Xów powiniene¶ zainstalowaæ XFree86-tools. Bêdziesz
-równie¿ musia³ zainstalowaæ pakiet XFree86, pakiet odpowiadaj±cy
-Twojej karcie graficznej, jeden z pakietów z fontami, pakiet
-Xconfigurator oraz XFree86-libs.
-
-Wreszcie, je¶li zamierzasz tworzyæ aplikacje, które dzia³aj± jako
-klienci X, bêdziesz musia³ zainstalowaæ równie¿ XFree86-devel.
-
-Ten pakiet zawiera aplikacje, które by³y w X11R6-contrib w starszych
-wersjach X.
-
-%description tools -l ru
-òÁÚÎÏÏÂÒÁÚÎÙÅ ÕÔÉÌÉÔÙ ÄÌÑ X, ×ËÌÀÞÁÑ listres, xbiff, xedit, xeyes,
-xcalc, xload, xman É ÄÒÕÇÉÅ.
-
-åÓÌÉ ×Ù ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÅ X Window System, ×ÁÍ ÎÁÄÏ ÕÓÔÁÎÏ×ÉÔØ
-XFree86-tools. ôÁËÖÅ ×ÁÍ ÔÁËÖÅ ÎÅÏÂÈÏÄÉÍÏ ÕÓÔÁÎÏ×ÉÔØ ÔÁËÉÅ ÐÁËÅÔÙ:
-XFree86, Xconfigurator, XFree86-xfs É XFree86-libs. ÷ÏÚÍÏÖÎÏ, ×ÁÍ ÎÁÄÏ
-ÕÓÔÁÎÏ×ÉÔØ É ÄÒÕÇÉÅ ÐÁËÅÔÙ ÛÒÉÆÔÏ× XFree86.
-
-åÓÌÉ ×Ù ÓÏÂÉÒÁÅÔÅÓØ ÒÁÚÒÁÂÁÔÙ×ÁÔØ ÐÒÏÇÒÁÍÍÙ, ÒÁÂÏÔÁÀÝÉÅ ËÁË X-ËÌÉÅÎÔÙ,
-×ÁÍ ÔÁËÖÅ ÎÁÄÏ ÕÓÔÁÎÏ×ÉÔØ XFree86-devel.
-
-üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ×ÓÅ ÐÒÏÇÒÁÍÍÙ, ËÏÔÏÒÙÅ ÒÁÎØÛÅ ×ËÌÀÞÁÌÉÓØ ×
-X11R6-contrib.
-
-%description tools -l uk
-ò¦ÚÎÏÍÁΦÔΦ ÕÔÉ̦ÔÉ ÄÌÑ X, ×ËÌÀÞÁÀÞÉ listres, xbiff, xedit, xeyes,
-xcalc, xload, xman ÔÁ ¦ÎÛ¦.
-
-ñËÝÏ ×É ×ÓÔÁÎÏ×ÌÀ¤ÔÅ X Window System, ×ÁÍ ÎÅÏÂȦÄÎÏ ×ÓÔÁÎÏ×ÉÔÉ
-XFree86-tools. ôÁËÏÖ ÔÒÅÂÁ ×ÓÔÁÎÏ×ÉÔÉ ÔÁ˦ ÐÁËÅÔÉ: XFree86,
-Xconfigurator, XFree86-xfs ÔÁ XFree86-libs. íÏÖÌÉ×Ï, ×ÁÍ ÔÒÅÂÁ
-×ÓÔÁÎÏ×ÉÔÉ Ê ¦ÎÛ¦ ÐÁËÅÔÉ ÛÒÉÆÔ¦× XFree86.
-
-ñËÝÏ ×É ÚÂÉÒÁ¤ÔÅÓØ ÒÏÚÒÏÂÌÑÔÉ ÐÒÏÇÒÁÍÉ, Ñ˦ ÐÒÁÃÀÀÔØ ÑË X-Ë̦¤ÎÔÉ, ×ÁÍ
-ÔÁËÏÖ ÎÅÏÂȦÄÎÏ ×ÓÔÁÎÏ×ÉÔÉ XFree86-devel.
-
-ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÕÓ¦ ÐÒÏÇÒÁÍÉ, Ñ˦ ÒÁΦÛÅ ×ÈÏÄÉÌÉ ÄÏ X11R6-contrib.
-
-%package -n XcursorTheme-handhelds
-Summary: Cursors Theme "handhelds"
-Summary(pl): Motyw kursorów "handhelds"
-Group: X11/Themes
-Requires: XFree86-libs
-Requires: xcursor
-Conflicts: XFree86 < 4.3.99.901-0.2
-
-%description -n XcursorTheme-handhelds
-Cursors theme "handhelds" for X11.
-
-%description -n XcursorTheme-handhelds -l pl
-Motyw kursorów "handhelds" dla X11.
-
-%package -n XcursorTheme-redglass
-Summary: Cursors theme "redglass"
-Summary(pl): Motyw kursorów "redglass"
-Group: X11/Themes
-Requires: XFree86-libs
-Requires: xcursor
-Conflicts: XFree86 < 4.3.99.901-0.2
-
-%description -n XcursorTheme-redglass
-Cursors theme "redglass" for X11.
-
-%description -n XcursorTheme-redglass -l pl
-Motyw kursorów "redglass" dla X11.
-
-%package -n XcursorTheme-whiteglass
-Summary: Cursors theme "whiteglass"
-Summary(pl): Motyw kursorów "whiteglass"
-Group: X11/Themes
-Requires: XFree86-libs
-Requires: xcursor
-Conflicts: XFree86 < 4.3.99.901-0.2
-
-%description -n XcursorTheme-whiteglass
-Cursors theme "whiteglass" for X11.
-
-%description -n XcursorTheme-whiteglass -l pl
-Motyw kursorów "whiteglass" dla X11.
-
-%package -n imake
-Summary: C preprocessor interface to the make utility
-Summary(pl): Miedzymordzie do make oparte o preprocesor C
-Group: Development/Building
-
-%description -n imake
-Imake is used to generate Makefiles from a template, a set of cpp
-macro functions, and a per-directory input file called an Imakefile.
-This allows machine dependencies (such as compiler options, alternate
-command names, and special make rules) to be kept separate from the
-descriptions of the various items to be built.
-
-%description -n imake -l pl
-Imake jest u¿ywany do generowania plików Makefile na bazie szablonu,
-zbioru makr preprocesora C oraz (dla ka¿dego podkatalogu) pliku
-wej¶ciowego Imakefile. Pozwala to na oddzielenie informacji zale¿nych
-od ¶rodowiska kompilacji (takich jak opcje kompilatora, alternatywne
-nazwy komend i regu³y specjalne) od opisu ró¿nych elementów które maj±
-byæ kompilowane.
-
-%package -n sessreg
-Summary: sessreg - manage utmp/wtmp entries for non-init clients
-Summary(pl): Program do zarz±dzania wpisami w utmp/wtmp
-Group: X11/XFree86
-
-%description -n sessreg
-sessreg is a simple program for managing utmp/wtmp entries for xdm
-sessions.
-
-System V has a better interface to /var/run/utmp than BSD; it
-dynamically allocates entries in the file, instead of writing them at
-fixed positions indexed by position in /etc/ttys.
-
-%description -n sessreg -l pl
-sessreg jest prostym programem do zarz±dzania wpisami w utmp/wtmp dla
-sesji xdm.
-
-System V ma lepszy ni¿ BSD interfejs do /var/run/utmp; dynamicznie
-alokuje wpisy w pliku, zamiast zapisywania ich na ustalonych pozycjach
-indeksowanych po³o¿eniem w /etc/ttys.
-
-%package -n twm
-Summary: Tab Window Manager for the X Window System
-Summary(pl): Twm - podstawowy zarz±dca okien dla X Window System
-Summary(ru): ðÒÏÓÔÏÊ ÏËÏÎÎÙÊ ÍÅÎÅÄÖÅÒ
-Summary(uk): ðÒÏÓÔÉÊ ×¦ËÏÎÎÉÊ ÍÅÎÅÄÖÅÒ
-Group: X11/Window Managers
-Requires: %{name}-libs = %{epoch}:%{version}
-
-%description -n twm
-Twm is a window manager for the X Window System. It provides
-titlebars, shaped windows, several forms of icon management,
-user-defined macro functions, click-to-type and pointerdriven keyboard
-focus, and user-specified key and pointer button bindings.
-
-%description -n twm -l pl
-Twm jest zarz±dc± okien dla X Window System. Daje belki tytu³owe,
-ramki okien, parê form zarz±dzania ikonami, definiowalne makra,
-ustawianie focusu klikniêciem lub po³o¿eniem wska¼nika myszy,
-definiowalne przypisania klawiszy i przycisków myszy.
-
-%description -n twm -l ru
-ðÒÏÓÔÏÊ ËÏÍÐÁËÔÎÉÊ ÏËÏÎÎÙÊ ÍÅÎÅÄÖÅÒ.
-
-%description -n twm -l uk
-ðÒÏÓÔÉÊ ËÏÍÐÁËÔÎÉÊ ×¦ËÏÎÎÉÊ ÍÅÎÅÄÖÅÒ.
-
-%package -n xauth
-Summary: xauth - X authority file utility
-Summary(pl): xauth - narzêdzie do plików X authority
-Group: X11/XFree86
-Requires: %{name}-libs = %{epoch}:%{version}
-
-%description -n xauth
-The xauth program is used to edit and display the authorization
-information used in connecting to the X server. This program is
-usually used to extract authorization records from one machine and
-merge them in on another (as is the case when using remote logins or
-granting access to other users).
-
-%description -n xauth -l pl
-Program xauth s³u¿y do edycji i wy¶wietlania informacji
-autoryzacyjnych u¿ywanych przy ³±czeniu z Xserwerem. Ten program
-przewa¿nie jest u¿ywany do wyci±gania rekordów autoryzacji z jednej
-maszyny i do³±czania ich na innej (w celu umo¿liwienia zdalnego
-logowania lub udostêpnienia innym u¿ytkownikom).
-
-%package -n xdm
-Summary: xdm - X Display Manager with support for XDMCP, host chooser
-Summary(pl): XDM - zarz±dca ekranów z obs³ug± XDMCP i wybieraniem hostów
-Summary(ru): íÅÎÅÄÖÅÒ ÄÉÓÐÌÅÑ X
-Summary(uk): íÅÎÅÄÖÅÒ ÄÉÓÐÌÅÀ X
-Group: X11/XFree86
-PreReq: rc-scripts
-Requires(post,preun): /sbin/chkconfig
-Requires: %{name} = %{epoch}:%{version}
-Requires: %{name}-libs = %{epoch}:%{version}
-Requires: /usr/X11R6/bin/sessreg
-Requires: pam >= 0.71
-Requires: sessreg = %{epoch}:%{version}
-Requires: /usr/X11R6/bin/sessreg
-Provides: XDM
-Obsoletes: XFree86-xdm
-Obsoletes: gdm
-Obsoletes: kdm
-
-%description -n xdm
-Xdm manages a collection of X displays, which may be on the local host
-or remote servers. The design of xdm was guided by the needs of X
-terminals as well as the X Consortium standard XDMCP, the X Display
-Manager Control Protocol.
-
-%description -n xdm -l pl
-Xdm zarz±dza zestawem ekranów X, które mog± byæ lokalne lub na
-zdalnych serwerach. Zosta³ zaprojektowany zgodnie z potrzebami X
-terminali oraz standardem X Consortium XDMCP.
-
-%description -n xdm -l ru
-íÅÎÅÄÖÅÒ ÄÉÓÐÌÅÑ X.
-
-%description -n xdm -l uk
-íÅÎÅÄÖÅÒ ÄÉÓÐÌÅÀ X.
-
-%package -n xfs
-Summary: Font server for XFree86
-Summary(pl): Serwer fontów dla XFree86
-Summary(ru): æÏÎÔÓÅÒ×ÅÒ ÄÌÑ X Window System
-Summary(uk): æÏÎÔÓÅÒ×ÅÒ ÄÌÑ X Window System
-Group: X11/XFree86
-PreReq: rc-scripts
-Requires(pre): /bin/id
-Requires(pre): /usr/bin/getgid
-Requires(pre): /usr/sbin/useradd
-Requires(pre): /usr/sbin/groupadd
-Requires(post,preun): /sbin/chkconfig
-Requires(postun): /usr/sbin/groupdel
-Requires(postun): /usr/sbin/userdel
-Requires: %{name}-fonts-base
-Requires: %{name}-libs = %{epoch}:%{version}
-Obsoletes: xfsft XFree86-xfs
-
-%description -n xfs
-This is a font server for XFree86. You can serve fonts to other X
-servers remotely with this package, and the remote system will be able
-to use all fonts installed on the font server, even if they are not
-installed on the remote computer.
-
-%description -n xfs -l pl
-Pakiet zawiera serwer fontów dla XFree86. Mo¿e udostêpniaæ fonty dla X
-serwerów lokalnych lub zdalnych.
-
-%description -n xfs -l ru
-XFree86-xfs ÓÏÄÅÒÖÉÔ ÓÅÒ×ÅÒ ÛÒÉÆÔÏ× ÄÌÑ XFree86. Xfs ÔÁËÖÅ ÍÏÖÅÔ
-ÐÒÅÄÏÓÔÁ×ÌÑÔØ ÛÒÉÆÔÙ ÕÄÁÌÅÎÎÙÍ X-ÓÅÒ×ÅÒÁÍ. õÄÁÌÅÎÎÁÑ ÓÉÓÔÅÍÁ ÂÕÄÅÔ
-ÓÐÏÓÏÂÎÁ ÉÓÐÏÌØÚÏ×ÁÔØ ×ÓÅ ÛÒÉÆÔÙ, ÕÓÔÁÎÏ×ÌÅÎÎÙÅ ÎÁ ÓÅÒ×ÅÒÅ ÛÒÉÆÔÏ×,
-ÄÁÖÅ ÅÓÌÉ ÏÎÉ ÎÅ ÕÓÔÁÎÏ×ÌÅÎÙ ÎÁ ÕÄÁÌÅÎÎÏÍ ËÏÍÐØÀÔÅÒÅ.
-
-÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ XFree86-xfs ÅÓÌÉ ×Ù ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÅ X Window
-System. ôÁËÖÅ ×ÁÍ ÐÒÉÄÅÔÓÑ ÕÓÔÁÎÏ×ÉÔØ ÓÌÅÄÕÀÝÉÅ ÐÁËÅÔÙ: XFree86,
-ÐÁËÅÔ(Ù) ÛÒÉÆÔÏ× XFree86, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ×ÁÛÅÊ ÓÉÓÔÅÍÙ, Xconfigurator
-É XFree86-libs.
-
-%description -n xfs -l uk
-XFree86-xfs ͦÓÔÉÔØ ÓÅÒ×ÅÒ ÛÒÉÆÔ¦× ÄÌÑ XFree86. Xfs ÔÁËÏÖ ÍÏÖÅ
-ÎÁÄÁ×ÁÔÉ ÛÒÉÆÔÉ ×¦ÄÄÁÌÅÎÉÍ X-ÓÅÒ×ÅÒÁÍ. ÷¦ÄÄÁÌÅÎÁ ÓÉÓÔÅÍÁ ÚÍÏÖÅ
-×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ ÕÓ¦ ÛÒÉÆÔÉ, Ñ˦ ×ÓÔÁÎÏ×ÌÅΦ ÎÁ ÓÅÒ×ÅÒ¦ ÛÒÉÆÔ¦×, ÎÁצÔØ
-ÑËÝÏ ×ÏÎÉ ÎÅ ×ÓÔÁÎÏ×ÌÅΦ ÎÁ צÄÄÁÌÅÎÏÍÕ ËÏÍÐ'ÀÔÅÒ¦.
-
-÷É ÐÏ×ÉÎΦ ×ÓÔÁÎÏ×ÉÔÉ XFree86-xfs ÑËÝÏ ×É ×ÓÔÁÎÏ×ÌÀ¤ÔÅ X Window
-System. ôÁËÏÖ ×ÁÍ ÐÒÉÊÄÅÔØÓÑ ×ÓÔÁÎÏ×ÉÔÉ ÎÁÓÔÕÐΦ ÐÁËÅÔÉ: XFree86,
-ÐÁËÅÔ(É) ÛÒÉÆÔ¦× XFree86, ÎÅÏÂȦÄΦ ÄÌÑ ×ÁÛϧ ÓÉÓÔÅÍÉ, Xconfigurator
-ÔÁ XFree86-libs.
-
-#--- %prep ---------------------------
-
-%prep
-%setup -q -c -b3 -a40 -a41
-#-b1 -b2 -a3
-%patch0 -p0
-%patch1 -p1
-%patch2 -p1
-%patch3 -p0
-%patch4 -p1
-%patch5 -p0
-%patch6 -p0
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p0
-#%patch11 -p0 -- obsoleted???
-%patch12 -p1
-%patch13 -p1
-%patch14 -p0
-%patch15 -p1
-%patch16 -p0
-#%patch17 -p1 -- not ready, is it required?
-%patch18 -p1
-#%patch19 -p1 -- maybe should be updated to allow using make -j
-%patch20 -p0
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch26 -p1
-%patch27 -p1
-%ifarch sparc sparc64
-#%patch28 -p1 -- needs update
-%endif
-%patch29 -p0
-%patch30 -p1
-%patch32 -p1
-%patch33 -p1
-#%patch34 -p1 -- seems not applied (was partially in rc1??? maybe another fix present?)
-#%patch35 -p1 -- obsoleted? (but doesn't look to be applied)
-%{!?_without_tdfx:%patch36 -p0}
-#%patch38 -p0 -- causing problems IIRC (but not really needed)
-%{!?_without_tdfx:%patch39 -p0}
-%patch40 -p1
-%{!?debug:%patch41 -p1}
-%{?_without_tdfx:%patch42 -p0}
-%patch43 -p0
-%patch44 -p0
-%patch45 -p1
-%patch46 -p0
-%patch47 -p1
-tar xfz *.tar.gz
-%patch48 -p0
-%patch49 -p1
-%patch50 -p1
-%patch51 -p1
-
-rm -f xc/config/cf/host.def
-
-#Remove fonts dir for faster build
-# only valid for snapshots
-rm -rf xc/fonts
-
-# New ATI drivers
-# cd xc/programs/Xserver/hw/xfree86/drivers
-#%bzcat %{SOURCE39} | tar x
-# ati.2 directory
-
-#--- %build --------------------------
-
-%build
-%{__make} -S -C xc World \
- DEFAULT_OS_CPU_FROB=%{_target_cpu} \
- CC="%{__cc}" \
- BOOTSTRAPCFLAGS="%{rpmcflags}" \
- CCOPTIONS="%{rpmcflags}" \
- CXXOPTIONS="%{rpmcflags}" \
- CXXDEBUGFLAGS="" \
- CDEBUGFLAGS="" \
- ICONDIR="%{_iconsdir}" \
- LINUXDIR="%{_kernelsrcdir}"
-
-%ifnarch alpha
-#%%{__make} -C xc/programs/Xserver/hw/xfree86/drivers SUBDIRS="ati.2" Makefiles
-#%%{__make} -C xc/programs/Xserver/hw/xfree86/drivers SUBDIRS="ati.2" all \
-# "BOOTSTRAPCFLAGS=%{rpmcflags}" \
-# "CCOPTIONS=%{rpmcflags}" \
-# "CXXOPTIONS=%{rpmcflags}" \
-# "CXXDEBUGFLAGS=" "CDEBUGFLAGS="
-%endif
-
-%ifarch %{ix86} mips ppc arm
-olddir=$(pwd)
-cd LinuxDriver/2D
-chmod u+w Imakefile
-echo -e ',s#$(XF86OSSRC)/vbe#$(XF86SRC)/vbe#g\n,w' | ed Imakefile
-xmkmf $olddir/xc .
-%{__make} -S savage_drv.o \
- DEFAULT_OS_CPU_FROB=%{_target_cpu} \
- CC="%{__cc}" \
- BOOTSTRAPCFLAGS="%{rpmcflags}" \
- CCOPTIONS="%{rpmcflags}" \
- CXXOPTIONS="%{rpmcflags}" \
- CXXDEBUGFLAGS="" \
- CDEBUGFLAGS="" \
- ICONDIR="%{_iconsdir}" \
- LINUXDIR="%{_kernelsrcdir}"
-cd $olddir
-%endif
-
-%ifnarch sparc sparc64
-TOPDIR=$(pwd)/xc
-%{__make} -S -C synaptics clean all \
- TOP="$TOPDIR" \
- CC="%{__cc}" \
- BOOTSTRAPCFLAGS="%{rpmcflags}" \
- CCOPTIONS="%{rpmcflags}" \
- CXXOPTIONS="%{rpmcflags}" \
- CXXDEBUGFLAGS="" \
- CDEBUGFLAGS="" \
- ICONDIR="%{_iconsdir}" \
- LINUXDIR="%{_kernelsrcdir}"
-
-cd synaptics
-for f in COMPATIBILITY INSTALL NEWS README README.alps TODO; do
- cp -f ${f} ${f}.synaptics
-done
-%endif
-
-#--- %install ------------------------
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security/console.apps,sysconfig,xdg} \
- $RPM_BUILD_ROOT%{_sysconfdir}/X11/fs \
- $RPM_BUILD_ROOT%{_appdefsdir}/{cs,da,de,es,fr,hu,it,ja,ko,nl,pl,pt,ru,sk,zh_CN.gb2312,zh_TW.big5} \
- $RPM_BUILD_ROOT%{_datadir}/misc \
- $RPM_BUILD_ROOT%{_sbindir} \
- $RPM_BUILD_ROOT/usr/{bin,include,lib} \
- $RPM_BUILD_ROOT/var/{log,lib/xkb} \
- $RPM_BUILD_ROOT{%{_desktopdir},%{_iconsdir}/mini,%{_pixmapsdir}/mini} \
- $RPM_BUILD_ROOT{%{_wmpropsdir},%{_soundsdir},%{_themesdir}/{Default,ThinIce}} \
- $RPM_BUILD_ROOT%{_xsessdir}
-
-%{__make} -C xc install install.man \
- DESTDIR="$RPM_BUILD_ROOT" \
- DOCDIR="/usr/share/doc/%{name}-%{version}" \
- INSTBINFLAGS="-m 755" \
- INSTPGMFLAGS="-m 755" \
- RAWCPP="/lib/cpp" \
- BOOTSTRAPCFLAGS="%{rpmcflags}" \
- CCOPTIONS="%{rpmcflags}" \
- CXXOPTIONS="%{rpmcflags}" \
- CXXDEBUGFLAGS="" \
- CDEBUGFLAGS="" \
- ICONDIR="%{_iconsdir}" \
- LINUXDIR="%{_kernelsrcdir}"
-
-%ifnarch sparc sparc64
-install synaptics/synaptics_drv.o $RPM_BUILD_ROOT%{_libdir}/modules/input
-%endif
-
-%ifnarch alpha
-#install -d $RPM_BUILD_ROOT%{_libdir}/modules.gatos/{drivers,dri}
-#install xc/programs/Xserver/hw/xfree86/drivers/ati.2/*_drv.o \
-# $RPM_BUILD_ROOT%{_libdir}/modules.gatos/drivers
-#install xc/programs/Xserver/hw/xfree86/drivers/ati.2/*_dri.o \
-# $RPM_BUILD_ROOT%{_libdir}/modules.gatos/dri
-%endif
-
-%ifarch %{ix86} mips ppc arm
-install -d $RPM_BUILD_ROOT%{_libdir}/modules.s3/drivers
-install LinuxDriver/2D/savage_drv.o $RPM_BUILD_ROOT%{_libdir}/modules.s3/drivers
-%endif
-
-# setting default X
-rm -f $RPM_BUILD_ROOT%{_bindir}/X
-ln -sf XFree86 $RPM_BUILD_ROOT%{_bindir}/X
-
-# setting ghost X in /etc/X11 -- xf86config will fix this ...
-ln -sf %{_bindir}/XFree86 $RPM_BUILD_ROOT%{_sysconfdir}/X11/X
-
-# add X11 links in /usr/bin, /usr/lib /usr/include
-ln -sf %{_includedir}/X11 $RPM_BUILD_ROOT/usr/include/X11
-ln -sf %{_libdir}/X11 $RPM_BUILD_ROOT/usr/lib/X11
-ln -sf %{_bindir} $RPM_BUILD_ROOT/usr/bin/X11
-
-# fix libGL*.so links
-rm -f $RPM_BUILD_ROOT%{_libdir}/libGL*.so
-ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
-ln -sf libGLU.so.1 $RPM_BUILD_ROOT%{_libdir}/libGLU.so
-
-# get the most current OpenGL extensions
-rm -f $RPM_BUILD_ROOT%{_includedir}/GL/glext.h
-cp %{SOURCE49} $RPM_BUILD_ROOT%{_includedir}/GL/glext.h
-
-# collect Xserver headers
-install -d $RPM_BUILD_ROOT%{_includedir}/X11/Xserver
-cd xc/programs/Xserver
-# don't change to single install - there are symlinked "duplicates"
-install include/*.h $RPM_BUILD_ROOT%{_includedir}/X11/Xserver
-install hw/xfree86/{common,os-support}/*.h $RPM_BUILD_ROOT%{_includedir}/X11/Xserver
-cd -
-
-# set up PLD xdm config
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/X11/xdm/{*Console,Xaccess,Xsession,Xsetup*}
-install xdm-xinitrc-*/pixmaps/* $RPM_BUILD_ROOT%{_sysconfdir}/X11/xdm/pixmaps
-install xdm-xinitrc-*/{*Console,Xaccess,Xsession,Xsetup*} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xdm
-
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/xdm
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/xserver
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/xdm
-install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/xfs
-install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/X11/fs/config
-install %{SOURCE9} $RPM_BUILD_ROOT%{_appdefsdir}/pl/XTerm
-
-install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/xdm
-install %{SOURCE11} $RPM_BUILD_ROOT/etc/sysconfig/xfs
-
-install %{SOURCE20} $RPM_BUILD_ROOT%{_wmpropsdir}/twm.desktop
-install %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE25} \
- %{SOURCE26} %{SOURCE27} %{SOURCE43} %{SOURCE44} %{SOURCE45} \
- $RPM_BUILD_ROOT%{_desktopdir}
-install %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} %{SOURCE34} \
- %{SOURCE35} %{SOURCE36} %{SOURCE37} %{SOURCE46} %{SOURCE47} \
- %{SOURCE48} \
- $RPM_BUILD_ROOT%{_pixmapsdir}
-
-bzip2 -dc %{SOURCE38} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
-
-# twm desktop file for gdm/kdm support
-install %{SOURCE42} $RPM_BUILD_ROOT%{_xsessdir}/twm.desktop
-
-:> $RPM_BUILD_ROOT/etc/security/console.apps/xserver
-:> $RPM_BUILD_ROOT/etc/security/blacklist.xserver
-:> $RPM_BUILD_ROOT/etc/security/blacklist.xdm
-
-ln -sf %{_fontsdir} $RPM_BUILD_ROOT%{_libdir}/X11/fonts
-
-# do not duplicate xkbcomp program
-rm -f $RPM_BUILD_ROOT%{_libdir}/X11/xkb/xkbcomp
-ln -sf %{_bindir}/xkbcomp $RPM_BUILD_ROOT%{_sysconfdir}/X11/xkb/xkbcomp
-
-ln -sf /usr/share/doc/%{name}-%{version} $RPM_BUILD_ROOT%{_libdir}/X11/doc
-
-rm -f $RPM_BUILD_ROOT%{_libdir}/X11/config/host.def
-
-:> $RPM_BUILD_ROOT%{_libdir}/X11/config/host.def
-:> $RPM_BUILD_ROOT%{_sysconfdir}/X11/XF86Config
-
-rm -rf $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/html
-
-# resolve conflict with man-pages
-mv -f $RPM_BUILD_ROOT%{_mandir}/man4/{mouse.4,mouse-x.4}
-
-# directories for applications locales
-echo '%defattr(644,root,root,755)' > XFree86-libs.lang
-for lang in af az bg bg_BG.cp1251 br ca cs da de el en_GB eo es et eu fi \
- fr ga gl he hr hu is it ja ko lt mi mk nl nn no pl pt pt_BR ro ru sk \
- sl sr sv ta th tr uk wa zh_CN zh_TW ; do
- install -d $RPM_BUILD_ROOT%{_datadir}/locale/${lang}/LC_MESSAGES
- echo "%lang(${lang}) %{_datadir}/locale/${lang}" >> XFree86-libs.lang
-done
-
-%ifnarch sparc sparc64
-install synaptics/synclient $RPM_BUILD_ROOT%{_bindir}
-install synaptics/*.synaptics $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
-%endif
-
-%ifnarch sparc sparc64
-gzip -9nf $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/*
-
-# don't gzip README.* files, they are needed by XF86Setup
-gunzip $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/README.*
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-#--- %post{un}, %preun, %verifyscript, %trigge ----------
-
-%post DPS -p /sbin/ldconfig
-%postun DPS -p /sbin/ldconfig
-
-%post OpenGL-core -p /sbin/ldconfig
-%postun OpenGL-core -p /sbin/ldconfig
-
-%post OpenGL-libGL -p /sbin/ldconfig
-%postun OpenGL-libGL -p /sbin/ldconfig
-
-%post OpenGL-libs -p /sbin/ldconfig
-%postun OpenGL-libs -p /sbin/ldconfig
-
-%post libs
-umask 022
-grep -qs "^%{_libdir}$" /etc/ld.so.conf
-[ $? -ne 0 ] && echo "%{_libdir}" >> /etc/ld.so.conf
-/sbin/ldconfig
-
-%postun libs
-if [ "$1" = "0" ]; then
- umask 022
- grep -v "%{_libdir}" /etc/ld.so.conf > /etc/ld.so.conf.new
- mv -f /etc/ld.so.conf.new /etc/ld.so.conf
-fi
-/sbin/ldconfig
-
-%verifyscript libs
-echo -n "Looking for %{_libdir} in /etc/ld.so.conf... "
-if ! grep -q "^%{_libdir}$" /etc/ld.so.conf ; then
- echo "missing"
- echo "%{_libdir} missing from /etc/ld.so.conf" >&2
-else
- echo "found"
-fi
-
-%pre modules
-if [ -d /etc/X11/xkb/geometry/hp ]; then
- rm -rf /etc/X11/xkb/geometry/hp
-fi
-
-%triggerpostun modules -- XFree86-modules < 4.0.2
-if [ -d /usr/X11R6/lib/X11/xkb ]; then
- rm -rf /usr/X11R6/lib/X11/xkb
- ln -sf /etc/X11/xkb /usr/X11R6/lib/X11/xkb
-fi
-
-%post -n xdm
-/sbin/chkconfig --add xdm
-if [ -f /var/lock/subsys/xdm ]; then
- echo "Run \"/etc/rc.d/init.d/xdm restart\" to restart xdm." >&2
- echo "WARNING: it will terminate all sessions opened from xdm!" >&2
-else
- echo "Run \"/etc/rc.d/init.d/xdm start\" to start xdm." >&2
-fi
-
-%preun -n xdm
-if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/xdm ]; then
- /etc/rc.d/init.d/xdm stop >&2
- fi
- /sbin/chkconfig --del xdm
-fi
-
-%pre -n xfs
-if [ -n "`/usr/bin/getgid xfs`" ]; then
- if [ "`/usr/bin/getgid xfs`" != "56" ]; then
- echo "Error: group xfs doesn't have GID=56. Correct this before installing xfs." 1>&2
- exit 1
- fi
-else
- /usr/sbin/groupadd -g 56 -r -f xfs
-fi
-if [ -n "`/bin/id -u xfs 2>/dev/null`" ]; then
- if [ "`/bin/id -u xfs`" != "56" ]; then
- echo "Error: user xfs doesn't have UID=56. Correct this before installing xfs." 1>&2
- exit 1
- fi
-else
- /usr/sbin/useradd -u 56 -r -d /etc/X11/fs -s /bin/false -c "X Font Server" -g xfs xfs 1>&2
-fi
-
-%post -n xfs
-/sbin/chkconfig --add xfs
-if [ -f /var/lock/subsys/xfs ]; then
- /etc/rc.d/init.d/xfs restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/xfs start\" to start font server." >&2
-fi
-
-%preun -n xfs
-if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/xfs ]; then
- /etc/rc.d/init.d/xfs stop >&2
- fi
- /sbin/chkconfig --del xfs
-fi
-
-%postun -n xfs
-if [ "$1" = "0" ]; then
- /usr/sbin/userdel xfs 2>/dev/null
- /usr/sbin/groupdel xfs 2>/dev/null
-fi
-
-#--- %files --------------------------
-
-%files
-%defattr(644,root,root,755)
-%ifnarch sparc sparc64
-%doc %{_docdir}/%{name}-%{version}
-%doc %{_libdir}/X11/doc
-%endif
-
-%{_appdefsdir}/UXTerm
-%{_appdefsdir}/XCalc
-%{_appdefsdir}/XCalc-color
-%{_appdefsdir}/XClipboard
-%{_appdefsdir}/XClock
-%{_appdefsdir}/XClock-color
-%{_appdefsdir}/XLoad
-%{_appdefsdir}/XLogo
-%{_appdefsdir}/XLogo-color
-%{_appdefsdir}/XSm
-%{_appdefsdir}/XTerm
-%lang(pl) %{_appdefsdir}/pl/XTerm
-%{_appdefsdir}/XTerm-color
-
-%attr(755,root,root) %{_libdir}/X11/lbxproxy
-%attr(755,root,root) %{_libdir}/X11/proxymngr
-%attr(755,root,root) %{_libdir}/X11/rstart
-%attr(755,root,root) %{_libdir}/X11/fonts
-%attr(755,root,root) %{_libdir}/X11/xinit
-%attr(755,root,root) %{_libdir}/X11/xsm
-
-%dir /etc/X11/xinit
-%dir /etc/X11/lbxproxy
-/etc/X11/lbxproxy/*
-%dir /etc/X11/proxymngr
-/etc/X11/proxymngr/*
-%dir /etc/X11/rstart
-/etc/X11/rstart/config
-%attr(755,root,root) /etc/X11/rstart/rstartd.real
-%dir /etc/X11/rstart/commands
-/etc/X11/rstart/commands/x
-/etc/X11/rstart/commands/x11
-%attr(755,root,root) /etc/X11/rstart/commands/*List*
-%dir /etc/X11/rstart/commands/x11r6
-%attr(755,root,root) /etc/X11/rstart/commands/x11r6/*
-%dir /etc/X11/rstart/contexts
-/etc/X11/rstart/contexts/*
-%dir /etc/X11/xsm
-/etc/X11/xsm/*
-
-%dir %{_libdir}/X11/x11perfcomp
-%attr(755,root,root) %{_libdir}/X11/x11perfcomp/*
-
-%attr(755,root,root) %{_bindir}/Xmark
-%attr(755,root,root) %{_bindir}/appres
-%attr(755,root,root) %{_bindir}/atobm
-%attr(755,root,root) %{_bindir}/bitmap
-%attr(755,root,root) %{_bindir}/bmtoa
-%attr(755,root,root) %{_bindir}/cxpm
-%attr(755,root,root) %{_bindir}/dga
-%attr(755,root,root) %{_bindir}/editres
-%attr(755,root,root) %{_bindir}/gtf
-%attr(755,root,root) %{_bindir}/iceauth
-%attr(755,root,root) %{_bindir}/lbxproxy
-%attr(755,root,root) %{_bindir}/lndir
-%attr(755,root,root) %{_bindir}/luit
-%attr(755,root,root) %{_bindir}/makeg
-%attr(755,root,root) %{_bindir}/makestrs
-%attr(755,root,root) %{_bindir}/mergelib
-%attr(755,root,root) %{_bindir}/mkdirhier
-%attr(755,root,root) %{_bindir}/mkhtmlindex
-%attr(755,root,root) %{_bindir}/proxymngr
-%attr(755,root,root) %{_bindir}/resize
-%attr(755,root,root) %{_bindir}/revpath
-%attr(755,root,root) %{_bindir}/rstart
-%attr(755,root,root) %{_bindir}/rstartd
-%attr(755,root,root) %{_bindir}/setxkbmap
-%attr(755,root,root) %{_bindir}/showrgb
-%attr(755,root,root) %{_bindir}/smproxy
-%attr(755,root,root) %{_bindir}/startx
-%attr(755,root,root) %{_bindir}/sxpm
-%ifnarch sparc sparc64
-%attr(755,root,root) %{_bindir}/synclient
-%endif
-%attr(755,root,root) %{_bindir}/uxterm
-%attr(755,root,root) %{_bindir}/xcmsdb
-%attr(755,root,root) %{_bindir}/xconsole
-%attr(755,root,root) %{_bindir}/xcursorgen
-%attr(755,root,root) %{_bindir}/xcutsel
-%attr(755,root,root) %{_bindir}/xdpyinfo
-%attr(755,root,root) %{_bindir}/xfindproxy
-%attr(755,root,root) %{_bindir}/xfwp
-%attr(755,root,root) %{_bindir}/xgamma
-%attr(755,root,root) %{_bindir}/xhost
-%attr(755,root,root) %{_bindir}/xinit
-%attr(755,root,root) %{_bindir}/xkbbell
-%attr(755,root,root) %{_bindir}/xkbevd
-%attr(755,root,root) %{_bindir}/xkbprint
-%attr(755,root,root) %{_bindir}/xkbvleds
-%attr(755,root,root) %{_bindir}/xkbwatch
-%attr(755,root,root) %{_bindir}/xlsatoms
-%attr(755,root,root) %{_bindir}/xlsclients
-%attr(755,root,root) %{_bindir}/xlsfonts
-%attr(755,root,root) %{_bindir}/xmodmap
-%attr(755,root,root) %{_bindir}/xon
-%attr(755,root,root) %{_bindir}/xprop
-%attr(755,root,root) %{_bindir}/xrandr
-%attr(755,root,root) %{_bindir}/xrdb
-%attr(755,root,root) %{_bindir}/xrefresh
-%attr(755,root,root) %{_bindir}/xset
-%attr(755,root,root) %{_bindir}/xsetmode
-%attr(755,root,root) %{_bindir}/xsetpointer
-%attr(755,root,root) %{_bindir}/xsetroot
-%attr(755,root,root) %{_bindir}/xsm
-%attr(755,root,root) %{_bindir}/xstdcmap
-%attr(755,root,root) %{_bindir}/xterm
-%attr(755,root,root) %{_bindir}/xvidtune
-%attr(755,root,root) %{_bindir}/xvinfo
-%attr(755,root,root) %{_bindir}/xwd
-%attr(755,root,root) %{_bindir}/xwud
-
-%{_includedir}/X11/bitmaps
-%{_includedir}/X11/pixmaps
-
-%{_desktopdir}/xconsole.desktop
-%{_desktopdir}/xterm.desktop
-%{_pixmapsdir}/xconsole.png
-%{_pixmapsdir}/xlogo64.png
-%{_pixmapsdir}/xterm.png
-
-%{_appdefsdir}/Xvidtune
-
-%{_mandir}/man1/Xmark.1*
-%{_mandir}/man1/appres.1*
-%{_mandir}/man1/atobm.1*
-%{_mandir}/man1/bdftopcf.1*
-%{_mandir}/man1/bitmap.1*
-%{_mandir}/man1/bmtoa.1*
-%{_mandir}/man1/cxpm.1*
-%{_mandir}/man1/dga.1*
-%{_mandir}/man1/editres.1*
-%{_mandir}/man1/gtf.1*
-%{_mandir}/man1/iceauth.1*
-%{_mandir}/man1/lbxproxy.1*
-%{_mandir}/man1/libxrx.1*
-%{_mandir}/man1/lndir.1*
-%{_mandir}/man1/luit.1x*
-%{_mandir}/man1/makestrs.1*
-%{_mandir}/man1/makeg.1*
-%{_mandir}/man1/mergelib.1*
-%{_mandir}/man1/mkdirhier.1*
-%{_mandir}/man1/mkhtmlindex.1*
-%{_mandir}/man1/proxymngr.1*
-%{_mandir}/man1/resize.1*
-%{_mandir}/man1/revpath.1*
-%{_mandir}/man1/rstart.1*
-%{_mandir}/man1/rstartd.1*
-%{_mandir}/man1/setxkbmap.1*
-%{_mandir}/man1/showrgb.1*
-%{_mandir}/man1/smproxy.1*
-%{_mandir}/man1/startx.1*
-%{_mandir}/man1/sxpm.1*
-%{_mandir}/man1/xcmsdb.1*
-%{_mandir}/man1/xconsole.1*
-%{_mandir}/man1/xcursorgen.1*
-%{_mandir}/man1/xcutsel.1*
-%{_mandir}/man1/xdpyinfo.1*
-%{_mandir}/man1/xfindproxy.1*
-%{_mandir}/man1/xfwp.1*
-%{_mandir}/man1/xgamma.1*
-%{_mandir}/man1/xhost.1*
-%{_mandir}/man1/xinit.1*
-%{_mandir}/man1/xkbevd.1*
-%{_mandir}/man1/xkbprint.1*
-%{_mandir}/man1/xlsatoms.1*
-%{_mandir}/man1/xlsclients.1*
-%{_mandir}/man1/xlsfonts.1*
-%{_mandir}/man1/xmodmap.1*
-%{_mandir}/man1/xprop.1*
-%{_mandir}/man1/xrandr.1*
-%{_mandir}/man1/xrdb.1*
-%{_mandir}/man1/xrefresh.1*
-%{_mandir}/man1/xset.1*
-%{_mandir}/man1/xsetmode.1*
-%{_mandir}/man1/xsetpointer.1*
-%{_mandir}/man1/xsetroot.1*
-%{_mandir}/man1/xsm.1*
-%{_mandir}/man1/xstdcmap.1*
-%{_mandir}/man1/xterm.1*
-%{_mandir}/man1/xvidtune.1*
-%{_mandir}/man1/xvinfo.1*
-%{_mandir}/man1/xwd.1*
-%{_mandir}/man1/xwud.1*
-%{_mandir}/man1/xon.1*
-%{_mandir}/man7/*
-
-%lang(it) %{_mandir}/it/man1/startx.1*
-%lang(it) %{_mandir}/it/man1/xconsole.1*
-%lang(it) %{_mandir}/it/man1/xinit.1*
-%lang(it) %{_mandir}/it/man1/xsetpointer.1*
-
-%lang(ko) %{_mandir}/ko/man1/xterm.1*
-
-%lang(pl) %{_mandir}/pl/man1/lbxproxy.1*
-%lang(pl) %{_mandir}/pl/man1/startx.1*
-%lang(pl) %{_mandir}/pl/man1/xinit.1*
-%lang(pl) %{_mandir}/pl/man1/xwd.1*
-
-# to be separated
-%attr(755,root,root) %{_bindir}/fonttosfnt
-%attr(755,root,root) %{_bindir}/mkfontdir
-%attr(755,root,root) %{_bindir}/mkfontscale
-%{_mandir}/man1/fonttosfnt.1*
-%{_mandir}/man1/mkfontdir.1*
-%{_mandir}/man1/mkfontscale.1*
-
-%files common
-%defattr(644,root,root,755)
-/usr/bin/X11
-/usr/lib/X11
-%dir %{_bindir}
-%dir %{_libdir}
-%dir %{_libdir}/X11
-%{_libdir}/X11/rgb.txt
-
-%files DPS
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/makepsres
-%attr(755,root,root) %{_bindir}/pswrap
-%attr(755,root,root) %{_bindir}/dpsinfo
-%attr(755,root,root) %{_bindir}/dpsexec
-%attr(755,root,root) %{_libdir}/libdps.so.*.*
-%attr(755,root,root) %{_libdir}/libdpstk.so.*.*
-%attr(755,root,root) %{_libdir}/libpsres.so.*.*
-%{_mandir}/man1/makepsres*
-%{_mandir}/man1/pswrap*
-%{_mandir}/man1/dpsexec*
-%{_mandir}/man1/dpsinfo*
-
-%files DPS-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libdps.so
-%attr(755,root,root) %{_libdir}/libdpstk.so
-%attr(755,root,root) %{_libdir}/libpsres.so
-%{_includedir}/DPS
-
-%files DPS-static
-%defattr(644,root,root,755)
-%{_libdir}/libdps.a
-%{_libdir}/libdpstk.a
-%{_libdir}/libpsres.a
-
-%files OpenGL-core
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/glxgears
-%attr(755,root,root) %{_libdir}/modules/extensions/libglx.a
-%attr(755,root,root) %{_libdir}/modules/extensions/libGLcore.a
-%{_mandir}/man1/glxgears.1x*
-
-%files OpenGL-libGL
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libGL.so.*.*
-%attr(755,root,root) %{_libdir}/libGL.so
-%attr(755,root,root) /usr/lib/libGL.so*
-
-%files OpenGL-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libGLU.so
-%attr(755,root,root) %{_libdir}/libOSMesa*.so
-%{_libdir}/libGLw.a
-%dir %{_includedir}/GL
-%dir /usr/include/GL
-%attr(644,root,root) %{_includedir}/GL/*
-%exclude %{_includedir}/GL/gl.h
-%exclude %{_includedir}/GL/glx.h
-%exclude %{_includedir}/GL/glxtokens.h
-%{_mandir}/man3/gl[A-Z]*
-%{_mandir}/man3/glu*
-%{_mandir}/man3/GLw*
-
-%files OpenGL-devel-base
-%defattr(644,root,root,755)
-%{_includedir}/GL/gl.h
-%{_includedir}/GL/glx.h
-%{_includedir}/GL/glxtokens.h
-
-%files OpenGL-libs
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/glxinfo
-%attr(755,root,root) %{_libdir}/libGLU.so.*.*
-# to be fixed: it contains unresolved symbols and would need -lXm
-#%attr(755,root,root) %{_libdir}/libGLw.so.*.*
-%attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
-%{_mandir}/man1/glxinfo.1*
-
-%files OpenGL-static
-%defattr(644,root,root,755)
-%{_libdir}/libGL.a
-%{_libdir}/libGLU.a
-%{_libdir}/libOSMesa*.a
-
-%files Xnest
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/Xnest
-%{_mandir}/man1/Xnest.1*
-
-%files Xprt
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/Xprt
-
-%files Xserver
-%defattr(644,root,root,755)
-%attr(4755,root,root) %{_bindir}/Xwrapper
-%attr(755,root,root) %{_bindir}/XFree86
-%attr(755,root,root) %{_bindir}/getconfig*
-%attr(755,root,root) %{_sysconfdir}/X11/X
-%attr(755,root,root) %{_bindir}/X
-%{_mandir}/man1/XFree86.1*
-%{_mandir}/man1/Xserver.1*
-%{_mandir}/man1/getconfig.1*
-%{_mandir}/man5/XF86Config.5*
-%{_mandir}/man5/getconfig.5*
-
-%{_libdir}/X11/Cards
-%{_libdir}/X11/Options
-%{_libdir}/X11/getconfig
-
-%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/X11/XF86Config
-%attr(640,root,root) %config %verify(not md5 size mtime) /etc/pam.d/xserver
-%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.xserver
-%config(missingok) /etc/security/console.apps/xserver
-
-%files Xvfb
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/Xvfb
-%{_mandir}/man1/Xvfb.1*
-
-%files devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/bdftopcf
-%attr(755,root,root) %{_libdir}/libFS.so
-%attr(755,root,root) %{_libdir}/libI810XvMC.so
-%attr(755,root,root) %{_libdir}/libICE.so
-%attr(755,root,root) %{_libdir}/libSM.so
-%attr(755,root,root) %{_libdir}/libX11.so
-%attr(755,root,root) %{_libdir}/libXRes.so
-%attr(755,root,root) %{_libdir}/libXTrap.so
-%attr(755,root,root) %{_libdir}/libXaw.so
-%attr(755,root,root) %{_libdir}/libXext.so
-%attr(755,root,root) %{_libdir}/libXfont.so
-%attr(755,root,root) %{_libdir}/libXfontcache.so
-%attr(755,root,root) %{_libdir}/libXi.so
-%attr(755,root,root) %{_libdir}/libXinerama.so
-%attr(755,root,root) %{_libdir}/libXmu.so
-%attr(755,root,root) %{_libdir}/libXmuu.so
-%attr(755,root,root) %{_libdir}/libXp.so
-%attr(755,root,root) %{_libdir}/libXpm.so
-%attr(755,root,root) %{_libdir}/libXrandr.so
-%attr(755,root,root) %{_libdir}/libXss.so
-%attr(755,root,root) %{_libdir}/libXt.so
-%attr(755,root,root) %{_libdir}/libXtst.so
-%attr(755,root,root) %{_libdir}/libXv.so
-%attr(755,root,root) %{_libdir}/libXvMC.so
-%attr(755,root,root) %{_libdir}/libXxf86dga.so
-%attr(755,root,root) %{_libdir}/libXxf86misc.so
-%attr(755,root,root) %{_libdir}/libXxf86rush.so
-%attr(755,root,root) %{_libdir}/libXxf86vm.so
-%attr(755,root,root) %{_libdir}/libfontenc.so
-%attr(755,root,root) %{_libdir}/libxkbfile.so
-%attr(755,root,root) %{_libdir}/libxkbui.so
-%attr(755,root,root) %{_libdir}/libxrx.so
-%{_libdir}/libXau.a
-%{_libdir}/libXdmcp.a
-%{_libdir}/libfntstubs.a
-%{_libdir}/liboldX.a
-%{_libdir}/libxf86config.a
-%{_includedir}/X11/*.h
-%{_includedir}/X11/ICE
-%{_includedir}/X11/PM
-%{_includedir}/X11/SM
-%{_includedir}/X11/Xaw
-%{_includedir}/X11/Xmu
-%dir %{_includedir}/X11/extensions
-%{_includedir}/X11/extensions/*.h
-%{_includedir}/X11/fonts
-%{_includedir}/xf86*.h
-%{_libdir}/X11/config
-
-%exclude %{_includedir}/X11/extensions/Xrender.h
-%exclude %{_includedir}/X11/extensions/render.h
-%exclude %{_includedir}/X11/extensions/renderproto.h
-
-%{_mandir}/man3/[A-FH-Z]*
-%exclude %{_mandir}/man3/Xft.3*
-
-%files Xserver-devel
-%defattr(644,root,root,755)
-%{_includedir}/X11/Xserver
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-apm
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/apm_drv.o
-%{_mandir}/man4/apm*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-ark
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/ark_drv.o
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} mips ppc arm
-%files driver-chips
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/chips_drv.o
-%{_mandir}/man4/chips*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} alpha
-%files driver-cirrus
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/cirrus_*.o
-%{_mandir}/man4/cirrus*
-%endif
-
-%ifarch %{ix86}
-%files driver-cyrix
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/cyrix_drv.o
-%{_mandir}/man4/cyrix*
-%endif
-
-%ifarch %{ix86} sparc sparc64 mips ppc arm superh
-%files driver-fbdev
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/fbdev_drv.o
-%{_mandir}/man4/fbdev*
-%endif
-
-%ifarch %{ix86}
-%{!?_without_tdfx:%files driver-glide}
-%{!?_without_tdfx:%defattr(644,root,root,755)}
-%{!?_without_tdfx:%attr(755,root,root) %{_libdir}/modules/drivers/glide_drv.o}
-%{!?_without_tdfx:%{_mandir}/man4/glide*}
-%endif
-
-%files driver-glint
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/glint_drv.o
-%ifarch %{ix86} alpha ppc arm
-%attr(755,root,root) %{_libdir}/modules/dri/gamma_dri.so
-%endif
-%{_mandir}/man4/glint*
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-i128
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/i128_drv.o
-%{_mandir}/man4/i128*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-i740
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/i740_drv.o
-%{_mandir}/man4/i740*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-i810
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/i810_drv.o
-%attr(755,root,root) %{_libdir}/modules/dri/i810_dri.so
-%attr(755,root,root) %{_libdir}/modules/dri/i830_dri.so
-%{_mandir}/man4/i810*
-%endif
-
-# Devel: %{ix86} sparc sparc64 ppc
-%if 0
-%files driver-imstt
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/imstt_drv.o
-%{_mandir}/man4/imstt.4*
-%endif
-
-%ifarch %{ix86} sparc sparc64 mips alpha ppc arm
-%files driver-mga
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/mga_drv.o
-%ifarch %{ix86} alpha ppc arm
-%attr(755,root,root) %{_libdir}/modules/dri/mga_dri.so
-%endif
-%{_mandir}/man4/mga*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-neomagic
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/neomagic_drv.o
-%{_mandir}/man4/neomagic*
-%endif
-
-# Devel: %{ix86} sparc sparc64
-%ifarch mips
-%files driver-newport
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/newport_drv.o
-%{_mandir}/man4/newport.4*
-%endif
-
-%ifarch %{ix86}
-%files driver-nsc
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/nsc_drv.o
-%{_mandir}/man4/nsc.4*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} mips alpha arm ppc
-%files driver-nv
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/nv_drv.o
-%attr(755,root,root) %{_libdir}/modules/drivers/riva128.o
-%{_mandir}/man4/nv*
-%endif
-
-%files driver-ati
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/ati*_drv.o
-
-%files driver-r128
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/r128*_drv.o
-%ifarch %{ix86} alpha ppc arm
-%attr(755,root,root) %{_libdir}/modules/dri/r128_dri.so
-%endif
-%{_mandir}/man4/r128*
-
-%files driver-radeon
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/radeon*_drv.o
-%ifarch %{ix86} alpha ppc arm
-%attr(755,root,root) %{_libdir}/modules/dri/radeon_dri.so
-%attr(755,root,root) %{_libdir}/modules/dri/r200_dri.so
-%endif
-%{_mandir}/man4/radeon*
-
-%ifnarch alpha
-#%%files driver-ati.2
-#%defattr(644,root,root,755)
-#%dir %{_libdir}/modules.gatos/drivers
-#%attr(755,root,root) %{_libdir}/modules.gatos/drivers/ati*_drv.o
-#%attr(755,root,root) %{_libdir}/modules.gatos/drivers/[bfmt]*_drv.o
-%endif
-
-%ifnarch alpha
-#%files driver-r128.2
-#%defattr(644,root,root,755)
-#%attr(755,root,root) %{_libdir}/modules.gatos/drivers/r128*_drv.o
-#%ifnarch sparc sparc64
-#%attr(755,root,root) %{_libdir}/modules.gatos/dri/r128_dri.o
-#%endif
-#%%{_mandir}/man4/r128*
-%endif
-
-%ifnarch alpha
-#%files driver-radeon.2
-#%defattr(644,root,root,755)
-#%attr(755,root,root) %{_libdir}/modules.gatos/drivers/radeon*_drv.o
-#%attr(755,root,root) %{_libdir}/modules.gatos/drivers/saa7114_drv.o
-#%ifnarch sparc sparc64
-#%attr(755,root,root) %{_libdir}/modules.gatos/dri/radeon_dri.o
-#%endif
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} alpha
-%files driver-rendition
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/rendition_drv.o
-%{_mandir}/man4/rendition*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} mips alpha ppc arm
-%files driver-s3virge
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/s3virge_drv.o
-%{_mandir}/man4/s3virge*
-%endif
-
-%ifarch %{ix86} mips alpha ppc arm
-%files driver-s3
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/s3_drv.o
-#%%{_mandir}/man4/s3.4*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} mips alpha ppc arm
-%files driver-savage
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/savage_drv.o
-%ifarch %{ix86} mips ppc arm
-%dir %{_libdir}/modules.s3
-%dir %{_libdir}/modules.s3/drivers
-%attr(755,root,root) %{_libdir}/modules.s3/drivers/savage_drv.o
-%endif
-%{_mandir}/man4/savage*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} alpha
-%files driver-siliconmotion
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/siliconmotion_drv.o
-%{_mandir}/man4/siliconmotion*
-%endif
-
-%ifarch %{ix86} mips ppc arm
-%files driver-sis
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/sis_drv.o
-%ifarch %{ix86}
-%attr(755,root,root) %{_libdir}/modules/dri/sis_dri.so
-%endif
-%{_mandir}/man4/sis*
-%endif
-
-%ifarch sparc sparc64
-%files driver-sunbw2
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/sunbw2_drv.o
-%{_mandir}/man4/sunbw2*
-%endif
-
-%ifarch sparc sparc64
-%files driver-suncg14
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/suncg14_drv.o
-%{_mandir}/man4/suncg14*
-%endif
-
-%ifarch sparc sparc64
-%files driver-suncg3
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/suncg3_drv.o
-%{_mandir}/man4/suncg3*
-%endif
-
-%ifarch sparc sparc64
-%files driver-suncg6
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/suncg6_drv.o
-%{_mandir}/man4/suncg6*
-%endif
-
-%ifarch sparc sparc64
-%files driver-sunffb
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/sunffb_drv.o
-%attr(755,root,root) %{_libdir}/modules/dri/ffb_dri.so
-%{_mandir}/man4/sunffb*
-%endif
-
-%ifarch sparc sparc64
-%files driver-sunleo
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/sunleo_drv.o
-%{_mandir}/man4/sunleo*
-%endif
-
-%ifarch sparc sparc64
-%files driver-suntcx
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/suntcx_drv.o
-%{_mandir}/man4/suntcx*
-%endif
-
-%ifarch %{ix86} sparc sparc64 mips alpha arm ppc
-%{!?_without_tdfx:%files driver-tdfx}
-%{!?_without_tdfx:%defattr(644,root,root,755)}
-%{!?_without_tdfx:%attr(755,root,root) %{_libdir}/modules/drivers/tdfx_drv.o}
-%ifarch %{ix86} alpha arm ppc
-%{!?_without_tdfx:%attr(755,root,root) %{_libdir}/modules/dri/tdfx_dri.so}
-%endif
-%{!?_without_tdfx:%{_mandir}/man4/tdfx*}
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} alpha
-%files driver-tga
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/tga_drv.o
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86} mips ppc arm
-%files driver-trident
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/trident_drv.o
-%{_mandir}/man4/trident*
-%endif
-
-%ifarch %{ix86}
-%files driver-tseng
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/tseng_drv.o
-%{_mandir}/man4/tseng*
-%endif
-
-%ifarch %{ix86}
-%files driver-via
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/via_drv.o
-%{_mandir}/man4/via.4*
-%endif
-
-# Devel: sparc sparc64
-%ifarch %{ix86}
-%files driver-vmware
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/modules/drivers/vmware_drv.o
-%{_mandir}/man4/vmware*
-%endif
-
-%files libs -f XFree86-libs.lang
-%defattr(644,root,root,755)
-%dir /etc/xdg
-%dir %{_themesdir}
-%dir %{_themesdir}/Default
-%dir %{_themesdir}/ThinIce
-%{_libdir}/X11/XErrorDB
-%{_libdir}/X11/XKeysymDB
-%dir %{_appdefsdir}
-%lang(cs) %dir %{_appdefsdir}/cs
-%lang(da) %dir %{_appdefsdir}/da
-%lang(de) %dir %{_appdefsdir}/de
-%lang(es) %dir %{_appdefsdir}/es
-%lang(fr) %dir %{_appdefsdir}/fr
-%lang(hu) %dir %{_appdefsdir}/hu
-%lang(ko) %dir %{_appdefsdir}/ko
-%lang(nl) %dir %{_appdefsdir}/nl
-%lang(pl) %dir %{_appdefsdir}/pl
-%lang(pt) %dir %{_appdefsdir}/pt
-%lang(ru) %dir %{_appdefsdir}/ru
-%lang(sk) %dir %{_appdefsdir}/sk
-%lang(zh_CN) %dir %{_appdefsdir}/zh_CN.gb2312
-%lang(zh_TW) %dir %{_appdefsdir}/zh_TW.big5
-%{_libdir}/X11/locale
-%dir %{_includedir}
-%dir %{_includedir}/X11
-/usr/include/X11
-%dir %{_sbindir}
-%dir %{_datadir}/locale
-%dir %{_datadir}/misc
-%dir %{_iconsdir}
-%dir %{_iconsdir}/mini
-%dir %{_pixmapsdir}
-%dir %{_pixmapsdir}/mini
-%dir %{_soundsdir}
-%dir %{_wmpropsdir}
-%dir %{_xsessdir}
-%attr(755,root,root) %{_libdir}/libFS.so.*.*
-%attr(755,root,root) %{_libdir}/libI810XvMC.so.*.*
-%attr(755,root,root) %{_libdir}/libICE.so.*.*
-%attr(755,root,root) %{_libdir}/libSM.so.*.*
-%attr(755,root,root) %{_libdir}/libX11.so.*.*
-%attr(755,root,root) %{_libdir}/libXRes.so.*.*
-%attr(755,root,root) %{_libdir}/libXTrap.so.*.*
-%attr(755,root,root) %{_libdir}/libXaw.so.*.*
-%attr(755,root,root) %{_libdir}/libXext.so.*.*
-%attr(755,root,root) %{_libdir}/libXfont.so.*.*
-%attr(755,root,root) %{_libdir}/libXfontcache.so.*.*
-%attr(755,root,root) %{_libdir}/libXi.so.*.*
-%attr(755,root,root) %{_libdir}/libXinerama.so.*.*
-%attr(755,root,root) %{_libdir}/libXmu.so.*.*
-%attr(755,root,root) %{_libdir}/libXmuu.so.*.*
-%attr(755,root,root) %{_libdir}/libXp.so.*.*
-%attr(755,root,root) %{_libdir}/libXpm.so.*.*
-%attr(755,root,root) %{_libdir}/libXrandr.so.*.*
-%attr(755,root,root) %{_libdir}/libXss.so.*.*
-%attr(755,root,root) %{_libdir}/libXt.so.*.*
-%attr(755,root,root) %{_libdir}/libXtst.so.*.*
-%attr(755,root,root) %{_libdir}/libXv.so.*.*
-%attr(755,root,root) %{_libdir}/libXvMC.so.*.*
-%attr(755,root,root) %{_libdir}/libXxf86dga.so.*.*
-%attr(755,root,root) %{_libdir}/libXxf86misc.so.*.*
-%attr(755,root,root) %{_libdir}/libXxf86rush.so.*.*
-%attr(755,root,root) %{_libdir}/libXxf86vm.so.*.*
-%attr(755,root,root) %{_libdir}/libfontenc.so.*.*
-%attr(755,root,root) %{_libdir}/libxkbfile.so.*.*
-%attr(755,root,root) %{_libdir}/libxkbui.so.*.*
-%attr(755,root,root) %{_libdir}/libxrx.so.*.*
-
-%files modules
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/xkbcomp
-%{_libdir}/X11/xkb
-%{_sysconfdir}/X11/xkb
-/var/lib/xkb
-%dir %{_libdir}/modules
-%dir %{_libdir}/modules/dri
-%dir %{_libdir}/modules/drivers
-%ifnarch sparc sparc64 ppc
-%{_libdir}/modules/*.uc
-%endif
-%attr(755,root,root) %{_libdir}/modules/*.a
-%attr(755,root,root) %{_libdir}/modules/codeconv
-%attr(755,root,root) %{_libdir}/modules/drivers/linux
-%ifarch %{ix86} sparc sparc64 alpha ppc arm
-%attr(755,root,root) %{_libdir}/modules/drivers/vga_drv.o
-%endif
-%ifarch %{ix86} sparc sparc64
-%attr(755,root,root) %{_libdir}/modules/drivers/vesa_drv.o
-%endif
-%dir %{_libdir}/modules/extensions
-%attr(755,root,root) %{_libdir}/modules/extensions/libdbe.a
-%attr(755,root,root) %{_libdir}/modules/extensions/libdri.a
-%attr(755,root,root) %{_libdir}/modules/extensions/libextmod.a
-%attr(755,root,root) %{_libdir}/modules/extensions/librecord.a
-%attr(755,root,root) %{_libdir}/modules/extensions/libxtrap.a
-%attr(755,root,root) %{_libdir}/modules/fonts
-%attr(755,root,root) %{_libdir}/modules/input
-%attr(755,root,root) %{_libdir}/modules/linux
-%attr(755,root,root) %{_libdir}/X11/xserver
-%dir /etc/X11/xserver
-/etc/X11/xserver/SecurityPolicy
-#%%{_mandir}/man1/xtr*
-%{_mandir}/man1/xkbcomp.1*
-%{_mandir}/man4/citron*
-%{_mandir}/man4/dmc.4*
-%{_mandir}/man4/dynapro*
-%{_mandir}/man4/fpit.4*
-%{_mandir}/man4/js_x.4*
-%{_mandir}/man4/kbd.4*
-%{_mandir}/man4/keyboard*
-%{_mandir}/man4/microtouch*
-%{_mandir}/man4/mouse-x.4*
-%{_mandir}/man4/palmax.4*
-%{_mandir}/man4/penmount.4*
-%{_mandir}/man4/tek4957.4*
-%{_mandir}/man4/v4l*
-%ifarch %{ix86} sparc sparc64 alpha ppc arm
-%{_mandir}/man4/vga*
-%endif
-%ifarch %{ix86} sparc sparc64
-%{_mandir}/man4/vesa*
-%endif
-%{_mandir}/man4/void*
-%{_mandir}/man4/wacom*
-%{_mandir}/man4/elographics*
-%{_mandir}/man4/mutouch*
-
-%files setup
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/pcitweak
-%ifnarch ppc
-%attr(755,root,root) %{_bindir}/scanpci
-%endif
-%attr(755,root,root) %{_bindir}/xf86cfg
-%attr(755,root,root) %{_bindir}/xf86config
-%{_appdefsdir}/XF86Cfg
-%ifnarch ppc
-%{_mandir}/man1/scanpci.1*
-%endif
-%{_mandir}/man1/pcitweak.1*
-%{_mandir}/man1/xf86cfg.1*
-%{_mandir}/man1/xf86config.1*
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libFS.a
-%{_libdir}/libI810XvMC.a
-%{_libdir}/libICE.a
-%{_libdir}/libSM.a
-%{_libdir}/libX11.a
-%{_libdir}/libXRes.a
-%{_libdir}/libXTrap.a
-%{_libdir}/libXaw.a
-%{_libdir}/libXext.a
-%{_libdir}/libXfont.a
-%{_libdir}/libXfontcache.a
-%{_libdir}/libXi.a
-%{_libdir}/libXinerama.a
-%{_libdir}/libXmu.a
-%{_libdir}/libXmuu.a
-%{_libdir}/libXp.a
-%{_libdir}/libXpm.a
-%{_libdir}/libXrandr.a
-%{_libdir}/libXss.a
-%{_libdir}/libXt.a
-%{_libdir}/libXtst.a
-%{_libdir}/libXv.a
-%{_libdir}/libXvMC.a
-%{_libdir}/libXxf86dga.a
-%{_libdir}/libXxf86misc.a
-%{_libdir}/libXxf86rush.a
-%{_libdir}/libXxf86vm.a
-%{_libdir}/libfontenc.a
-%{_libdir}/libxkbfile.a
-%{_libdir}/libxkbui.a
-
-%files tools
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/beforelight
-%attr(755,root,root) %{_bindir}/ico
-%attr(755,root,root) %{_bindir}/listres
-%attr(755,root,root) %{_bindir}/showfont
-%attr(755,root,root) %{_bindir}/viewres
-%attr(755,root,root) %{_bindir}/x11perf
-%attr(755,root,root) %{_bindir}/x11perfcomp
-%attr(755,root,root) %{_bindir}/xbiff
-%attr(755,root,root) %{_bindir}/xcalc
-%attr(755,root,root) %{_bindir}/xclipboard
-%attr(755,root,root) %{_bindir}/xclock
-%attr(755,root,root) %{_bindir}/xditview
-%attr(755,root,root) %{_bindir}/xedit
-%attr(755,root,root) %{_bindir}/xev
-%attr(755,root,root) %{_bindir}/xeyes
-%attr(755,root,root) %{_bindir}/xfd
-%attr(755,root,root) %{_bindir}/xfontsel
-%attr(755,root,root) %{_bindir}/xgc
-%attr(755,root,root) %{_bindir}/xload
-%attr(755,root,root) %{_bindir}/xmag
-%attr(755,root,root) %{_bindir}/xman
-%attr(755,root,root) %{_bindir}/xmessage
-%attr(755,root,root) %{_bindir}/xmh
-%attr(755,root,root) %{_bindir}/xwininfo
-%attr(755,root,root) %{_bindir}/oclock
-%attr(755,root,root) %{_bindir}/xlogo
-%attr(755,root,root) %{_bindir}/xkill
-%attr(755,root,root) %{_bindir}/rman
-%attr(755,root,root) %{_bindir}/xtrap*
-%attr(755,root,root) %{_bindir}/texteroids
-%{_libdir}/X11/xedit
-%{_libdir}/X11/xman.help
-%{_mandir}/man1/beforelight.1*
-%{_mandir}/man1/ico.1*
-%{_mandir}/man1/listres.1*
-%{_mandir}/man1/showfont.1*
-%{_mandir}/man1/viewres.1*
-%{_mandir}/man1/x11perf.1*
-%{_mandir}/man1/x11perfcomp.1*
-%{_mandir}/man1/xbiff.1*
-%{_mandir}/man1/xcalc.1*
-%{_mandir}/man1/xclipboard.1*
-%{_mandir}/man1/xclock.1*
-%{_mandir}/man1/xditview.1*
-%{_mandir}/man1/xedit.1*
-%{_mandir}/man1/xev.1*
-%{_mandir}/man1/xeyes.1*
-%{_mandir}/man1/xfd.1*
-%{_mandir}/man1/xfontsel.1*
-%{_mandir}/man1/xgc.1*
-%{_mandir}/man1/xload.1*
-%{_mandir}/man1/xmag.1*
-%{_mandir}/man1/xman.1*
-%{_mandir}/man1/xmessage.1*
-%{_mandir}/man1/xmh.1*
-%{_mandir}/man1/xwininfo.1*
-%{_mandir}/man1/xkill.1*
-%{_mandir}/man1/xlogo.1*
-%{_mandir}/man1/oclock.1*
-%{_mandir}/man1/rman.1*
-%{_mandir}/man1/xtr*
-%{_mandir}/man1/texteroids.1*
-
-%lang(it) %{_mandir}/it/man1/xload.1*
-
-%lang(pl) %{_mandir}/pl/man1/rman.1*
-
-%{_appdefsdir}/Beforelight
-%{_appdefsdir}/Bitmap
-%{_appdefsdir}/Bitmap-color
-%{_appdefsdir}/Clock-color
-%{_appdefsdir}/Editres
-%{_appdefsdir}/Editres-color
-%{_appdefsdir}/Viewres
-%{_appdefsdir}/XConsole
-%{_appdefsdir}/Xedit
-%{_appdefsdir}/Xedit-color
-%{_appdefsdir}/Xfd
-%{_appdefsdir}/Xgc
-%{_appdefsdir}/Xmag
-%{_appdefsdir}/Xman
-%{_appdefsdir}/Xmessage
-%{_appdefsdir}/Xmessage-color
-%{_appdefsdir}/Xmh
-%{_appdefsdir}/XFontSel
-%{_appdefsdir}/Xditview
-%{_appdefsdir}/Xditview-chrtr
-
-%{_desktopdir}/oclock.desktop
-%{_desktopdir}/xcalc.desktop
-%{_desktopdir}/xclipboard.desktop
-%{_desktopdir}/xclock.desktop
-%{_desktopdir}/xedit.desktop
-%{_desktopdir}/xeyes.desktop
-%{_desktopdir}/xload.desktop
-%{_desktopdir}/xmag.desktop
-%{_pixmapsdir}/oclock.png
-%{_pixmapsdir}/xcalc.png
-%{_pixmapsdir}/xclipboard.png
-%{_pixmapsdir}/xclock.png
-%{_pixmapsdir}/xedit.png
-%{_pixmapsdir}/xeyes.png
-%{_pixmapsdir}/xload.png
-%{_pixmapsdir}/xmag.png
-
-%files -n XcursorTheme-handhelds
-%defattr(644,root,root,755)
-%{_iconsdir}/handhelds
-
-%files -n XcursorTheme-redglass
-%defattr(644,root,root,755)
-%{_iconsdir}/redglass
-
-%files -n XcursorTheme-whiteglass
-%defattr(644,root,root,755)
-%{_iconsdir}/whiteglass
-
-%files -n imake
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/ccmakedep
-%attr(755,root,root) %{_bindir}/cleanlinks
-%attr(755,root,root) %{_bindir}/gccmakedep
-%attr(755,root,root) %{_bindir}/imake
-%attr(755,root,root) %{_bindir}/makedepend
-%attr(755,root,root) %{_bindir}/xmkmf
-
-%{_mandir}/man1/imake.1*
-%{_mandir}/man1/ccmakedep.1*
-%{_mandir}/man1/cleanlinks.1*
-%{_mandir}/man1/gccmakedep.1*
-%{_mandir}/man1/makedepend.1*
-%{_mandir}/man1/xmkmf.1*
-
-%files -n sessreg
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/sessreg
-%{_mandir}/man1/sessreg.1*
-
-%files -n twm
-%defattr(644,root,root,755)
-%{_wmpropsdir}/twm.desktop
-%{_xsessdir}/twm.desktop
-%attr(755,root,root) %{_bindir}/twm
-%dir %{_sysconfdir}/X11/twm
-%config %{_sysconfdir}/X11/twm/system.twmrc
-%attr(755,root,root) %{_libdir}/X11/twm
-%{_mandir}/man1/twm.1*
-
-%files -n xauth
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/xauth
-%{_mandir}/man1/xauth.1*
-
-%files -n xdm
-%defattr(644,root,root,755)
-%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/xdm
-%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.xdm
-%attr(754,root,root) /etc/rc.d/init.d/xdm
-%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/xdm
-/var/lib/xdm
-
-%{_appdefsdir}/Chooser
-
-%attr(755,root,root) %{_libdir}/X11/xdm
-%attr(755,root,root) %{_bindir}/xdm
-%attr(755,root,root) %{_bindir}/chooser
-%{_mandir}/man1/xdm.1*
-
-%dir /etc/X11/xdm
-%attr(755,root,root) %config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/GiveConsole
-%attr(755,root,root) %config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/TakeConsole
-%attr(755,root,root) %config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/Xsession
-%attr(755,root,root) %config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/Xsetup_0
-%attr(755,root,root) %config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/Xwilling
-%config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/Xaccess
-%config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/Xresources
-%config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/Xservers
-%config(noreplace) %verify(not size mtime md5) /etc/X11/xdm/xdm-config
-/etc/X11/xdm/pixmaps
-/etc/X11/xdm/authdir
-
-%files -n xfs
-%defattr(644,root,root,755)
-%attr(754,root,root) /etc/rc.d/init.d/xfs
-%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/xfs
-%dir %{_sysconfdir}/X11/fs
-%attr(755,root,root) %{_libdir}/X11/fs
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/X11/fs/config
-
-%attr(755,root,root) %{_bindir}/xfs
-%attr(755,root,root) %{_bindir}/fslsfonts
-%attr(755,root,root) %{_bindir}/fstobdf
-%attr(755,root,root) %{_bindir}/mkcfm
-%attr(755,root,root) %{_bindir}/xfsinfo
-
-%{_mandir}/man1/xfs.1*
-%{_mandir}/man1/fslsfonts.1*
-%{_mandir}/man1/fstobdf.1*
-%{_mandir}/man1/mkcfm.1*
-%{_mandir}/man1/xfsinfo.1*
+++ /dev/null
-NXTerm.JoinSession: False
-*SimpleMenu*BackingStore: NotUseful
-*SimpleMenu*menuLabel.font: -misc-*-*-*-*-*-15-*-*-*-*-*-*-2
-*SimpleMenu*menuLabel.vertSpace: 100
-*SimpleMenu*HorizontalMargins: 16
-*SimpleMenu*Sme.height: 16
-*SimpleMenu*Cursor: left_ptr
-*saveLines: 1500
-*eightBitInput: True
-*scrollBar: True
-*fullCursor: True
-*reverseWrap: True
-*titleBar: True
-*dynamicColors: True
-
-! Kolory
-*XTerm*cursorColor: blue
-*XTerm*cursorBlink: yes
-*XTerm*background: black
-*XTerm*foreground: white
-*XTerm*SimpleMenu.background: #00aaff
-*XTerm*SimpleMenu.foreground: black
-
-! *VT100.geometry: 100x40
-*VT100*colorULMode: on
-*VT100*underLine: on
-*VT100*colorBDMode: on
-
-*VT100*color0: black
-*VT100*color1: red3
-*VT100*color2: green3
-*VT100*color3: yellow3
-*VT100*color4: blue3
-*VT100*color5: magenta3
-*VT100*color6: cyan3
-*VT100*color7: gray90
-*VT100*color8: gray30
-*VT100*color9: red
-*VT100*color10: green
-*VT100*color11: yellow
-*VT100*color12: blue
-*VT100*color13: magenta
-*VT100*color14: cyan
-*VT100*color15: white
-*VT100*colorBD: white
-*VT100*colorUL: green
-
-*mainMenu.Label: Opcje g³ówne
-*mainMenu*securekbd*Label: Zabezpiecz klawiaturê
-*mainMenu*allowsends*Label: Allow SendEvents
-*mainMenu*logging*Label: Log to File
-*mainMenu*redraw*Label: Od¶wie¿ zawarto¶æ okna
-*mainMenu*suspend*Label: Wy¶lij sygna³ STOP
-*mainMenu*continue*Label: Wy¶lij sygna³ CONT
-*mainMenu*interrupt*Label: Wy¶lij sygna³ INT
-*mainMenu*hangup*Label: Wy¶lij sygna³ HUP
-*mainMenu*terminate*Label: Wy¶lij sygna³ TERM
-*mainMenu*kill*Label: Wy¶lij sygna³ KILL
-*mainMenu*quit*Label: Koniec
-*mainMenu*eightBit*Label: 8-Bit Controls
-
-*vtMenu.Label: Opcje terminala
-*vtMenu*scrollbar*Label: W³±cz pasek przewijania
-*vtMenu*jumpscroll*Label: Enable Jump Scroll
-*vtMenu*reversevideo*Label: Zamieñ kolory t³a i fontu
-*vtMenu*autowrap*Label: Enable Auto Wraparound
-*vtMenu*reversewrap*Label: Enable Reverse Wraparound
-*vtMenu*autolinefeed*Label: Enable Auto Linefeed
-*vtMenu*appcursor*Label: W³acz dla aplikacji klawiaturê kursorów
-*vtMenu*appkeypad*Label: W³acz dla aplikacji klawiaturê numeryczn±
-*vtMenu*scrollkey*Label: Przewijaj w dó³ po naci¶niêciu klawisza
-*vtMenu*scrollttyoutput*Label: Przewijaj w dó³ po dowolnej akcji terminala
-*vtMenu*allow132*Label: Zezwól na prze³±czanie 80/132 kolumn
-*vtMenu*cursesemul*Label: W³acz emulacjê kursora
-*vtMenu*visualbell*Label: W³±cz sygna³ wizualny
-*vtMenu*marginbell*Label: Enable Margin Bell
-*vtMenu*altscreen*Label: Show Alternate Screen
-*vtMenu*softreset*Label: Wykonaj miekki reset
-*vtMenu*hardreset*Label: Wykonaj pe³ny reset
-*vtMenu*clearsavedlines*Label: Reset i wyczyszcznie bufora terminala
-*vtMenu*tekshow*Label: Poka¿ okno Tektronic
-*vtMenu*tekmode*Label: Prze³±cz w tryb Tek
-*vtMenu*vthide*Label: Ukryj okno terminala
-
-*font: -misc-*-bold-*-*-*-15-*-*-*-*-*-*-2
-
-*fontMenu.Label: Font terminala
-*fontMenu*fontdefault*Label: Domy¶lny (iso-8859-2)
-#VT100*font: -misc-*-bold-*-*-*-15-*-*-*-*-*-*-2
-*fontMenu*font1*Label: Nieczytelny
-*VT100*font1: nil2
-*fontMenu*font2*Label: Bardzo ma³y
-*VT100*font2: 5x7
-*fontMenu*font3*Label: Ma³y
-*VT100*font3: 6x10
-*fontMenu*font4*Label: ¦redni
-*VT100*font4: 7x13
-*fontMenu*font5*Label: Du¿y (iso-8859-2)
-*VT100*font5: -misc-*-medium-*-*-*-15-*-*-*-*-*-*-2
-*fontMenu*font6*Label: Bardzo du¿y (iso-8859-2)
-*VT100*font6: -misc-*-medium-*-*-*-20-*-*-*-*-*-*-2
-*fontMenu*fontescape*Label: Escape Sequence
-*fontMenu*fontsel*Label: Zaznaczony
-!fontescape and fontsel overridden by application
-
-*visualBell: off
-*tekMenu.Label: Opcje terminala Tektronix
-*tekMenu*tektextlarge*Label: Large Characters
-*tekMenu*tektext2*Label: #2 Size Characters
-*tekMenu*tektext3*Label: #3 Size Characters
-*tekMenu*tektextsmall*Label: Small Characters
-*tekMenu*tekpage*Label: PAGE
-*tekMenu*tekreset*Label: RESET
-*tekMenu*tekcopy*Label: COPY
-*tekMenu*vtshow*Label: Poka¿ okno terminala
-*tekMenu*vtmode*Label: Prze³±cz na tryb terminala
-*tekMenu*tekhide*Label: Ukryj okno Tektronic
-
-*tek4014*fontLarge: 9x15
-*tek4014*font2: 8x13
-*tek4014*font3: 6x13
-*tek4014*fontSmall: 6x10
-
-! This file causes when loaded using xrdb correct behaviour of xterm
-! if you are using enclosed xterm.tcap and xterm.ti.
-! Some keys would never normally work if they weren't here (like Alt
-! something), some key definitions differ from one termcap/terminfo
-! to the other. You may delete any line if you find out that mc
-! sends exactly that string which is mentioned here.
-! See xterm(1).
-! Either put this into your ~/.Xdefaults, or to app-defaults/XTerm
-! or wherever it will be loaded into xrm from.
-! To know, why this works, see Xt documentation (appendix B).
-! On some systems you may want to replace the a (alt) modifiers with
-! m (meta) modifier in front of some <Key> events.
-*vt100.translations: #override \
- Alt Ctrl<Btn4Down>: string(0x1b) string("OA")\n\
- Alt Ctrl<Btn5Down>: string(0x1b) string("OB")\n\
- Alt<Btn4Down>: string(0x1b) string("OA") string(0x1b) string("OA") string(0x1b) string("OA") string(0x1b) string("OA") string(0x1b) string("OA")\n\
- Alt<Btn5Down>: string(0x1b) string("OB") string(0x1b) string("OB") string(0x1b) string("OB") string(0x1b) string("OB") string(0x1b) string("OB")\n\
- Shift<Btn4Down>: scroll-back(1,page)\n\
- Shift<Btn5Down>: scroll-forw(1,page)\n\
- Ctrl<Btn4Down>: scroll-back(1,line)\n\
- Ctrl<Btn5Down>:scroll-forw(1,line)\n\
- <Btn4Down>: scroll-back(5,line)\n\
- <Btn5Down>: scroll-forw(5,line)\n\
- @Num_Lock<Key>KP_0: string(0)\n\
- @Num_Lock<Key>KP_1: string(1)\n\
- @Num_Lock<Key>KP_2: string(2)\n\
- @Num_Lock<Key>KP_3: string(3)\n\
- @Num_Lock<Key>KP_4: string(4)\n\
- @Num_Lock<Key>KP_5: string(5)\n\
- @Num_Lock<Key>KP_6: string(6)\n\
- @Num_Lock<Key>KP_7: string(7)\n\
- @Num_Lock<Key>KP_8: string(8)\n\
- @Num_Lock<Key>KP_9: string(9)\n\
- @Num_Lock<Key>KP_Add: string(+)\n\
- @Num_Lock<Key>KP_Decimal: string(.)\n\
- @Num_Lock<Key>KP_Divide: string(/)\n\
- @Num_Lock<Key>KP_Enter: string(\015)\n\
- @Num_Lock<Key>KP_Equal: string(=)\n\
- @Num_Lock<Key>KP_Multiply: string(*)\n\
- @Num_Lock<Key>KP_Subtract: string(-)\n\
- <Key>KP_Add: string(+)\n\
- <Key>KP_Divide: string(/)\n\
- <Key>KP_Enter: string(\015)\n\
- <Key>KP_Equal: string(=)\n\
- <Key>KP_Multiply: string(*)\n\
- <Key>KP_Subtract: string(-)\n\
- Shift<Key>KP_Home: scroll-back(100,page)\n\
- Shift<Key>KP_End: scroll-forw(100,page)\n\
- <Key>KP_Home: string(0x1b) string("[1~")\n\
- <Key>KP_End: string(0x1b) string("[4~")\n\
- Shift<Key>Prior:scroll-back(1,page)\n\
- Shift<Key>Next:scroll-forw(1,page)\n\
- <Key>F16: start-extend() select-end(PRIMARY, CUT_BUFFER0, CLIPBOARD)\n\
- <Key>F18: insert-selection(PRIMARY, CLIPBOARD)\n\
- <Key>F27: scroll-back(100,page)\n\
- <Key>R13: scroll-forw(100,page)\n\
- Ctrl<Key>Home: string(0x1b) string("[1;5H")\n\
- Shift<Key>Home: string(0x1b) string("[1;2H")\n\
- ~Meta<Key>Home: string(0x1b) string("[1~")\n\
- Meta<Key>Home: string(0x1b) string(0x1b) string("[1~")\n\
- Ctrl<Key>End: string(0x1b) string("[1;5F")\n\
- Shift<Key>End: string(0x1b) string("[1;2F")\n\
- ~Meta<Key>End: string(0x1b) string("[4~")\n\
- Meta<Key>End: string(0x1b) string(0x1b) string("[4~")\n\
- Ctrl<Key>Insert: string(0x1b) string("[2;5~")\n\
- Shift<Key>Insert: string(0x1b) string("[2;2~")\n\
- ~Meta<Key>Insert: string(0x1b) string("[2~")\n\
- Meta<Key>Insert: string(0x1b) string(0x1b) string("[2~")\n\
- Ctrl<Key>Delete: string(0x1b) string("[3;5~")\n\
- Shift<Key>Delete: string(0x1b) string("[3;2~")\n\
- ~Meta<Key>Delete: string(0x1b) string("[3~")\n\
- Meta<Key>Delete: string(0x1b) string(0x1b) string("[3~")\n\
- Ctrl<Key>Page_Up: string(0x1b) string("[5;5~")\n\
- ~Meta<Key>Page_Up: string(0x1b) string("[5~")\n\
- Meta<Key>Page_Up: string(0x1b) string(0x1b) string("[5~")\n\
- Ctrl<Key>Page_Down: string(0x1b) string("[6;5~")\n\
- ~Meta<Key>Page_Down: string(0x1b) string("[6~")\n\
- Meta<Key>Page_Down: string(0x1b) string(0x1b) string("[6~")\n\
- ~Meta<Key>BackSpace: string(0x08)\n\
- Meta<Key>BackSpace: string(0x1b) string(0x08)\n\
- Ctrl<Key>Up: string(0x1b) string("[1;5A")\n\
- Shift<Key>Up: string(0x1b) string("O2A")\n\
- ~Meta<Key>Up: string(0x1b) string("OA")\n\
- Meta<Key>Up: string(0x1b) string(0x1b) string("OA")\n\
- Ctrl<Key>Down: string(0x1b) string("[1;5B")\n\
- Shift<Key>Down: string(0x1b) string("O2B")\n\
- ~Meta<Key>Down: string(0x1b) string("OB")\n\
- Meta<Key>Down: string(0x1b) string(0x1b) string("OB")\n\
- Ctrl<Key>Left: string(0x1b) string("[1;5D")\n\
- Shift<Key>Left: string(0x1b) string("O2D")\n\
- ~Meta<Key>Left: string(0x1b) string("OD")\n\
- Meta<Key>Left: string(0x1b) string(0x1b) string("OD")\n\
- Ctrl<Key>Right: string(0x1b) string("[1;5C")\n\
- Shift<Key>Right: string(0x1b) string("O2C")\n\
- ~Meta<Key>Right: string(0x1b) string("OC")\n\
- Meta<Key>Right: string(0x1b) string(0x1b) string("OC")\n\
- ~Meta<Key>Return: string(0x0d)\n\
- Meta<Key>Return: string(0x1b) string(0x0d)\n\
- ~Meta<Key>Tab: string(0x09)\n\
- Meta<Key>Tab: string(0x1b) string(0x09)\n\
- ~s<Key>F1: string(0x1b) string("[11~")\n\
- ~s<Key>F2: string(0x1b) string("[12~")\n\
- ~s<Key>F3: string(0x1b) string("[13~")\n\
- ~s<Key>F4: string(0x1b) string("[14~")\n\
- ~s<Key>F5: string(0x1b) string("[15~")\n\
- ~s<Key>F6: string(0x1b) string("[17~")\n\
- ~s<Key>F7: string(0x1b) string("[18~")\n\
- ~s<Key>F8: string(0x1b) string("[19~")\n\
- ~s<Key>F9: string(0x1b) string("[20~")\n\
- ~s<Key>F10: string(0x1b) string("[21~")\n\
- <Key>F11: string(0x1b) string("[23~")\n\
- <Key>F12: string(0x1b) string("[24~")\n\
- <Key>F13: string(0x1b) string("[25~")\n\
- <Key>F14: string(0x1b) string("[26~")\n\
- <Key>F15: string(0x1b) string("[28~")\n\
- <Key>F16: string(0x1b) string("[29~")\n\
- <Key>F17: string(0x1b) string("[31~")\n\
- <Key>F18: string(0x1b) string("[32~")\n\
- <Key>F19: string(0x1b) string("[33~")\n\
- <Key>F20: string(0x1b) string("[34~")\n\
- s<Key>F1: string(0x1b) string("[23~")\n\
- s<Key>F2: string(0x1b) string("[24~")\n\
- s<Key>F3: string(0x1b) string("[25~")\n\
- s<Key>F4: string(0x1b) string("[26~")\n\
- s<Key>F5: string(0x1b) string("[28~")\n\
- s<Key>F6: string(0x1b) string("[29~")\n\
- s<Key>F7: string(0x1b) string("[31~")\n\
- s<Key>F8: string(0x1b) string("[32~")\n\
- s<Key>F9: string(0x1b) string("[33~")\n\
- s<Key>F10: string(0x1b) string("[34~")\n\
- a<Key>Return: string(0x1b) string(0x0d)\n\
- a<Key>Tab: string(0x1b) string(0x09)\n\
- a<Key>space: string(0x1b) string(" ")\n\
- a s<Key>question: string(0x1b) string("?")\n\
- a s<Key>exclam: string(0x1b) string("!")\n\
- a<Key>1: string(0x1b) string("1")\n\
- a<Key>2: string(0x1b) string("2")\n\
- a<Key>3: string(0x1b) string("3")\n\
- a<Key>4: string(0x1b) string("4")\n\
- a<Key>5: string(0x1b) string("5")\n\
- a<Key>6: string(0x1b) string("6")\n\
- a<Key>7: string(0x1b) string("7")\n\
- a<Key>8: string(0x1b) string("8")\n\
- a<Key>9: string(0x1b) string("9")\n\
- a<Key>0: string(0x1b) string("0")\n\
- a<Key>a: string(0x1b) string("a")\n\
- a<Key>b: string(0x1b) string("b")\n\
- a<Key>c: string(0x1b) string("c")\n\
- a<Key>d: string(0x1b) string("d")\n\
- a<Key>e: string(0x1b) string("e")\n\
- a<Key>f: string(0x1b) string("f")\n\
- a<Key>g: string(0x1b) string("g")\n\
- a s<Key>h: string(0x1b) string("H")\n\
- a<Key>h: string(0x1b) string("h")\n\
- a<Key>i: string(0x1b) string("i")\n\
- a<Key>j: string(0x1b) string("j")\n\
- a<Key>k: string(0x1b) string("k")\n\
- a<Key>l: string(0x1b) string("l")\n\
- a<Key>m: string(0x1b) string("m")\n\
- a<Key>n: string(0x1b) string("n")\n\
- a<Key>o: string(0x1b) string("o")\n\
- a<Key>p: string(0x1b) string("p")\n\
- a<Key>q: string(0x1b) string("q")\n\
- a<Key>r: string(0x1b) string("r")\n\
- a<Key>s: string(0x1b) string("s")\n\
- a<Key>t: string(0x1b) string("t")\n\
- a<Key>u: string(0x1b) string("u")\n\
- a<Key>v: string(0x1b) string("v")\n\
- a<Key>w: string(0x1b) string("w")\n\
- a<Key>x: string(0x1b) string("x")\n\
- a<Key>y: string(0x1b) string("y")\n\
- a<Key>z: string(0x1b) string("z")
+++ /dev/null
-#ifndef __glext_h_
-#define __glext_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** License Applicability. Except to the extent portions of this file are
-** made subject to an alternative license as permitted in the SGI Free
-** Software License B, Version 1.1 (the "License"), the contents of this
-** file are subject only to the provisions of the License. You may not use
-** this file except in compliance with the License. You may obtain a copy
-** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
-** http://oss.sgi.com/projects/FreeB
-**
-** Note that, as provided in the License, the Software is distributed on an
-** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
-** Original Code. The Original Code is: OpenGL Sample Implementation,
-** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2002 Silicon Graphics, Inc.
-** Copyright in any portions created by third parties is as indicated
-** elsewhere herein. All Rights Reserved.
-**
-** Additional Notice Provisions: This software was created using the
-** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
-** not been independently verified as being compliant with the OpenGL(R)
-** version 1.2.1 Specification.
-*/
-
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-/*************************************************************/
-
-/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2003/5/9 */
-/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define GL_GLEXT_VERSION 18
-
-#ifndef GL_VERSION_1_2
-#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_TEXTURE_BINDING_3D 0x806A
-#define GL_PACK_SKIP_IMAGES 0x806B
-#define GL_PACK_IMAGE_HEIGHT 0x806C
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_PROXY_TEXTURE_3D 0x8070
-#define GL_TEXTURE_DEPTH 0x8071
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_BGR 0x80E0
-#define GL_BGRA 0x80E1
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
-#define GL_SINGLE_COLOR 0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#endif
-
-#ifndef GL_ARB_imaging
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_FUNC_ADD 0x8006
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_BLEND_EQUATION 0x8009
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_CONVOLUTION_1D 0x8010
-#define GL_CONVOLUTION_2D 0x8011
-#define GL_SEPARABLE_2D 0x8012
-#define GL_CONVOLUTION_BORDER_MODE 0x8013
-#define GL_CONVOLUTION_FILTER_SCALE 0x8014
-#define GL_CONVOLUTION_FILTER_BIAS 0x8015
-#define GL_REDUCE 0x8016
-#define GL_CONVOLUTION_FORMAT 0x8017
-#define GL_CONVOLUTION_WIDTH 0x8018
-#define GL_CONVOLUTION_HEIGHT 0x8019
-#define GL_MAX_CONVOLUTION_WIDTH 0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
-#define GL_HISTOGRAM 0x8024
-#define GL_PROXY_HISTOGRAM 0x8025
-#define GL_HISTOGRAM_WIDTH 0x8026
-#define GL_HISTOGRAM_FORMAT 0x8027
-#define GL_HISTOGRAM_RED_SIZE 0x8028
-#define GL_HISTOGRAM_GREEN_SIZE 0x8029
-#define GL_HISTOGRAM_BLUE_SIZE 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
-#define GL_HISTOGRAM_SINK 0x802D
-#define GL_MINMAX 0x802E
-#define GL_MINMAX_FORMAT 0x802F
-#define GL_MINMAX_SINK 0x8030
-#define GL_TABLE_TOO_LARGE 0x8031
-#define GL_COLOR_MATRIX 0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
-#define GL_COLOR_TABLE 0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
-#define GL_PROXY_COLOR_TABLE 0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-#define GL_COLOR_TABLE_SCALE 0x80D6
-#define GL_COLOR_TABLE_BIAS 0x80D7
-#define GL_COLOR_TABLE_FORMAT 0x80D8
-#define GL_COLOR_TABLE_WIDTH 0x80D9
-#define GL_COLOR_TABLE_RED_SIZE 0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
-#define GL_CONSTANT_BORDER 0x8151
-#define GL_REPLICATE_BORDER 0x8153
-#define GL_CONVOLUTION_BORDER_COLOR 0x8154
-#endif
-
-#ifndef GL_VERSION_1_3
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_MULTISAMPLE_BIT 0x20000000
-#define GL_NORMAL_MAP 0x8511
-#define GL_REFLECTION_MAP 0x8512
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_COMPRESSED_ALPHA 0x84E9
-#define GL_COMPRESSED_LUMINANCE 0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
-#define GL_COMPRESSED_INTENSITY 0x84EC
-#define GL_COMPRESSED_RGB 0x84ED
-#define GL_COMPRESSED_RGBA 0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-#define GL_TEXTURE_COMPRESSED 0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_CLAMP_TO_BORDER 0x812D
-#define GL_CLAMP_TO_BORDER_SGIS 0x812D
-#define GL_COMBINE 0x8570
-#define GL_COMBINE_RGB 0x8571
-#define GL_COMBINE_ALPHA 0x8572
-#define GL_SOURCE0_RGB 0x8580
-#define GL_SOURCE1_RGB 0x8581
-#define GL_SOURCE2_RGB 0x8582
-#define GL_SOURCE0_ALPHA 0x8588
-#define GL_SOURCE1_ALPHA 0x8589
-#define GL_SOURCE2_ALPHA 0x858A
-#define GL_OPERAND0_RGB 0x8590
-#define GL_OPERAND1_RGB 0x8591
-#define GL_OPERAND2_RGB 0x8592
-#define GL_OPERAND0_ALPHA 0x8598
-#define GL_OPERAND1_ALPHA 0x8599
-#define GL_OPERAND2_ALPHA 0x859A
-#define GL_RGB_SCALE 0x8573
-#define GL_ADD_SIGNED 0x8574
-#define GL_INTERPOLATE 0x8575
-#define GL_SUBTRACT 0x84E7
-#define GL_CONSTANT 0x8576
-#define GL_PRIMARY_COLOR 0x8577
-#define GL_PREVIOUS 0x8578
-#define GL_DOT3_RGB 0x86AE
-#define GL_DOT3_RGBA 0x86AF
-#endif
-
-#ifndef GL_VERSION_1_4
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_POINT_SIZE_MIN 0x8126
-#define GL_POINT_SIZE_MAX 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
-#define GL_POINT_DISTANCE_ATTENUATION 0x8129
-#define GL_GENERATE_MIPMAP 0x8191
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_DEPTH_COMPONENT24 0x81A6
-#define GL_DEPTH_COMPONENT32 0x81A7
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_FOG_COORDINATE_SOURCE 0x8450
-#define GL_FOG_COORDINATE 0x8451
-#define GL_FRAGMENT_DEPTH 0x8452
-#define GL_CURRENT_FOG_COORDINATE 0x8453
-#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
-#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
-#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
-#define GL_FOG_COORDINATE_ARRAY 0x8457
-#define GL_COLOR_SUM 0x8458
-#define GL_CURRENT_SECONDARY_COLOR 0x8459
-#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
-#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
-#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
-#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
-#define GL_SECONDARY_COLOR_ARRAY 0x845E
-#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-#define GL_TEXTURE_FILTER_CONTROL 0x8500
-#define GL_TEXTURE_LOD_BIAS 0x8501
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_TEXTURE_DEPTH_SIZE 0x884A
-#define GL_DEPTH_TEXTURE_MODE 0x884B
-#define GL_TEXTURE_COMPARE_MODE 0x884C
-#define GL_TEXTURE_COMPARE_FUNC 0x884D
-#define GL_COMPARE_R_TO_TEXTURE 0x884E
-#endif
-
-#ifndef GL_ARB_multitexture
-#define GL_TEXTURE0_ARB 0x84C0
-#define GL_TEXTURE1_ARB 0x84C1
-#define GL_TEXTURE2_ARB 0x84C2
-#define GL_TEXTURE3_ARB 0x84C3
-#define GL_TEXTURE4_ARB 0x84C4
-#define GL_TEXTURE5_ARB 0x84C5
-#define GL_TEXTURE6_ARB 0x84C6
-#define GL_TEXTURE7_ARB 0x84C7
-#define GL_TEXTURE8_ARB 0x84C8
-#define GL_TEXTURE9_ARB 0x84C9
-#define GL_TEXTURE10_ARB 0x84CA
-#define GL_TEXTURE11_ARB 0x84CB
-#define GL_TEXTURE12_ARB 0x84CC
-#define GL_TEXTURE13_ARB 0x84CD
-#define GL_TEXTURE14_ARB 0x84CE
-#define GL_TEXTURE15_ARB 0x84CF
-#define GL_TEXTURE16_ARB 0x84D0
-#define GL_TEXTURE17_ARB 0x84D1
-#define GL_TEXTURE18_ARB 0x84D2
-#define GL_TEXTURE19_ARB 0x84D3
-#define GL_TEXTURE20_ARB 0x84D4
-#define GL_TEXTURE21_ARB 0x84D5
-#define GL_TEXTURE22_ARB 0x84D6
-#define GL_TEXTURE23_ARB 0x84D7
-#define GL_TEXTURE24_ARB 0x84D8
-#define GL_TEXTURE25_ARB 0x84D9
-#define GL_TEXTURE26_ARB 0x84DA
-#define GL_TEXTURE27_ARB 0x84DB
-#define GL_TEXTURE28_ARB 0x84DC
-#define GL_TEXTURE29_ARB 0x84DD
-#define GL_TEXTURE30_ARB 0x84DE
-#define GL_TEXTURE31_ARB 0x84DF
-#define GL_ACTIVE_TEXTURE_ARB 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
-#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
-#endif
-
-#ifndef GL_ARB_transpose_matrix
-#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
-#endif
-
-#ifndef GL_ARB_multisample
-#define GL_MULTISAMPLE_ARB 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
-#define GL_SAMPLE_COVERAGE_ARB 0x80A0
-#define GL_SAMPLE_BUFFERS_ARB 0x80A8
-#define GL_SAMPLES_ARB 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
-#define GL_MULTISAMPLE_BIT_ARB 0x20000000
-#endif
-
-#ifndef GL_ARB_texture_env_add
-#endif
-
-#ifndef GL_ARB_texture_cube_map
-#define GL_NORMAL_MAP_ARB 0x8511
-#define GL_REFLECTION_MAP_ARB 0x8512
-#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
-#endif
-
-#ifndef GL_ARB_texture_compression
-#define GL_COMPRESSED_ALPHA_ARB 0x84E9
-#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
-#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
-#define GL_COMPRESSED_RGB_ARB 0x84ED
-#define GL_COMPRESSED_RGBA_ARB 0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
-#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
-#endif
-
-#ifndef GL_ARB_texture_border_clamp
-#define GL_CLAMP_TO_BORDER_ARB 0x812D
-#endif
-
-#ifndef GL_ARB_point_parameters
-#define GL_POINT_SIZE_MIN_ARB 0x8126
-#define GL_POINT_SIZE_MAX_ARB 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
-#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
-#endif
-
-#ifndef GL_ARB_vertex_blend
-#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
-#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
-#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
-#define GL_VERTEX_BLEND_ARB 0x86A7
-#define GL_CURRENT_WEIGHT_ARB 0x86A8
-#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
-#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
-#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
-#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
-#define GL_WEIGHT_ARRAY_ARB 0x86AD
-#define GL_MODELVIEW0_ARB 0x1700
-#define GL_MODELVIEW1_ARB 0x850A
-#define GL_MODELVIEW2_ARB 0x8722
-#define GL_MODELVIEW3_ARB 0x8723
-#define GL_MODELVIEW4_ARB 0x8724
-#define GL_MODELVIEW5_ARB 0x8725
-#define GL_MODELVIEW6_ARB 0x8726
-#define GL_MODELVIEW7_ARB 0x8727
-#define GL_MODELVIEW8_ARB 0x8728
-#define GL_MODELVIEW9_ARB 0x8729
-#define GL_MODELVIEW10_ARB 0x872A
-#define GL_MODELVIEW11_ARB 0x872B
-#define GL_MODELVIEW12_ARB 0x872C
-#define GL_MODELVIEW13_ARB 0x872D
-#define GL_MODELVIEW14_ARB 0x872E
-#define GL_MODELVIEW15_ARB 0x872F
-#define GL_MODELVIEW16_ARB 0x8730
-#define GL_MODELVIEW17_ARB 0x8731
-#define GL_MODELVIEW18_ARB 0x8732
-#define GL_MODELVIEW19_ARB 0x8733
-#define GL_MODELVIEW20_ARB 0x8734
-#define GL_MODELVIEW21_ARB 0x8735
-#define GL_MODELVIEW22_ARB 0x8736
-#define GL_MODELVIEW23_ARB 0x8737
-#define GL_MODELVIEW24_ARB 0x8738
-#define GL_MODELVIEW25_ARB 0x8739
-#define GL_MODELVIEW26_ARB 0x873A
-#define GL_MODELVIEW27_ARB 0x873B
-#define GL_MODELVIEW28_ARB 0x873C
-#define GL_MODELVIEW29_ARB 0x873D
-#define GL_MODELVIEW30_ARB 0x873E
-#define GL_MODELVIEW31_ARB 0x873F
-#endif
-
-#ifndef GL_ARB_matrix_palette
-#define GL_MATRIX_PALETTE_ARB 0x8840
-#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
-#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
-#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
-#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
-#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
-#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
-#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
-#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
-#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
-#endif
-
-#ifndef GL_ARB_texture_env_combine
-#define GL_COMBINE_ARB 0x8570
-#define GL_COMBINE_RGB_ARB 0x8571
-#define GL_COMBINE_ALPHA_ARB 0x8572
-#define GL_SOURCE0_RGB_ARB 0x8580
-#define GL_SOURCE1_RGB_ARB 0x8581
-#define GL_SOURCE2_RGB_ARB 0x8582
-#define GL_SOURCE0_ALPHA_ARB 0x8588
-#define GL_SOURCE1_ALPHA_ARB 0x8589
-#define GL_SOURCE2_ALPHA_ARB 0x858A
-#define GL_OPERAND0_RGB_ARB 0x8590
-#define GL_OPERAND1_RGB_ARB 0x8591
-#define GL_OPERAND2_RGB_ARB 0x8592
-#define GL_OPERAND0_ALPHA_ARB 0x8598
-#define GL_OPERAND1_ALPHA_ARB 0x8599
-#define GL_OPERAND2_ALPHA_ARB 0x859A
-#define GL_RGB_SCALE_ARB 0x8573
-#define GL_ADD_SIGNED_ARB 0x8574
-#define GL_INTERPOLATE_ARB 0x8575
-#define GL_SUBTRACT_ARB 0x84E7
-#define GL_CONSTANT_ARB 0x8576
-#define GL_PRIMARY_COLOR_ARB 0x8577
-#define GL_PREVIOUS_ARB 0x8578
-#endif
-
-#ifndef GL_ARB_texture_env_crossbar
-#endif
-
-#ifndef GL_ARB_texture_env_dot3
-#define GL_DOT3_RGB_ARB 0x86AE
-#define GL_DOT3_RGBA_ARB 0x86AF
-#endif
-
-#ifndef GL_ARB_texture_mirrored_repeat
-#define GL_MIRRORED_REPEAT_ARB 0x8370
-#endif
-
-#ifndef GL_ARB_depth_texture
-#define GL_DEPTH_COMPONENT16_ARB 0x81A5
-#define GL_DEPTH_COMPONENT24_ARB 0x81A6
-#define GL_DEPTH_COMPONENT32_ARB 0x81A7
-#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
-#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
-#endif
-
-#ifndef GL_ARB_shadow
-#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
-#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
-#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
-#endif
-
-#ifndef GL_ARB_shadow_ambient
-#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
-#endif
-
-#ifndef GL_ARB_window_pos
-#endif
-
-#ifndef GL_ARB_vertex_program
-#define GL_COLOR_SUM_ARB 0x8458
-#define GL_VERTEX_PROGRAM_ARB 0x8620
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
-#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
-#define GL_PROGRAM_LENGTH_ARB 0x8627
-#define GL_PROGRAM_STRING_ARB 0x8628
-#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
-#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
-#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
-#define GL_CURRENT_MATRIX_ARB 0x8641
-#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
-#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
-#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
-#define GL_PROGRAM_BINDING_ARB 0x8677
-#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
-#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
-#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
-#define GL_PROGRAM_FORMAT_ARB 0x8876
-#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
-#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
-#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
-#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
-#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
-#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
-#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
-#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
-#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
-#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
-#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
-#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
-#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
-#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
-#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
-#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
-#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
-#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
-#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
-#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
-#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
-#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
-#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
-#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
-#define GL_MATRIX0_ARB 0x88C0
-#define GL_MATRIX1_ARB 0x88C1
-#define GL_MATRIX2_ARB 0x88C2
-#define GL_MATRIX3_ARB 0x88C3
-#define GL_MATRIX4_ARB 0x88C4
-#define GL_MATRIX5_ARB 0x88C5
-#define GL_MATRIX6_ARB 0x88C6
-#define GL_MATRIX7_ARB 0x88C7
-#define GL_MATRIX8_ARB 0x88C8
-#define GL_MATRIX9_ARB 0x88C9
-#define GL_MATRIX10_ARB 0x88CA
-#define GL_MATRIX11_ARB 0x88CB
-#define GL_MATRIX12_ARB 0x88CC
-#define GL_MATRIX13_ARB 0x88CD
-#define GL_MATRIX14_ARB 0x88CE
-#define GL_MATRIX15_ARB 0x88CF
-#define GL_MATRIX16_ARB 0x88D0
-#define GL_MATRIX17_ARB 0x88D1
-#define GL_MATRIX18_ARB 0x88D2
-#define GL_MATRIX19_ARB 0x88D3
-#define GL_MATRIX20_ARB 0x88D4
-#define GL_MATRIX21_ARB 0x88D5
-#define GL_MATRIX22_ARB 0x88D6
-#define GL_MATRIX23_ARB 0x88D7
-#define GL_MATRIX24_ARB 0x88D8
-#define GL_MATRIX25_ARB 0x88D9
-#define GL_MATRIX26_ARB 0x88DA
-#define GL_MATRIX27_ARB 0x88DB
-#define GL_MATRIX28_ARB 0x88DC
-#define GL_MATRIX29_ARB 0x88DD
-#define GL_MATRIX30_ARB 0x88DE
-#define GL_MATRIX31_ARB 0x88DF
-#endif
-
-#ifndef GL_ARB_fragment_program
-#define GL_FRAGMENT_PROGRAM_ARB 0x8804
-#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
-#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
-#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
-#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
-#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
-#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
-#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
-#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
-#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
-#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
-#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
-#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
-#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
-#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
-#endif
-
-#ifndef GL_ARB_vertex_buffer_object
-#define GL_BUFFER_SIZE_ARB 0x8764
-#define GL_BUFFER_USAGE_ARB 0x8765
-#define GL_ARRAY_BUFFER_ARB 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
-#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
-#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
-#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
-#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
-#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
-#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
-#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
-#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
-#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
-#define GL_READ_ONLY_ARB 0x88B8
-#define GL_WRITE_ONLY_ARB 0x88B9
-#define GL_READ_WRITE_ARB 0x88BA
-#define GL_BUFFER_ACCESS_ARB 0x88BB
-#define GL_BUFFER_MAPPED_ARB 0x88BC
-#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
-#define GL_STREAM_DRAW_ARB 0x88E0
-#define GL_STREAM_READ_ARB 0x88E1
-#define GL_STREAM_COPY_ARB 0x88E2
-#define GL_STATIC_DRAW_ARB 0x88E4
-#define GL_STATIC_READ_ARB 0x88E5
-#define GL_STATIC_COPY_ARB 0x88E6
-#define GL_DYNAMIC_DRAW_ARB 0x88E8
-#define GL_DYNAMIC_READ_ARB 0x88E9
-#define GL_DYNAMIC_COPY_ARB 0x88EA
-#endif
-
-#ifndef GL_EXT_abgr
-#define GL_ABGR_EXT 0x8000
-#endif
-
-#ifndef GL_EXT_blend_color
-#define GL_CONSTANT_COLOR_EXT 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
-#define GL_CONSTANT_ALPHA_EXT 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
-#define GL_BLEND_COLOR_EXT 0x8005
-#endif
-
-#ifndef GL_EXT_polygon_offset
-#define GL_POLYGON_OFFSET_EXT 0x8037
-#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
-#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
-#endif
-
-#ifndef GL_EXT_texture
-#define GL_ALPHA4_EXT 0x803B
-#define GL_ALPHA8_EXT 0x803C
-#define GL_ALPHA12_EXT 0x803D
-#define GL_ALPHA16_EXT 0x803E
-#define GL_LUMINANCE4_EXT 0x803F
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE12_EXT 0x8041
-#define GL_LUMINANCE16_EXT 0x8042
-#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
-#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
-#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
-#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
-#define GL_INTENSITY_EXT 0x8049
-#define GL_INTENSITY4_EXT 0x804A
-#define GL_INTENSITY8_EXT 0x804B
-#define GL_INTENSITY12_EXT 0x804C
-#define GL_INTENSITY16_EXT 0x804D
-#define GL_RGB2_EXT 0x804E
-#define GL_RGB4_EXT 0x804F
-#define GL_RGB5_EXT 0x8050
-#define GL_RGB8_EXT 0x8051
-#define GL_RGB10_EXT 0x8052
-#define GL_RGB12_EXT 0x8053
-#define GL_RGB16_EXT 0x8054
-#define GL_RGBA2_EXT 0x8055
-#define GL_RGBA4_EXT 0x8056
-#define GL_RGB5_A1_EXT 0x8057
-#define GL_RGBA8_EXT 0x8058
-#define GL_RGB10_A2_EXT 0x8059
-#define GL_RGBA12_EXT 0x805A
-#define GL_RGBA16_EXT 0x805B
-#define GL_TEXTURE_RED_SIZE_EXT 0x805C
-#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
-#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
-#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
-#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
-#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
-#define GL_REPLACE_EXT 0x8062
-#define GL_PROXY_TEXTURE_1D_EXT 0x8063
-#define GL_PROXY_TEXTURE_2D_EXT 0x8064
-#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
-#endif
-
-#ifndef GL_EXT_texture3D
-#define GL_PACK_SKIP_IMAGES_EXT 0x806B
-#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
-#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
-#define GL_TEXTURE_3D_EXT 0x806F
-#define GL_PROXY_TEXTURE_3D_EXT 0x8070
-#define GL_TEXTURE_DEPTH_EXT 0x8071
-#define GL_TEXTURE_WRAP_R_EXT 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
-#endif
-
-#ifndef GL_SGIS_texture_filter4
-#define GL_FILTER4_SGIS 0x8146
-#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
-#endif
-
-#ifndef GL_EXT_subtexture
-#endif
-
-#ifndef GL_EXT_copy_texture
-#endif
-
-#ifndef GL_EXT_histogram
-#define GL_HISTOGRAM_EXT 0x8024
-#define GL_PROXY_HISTOGRAM_EXT 0x8025
-#define GL_HISTOGRAM_WIDTH_EXT 0x8026
-#define GL_HISTOGRAM_FORMAT_EXT 0x8027
-#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
-#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
-#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
-#define GL_HISTOGRAM_SINK_EXT 0x802D
-#define GL_MINMAX_EXT 0x802E
-#define GL_MINMAX_FORMAT_EXT 0x802F
-#define GL_MINMAX_SINK_EXT 0x8030
-#define GL_TABLE_TOO_LARGE_EXT 0x8031
-#endif
-
-#ifndef GL_EXT_convolution
-#define GL_CONVOLUTION_1D_EXT 0x8010
-#define GL_CONVOLUTION_2D_EXT 0x8011
-#define GL_SEPARABLE_2D_EXT 0x8012
-#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
-#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
-#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
-#define GL_REDUCE_EXT 0x8016
-#define GL_CONVOLUTION_FORMAT_EXT 0x8017
-#define GL_CONVOLUTION_WIDTH_EXT 0x8018
-#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
-#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
-#endif
-
-#ifndef GL_SGI_color_matrix
-#define GL_COLOR_MATRIX_SGI 0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
-#endif
-
-#ifndef GL_SGI_color_table
-#define GL_COLOR_TABLE_SGI 0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
-#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
-#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
-#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
-#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
-#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
-#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
-#endif
-
-#ifndef GL_SGIS_pixel_texture
-#define GL_PIXEL_TEXTURE_SGIS 0x8353
-#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
-#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
-#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
-#endif
-
-#ifndef GL_SGIX_pixel_texture
-#define GL_PIXEL_TEX_GEN_SGIX 0x8139
-#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
-#endif
-
-#ifndef GL_SGIS_texture4D
-#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
-#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
-#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
-#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
-#define GL_TEXTURE_4D_SGIS 0x8134
-#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
-#define GL_TEXTURE_4DSIZE_SGIS 0x8136
-#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
-#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
-#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
-#endif
-
-#ifndef GL_SGI_texture_color_table
-#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
-#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
-#endif
-
-#ifndef GL_EXT_cmyka
-#define GL_CMYK_EXT 0x800C
-#define GL_CMYKA_EXT 0x800D
-#define GL_PACK_CMYK_HINT_EXT 0x800E
-#define GL_UNPACK_CMYK_HINT_EXT 0x800F
-#endif
-
-#ifndef GL_EXT_texture_object
-#define GL_TEXTURE_PRIORITY_EXT 0x8066
-#define GL_TEXTURE_RESIDENT_EXT 0x8067
-#define GL_TEXTURE_1D_BINDING_EXT 0x8068
-#define GL_TEXTURE_2D_BINDING_EXT 0x8069
-#define GL_TEXTURE_3D_BINDING_EXT 0x806A
-#endif
-
-#ifndef GL_SGIS_detail_texture
-#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
-#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
-#define GL_LINEAR_DETAIL_SGIS 0x8097
-#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
-#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
-#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
-#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
-#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
-#endif
-
-#ifndef GL_SGIS_sharpen_texture
-#define GL_LINEAR_SHARPEN_SGIS 0x80AD
-#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
-#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
-#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
-#endif
-
-#ifndef GL_EXT_packed_pixels
-#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
-#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
-#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
-#endif
-
-#ifndef GL_SGIS_texture_lod
-#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
-#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
-#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
-#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
-#endif
-
-#ifndef GL_SGIS_multisample
-#define GL_MULTISAMPLE_SGIS 0x809D
-#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
-#define GL_SAMPLE_MASK_SGIS 0x80A0
-#define GL_1PASS_SGIS 0x80A1
-#define GL_2PASS_0_SGIS 0x80A2
-#define GL_2PASS_1_SGIS 0x80A3
-#define GL_4PASS_0_SGIS 0x80A4
-#define GL_4PASS_1_SGIS 0x80A5
-#define GL_4PASS_2_SGIS 0x80A6
-#define GL_4PASS_3_SGIS 0x80A7
-#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
-#define GL_SAMPLES_SGIS 0x80A9
-#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
-#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
-#define GL_SAMPLE_PATTERN_SGIS 0x80AC
-#endif
-
-#ifndef GL_EXT_rescale_normal
-#define GL_RESCALE_NORMAL_EXT 0x803A
-#endif
-
-#ifndef GL_EXT_vertex_array
-#define GL_VERTEX_ARRAY_EXT 0x8074
-#define GL_NORMAL_ARRAY_EXT 0x8075
-#define GL_COLOR_ARRAY_EXT 0x8076
-#define GL_INDEX_ARRAY_EXT 0x8077
-#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
-#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
-#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
-#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
-#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
-#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
-#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
-#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
-#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
-#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
-#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
-#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
-#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
-#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
-#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
-#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
-#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
-#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
-#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
-#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
-#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
-#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
-#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
-#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
-#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
-#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
-#endif
-
-#ifndef GL_EXT_misc_attribute
-#endif
-
-#ifndef GL_SGIS_generate_mipmap
-#define GL_GENERATE_MIPMAP_SGIS 0x8191
-#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
-#endif
-
-#ifndef GL_SGIX_clipmap
-#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
-#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
-#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
-#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
-#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
-#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
-#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
-#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
-#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
-#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
-#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
-#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
-#endif
-
-#ifndef GL_SGIX_shadow
-#define GL_TEXTURE_COMPARE_SGIX 0x819A
-#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
-#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
-#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
-#endif
-
-#ifndef GL_SGIS_texture_edge_clamp
-#define GL_CLAMP_TO_EDGE_SGIS 0x812F
-#endif
-
-#ifndef GL_EXT_blend_minmax
-#define GL_FUNC_ADD_EXT 0x8006
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#define GL_BLEND_EQUATION_EXT 0x8009
-#endif
-
-#ifndef GL_EXT_blend_subtract
-#define GL_FUNC_SUBTRACT_EXT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
-#endif
-
-#ifndef GL_EXT_blend_logic_op
-#endif
-
-#ifndef GL_SGIX_interlace
-#define GL_INTERLACE_SGIX 0x8094
-#endif
-
-#ifndef GL_SGIX_pixel_tiles
-#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
-#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
-#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
-#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
-#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
-#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
-#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
-#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
-#endif
-
-#ifndef GL_SGIS_texture_select
-#define GL_DUAL_ALPHA4_SGIS 0x8110
-#define GL_DUAL_ALPHA8_SGIS 0x8111
-#define GL_DUAL_ALPHA12_SGIS 0x8112
-#define GL_DUAL_ALPHA16_SGIS 0x8113
-#define GL_DUAL_LUMINANCE4_SGIS 0x8114
-#define GL_DUAL_LUMINANCE8_SGIS 0x8115
-#define GL_DUAL_LUMINANCE12_SGIS 0x8116
-#define GL_DUAL_LUMINANCE16_SGIS 0x8117
-#define GL_DUAL_INTENSITY4_SGIS 0x8118
-#define GL_DUAL_INTENSITY8_SGIS 0x8119
-#define GL_DUAL_INTENSITY12_SGIS 0x811A
-#define GL_DUAL_INTENSITY16_SGIS 0x811B
-#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
-#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
-#define GL_QUAD_ALPHA4_SGIS 0x811E
-#define GL_QUAD_ALPHA8_SGIS 0x811F
-#define GL_QUAD_LUMINANCE4_SGIS 0x8120
-#define GL_QUAD_LUMINANCE8_SGIS 0x8121
-#define GL_QUAD_INTENSITY4_SGIS 0x8122
-#define GL_QUAD_INTENSITY8_SGIS 0x8123
-#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
-#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
-#endif
-
-#ifndef GL_SGIX_sprite
-#define GL_SPRITE_SGIX 0x8148
-#define GL_SPRITE_MODE_SGIX 0x8149
-#define GL_SPRITE_AXIS_SGIX 0x814A
-#define GL_SPRITE_TRANSLATION_SGIX 0x814B
-#define GL_SPRITE_AXIAL_SGIX 0x814C
-#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
-#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
-#endif
-
-#ifndef GL_SGIX_texture_multi_buffer
-#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
-#endif
-
-#ifndef GL_EXT_point_parameters
-#define GL_POINT_SIZE_MIN_EXT 0x8126
-#define GL_POINT_SIZE_MAX_EXT 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
-#define GL_DISTANCE_ATTENUATION_EXT 0x8129
-#endif
-
-#ifndef GL_SGIS_point_parameters
-#define GL_POINT_SIZE_MIN_SGIS 0x8126
-#define GL_POINT_SIZE_MAX_SGIS 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
-#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
-#endif
-
-#ifndef GL_SGIX_instruments
-#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
-#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
-#endif
-
-#ifndef GL_SGIX_texture_scale_bias
-#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
-#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
-#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
-#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
-#endif
-
-#ifndef GL_SGIX_framezoom
-#define GL_FRAMEZOOM_SGIX 0x818B
-#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
-#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
-#endif
-
-#ifndef GL_SGIX_tag_sample_buffer
-#endif
-
-#ifndef GL_FfdMaskSGIX
-#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
-#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
-#endif
-
-#ifndef GL_SGIX_polynomial_ffd
-#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
-#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
-#define GL_DEFORMATIONS_MASK_SGIX 0x8196
-#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
-#endif
-
-#ifndef GL_SGIX_reference_plane
-#define GL_REFERENCE_PLANE_SGIX 0x817D
-#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
-#endif
-
-#ifndef GL_SGIX_flush_raster
-#endif
-
-#ifndef GL_SGIX_depth_texture
-#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
-#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
-#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
-#endif
-
-#ifndef GL_SGIS_fog_function
-#define GL_FOG_FUNC_SGIS 0x812A
-#define GL_FOG_FUNC_POINTS_SGIS 0x812B
-#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
-#endif
-
-#ifndef GL_SGIX_fog_offset
-#define GL_FOG_OFFSET_SGIX 0x8198
-#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
-#endif
-
-#ifndef GL_HP_image_transform
-#define GL_IMAGE_SCALE_X_HP 0x8155
-#define GL_IMAGE_SCALE_Y_HP 0x8156
-#define GL_IMAGE_TRANSLATE_X_HP 0x8157
-#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
-#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
-#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
-#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
-#define GL_IMAGE_MAG_FILTER_HP 0x815C
-#define GL_IMAGE_MIN_FILTER_HP 0x815D
-#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
-#define GL_CUBIC_HP 0x815F
-#define GL_AVERAGE_HP 0x8160
-#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
-#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
-#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
-#endif
-
-#ifndef GL_HP_convolution_border_modes
-#define GL_IGNORE_BORDER_HP 0x8150
-#define GL_CONSTANT_BORDER_HP 0x8151
-#define GL_REPLICATE_BORDER_HP 0x8153
-#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
-#endif
-
-#ifndef GL_INGR_palette_buffer
-#endif
-
-#ifndef GL_SGIX_texture_add_env
-#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
-#endif
-
-#ifndef GL_EXT_color_subtable
-#endif
-
-#ifndef GL_PGI_vertex_hints
-#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
-#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
-#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
-#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
-#define GL_COLOR3_BIT_PGI 0x00010000
-#define GL_COLOR4_BIT_PGI 0x00020000
-#define GL_EDGEFLAG_BIT_PGI 0x00040000
-#define GL_INDEX_BIT_PGI 0x00080000
-#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
-#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
-#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
-#define GL_MAT_EMISSION_BIT_PGI 0x00800000
-#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
-#define GL_MAT_SHININESS_BIT_PGI 0x02000000
-#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
-#define GL_NORMAL_BIT_PGI 0x08000000
-#define GL_TEXCOORD1_BIT_PGI 0x10000000
-#define GL_TEXCOORD2_BIT_PGI 0x20000000
-#define GL_TEXCOORD3_BIT_PGI 0x40000000
-#define GL_TEXCOORD4_BIT_PGI 0x80000000
-#define GL_VERTEX23_BIT_PGI 0x00000004
-#define GL_VERTEX4_BIT_PGI 0x00000008
-#endif
-
-#ifndef GL_PGI_misc_hints
-#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
-#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
-#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
-#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
-#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
-#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
-#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
-#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
-#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
-#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
-#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
-#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
-#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
-#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
-#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
-#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
-#define GL_CLIP_NEAR_HINT_PGI 0x1A220
-#define GL_CLIP_FAR_HINT_PGI 0x1A221
-#define GL_WIDE_LINE_HINT_PGI 0x1A222
-#define GL_BACK_NORMALS_HINT_PGI 0x1A223
-#endif
-
-#ifndef GL_EXT_paletted_texture
-#define GL_COLOR_INDEX1_EXT 0x80E2
-#define GL_COLOR_INDEX2_EXT 0x80E3
-#define GL_COLOR_INDEX4_EXT 0x80E4
-#define GL_COLOR_INDEX8_EXT 0x80E5
-#define GL_COLOR_INDEX12_EXT 0x80E6
-#define GL_COLOR_INDEX16_EXT 0x80E7
-#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
-#endif
-
-#ifndef GL_EXT_clip_volume_hint
-#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
-#endif
-
-#ifndef GL_SGIX_list_priority
-#define GL_LIST_PRIORITY_SGIX 0x8182
-#endif
-
-#ifndef GL_SGIX_ir_instrument1
-#define GL_IR_INSTRUMENT1_SGIX 0x817F
-#endif
-
-#ifndef GL_SGIX_calligraphic_fragment
-#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
-#endif
-
-#ifndef GL_SGIX_texture_lod_bias
-#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
-#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
-#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
-#endif
-
-#ifndef GL_SGIX_shadow_ambient
-#define GL_SHADOW_AMBIENT_SGIX 0x80BF
-#endif
-
-#ifndef GL_EXT_index_texture
-#endif
-
-#ifndef GL_EXT_index_material
-#define GL_INDEX_MATERIAL_EXT 0x81B8
-#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
-#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
-#endif
-
-#ifndef GL_EXT_index_func
-#define GL_INDEX_TEST_EXT 0x81B5
-#define GL_INDEX_TEST_FUNC_EXT 0x81B6
-#define GL_INDEX_TEST_REF_EXT 0x81B7
-#endif
-
-#ifndef GL_EXT_index_array_formats
-#define GL_IUI_V2F_EXT 0x81AD
-#define GL_IUI_V3F_EXT 0x81AE
-#define GL_IUI_N3F_V2F_EXT 0x81AF
-#define GL_IUI_N3F_V3F_EXT 0x81B0
-#define GL_T2F_IUI_V2F_EXT 0x81B1
-#define GL_T2F_IUI_V3F_EXT 0x81B2
-#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
-#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
-#endif
-
-#ifndef GL_EXT_compiled_vertex_array
-#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
-#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
-#endif
-
-#ifndef GL_EXT_cull_vertex
-#define GL_CULL_VERTEX_EXT 0x81AA
-#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
-#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
-#endif
-
-#ifndef GL_SGIX_ycrcb
-#define GL_YCRCB_422_SGIX 0x81BB
-#define GL_YCRCB_444_SGIX 0x81BC
-#endif
-
-#ifndef GL_SGIX_fragment_lighting
-#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
-#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
-#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
-#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
-#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
-#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
-#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
-#define GL_LIGHT_ENV_MODE_SGIX 0x8407
-#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
-#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
-#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
-#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
-#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
-#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
-#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
-#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
-#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
-#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
-#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
-#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
-#endif
-
-#ifndef GL_IBM_rasterpos_clip
-#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
-#endif
-
-#ifndef GL_HP_texture_lighting
-#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
-#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
-#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
-#endif
-
-#ifndef GL_EXT_draw_range_elements
-#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
-#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
-#endif
-
-#ifndef GL_WIN_phong_shading
-#define GL_PHONG_WIN 0x80EA
-#define GL_PHONG_HINT_WIN 0x80EB
-#endif
-
-#ifndef GL_WIN_specular_fog
-#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
-#endif
-
-#ifndef GL_EXT_light_texture
-#define GL_FRAGMENT_MATERIAL_EXT 0x8349
-#define GL_FRAGMENT_NORMAL_EXT 0x834A
-#define GL_FRAGMENT_COLOR_EXT 0x834C
-#define GL_ATTENUATION_EXT 0x834D
-#define GL_SHADOW_ATTENUATION_EXT 0x834E
-#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
-#define GL_TEXTURE_LIGHT_EXT 0x8350
-#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
-#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
-/* reuse GL_FRAGMENT_DEPTH_EXT */
-#endif
-
-#ifndef GL_SGIX_blend_alpha_minmax
-#define GL_ALPHA_MIN_SGIX 0x8320
-#define GL_ALPHA_MAX_SGIX 0x8321
-#endif
-
-#ifndef GL_SGIX_impact_pixel_texture
-#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
-#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
-#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
-#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
-#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
-#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
-#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
-#endif
-
-#ifndef GL_EXT_bgra
-#define GL_BGR_EXT 0x80E0
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-#ifndef GL_SGIX_async
-#define GL_ASYNC_MARKER_SGIX 0x8329
-#endif
-
-#ifndef GL_SGIX_async_pixel
-#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
-#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
-#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
-#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
-#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
-#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
-#endif
-
-#ifndef GL_SGIX_async_histogram
-#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
-#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
-#endif
-
-#ifndef GL_INTEL_texture_scissor
-#endif
-
-#ifndef GL_INTEL_parallel_arrays
-#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
-#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
-#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
-#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
-#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
-#endif
-
-#ifndef GL_HP_occlusion_test
-#define GL_OCCLUSION_TEST_HP 0x8165
-#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
-#endif
-
-#ifndef GL_EXT_pixel_transform
-#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
-#define GL_PIXEL_MAG_FILTER_EXT 0x8331
-#define GL_PIXEL_MIN_FILTER_EXT 0x8332
-#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
-#define GL_CUBIC_EXT 0x8334
-#define GL_AVERAGE_EXT 0x8335
-#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
-#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
-#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
-#endif
-
-#ifndef GL_EXT_pixel_transform_color_table
-#endif
-
-#ifndef GL_EXT_shared_texture_palette
-#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
-#endif
-
-#ifndef GL_EXT_separate_specular_color
-#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
-#define GL_SINGLE_COLOR_EXT 0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
-#endif
-
-#ifndef GL_EXT_secondary_color
-#define GL_COLOR_SUM_EXT 0x8458
-#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
-#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
-#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
-#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
-#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
-#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
-#endif
-
-#ifndef GL_EXT_texture_perturb_normal
-#define GL_PERTURB_EXT 0x85AE
-#define GL_TEXTURE_NORMAL_EXT 0x85AF
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#endif
-
-#ifndef GL_EXT_fog_coord
-#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
-#define GL_FOG_COORDINATE_EXT 0x8451
-#define GL_FRAGMENT_DEPTH_EXT 0x8452
-#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
-#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
-#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
-#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
-#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
-#endif
-
-#ifndef GL_REND_screen_coordinates
-#define GL_SCREEN_COORDINATES_REND 0x8490
-#define GL_INVERTED_SCREEN_W_REND 0x8491
-#endif
-
-#ifndef GL_EXT_coordinate_frame
-#define GL_TANGENT_ARRAY_EXT 0x8439
-#define GL_BINORMAL_ARRAY_EXT 0x843A
-#define GL_CURRENT_TANGENT_EXT 0x843B
-#define GL_CURRENT_BINORMAL_EXT 0x843C
-#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
-#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
-#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
-#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
-#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
-#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
-#define GL_MAP1_TANGENT_EXT 0x8444
-#define GL_MAP2_TANGENT_EXT 0x8445
-#define GL_MAP1_BINORMAL_EXT 0x8446
-#define GL_MAP2_BINORMAL_EXT 0x8447
-#endif
-
-#ifndef GL_EXT_texture_env_combine
-#define GL_COMBINE_EXT 0x8570
-#define GL_COMBINE_RGB_EXT 0x8571
-#define GL_COMBINE_ALPHA_EXT 0x8572
-#define GL_RGB_SCALE_EXT 0x8573
-#define GL_ADD_SIGNED_EXT 0x8574
-#define GL_INTERPOLATE_EXT 0x8575
-#define GL_CONSTANT_EXT 0x8576
-#define GL_PRIMARY_COLOR_EXT 0x8577
-#define GL_PREVIOUS_EXT 0x8578
-#define GL_SOURCE0_RGB_EXT 0x8580
-#define GL_SOURCE1_RGB_EXT 0x8581
-#define GL_SOURCE2_RGB_EXT 0x8582
-#define GL_SOURCE0_ALPHA_EXT 0x8588
-#define GL_SOURCE1_ALPHA_EXT 0x8589
-#define GL_SOURCE2_ALPHA_EXT 0x858A
-#define GL_OPERAND0_RGB_EXT 0x8590
-#define GL_OPERAND1_RGB_EXT 0x8591
-#define GL_OPERAND2_RGB_EXT 0x8592
-#define GL_OPERAND0_ALPHA_EXT 0x8598
-#define GL_OPERAND1_ALPHA_EXT 0x8599
-#define GL_OPERAND2_ALPHA_EXT 0x859A
-#endif
-
-#ifndef GL_APPLE_specular_vector
-#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
-#endif
-
-#ifndef GL_APPLE_transform_hint
-#define GL_TRANSFORM_HINT_APPLE 0x85B1
-#endif
-
-#ifndef GL_SGIX_fog_scale
-#define GL_FOG_SCALE_SGIX 0x81FC
-#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
-#endif
-
-#ifndef GL_SUNX_constant_data
-#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
-#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
-#endif
-
-#ifndef GL_SUN_global_alpha
-#define GL_GLOBAL_ALPHA_SUN 0x81D9
-#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
-#endif
-
-#ifndef GL_SUN_triangle_list
-#define GL_RESTART_SUN 0x0001
-#define GL_REPLACE_MIDDLE_SUN 0x0002
-#define GL_REPLACE_OLDEST_SUN 0x0003
-#define GL_TRIANGLE_LIST_SUN 0x81D7
-#define GL_REPLACEMENT_CODE_SUN 0x81D8
-#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
-#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
-#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
-#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
-#define GL_R1UI_V3F_SUN 0x85C4
-#define GL_R1UI_C4UB_V3F_SUN 0x85C5
-#define GL_R1UI_C3F_V3F_SUN 0x85C6
-#define GL_R1UI_N3F_V3F_SUN 0x85C7
-#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
-#define GL_R1UI_T2F_V3F_SUN 0x85C9
-#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
-#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
-#endif
-
-#ifndef GL_SUN_vertex
-#endif
-
-#ifndef GL_EXT_blend_func_separate
-#define GL_BLEND_DST_RGB_EXT 0x80C8
-#define GL_BLEND_SRC_RGB_EXT 0x80C9
-#define GL_BLEND_DST_ALPHA_EXT 0x80CA
-#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
-#endif
-
-#ifndef GL_INGR_color_clamp
-#define GL_RED_MIN_CLAMP_INGR 0x8560
-#define GL_GREEN_MIN_CLAMP_INGR 0x8561
-#define GL_BLUE_MIN_CLAMP_INGR 0x8562
-#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
-#define GL_RED_MAX_CLAMP_INGR 0x8564
-#define GL_GREEN_MAX_CLAMP_INGR 0x8565
-#define GL_BLUE_MAX_CLAMP_INGR 0x8566
-#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
-#endif
-
-#ifndef GL_INGR_interlace_read
-#define GL_INTERLACE_READ_INGR 0x8568
-#endif
-
-#ifndef GL_EXT_stencil_wrap
-#define GL_INCR_WRAP_EXT 0x8507
-#define GL_DECR_WRAP_EXT 0x8508
-#endif
-
-#ifndef GL_EXT_422_pixels
-#define GL_422_EXT 0x80CC
-#define GL_422_REV_EXT 0x80CD
-#define GL_422_AVERAGE_EXT 0x80CE
-#define GL_422_REV_AVERAGE_EXT 0x80CF
-#endif
-
-#ifndef GL_NV_texgen_reflection
-#define GL_NORMAL_MAP_NV 0x8511
-#define GL_REFLECTION_MAP_NV 0x8512
-#endif
-
-#ifndef GL_EXT_texture_cube_map
-#define GL_NORMAL_MAP_EXT 0x8511
-#define GL_REFLECTION_MAP_EXT 0x8512
-#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
-#endif
-
-#ifndef GL_SUN_convolution_border_modes
-#define GL_WRAP_BORDER_SUN 0x81D4
-#endif
-
-#ifndef GL_EXT_texture_env_add
-#endif
-
-#ifndef GL_EXT_texture_lod_bias
-#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
-#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
-#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
-#endif
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif
-
-#ifndef GL_EXT_vertex_weighting
-#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
-#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
-#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
-#define GL_MODELVIEW1_MATRIX_EXT 0x8506
-#define GL_VERTEX_WEIGHTING_EXT 0x8509
-#define GL_MODELVIEW0_EXT GL_MODELVIEW
-#define GL_MODELVIEW1_EXT 0x850A
-#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
-#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
-#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
-#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
-#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
-#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
-#endif
-
-#ifndef GL_NV_light_max_exponent
-#define GL_MAX_SHININESS_NV 0x8504
-#define GL_MAX_SPOT_EXPONENT_NV 0x8505
-#endif
-
-#ifndef GL_NV_vertex_array_range
-#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
-#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
-#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
-#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
-#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
-#endif
-
-#ifndef GL_NV_register_combiners
-#define GL_REGISTER_COMBINERS_NV 0x8522
-#define GL_VARIABLE_A_NV 0x8523
-#define GL_VARIABLE_B_NV 0x8524
-#define GL_VARIABLE_C_NV 0x8525
-#define GL_VARIABLE_D_NV 0x8526
-#define GL_VARIABLE_E_NV 0x8527
-#define GL_VARIABLE_F_NV 0x8528
-#define GL_VARIABLE_G_NV 0x8529
-#define GL_CONSTANT_COLOR0_NV 0x852A
-#define GL_CONSTANT_COLOR1_NV 0x852B
-#define GL_PRIMARY_COLOR_NV 0x852C
-#define GL_SECONDARY_COLOR_NV 0x852D
-#define GL_SPARE0_NV 0x852E
-#define GL_SPARE1_NV 0x852F
-#define GL_DISCARD_NV 0x8530
-#define GL_E_TIMES_F_NV 0x8531
-#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
-#define GL_UNSIGNED_IDENTITY_NV 0x8536
-#define GL_UNSIGNED_INVERT_NV 0x8537
-#define GL_EXPAND_NORMAL_NV 0x8538
-#define GL_EXPAND_NEGATE_NV 0x8539
-#define GL_HALF_BIAS_NORMAL_NV 0x853A
-#define GL_HALF_BIAS_NEGATE_NV 0x853B
-#define GL_SIGNED_IDENTITY_NV 0x853C
-#define GL_SIGNED_NEGATE_NV 0x853D
-#define GL_SCALE_BY_TWO_NV 0x853E
-#define GL_SCALE_BY_FOUR_NV 0x853F
-#define GL_SCALE_BY_ONE_HALF_NV 0x8540
-#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
-#define GL_COMBINER_INPUT_NV 0x8542
-#define GL_COMBINER_MAPPING_NV 0x8543
-#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
-#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
-#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
-#define GL_COMBINER_MUX_SUM_NV 0x8547
-#define GL_COMBINER_SCALE_NV 0x8548
-#define GL_COMBINER_BIAS_NV 0x8549
-#define GL_COMBINER_AB_OUTPUT_NV 0x854A
-#define GL_COMBINER_CD_OUTPUT_NV 0x854B
-#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
-#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
-#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
-#define GL_COLOR_SUM_CLAMP_NV 0x854F
-#define GL_COMBINER0_NV 0x8550
-#define GL_COMBINER1_NV 0x8551
-#define GL_COMBINER2_NV 0x8552
-#define GL_COMBINER3_NV 0x8553
-#define GL_COMBINER4_NV 0x8554
-#define GL_COMBINER5_NV 0x8555
-#define GL_COMBINER6_NV 0x8556
-#define GL_COMBINER7_NV 0x8557
-/* reuse GL_TEXTURE0_ARB */
-/* reuse GL_TEXTURE1_ARB */
-/* reuse GL_ZERO */
-/* reuse GL_NONE */
-/* reuse GL_FOG */
-#endif
-
-#ifndef GL_NV_fog_distance
-#define GL_FOG_DISTANCE_MODE_NV 0x855A
-#define GL_EYE_RADIAL_NV 0x855B
-#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
-/* reuse GL_EYE_PLANE */
-#endif
-
-#ifndef GL_NV_texgen_emboss
-#define GL_EMBOSS_LIGHT_NV 0x855D
-#define GL_EMBOSS_CONSTANT_NV 0x855E
-#define GL_EMBOSS_MAP_NV 0x855F
-#endif
-
-#ifndef GL_NV_blend_square
-#endif
-
-#ifndef GL_NV_texture_env_combine4
-#define GL_COMBINE4_NV 0x8503
-#define GL_SOURCE3_RGB_NV 0x8583
-#define GL_SOURCE3_ALPHA_NV 0x858B
-#define GL_OPERAND3_RGB_NV 0x8593
-#define GL_OPERAND3_ALPHA_NV 0x859B
-#endif
-
-#ifndef GL_MESA_resize_buffers
-#endif
-
-#ifndef GL_MESA_window_pos
-#endif
-
-#ifndef GL_EXT_texture_compression_s3tc
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-#endif
-
-#ifndef GL_IBM_cull_vertex
-#define GL_CULL_VERTEX_IBM 103050
-#endif
-
-#ifndef GL_IBM_multimode_draw_arrays
-#endif
-
-#ifndef GL_IBM_vertex_array_lists
-#define GL_VERTEX_ARRAY_LIST_IBM 103070
-#define GL_NORMAL_ARRAY_LIST_IBM 103071
-#define GL_COLOR_ARRAY_LIST_IBM 103072
-#define GL_INDEX_ARRAY_LIST_IBM 103073
-#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
-#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
-#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
-#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
-#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
-#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
-#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
-#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
-#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
-#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
-#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
-#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
-#endif
-
-#ifndef GL_SGIX_subsample
-#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
-#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
-#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
-#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
-#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
-#endif
-
-#ifndef GL_SGIX_ycrcb_subsample
-#endif
-
-#ifndef GL_SGIX_ycrcba
-#define GL_YCRCB_SGIX 0x8318
-#define GL_YCRCBA_SGIX 0x8319
-#endif
-
-#ifndef GL_SGI_depth_pass_instrument
-#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
-#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
-#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
-#endif
-
-#ifndef GL_3DFX_texture_compression_FXT1
-#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
-#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
-#endif
-
-#ifndef GL_3DFX_multisample
-#define GL_MULTISAMPLE_3DFX 0x86B2
-#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
-#define GL_SAMPLES_3DFX 0x86B4
-#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
-#endif
-
-#ifndef GL_3DFX_tbuffer
-#endif
-
-#ifndef GL_EXT_multisample
-#define GL_MULTISAMPLE_EXT 0x809D
-#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
-#define GL_SAMPLE_MASK_EXT 0x80A0
-#define GL_1PASS_EXT 0x80A1
-#define GL_2PASS_0_EXT 0x80A2
-#define GL_2PASS_1_EXT 0x80A3
-#define GL_4PASS_0_EXT 0x80A4
-#define GL_4PASS_1_EXT 0x80A5
-#define GL_4PASS_2_EXT 0x80A6
-#define GL_4PASS_3_EXT 0x80A7
-#define GL_SAMPLE_BUFFERS_EXT 0x80A8
-#define GL_SAMPLES_EXT 0x80A9
-#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
-#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
-#define GL_SAMPLE_PATTERN_EXT 0x80AC
-#define GL_MULTISAMPLE_BIT_EXT 0x20000000
-#endif
-
-#ifndef GL_SGIX_vertex_preclip
-#define GL_VERTEX_PRECLIP_SGIX 0x83EE
-#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
-#endif
-
-#ifndef GL_SGIX_convolution_accuracy
-#define GL_CONVOLUTION_HINT_SGIX 0x8316
-#endif
-
-#ifndef GL_SGIX_resample
-#define GL_PACK_RESAMPLE_SGIX 0x842C
-#define GL_UNPACK_RESAMPLE_SGIX 0x842D
-#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
-#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
-#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
-#endif
-
-#ifndef GL_SGIS_point_line_texgen
-#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
-#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
-#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
-#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
-#define GL_EYE_POINT_SGIS 0x81F4
-#define GL_OBJECT_POINT_SGIS 0x81F5
-#define GL_EYE_LINE_SGIS 0x81F6
-#define GL_OBJECT_LINE_SGIS 0x81F7
-#endif
-
-#ifndef GL_SGIS_texture_color_mask
-#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
-#endif
-
-#ifndef GL_EXT_texture_env_dot3
-#define GL_DOT3_RGB_EXT 0x8740
-#define GL_DOT3_RGBA_EXT 0x8741
-#endif
-
-#ifndef GL_ATI_texture_mirror_once
-#define GL_MIRROR_CLAMP_ATI 0x8742
-#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
-#endif
-
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
-#ifndef GL_IBM_texture_mirrored_repeat
-#define GL_MIRRORED_REPEAT_IBM 0x8370
-#endif
-
-#ifndef GL_NV_evaluators
-#define GL_EVAL_2D_NV 0x86C0
-#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
-#define GL_MAP_TESSELLATION_NV 0x86C2
-#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
-#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
-#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
-#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
-#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
-#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
-#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
-#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
-#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
-#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
-#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
-#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
-#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
-#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
-#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
-#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
-#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
-#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
-#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
-#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
-#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
-#endif
-
-#ifndef GL_NV_packed_depth_stencil
-#define GL_DEPTH_STENCIL_NV 0x84F9
-#define GL_UNSIGNED_INT_24_8_NV 0x84FA
-#endif
-
-#ifndef GL_NV_register_combiners2
-#define GL_PER_STAGE_CONSTANTS_NV 0x8535
-#endif
-
-#ifndef GL_NV_texture_compression_vtc
-#endif
-
-#ifndef GL_NV_texture_rectangle
-#define GL_TEXTURE_RECTANGLE_NV 0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
-#endif
-
-#ifndef GL_NV_texture_shader
-#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
-#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
-#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
-#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
-#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
-#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
-#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
-#define GL_SHADER_CONSISTENT_NV 0x86DD
-#define GL_TEXTURE_SHADER_NV 0x86DE
-#define GL_SHADER_OPERATION_NV 0x86DF
-#define GL_CULL_MODES_NV 0x86E0
-#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
-#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
-#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
-#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
-#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
-#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
-#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
-#define GL_CONST_EYE_NV 0x86E5
-#define GL_PASS_THROUGH_NV 0x86E6
-#define GL_CULL_FRAGMENT_NV 0x86E7
-#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
-#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
-#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
-#define GL_DOT_PRODUCT_NV 0x86EC
-#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
-#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
-#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
-#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
-#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
-#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
-#define GL_HILO_NV 0x86F4
-#define GL_DSDT_NV 0x86F5
-#define GL_DSDT_MAG_NV 0x86F6
-#define GL_DSDT_MAG_VIB_NV 0x86F7
-#define GL_HILO16_NV 0x86F8
-#define GL_SIGNED_HILO_NV 0x86F9
-#define GL_SIGNED_HILO16_NV 0x86FA
-#define GL_SIGNED_RGBA_NV 0x86FB
-#define GL_SIGNED_RGBA8_NV 0x86FC
-#define GL_SIGNED_RGB_NV 0x86FE
-#define GL_SIGNED_RGB8_NV 0x86FF
-#define GL_SIGNED_LUMINANCE_NV 0x8701
-#define GL_SIGNED_LUMINANCE8_NV 0x8702
-#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
-#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
-#define GL_SIGNED_ALPHA_NV 0x8705
-#define GL_SIGNED_ALPHA8_NV 0x8706
-#define GL_SIGNED_INTENSITY_NV 0x8707
-#define GL_SIGNED_INTENSITY8_NV 0x8708
-#define GL_DSDT8_NV 0x8709
-#define GL_DSDT8_MAG8_NV 0x870A
-#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
-#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
-#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
-#define GL_HI_SCALE_NV 0x870E
-#define GL_LO_SCALE_NV 0x870F
-#define GL_DS_SCALE_NV 0x8710
-#define GL_DT_SCALE_NV 0x8711
-#define GL_MAGNITUDE_SCALE_NV 0x8712
-#define GL_VIBRANCE_SCALE_NV 0x8713
-#define GL_HI_BIAS_NV 0x8714
-#define GL_LO_BIAS_NV 0x8715
-#define GL_DS_BIAS_NV 0x8716
-#define GL_DT_BIAS_NV 0x8717
-#define GL_MAGNITUDE_BIAS_NV 0x8718
-#define GL_VIBRANCE_BIAS_NV 0x8719
-#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
-#define GL_TEXTURE_HI_SIZE_NV 0x871B
-#define GL_TEXTURE_LO_SIZE_NV 0x871C
-#define GL_TEXTURE_DS_SIZE_NV 0x871D
-#define GL_TEXTURE_DT_SIZE_NV 0x871E
-#define GL_TEXTURE_MAG_SIZE_NV 0x871F
-#endif
-
-#ifndef GL_NV_texture_shader2
-#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
-#endif
-
-#ifndef GL_NV_vertex_array_range2
-#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
-#endif
-
-#ifndef GL_NV_vertex_program
-#define GL_VERTEX_PROGRAM_NV 0x8620
-#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
-#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
-#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
-#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
-#define GL_CURRENT_ATTRIB_NV 0x8626
-#define GL_PROGRAM_LENGTH_NV 0x8627
-#define GL_PROGRAM_STRING_NV 0x8628
-#define GL_MODELVIEW_PROJECTION_NV 0x8629
-#define GL_IDENTITY_NV 0x862A
-#define GL_INVERSE_NV 0x862B
-#define GL_TRANSPOSE_NV 0x862C
-#define GL_INVERSE_TRANSPOSE_NV 0x862D
-#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
-#define GL_MAX_TRACK_MATRICES_NV 0x862F
-#define GL_MATRIX0_NV 0x8630
-#define GL_MATRIX1_NV 0x8631
-#define GL_MATRIX2_NV 0x8632
-#define GL_MATRIX3_NV 0x8633
-#define GL_MATRIX4_NV 0x8634
-#define GL_MATRIX5_NV 0x8635
-#define GL_MATRIX6_NV 0x8636
-#define GL_MATRIX7_NV 0x8637
-#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
-#define GL_CURRENT_MATRIX_NV 0x8641
-#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
-#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
-#define GL_PROGRAM_PARAMETER_NV 0x8644
-#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
-#define GL_PROGRAM_TARGET_NV 0x8646
-#define GL_PROGRAM_RESIDENT_NV 0x8647
-#define GL_TRACK_MATRIX_NV 0x8648
-#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
-#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
-#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
-#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
-#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
-#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
-#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
-#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
-#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
-#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
-#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
-#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
-#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
-#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
-#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
-#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
-#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
-#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
-#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
-#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
-#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
-#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
-#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
-#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
-#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
-#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
-#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
-#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
-#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
-#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
-#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
-#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
-#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
-#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
-#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
-#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
-#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
-#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
-#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
-#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
-#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
-#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
-#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
-#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
-#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
-#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
-#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
-#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
-#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
-#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
-#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
-#endif
-
-#ifndef GL_SGIX_texture_coordinate_clamp
-#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
-#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
-#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
-#endif
-
-#ifndef GL_SGIX_scalebias_hint
-#define GL_SCALEBIAS_HINT_SGIX 0x8322
-#endif
-
-#ifndef GL_OML_interlace
-#define GL_INTERLACE_OML 0x8980
-#define GL_INTERLACE_READ_OML 0x8981
-#endif
-
-#ifndef GL_OML_subsample
-#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
-#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
-#endif
-
-#ifndef GL_OML_resample
-#define GL_PACK_RESAMPLE_OML 0x8984
-#define GL_UNPACK_RESAMPLE_OML 0x8985
-#define GL_RESAMPLE_REPLICATE_OML 0x8986
-#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
-#define GL_RESAMPLE_AVERAGE_OML 0x8988
-#define GL_RESAMPLE_DECIMATE_OML 0x8989
-#endif
-
-#ifndef GL_NV_copy_depth_to_color
-#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
-#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
-#endif
-
-#ifndef GL_ATI_envmap_bumpmap
-#define GL_BUMP_ROT_MATRIX_ATI 0x8775
-#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
-#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
-#define GL_BUMP_TEX_UNITS_ATI 0x8778
-#define GL_DUDV_ATI 0x8779
-#define GL_DU8DV8_ATI 0x877A
-#define GL_BUMP_ENVMAP_ATI 0x877B
-#define GL_BUMP_TARGET_ATI 0x877C
-#endif
-
-#ifndef GL_ATI_fragment_shader
-#define GL_FRAGMENT_SHADER_ATI 0x8920
-#define GL_REG_0_ATI 0x8921
-#define GL_REG_1_ATI 0x8922
-#define GL_REG_2_ATI 0x8923
-#define GL_REG_3_ATI 0x8924
-#define GL_REG_4_ATI 0x8925
-#define GL_REG_5_ATI 0x8926
-#define GL_REG_6_ATI 0x8927
-#define GL_REG_7_ATI 0x8928
-#define GL_REG_8_ATI 0x8929
-#define GL_REG_9_ATI 0x892A
-#define GL_REG_10_ATI 0x892B
-#define GL_REG_11_ATI 0x892C
-#define GL_REG_12_ATI 0x892D
-#define GL_REG_13_ATI 0x892E
-#define GL_REG_14_ATI 0x892F
-#define GL_REG_15_ATI 0x8930
-#define GL_REG_16_ATI 0x8931
-#define GL_REG_17_ATI 0x8932
-#define GL_REG_18_ATI 0x8933
-#define GL_REG_19_ATI 0x8934
-#define GL_REG_20_ATI 0x8935
-#define GL_REG_21_ATI 0x8936
-#define GL_REG_22_ATI 0x8937
-#define GL_REG_23_ATI 0x8938
-#define GL_REG_24_ATI 0x8939
-#define GL_REG_25_ATI 0x893A
-#define GL_REG_26_ATI 0x893B
-#define GL_REG_27_ATI 0x893C
-#define GL_REG_28_ATI 0x893D
-#define GL_REG_29_ATI 0x893E
-#define GL_REG_30_ATI 0x893F
-#define GL_REG_31_ATI 0x8940
-#define GL_CON_0_ATI 0x8941
-#define GL_CON_1_ATI 0x8942
-#define GL_CON_2_ATI 0x8943
-#define GL_CON_3_ATI 0x8944
-#define GL_CON_4_ATI 0x8945
-#define GL_CON_5_ATI 0x8946
-#define GL_CON_6_ATI 0x8947
-#define GL_CON_7_ATI 0x8948
-#define GL_CON_8_ATI 0x8949
-#define GL_CON_9_ATI 0x894A
-#define GL_CON_10_ATI 0x894B
-#define GL_CON_11_ATI 0x894C
-#define GL_CON_12_ATI 0x894D
-#define GL_CON_13_ATI 0x894E
-#define GL_CON_14_ATI 0x894F
-#define GL_CON_15_ATI 0x8950
-#define GL_CON_16_ATI 0x8951
-#define GL_CON_17_ATI 0x8952
-#define GL_CON_18_ATI 0x8953
-#define GL_CON_19_ATI 0x8954
-#define GL_CON_20_ATI 0x8955
-#define GL_CON_21_ATI 0x8956
-#define GL_CON_22_ATI 0x8957
-#define GL_CON_23_ATI 0x8958
-#define GL_CON_24_ATI 0x8959
-#define GL_CON_25_ATI 0x895A
-#define GL_CON_26_ATI 0x895B
-#define GL_CON_27_ATI 0x895C
-#define GL_CON_28_ATI 0x895D
-#define GL_CON_29_ATI 0x895E
-#define GL_CON_30_ATI 0x895F
-#define GL_CON_31_ATI 0x8960
-#define GL_MOV_ATI 0x8961
-#define GL_ADD_ATI 0x8963
-#define GL_MUL_ATI 0x8964
-#define GL_SUB_ATI 0x8965
-#define GL_DOT3_ATI 0x8966
-#define GL_DOT4_ATI 0x8967
-#define GL_MAD_ATI 0x8968
-#define GL_LERP_ATI 0x8969
-#define GL_CND_ATI 0x896A
-#define GL_CND0_ATI 0x896B
-#define GL_DOT2_ADD_ATI 0x896C
-#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
-#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
-#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
-#define GL_NUM_PASSES_ATI 0x8970
-#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
-#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
-#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
-#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
-#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
-#define GL_SWIZZLE_STR_ATI 0x8976
-#define GL_SWIZZLE_STQ_ATI 0x8977
-#define GL_SWIZZLE_STR_DR_ATI 0x8978
-#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
-#define GL_SWIZZLE_STRQ_ATI 0x897A
-#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
-#define GL_RED_BIT_ATI 0x00000001
-#define GL_GREEN_BIT_ATI 0x00000002
-#define GL_BLUE_BIT_ATI 0x00000004
-#define GL_2X_BIT_ATI 0x00000001
-#define GL_4X_BIT_ATI 0x00000002
-#define GL_8X_BIT_ATI 0x00000004
-#define GL_HALF_BIT_ATI 0x00000008
-#define GL_QUARTER_BIT_ATI 0x00000010
-#define GL_EIGHTH_BIT_ATI 0x00000020
-#define GL_SATURATE_BIT_ATI 0x00000040
-#define GL_COMP_BIT_ATI 0x00000002
-#define GL_NEGATE_BIT_ATI 0x00000004
-#define GL_BIAS_BIT_ATI 0x00000008
-#endif
-
-#ifndef GL_ATI_pn_triangles
-#define GL_PN_TRIANGLES_ATI 0x87F0
-#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
-#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
-#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
-#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
-#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
-#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
-#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
-#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
-#endif
-
-#ifndef GL_ATI_vertex_array_object
-#define GL_STATIC_ATI 0x8760
-#define GL_DYNAMIC_ATI 0x8761
-#define GL_PRESERVE_ATI 0x8762
-#define GL_DISCARD_ATI 0x8763
-#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
-#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
-#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
-#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
-#endif
-
-#ifndef GL_EXT_vertex_shader
-#define GL_VERTEX_SHADER_EXT 0x8780
-#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
-#define GL_OP_INDEX_EXT 0x8782
-#define GL_OP_NEGATE_EXT 0x8783
-#define GL_OP_DOT3_EXT 0x8784
-#define GL_OP_DOT4_EXT 0x8785
-#define GL_OP_MUL_EXT 0x8786
-#define GL_OP_ADD_EXT 0x8787
-#define GL_OP_MADD_EXT 0x8788
-#define GL_OP_FRAC_EXT 0x8789
-#define GL_OP_MAX_EXT 0x878A
-#define GL_OP_MIN_EXT 0x878B
-#define GL_OP_SET_GE_EXT 0x878C
-#define GL_OP_SET_LT_EXT 0x878D
-#define GL_OP_CLAMP_EXT 0x878E
-#define GL_OP_FLOOR_EXT 0x878F
-#define GL_OP_ROUND_EXT 0x8790
-#define GL_OP_EXP_BASE_2_EXT 0x8791
-#define GL_OP_LOG_BASE_2_EXT 0x8792
-#define GL_OP_POWER_EXT 0x8793
-#define GL_OP_RECIP_EXT 0x8794
-#define GL_OP_RECIP_SQRT_EXT 0x8795
-#define GL_OP_SUB_EXT 0x8796
-#define GL_OP_CROSS_PRODUCT_EXT 0x8797
-#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
-#define GL_OP_MOV_EXT 0x8799
-#define GL_OUTPUT_VERTEX_EXT 0x879A
-#define GL_OUTPUT_COLOR0_EXT 0x879B
-#define GL_OUTPUT_COLOR1_EXT 0x879C
-#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
-#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
-#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
-#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
-#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
-#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
-#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
-#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
-#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
-#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
-#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
-#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
-#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
-#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
-#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
-#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
-#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
-#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
-#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
-#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
-#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
-#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
-#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
-#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
-#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
-#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
-#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
-#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
-#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
-#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
-#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
-#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
-#define GL_OUTPUT_FOG_EXT 0x87BD
-#define GL_SCALAR_EXT 0x87BE
-#define GL_VECTOR_EXT 0x87BF
-#define GL_MATRIX_EXT 0x87C0
-#define GL_VARIANT_EXT 0x87C1
-#define GL_INVARIANT_EXT 0x87C2
-#define GL_LOCAL_CONSTANT_EXT 0x87C3
-#define GL_LOCAL_EXT 0x87C4
-#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
-#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
-#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
-#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
-#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
-#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
-#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
-#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
-#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
-#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
-#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
-#define GL_X_EXT 0x87D5
-#define GL_Y_EXT 0x87D6
-#define GL_Z_EXT 0x87D7
-#define GL_W_EXT 0x87D8
-#define GL_NEGATIVE_X_EXT 0x87D9
-#define GL_NEGATIVE_Y_EXT 0x87DA
-#define GL_NEGATIVE_Z_EXT 0x87DB
-#define GL_NEGATIVE_W_EXT 0x87DC
-#define GL_ZERO_EXT 0x87DD
-#define GL_ONE_EXT 0x87DE
-#define GL_NEGATIVE_ONE_EXT 0x87DF
-#define GL_NORMALIZED_RANGE_EXT 0x87E0
-#define GL_FULL_RANGE_EXT 0x87E1
-#define GL_CURRENT_VERTEX_EXT 0x87E2
-#define GL_MVP_MATRIX_EXT 0x87E3
-#define GL_VARIANT_VALUE_EXT 0x87E4
-#define GL_VARIANT_DATATYPE_EXT 0x87E5
-#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
-#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
-#define GL_VARIANT_ARRAY_EXT 0x87E8
-#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
-#define GL_INVARIANT_VALUE_EXT 0x87EA
-#define GL_INVARIANT_DATATYPE_EXT 0x87EB
-#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
-#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
-#endif
-
-#ifndef GL_ATI_vertex_streams
-#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
-#define GL_VERTEX_STREAM0_ATI 0x876C
-#define GL_VERTEX_STREAM1_ATI 0x876D
-#define GL_VERTEX_STREAM2_ATI 0x876E
-#define GL_VERTEX_STREAM3_ATI 0x876F
-#define GL_VERTEX_STREAM4_ATI 0x8770
-#define GL_VERTEX_STREAM5_ATI 0x8771
-#define GL_VERTEX_STREAM6_ATI 0x8772
-#define GL_VERTEX_STREAM7_ATI 0x8773
-#define GL_VERTEX_SOURCE_ATI 0x8774
-#endif
-
-#ifndef GL_ATI_element_array
-#define GL_ELEMENT_ARRAY_ATI 0x8768
-#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
-#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
-#endif
-
-#ifndef GL_SUN_mesh_array
-#define GL_QUAD_MESH_SUN 0x8614
-#define GL_TRIANGLE_MESH_SUN 0x8615
-#endif
-
-#ifndef GL_SUN_slice_accum
-#define GL_SLICE_ACCUM_SUN 0x85CC
-#endif
-
-#ifndef GL_NV_multisample_filter_hint
-#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
-#endif
-
-#ifndef GL_NV_depth_clamp
-#define GL_DEPTH_CLAMP_NV 0x864F
-#endif
-
-#ifndef GL_NV_occlusion_query
-#define GL_PIXEL_COUNTER_BITS_NV 0x8864
-#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
-#define GL_PIXEL_COUNT_NV 0x8866
-#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
-#endif
-
-#ifndef GL_NV_point_sprite
-#define GL_POINT_SPRITE_NV 0x8861
-#define GL_COORD_REPLACE_NV 0x8862
-#define GL_POINT_SPRITE_R_MODE_NV 0x8863
-#endif
-
-#ifndef GL_NV_texture_shader3
-#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
-#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
-#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
-#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
-#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
-#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
-#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
-#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
-#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
-#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
-#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
-#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
-#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
-#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
-#define GL_HILO8_NV 0x885E
-#define GL_SIGNED_HILO8_NV 0x885F
-#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
-#endif
-
-#ifndef GL_NV_vertex_program1_1
-#endif
-
-#ifndef GL_EXT_shadow_funcs
-#endif
-
-#ifndef GL_EXT_stencil_two_side
-#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
-#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
-#endif
-
-#ifndef GL_ATI_text_fragment_shader
-#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
-#endif
-
-#ifndef GL_APPLE_client_storage
-#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
-#endif
-
-#ifndef GL_APPLE_element_array
-#define GL_ELEMENT_ARRAY_APPLE 0x8768
-#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
-#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
-#endif
-
-#ifndef GL_APPLE_fence
-#define GL_DRAW_PIXELS_APPLE 0x8A0A
-#define GL_FENCE_APPLE 0x8A0B
-#endif
-
-#ifndef GL_APPLE_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
-#endif
-
-#ifndef GL_APPLE_vertex_array_range
-#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
-#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
-#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
-#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
-#define GL_STORAGE_CACHED_APPLE 0x85BE
-#define GL_STORAGE_SHARED_APPLE 0x85BF
-#endif
-
-#ifndef GL_APPLE_ycbcr_422
-#define GL_YCBCR_422_APPLE 0x85B9
-#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
-#endif
-
-#ifndef GL_S3_s3tc
-#define GL_RGB_S3TC 0x83A0
-#define GL_RGB4_S3TC 0x83A1
-#define GL_RGBA_S3TC 0x83A2
-#define GL_RGBA4_S3TC 0x83A3
-#endif
-
-#ifndef GL_ATI_draw_buffers
-#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
-#define GL_DRAW_BUFFER0_ATI 0x8825
-#define GL_DRAW_BUFFER1_ATI 0x8826
-#define GL_DRAW_BUFFER2_ATI 0x8827
-#define GL_DRAW_BUFFER3_ATI 0x8828
-#define GL_DRAW_BUFFER4_ATI 0x8829
-#define GL_DRAW_BUFFER5_ATI 0x882A
-#define GL_DRAW_BUFFER6_ATI 0x882B
-#define GL_DRAW_BUFFER7_ATI 0x882C
-#define GL_DRAW_BUFFER8_ATI 0x882D
-#define GL_DRAW_BUFFER9_ATI 0x882E
-#define GL_DRAW_BUFFER10_ATI 0x882F
-#define GL_DRAW_BUFFER11_ATI 0x8830
-#define GL_DRAW_BUFFER12_ATI 0x8831
-#define GL_DRAW_BUFFER13_ATI 0x8832
-#define GL_DRAW_BUFFER14_ATI 0x8833
-#define GL_DRAW_BUFFER15_ATI 0x8834
-#endif
-
-#ifndef GL_ATI_texture_env_combine3
-#define GL_MODULATE_ADD_ATI 0x8744
-#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
-#define GL_MODULATE_SUBTRACT_ATI 0x8746
-#endif
-
-#ifndef GL_ATI_texture_float
-#define GL_RGBA_FLOAT32_ATI 0x8814
-#define GL_RGB_FLOAT32_ATI 0x8815
-#define GL_ALPHA_FLOAT32_ATI 0x8816
-#define GL_INTENSITY_FLOAT32_ATI 0x8817
-#define GL_LUMINANCE_FLOAT32_ATI 0x8818
-#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
-#define GL_RGBA_FLOAT16_ATI 0x881A
-#define GL_RGB_FLOAT16_ATI 0x881B
-#define GL_ALPHA_FLOAT16_ATI 0x881C
-#define GL_INTENSITY_FLOAT16_ATI 0x881D
-#define GL_LUMINANCE_FLOAT16_ATI 0x881E
-#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
-#endif
-
-#ifndef GL_NV_float_buffer
-#define GL_FLOAT_R_NV 0x8880
-#define GL_FLOAT_RG_NV 0x8881
-#define GL_FLOAT_RGB_NV 0x8882
-#define GL_FLOAT_RGBA_NV 0x8883
-#define GL_FLOAT_R16_NV 0x8884
-#define GL_FLOAT_R32_NV 0x8885
-#define GL_FLOAT_RG16_NV 0x8886
-#define GL_FLOAT_RG32_NV 0x8887
-#define GL_FLOAT_RGB16_NV 0x8888
-#define GL_FLOAT_RGB32_NV 0x8889
-#define GL_FLOAT_RGBA16_NV 0x888A
-#define GL_FLOAT_RGBA32_NV 0x888B
-#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
-#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
-#define GL_FLOAT_RGBA_MODE_NV 0x888E
-#endif
-
-#ifndef GL_NV_fragment_program
-#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
-#define GL_FRAGMENT_PROGRAM_NV 0x8870
-#define GL_MAX_TEXTURE_COORDS_NV 0x8871
-#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
-#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
-#define GL_PROGRAM_ERROR_STRING_NV 0x8874
-#endif
-
-#ifndef GL_NV_half_float
-#define GL_HALF_FLOAT_NV 0x140B
-#endif
-
-#ifndef GL_NV_pixel_data_range
-#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
-#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
-#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
-#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
-#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
-#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
-#endif
-
-#ifndef GL_NV_primitive_restart
-#define GL_PRIMITIVE_RESTART_NV 0x8558
-#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
-#endif
-
-#ifndef GL_NV_texture_expand_normal
-#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
-#endif
-
-#ifndef GL_NV_vertex_program2
-#endif
-
-#ifndef GL_ATI_map_object_buffer
-#endif
-
-#ifndef GL_ATI_separate_stencil
-#define GL_STENCIL_BACK_FUNC_ATI 0x8800
-#define GL_STENCIL_BACK_FAIL_ATI 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
-#endif
-
-#ifndef GL_ATI_vertex_attrib_array_object
-#endif
-
-
-/*************************************************************/
-
-#ifndef GL_VERSION_1_2
-#define GL_VERSION_1_2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
-GLAPI void APIENTRY glBlendEquation (GLenum);
-GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
-GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
-GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
-GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
-GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
-GLAPI void APIENTRY glResetHistogram (GLenum);
-GLAPI void APIENTRY glResetMinmax (GLenum);
-GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-typedef void (APIENTRY * PFNGLBLENDEQUATIONPROC) (GLenum mode);
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
-typedef void (APIENTRY * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
-typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLRESETHISTOGRAMPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLRESETMINMAXPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-
-#ifndef GL_VERSION_1_3
-#define GL_VERSION_1_3 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTexture (GLenum);
-GLAPI void APIENTRY glClientActiveTexture (GLenum);
-GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
-GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
-GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
-GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
-GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
-GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
-GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
-GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-typedef void (APIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
-#endif
-
-#ifndef GL_VERSION_1_4
-#define GL_VERSION_1_4 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glFogCoordf (GLfloat);
-GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
-GLAPI void APIENTRY glFogCoordd (GLdouble);
-GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
-GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
-GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
-GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
-GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
-GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
-GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
-GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
-GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
-GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
-GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
-GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
-GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
-GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
-GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
-GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
-GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
-GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
-GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
-GLAPI void APIENTRY glWindowPos2iv (const GLint *);
-GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
-GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
-GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
-GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos3iv (const GLint *);
-GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-typedef void (APIENTRY * PFNGLFOGCOORDFPROC) (GLfloat coord);
-typedef void (APIENTRY * PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
-typedef void (APIENTRY * PFNGLFOGCOORDDPROC) (GLdouble coord);
-typedef void (APIENTRY * PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
-typedef void (APIENTRY * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (APIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IVPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IVPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
-#endif
-
-#ifndef GL_ARB_multitexture
-#define GL_ARB_multitexture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTextureARB (GLenum);
-GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
-GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
-GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
-GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
-#endif
-
-#ifndef GL_ARB_transpose_matrix
-#define GL_ARB_transpose_matrix 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
-GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
-GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
-GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-#endif
-
-#ifndef GL_ARB_multisample
-#define GL_ARB_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
-#endif
-
-#ifndef GL_ARB_texture_env_add
-#define GL_ARB_texture_env_add 1
-#endif
-
-#ifndef GL_ARB_texture_cube_map
-#define GL_ARB_texture_cube_map 1
-#endif
-
-#ifndef GL_ARB_texture_compression
-#define GL_ARB_texture_compression 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
-#endif
-
-#ifndef GL_ARB_texture_border_clamp
-#define GL_ARB_texture_border_clamp 1
-#endif
-
-#ifndef GL_ARB_point_parameters
-#define GL_ARB_point_parameters 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_ARB_vertex_blend
-#define GL_ARB_vertex_blend 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
-GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
-GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
-GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
-GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
-GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
-GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
-GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
-GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glVertexBlendARB (GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
-typedef void (APIENTRY * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
-typedef void (APIENTRY * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
-typedef void (APIENTRY * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
-typedef void (APIENTRY * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
-typedef void (APIENTRY * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
-typedef void (APIENTRY * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
-typedef void (APIENTRY * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
-typedef void (APIENTRY * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXBLENDARBPROC) (GLint count);
-#endif
-
-#ifndef GL_ARB_matrix_palette
-#define GL_ARB_matrix_palette 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
-GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
-GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
-GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
-GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
-typedef void (APIENTRY * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
-typedef void (APIENTRY * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
-typedef void (APIENTRY * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
-typedef void (APIENTRY * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_ARB_texture_env_combine
-#define GL_ARB_texture_env_combine 1
-#endif
-
-#ifndef GL_ARB_texture_env_crossbar
-#define GL_ARB_texture_env_crossbar 1
-#endif
-
-#ifndef GL_ARB_texture_env_dot3
-#define GL_ARB_texture_env_dot3 1
-#endif
-
-#ifndef GL_ARB_texture_mirror_repeat
-#define GL_ARB_texture_mirror_repeat 1
-#endif
-
-#ifndef GL_ARB_depth_texture
-#define GL_ARB_depth_texture 1
-#endif
-
-#ifndef GL_ARB_shadow
-#define GL_ARB_shadow 1
-#endif
-
-#ifndef GL_ARB_shadow_ambient
-#define GL_ARB_shadow_ambient 1
-#endif
-
-#ifndef GL_ARB_window_pos
-#define GL_ARB_window_pos 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
-GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
-GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
-GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
-GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
-GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
-GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
-GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
-GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
-#endif
-
-#ifndef GL_ARB_vertex_program
-#define GL_ARB_vertex_program 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
-GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
-GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
-GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
-GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
-GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
-GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
-GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
-GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
-GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
-GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
-GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
-GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
-GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
-GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
-GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
-GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
-GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
-GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
-GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
-GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
-GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
-GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
-GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
-GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
-GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
-GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
-GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
-GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
-typedef void (APIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
-typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
-typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
-typedef void (APIENTRY * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
-typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
-typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
-typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
-typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
-typedef GLboolean (APIENTRY * PFNGLISPROGRAMARBPROC) (GLuint program);
-#endif
-
-#ifndef GL_ARB_fragment_program
-#define GL_ARB_fragment_program 1
-/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
-#endif
-
-#ifndef GL_ARB_vertex_buffer_object
-#define GL_ARB_vertex_buffer_object 1
-/* GL types for handling large vertex buffer objects */
-/* Only used by this extension for now; later needs to be moved earlier in glext.h */
-#include <stddef.h>
-typedef ptrdiff_t GLintptrARB;
-typedef ptrdiff_t GLsizeiptrARB;
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
-GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
-GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
-GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
-GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
-GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
-GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
-GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
-GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
-typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
-typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
-typedef GLboolean (APIENTRY * PFNGLISBUFFERARBPROC) (GLuint buffer);
-typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
-typedef void (APIENTRY * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
-typedef void (APIENTRY * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
-typedef GLvoid* (APIENTRY * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
-typedef GLboolean (APIENTRY * PFNGLUNMAPBUFFERARBPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
-#endif
-
-#ifndef GL_EXT_abgr
-#define GL_EXT_abgr 1
-#endif
-
-#ifndef GL_EXT_blend_color
-#define GL_EXT_blend_color 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-#endif
-
-#ifndef GL_EXT_polygon_offset
-#define GL_EXT_polygon_offset 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
-#endif
-
-#ifndef GL_EXT_texture
-#define GL_EXT_texture 1
-#endif
-
-#ifndef GL_EXT_texture3D
-#define GL_EXT_texture3D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-#endif
-
-#ifndef GL_SGIS_texture_filter4
-#define GL_SGIS_texture_filter4 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
-typedef void (APIENTRY * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
-#endif
-
-#ifndef GL_EXT_subtexture
-#define GL_EXT_subtexture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-#endif
-
-#ifndef GL_EXT_copy_texture
-#define GL_EXT_copy_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
-GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
-GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-typedef void (APIENTRY * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-
-#ifndef GL_EXT_histogram
-#define GL_EXT_histogram 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
-GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
-GLAPI void APIENTRY glResetHistogramEXT (GLenum);
-GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLRESETMINMAXEXTPROC) (GLenum target);
-#endif
-
-#ifndef GL_EXT_convolution
-#define GL_EXT_convolution 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
-GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
-typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
-#endif
-
-#ifndef GL_EXT_color_matrix
-#define GL_EXT_color_matrix 1
-#endif
-
-#ifndef GL_SGI_color_table
-#define GL_SGI_color_table 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
-#endif
-
-#ifndef GL_SGIX_pixel_texture
-#define GL_SGIX_pixel_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
-#endif
-
-#ifndef GL_SGIS_pixel_texture
-#define GL_SGIS_pixel_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
-GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
-GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
-GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
-GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_SGIS_texture4D
-#define GL_SGIS_texture4D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE4DSGISPROC) (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);
-#endif
-
-#ifndef GL_SGI_texture_color_table
-#define GL_SGI_texture_color_table 1
-#endif
-
-#ifndef GL_EXT_cmyka
-#define GL_EXT_cmyka 1
-#endif
-
-#ifndef GL_EXT_texture_object
-#define GL_EXT_texture_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
-GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
-GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
-GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
-GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLboolean (APIENTRY * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
-typedef void (APIENTRY * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
-typedef void (APIENTRY * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
-typedef void (APIENTRY * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
-typedef GLboolean (APIENTRY * PFNGLISTEXTUREEXTPROC) (GLuint texture);
-typedef void (APIENTRY * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
-#endif
-
-#ifndef GL_SGIS_detail_texture
-#define GL_SGIS_detail_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-typedef void (APIENTRY * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-#endif
-
-#ifndef GL_SGIS_sharpen_texture
-#define GL_SGIS_sharpen_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-typedef void (APIENTRY * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-#endif
-
-#ifndef GL_EXT_packed_pixels
-#define GL_EXT_packed_pixels 1
-#endif
-
-#ifndef GL_SGIS_texture_lod
-#define GL_SGIS_texture_lod 1
-#endif
-
-#ifndef GL_SGIS_multisample
-#define GL_SGIS_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
-GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRY * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
-#endif
-
-#ifndef GL_EXT_rescale_normal
-#define GL_EXT_rescale_normal 1
-#endif
-
-#ifndef GL_EXT_vertex_array
-#define GL_EXT_vertex_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glArrayElementEXT (GLint);
-GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
-GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
-GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
-GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i);
-typedef void (APIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
-typedef void (APIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
-typedef void (APIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
-typedef void (APIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-#endif
-
-#ifndef GL_EXT_misc_attribute
-#define GL_EXT_misc_attribute 1
-#endif
-
-#ifndef GL_SGIS_generate_mipmap
-#define GL_SGIS_generate_mipmap 1
-#endif
-
-#ifndef GL_SGIX_clipmap
-#define GL_SGIX_clipmap 1
-#endif
-
-#ifndef GL_SGIX_shadow
-#define GL_SGIX_shadow 1
-#endif
-
-#ifndef GL_SGIS_texture_edge_clamp
-#define GL_SGIS_texture_edge_clamp 1
-#endif
-
-#ifndef GL_SGIS_texture_border_clamp
-#define GL_SGIS_texture_border_clamp 1
-#endif
-
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
-#endif
-
-#ifndef GL_EXT_blend_subtract
-#define GL_EXT_blend_subtract 1
-#endif
-
-#ifndef GL_EXT_blend_logic_op
-#define GL_EXT_blend_logic_op 1
-#endif
-
-#ifndef GL_SGIX_interlace
-#define GL_SGIX_interlace 1
-#endif
-
-#ifndef GL_SGIX_pixel_tiles
-#define GL_SGIX_pixel_tiles 1
-#endif
-
-#ifndef GL_SGIX_texture_select
-#define GL_SGIX_texture_select 1
-#endif
-
-#ifndef GL_SGIX_sprite
-#define GL_SGIX_sprite 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
-GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
-GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
-GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
-#endif
-
-#ifndef GL_SGIX_texture_multi_buffer
-#define GL_SGIX_texture_multi_buffer 1
-#endif
-
-#ifndef GL_EXT_point_parameters
-#define GL_EXT_point_parameters 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_SGIS_point_parameters
-#define GL_SGIS_point_parameters 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_SGIX_instruments
-#define GL_SGIX_instruments 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
-GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
-GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
-GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
-GLAPI void APIENTRY glStartInstrumentsSGIX (void);
-GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLint (APIENTRY * PFNGLGETINSTRUMENTSSGIXPROC) (void);
-typedef void (APIENTRY * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
-typedef GLint (APIENTRY * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
-typedef void (APIENTRY * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
-typedef void (APIENTRY * PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
-typedef void (APIENTRY * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
-#endif
-
-#ifndef GL_SGIX_texture_scale_bias
-#define GL_SGIX_texture_scale_bias 1
-#endif
-
-#ifndef GL_SGIX_framezoom
-#define GL_SGIX_framezoom 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFrameZoomSGIX (GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
-#endif
-
-#ifndef GL_SGIX_tag_sample_buffer
-#define GL_SGIX_tag_sample_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTagSampleBufferSGIX (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
-#endif
-
-#ifndef GL_SGIX_polynomial_ffd
-#define GL_SGIX_polynomial_ffd 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
-GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
-GLAPI void APIENTRY glDeformSGIX (GLbitfield);
-GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
-typedef void (APIENTRY * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
-typedef void (APIENTRY * PFNGLDEFORMSGIXPROC) (GLbitfield mask);
-typedef void (APIENTRY * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
-#endif
-
-#ifndef GL_SGIX_reference_plane
-#define GL_SGIX_reference_plane 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
-#endif
-
-#ifndef GL_SGIX_flush_raster
-#define GL_SGIX_flush_raster 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushRasterSGIX (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFLUSHRASTERSGIXPROC) (void);
-#endif
-
-#ifndef GL_SGIX_depth_texture
-#define GL_SGIX_depth_texture 1
-#endif
-
-#ifndef GL_SGIS_fog_function
-#define GL_SGIS_fog_function 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
-GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
-typedef void (APIENTRY * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
-#endif
-
-#ifndef GL_SGIX_fog_offset
-#define GL_SGIX_fog_offset 1
-#endif
-
-#ifndef GL_HP_image_transform
-#define GL_HP_image_transform 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_HP_convolution_border_modes
-#define GL_HP_convolution_border_modes 1
-#endif
-
-#ifndef GL_SGIX_texture_add_env
-#define GL_SGIX_texture_add_env 1
-#endif
-
-#ifndef GL_EXT_color_subtable
-#define GL_EXT_color_subtable 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-#endif
-
-#ifndef GL_PGI_vertex_hints
-#define GL_PGI_vertex_hints 1
-#endif
-
-#ifndef GL_PGI_misc_hints
-#define GL_PGI_misc_hints 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glHintPGI (GLenum, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLHINTPGIPROC) (GLenum target, GLint mode);
-#endif
-
-#ifndef GL_EXT_paletted_texture
-#define GL_EXT_paletted_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_EXT_clip_volume_hint
-#define GL_EXT_clip_volume_hint 1
-#endif
-
-#ifndef GL_SGIX_list_priority
-#define GL_SGIX_list_priority 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
-GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
-GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
-GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
-#endif
-
-#ifndef GL_SGIX_ir_instrument1
-#define GL_SGIX_ir_instrument1 1
-#endif
-
-#ifndef GL_SGIX_calligraphic_fragment
-#define GL_SGIX_calligraphic_fragment 1
-#endif
-
-#ifndef GL_SGIX_texture_lod_bias
-#define GL_SGIX_texture_lod_bias 1
-#endif
-
-#ifndef GL_SGIX_shadow_ambient
-#define GL_SGIX_shadow_ambient 1
-#endif
-
-#ifndef GL_EXT_index_texture
-#define GL_EXT_index_texture 1
-#endif
-
-#ifndef GL_EXT_index_material
-#define GL_EXT_index_material 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
-#endif
-
-#ifndef GL_EXT_index_func
-#define GL_EXT_index_func 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
-#endif
-
-#ifndef GL_EXT_index_array_formats
-#define GL_EXT_index_array_formats 1
-#endif
-
-#ifndef GL_EXT_compiled_vertex_array
-#define GL_EXT_compiled_vertex_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
-GLAPI void APIENTRY glUnlockArraysEXT (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
-typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void);
-#endif
-
-#ifndef GL_EXT_cull_vertex
-#define GL_EXT_cull_vertex 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
-GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_SGIX_ycrcb
-#define GL_SGIX_ycrcb 1
-#endif
-
-#ifndef GL_SGIX_fragment_lighting
-#define GL_SGIX_fragment_lighting 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
-GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
-GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
-GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
-GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
-GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
-#endif
-
-#ifndef GL_IBM_rasterpos_clip
-#define GL_IBM_rasterpos_clip 1
-#endif
-
-#ifndef GL_HP_texture_lighting
-#define GL_HP_texture_lighting 1
-#endif
-
-#ifndef GL_EXT_draw_range_elements
-#define GL_EXT_draw_range_elements 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
-#endif
-
-#ifndef GL_WIN_phong_shading
-#define GL_WIN_phong_shading 1
-#endif
-
-#ifndef GL_WIN_specular_fog
-#define GL_WIN_specular_fog 1
-#endif
-
-#ifndef GL_EXT_light_texture
-#define GL_EXT_light_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glApplyTextureEXT (GLenum);
-GLAPI void APIENTRY glTextureLightEXT (GLenum);
-GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
-typedef void (APIENTRY * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
-typedef void (APIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
-#endif
-
-#ifndef GL_SGIX_blend_alpha_minmax
-#define GL_SGIX_blend_alpha_minmax 1
-#endif
-
-#ifndef GL_EXT_bgra
-#define GL_EXT_bgra 1
-#endif
-
-#ifndef GL_SGIX_async
-#define GL_SGIX_async 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
-GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
-GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
-GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
-GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
-GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
-typedef GLint (APIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
-typedef GLint (APIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
-typedef GLuint (APIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
-typedef void (APIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
-typedef GLboolean (APIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
-#endif
-
-#ifndef GL_SGIX_async_pixel
-#define GL_SGIX_async_pixel 1
-#endif
-
-#ifndef GL_SGIX_async_histogram
-#define GL_SGIX_async_histogram 1
-#endif
-
-#ifndef GL_INTEL_parallel_arrays
-#define GL_INTEL_parallel_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
-GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
-GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
-GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
-typedef void (APIENTRY * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
-typedef void (APIENTRY * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
-typedef void (APIENTRY * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
-#endif
-
-#ifndef GL_HP_occlusion_test
-#define GL_HP_occlusion_test 1
-#endif
-
-#ifndef GL_EXT_pixel_transform
-#define GL_EXT_pixel_transform 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_EXT_pixel_transform_color_table
-#define GL_EXT_pixel_transform_color_table 1
-#endif
-
-#ifndef GL_EXT_shared_texture_palette
-#define GL_EXT_shared_texture_palette 1
-#endif
-
-#ifndef GL_EXT_separate_specular_color
-#define GL_EXT_separate_specular_color 1
-#endif
-
-#ifndef GL_EXT_secondary_color
-#define GL_EXT_secondary_color 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
-GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
-GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
-GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
-GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
-GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
-GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
-GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
-GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
-GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
-GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
-GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_EXT_texture_perturb_normal
-#define GL_EXT_texture_perturb_normal 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureNormalEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
-GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (APIENTRY * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-#ifndef GL_EXT_fog_coord
-#define GL_EXT_fog_coord 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
-GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
-GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
-GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
-GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
-typedef void (APIENTRY * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
-typedef void (APIENTRY * PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
-typedef void (APIENTRY * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
-typedef void (APIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_REND_screen_coordinates
-#define GL_REND_screen_coordinates 1
-#endif
-
-#ifndef GL_EXT_coordinate_frame
-#define GL_EXT_coordinate_frame 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
-GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
-GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
-GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
-GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
-GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
-GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
-GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
-GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
-GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
-GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
-GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
-GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
-typedef void (APIENTRY * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
-typedef void (APIENTRY * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
-typedef void (APIENTRY * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
-typedef void (APIENTRY * PFNGLTANGENT3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
-typedef void (APIENTRY * PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
-typedef void (APIENTRY * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
-typedef void (APIENTRY * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
-typedef void (APIENTRY * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
-typedef void (APIENTRY * PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
-typedef void (APIENTRY * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_EXT_texture_env_combine
-#define GL_EXT_texture_env_combine 1
-#endif
-
-#ifndef GL_APPLE_specular_vector
-#define GL_APPLE_specular_vector 1
-#endif
-
-#ifndef GL_APPLE_transform_hint
-#define GL_APPLE_transform_hint 1
-#endif
-
-#ifndef GL_SGIX_fog_scale
-#define GL_SGIX_fog_scale 1
-#endif
-
-#ifndef GL_SUNX_constant_data
-#define GL_SUNX_constant_data 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFinishTextureSUNX (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFINISHTEXTURESUNXPROC) (void);
-#endif
-
-#ifndef GL_SUN_global_alpha
-#define GL_SUN_global_alpha 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
-GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
-GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
-GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
-GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
-GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
-GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
-GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
-#endif
-
-#ifndef GL_SUN_triangle_list
-#define GL_SUN_triangle_list 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
-GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
-GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
-GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
-GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
-GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
-GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
-#endif
-
-#ifndef GL_SUN_vertex
-#define GL_SUN_vertex 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-#endif
-
-#ifndef GL_EXT_blend_func_separate
-#define GL_EXT_blend_func_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#endif
-
-#ifndef GL_INGR_blend_func_separate
-#define GL_INGR_blend_func_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#endif
-
-#ifndef GL_INGR_color_clamp
-#define GL_INGR_color_clamp 1
-#endif
-
-#ifndef GL_INGR_interlace_read
-#define GL_INGR_interlace_read 1
-#endif
-
-#ifndef GL_EXT_stencil_wrap
-#define GL_EXT_stencil_wrap 1
-#endif
-
-#ifndef GL_EXT_422_pixels
-#define GL_EXT_422_pixels 1
-#endif
-
-#ifndef GL_NV_texgen_reflection
-#define GL_NV_texgen_reflection 1
-#endif
-
-#ifndef GL_SUN_convolution_border_modes
-#define GL_SUN_convolution_border_modes 1
-#endif
-
-#ifndef GL_EXT_texture_env_add
-#define GL_EXT_texture_env_add 1
-#endif
-
-#ifndef GL_EXT_texture_lod_bias
-#define GL_EXT_texture_lod_bias 1
-#endif
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-#ifndef GL_EXT_vertex_weighting
-#define GL_EXT_vertex_weighting 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
-GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
-GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_NV_light_max_exponent
-#define GL_NV_light_max_exponent 1
-#endif
-
-#ifndef GL_NV_vertex_array_range
-#define GL_NV_vertex_array_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
-GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
-typedef void (APIENTRY * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
-#endif
-
-#ifndef GL_NV_register_combiners
-#define GL_NV_register_combiners 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
-GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
-GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
-GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
-GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
-GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
-typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
-#endif
-
-#ifndef GL_NV_fog_distance
-#define GL_NV_fog_distance 1
-#endif
-
-#ifndef GL_NV_texgen_emboss
-#define GL_NV_texgen_emboss 1
-#endif
-
-#ifndef GL_NV_blend_square
-#define GL_NV_blend_square 1
-#endif
-
-#ifndef GL_NV_texture_env_combine4
-#define GL_NV_texture_env_combine4 1
-#endif
-
-#ifndef GL_MESA_resize_buffers
-#define GL_MESA_resize_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glResizeBuffersMESA (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLRESIZEBUFFERSMESAPROC) (void);
-#endif
-
-#ifndef GL_MESA_window_pos
-#define GL_MESA_window_pos 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
-GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
-GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
-GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
-GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
-GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
-GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
-GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
-GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
-GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
-GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
-GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
-GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
-#endif
-
-#ifndef GL_IBM_cull_vertex
-#define GL_IBM_cull_vertex 1
-#endif
-
-#ifndef GL_IBM_multimode_draw_arrays
-#define GL_IBM_multimode_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiModeDrawArraysIBM (GLenum, const GLint *, const GLsizei *, GLsizei, GLint);
-GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* *, GLsizei, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
-typedef void (APIENTRY * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, GLint modestride);
-#endif
-
-#ifndef GL_IBM_vertex_array_lists
-#define GL_IBM_vertex_array_lists 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
-GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-#endif
-
-#ifndef GL_SGIX_subsample
-#define GL_SGIX_subsample 1
-#endif
-
-#ifndef GL_SGIX_ycrcba
-#define GL_SGIX_ycrcba 1
-#endif
-
-#ifndef GL_SGIX_ycrcb_subsample
-#define GL_SGIX_ycrcb_subsample 1
-#endif
-
-#ifndef GL_SGIX_depth_pass_instrument
-#define GL_SGIX_depth_pass_instrument 1
-#endif
-
-#ifndef GL_3DFX_texture_compression_FXT1
-#define GL_3DFX_texture_compression_FXT1 1
-#endif
-
-#ifndef GL_3DFX_multisample
-#define GL_3DFX_multisample 1
-#endif
-
-#ifndef GL_3DFX_tbuffer
-#define GL_3DFX_tbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
-#endif
-
-#ifndef GL_EXT_multisample
-#define GL_EXT_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
-GLAPI void APIENTRY glSamplePatternEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRY * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
-#endif
-
-#ifndef GL_SGIX_vertex_preclip
-#define GL_SGIX_vertex_preclip 1
-#endif
-
-#ifndef GL_SGIX_convolution_accuracy
-#define GL_SGIX_convolution_accuracy 1
-#endif
-
-#ifndef GL_SGIX_resample
-#define GL_SGIX_resample 1
-#endif
-
-#ifndef GL_SGIS_point_line_texgen
-#define GL_SGIS_point_line_texgen 1
-#endif
-
-#ifndef GL_SGIS_texture_color_mask
-#define GL_SGIS_texture_color_mask 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-#endif
-
-#ifndef GL_SGIX_igloo_interface
-#define GL_SGIX_igloo_interface 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
-#endif
-
-#ifndef GL_EXT_texture_env_dot3
-#define GL_EXT_texture_env_dot3 1
-#endif
-
-#ifndef GL_ATI_texture_mirror_once
-#define GL_ATI_texture_mirror_once 1
-#endif
-
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
-GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
-GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
-GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glFinishFenceNV (GLuint);
-GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (APIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (APIENTRY * PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (APIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (APIENTRY * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (APIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-#ifndef GL_NV_evaluators
-#define GL_NV_evaluators 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
-GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
-GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
-typedef void (APIENTRY * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
-typedef void (APIENTRY * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
-#endif
-
-#ifndef GL_NV_packed_depth_stencil
-#define GL_NV_packed_depth_stencil 1
-#endif
-
-#ifndef GL_NV_register_combiners2
-#define GL_NV_register_combiners2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_NV_texture_compression_vtc
-#define GL_NV_texture_compression_vtc 1
-#endif
-
-#ifndef GL_NV_texture_rectangle
-#define GL_NV_texture_rectangle 1
-#endif
-
-#ifndef GL_NV_texture_shader
-#define GL_NV_texture_shader 1
-#endif
-
-#ifndef GL_NV_texture_shader2
-#define GL_NV_texture_shader2 1
-#endif
-
-#ifndef GL_NV_vertex_array_range2
-#define GL_NV_vertex_array_range2 1
-#endif
-
-#ifndef GL_NV_vertex_program
-#define GL_NV_vertex_program 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
-GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
-GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
-GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
-GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
-GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
-GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
-GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
-GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
-GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
-GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
-GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
-GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
-GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
-GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
-GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
-GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
-GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
-GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
-GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
-GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
-GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
-GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLboolean (APIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
-typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
-typedef void (APIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRY * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
-typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
-typedef void (APIENTRY * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
-typedef GLboolean (APIENTRY * PFNGLISPROGRAMNVPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
-#endif
-
-#ifndef GL_SGIX_texture_coordinate_clamp
-#define GL_SGIX_texture_coordinate_clamp 1
-#endif
-
-#ifndef GL_SGIX_scalebias_hint
-#define GL_SGIX_scalebias_hint 1
-#endif
-
-#ifndef GL_OML_interlace
-#define GL_OML_interlace 1
-#endif
-
-#ifndef GL_OML_subsample
-#define GL_OML_subsample 1
-#endif
-
-#ifndef GL_OML_resample
-#define GL_OML_resample 1
-#endif
-
-#ifndef GL_NV_copy_depth_to_color
-#define GL_NV_copy_depth_to_color 1
-#endif
-
-#ifndef GL_ATI_envmap_bumpmap
-#define GL_ATI_envmap_bumpmap 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
-GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
-typedef void (APIENTRY * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
-typedef void (APIENTRY * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
-typedef void (APIENTRY * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
-#endif
-
-#ifndef GL_ATI_fragment_shader
-#define GL_ATI_fragment_shader 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
-GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
-GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
-GLAPI void APIENTRY glBeginFragmentShaderATI (void);
-GLAPI void APIENTRY glEndFragmentShaderATI (void);
-GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
-GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
-GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLuint (APIENTRY * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
-typedef void (APIENTRY * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
-typedef void (APIENTRY * PFNGLENDFRAGMENTSHADERATIPROC) (void);
-typedef void (APIENTRY * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
-typedef void (APIENTRY * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
-typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-typedef void (APIENTRY * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
-#endif
-
-#ifndef GL_ATI_pn_triangles
-#define GL_ATI_pn_triangles 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
-GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
-#endif
-
-#ifndef GL_ATI_vertex_array_object
-#define GL_ATI_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
-GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
-GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
-GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
-GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
-GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
-GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLuint (APIENTRY * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
-typedef GLboolean (APIENTRY * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRY * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
-typedef void (APIENTRY * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRY * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRY * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRY * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
-#endif
-
-#ifndef GL_EXT_vertex_shader
-#define GL_EXT_vertex_shader 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginVertexShaderEXT (void);
-GLAPI void APIENTRY glEndVertexShaderEXT (void);
-GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
-GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
-GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
-GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
-GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
-GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
-GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
-GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
-GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
-GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
-GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
-GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
-GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
-GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
-GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
-GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
-GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
-GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
-GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
-GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
-GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
-GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
-GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
-GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBEGINVERTEXSHADEREXTPROC) (void);
-typedef void (APIENTRY * PFNGLENDVERTEXSHADEREXTPROC) (void);
-typedef void (APIENTRY * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
-typedef GLuint (APIENTRY * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
-typedef void (APIENTRY * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
-typedef void (APIENTRY * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
-typedef void (APIENTRY * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
-typedef void (APIENTRY * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-typedef void (APIENTRY * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-typedef void (APIENTRY * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-typedef void (APIENTRY * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-typedef GLuint (APIENTRY * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
-typedef void (APIENTRY * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
-typedef void (APIENTRY * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
-typedef void (APIENTRY * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
-typedef void (APIENTRY * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
-typedef void (APIENTRY * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
-typedef void (APIENTRY * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
-typedef void (APIENTRY * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
-typedef void (APIENTRY * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
-typedef void (APIENTRY * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
-typedef void (APIENTRY * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
-typedef void (APIENTRY * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
-typedef void (APIENTRY * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-typedef GLuint (APIENTRY * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDPARAMETEREXTPROC) (GLenum value);
-typedef GLboolean (APIENTRY * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
-typedef void (APIENTRY * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRY * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRY * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-typedef void (APIENTRY * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
-typedef void (APIENTRY * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRY * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRY * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-typedef void (APIENTRY * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRY * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRY * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-#endif
-
-#ifndef GL_ATI_vertex_streams
-#define GL_ATI_vertex_streams 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
-GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
-GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
-GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
-GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
-GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
-GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
-GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
-GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
-GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
-typedef void (APIENTRY * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
-#endif
-
-#ifndef GL_ATI_element_array
-#define GL_ATI_element_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
-GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
-GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
-#endif
-
-#ifndef GL_SUN_mesh_array
-#define GL_SUN_mesh_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
-#endif
-
-#ifndef GL_SUN_slice_accum
-#define GL_SUN_slice_accum 1
-#endif
-
-#ifndef GL_NV_multisample_filter_hint
-#define GL_NV_multisample_filter_hint 1
-#endif
-
-#ifndef GL_NV_depth_clamp
-#define GL_NV_depth_clamp 1
-#endif
-
-#ifndef GL_NV_occlusion_query
-#define GL_NV_occlusion_query 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
-GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
-GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
-GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
-GLAPI void APIENTRY glEndOcclusionQueryNV (void);
-GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
-typedef void (APIENTRY * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (APIENTRY * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLENDOCCLUSIONQUERYNVPROC) (void);
-typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
-#endif
-
-#ifndef GL_NV_point_sprite
-#define GL_NV_point_sprite 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
-GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-#endif
-
-#ifndef GL_NV_texture_shader3
-#define GL_NV_texture_shader3 1
-#endif
-
-#ifndef GL_NV_vertex_program1_1
-#define GL_NV_vertex_program1_1 1
-#endif
-
-#ifndef GL_EXT_shadow_funcs
-#define GL_EXT_shadow_funcs 1
-#endif
-
-#ifndef GL_EXT_stencil_two_side
-#define GL_EXT_stencil_two_side 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
-#endif
-
-#ifndef GL_ATI_text_fragment_shader
-#define GL_ATI_text_fragment_shader 1
-#endif
-
-#ifndef GL_APPLE_client_storage
-#define GL_APPLE_client_storage 1
-#endif
-
-#ifndef GL_APPLE_element_array
-#define GL_APPLE_element_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
-GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
-GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
-GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
-GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
-typedef void (APIENTRY * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-typedef void (APIENTRY * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
-#endif
-
-#ifndef GL_APPLE_fence
-#define GL_APPLE_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
-GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
-GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
-GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
-GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
-GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
-GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
-GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
-typedef void (APIENTRY * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
-typedef void (APIENTRY * PFNGLSETFENCEAPPLEPROC) (GLuint fence);
-typedef GLboolean (APIENTRY * PFNGLISFENCEAPPLEPROC) (GLuint fence);
-typedef GLboolean (APIENTRY * PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
-typedef void (APIENTRY * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
-typedef GLboolean (APIENTRY * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
-typedef void (APIENTRY * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
-#endif
-
-#ifndef GL_APPLE_vertex_array_object
-#define GL_APPLE_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
-GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
-GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
-typedef void (APIENTRY * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
-typedef void (APIENTRY * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
-typedef GLboolean (APIENTRY * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
-#endif
-
-#ifndef GL_APPLE_vertex_array_range
-#define GL_APPLE_vertex_array_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
-GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
-GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
-typedef void (APIENTRY * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
-#endif
-
-#ifndef GL_APPLE_ycbcr_422
-#define GL_APPLE_ycbcr_422 1
-#endif
-
-#ifndef GL_S3_s3tc
-#define GL_S3_s3tc 1
-#endif
-
-#ifndef GL_ATI_draw_buffers
-#define GL_ATI_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
-#endif
-
-#ifndef GL_ATI_texture_env_combine3
-#define GL_ATI_texture_env_combine3 1
-#endif
-
-#ifndef GL_ATI_texture_float
-#define GL_ATI_texture_float 1
-#endif
-
-#ifndef GL_NV_float_buffer
-#define GL_NV_float_buffer 1
-#endif
-
-#ifndef GL_NV_fragment_program
-#define GL_NV_fragment_program 1
-/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
-GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
-GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
-typedef void (APIENTRY * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
-typedef void (APIENTRY * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
-#endif
-
-#ifndef GL_NV_half_float
-#define GL_NV_half_float 1
-/* GL type for representing NVIDIA "half" floating point type in host memory */
-/* Only used by this extension for now; later needs to be moved earlier in glext.h */
-typedef unsigned short GLhalfNV;
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
-GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
-GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
-GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
-GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
-GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
-GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
-GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
-GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
-GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
-GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
-GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
-GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
-GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
-typedef void (APIENTRY * PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
-typedef void (APIENTRY * PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-typedef void (APIENTRY * PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
-typedef void (APIENTRY * PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-typedef void (APIENTRY * PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
-typedef void (APIENTRY * PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
-typedef void (APIENTRY * PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
-typedef void (APIENTRY * PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
-typedef void (APIENTRY * PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-typedef void (APIENTRY * PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
-typedef void (APIENTRY * PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-#endif
-
-#ifndef GL_NV_pixel_data_range
-#define GL_NV_pixel_data_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
-GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
-typedef void (APIENTRY * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
-#endif
-
-#ifndef GL_NV_primitive_restart
-#define GL_NV_primitive_restart 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPrimitiveRestartNV (void);
-GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPRIMITIVERESTARTNVPROC) (void);
-typedef void (APIENTRY * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
-#endif
-
-#ifndef GL_NV_texture_expand_normal
-#define GL_NV_texture_expand_normal 1
-#endif
-
-#ifndef GL_NV_vertex_program2
-#define GL_NV_vertex_program2 1
-#endif
-
-#ifndef GL_ATI_map_object_buffer
-#define GL_ATI_map_object_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
-GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLvoid* (APIENTRY * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRY * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
-#endif
-
-#ifndef GL_ATI_separate_stencil
-#define GL_ATI_separate_stencil 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-typedef void (APIENTRY * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-#endif
-
-#ifndef GL_ATI_vertex_attrib_array_object
-#define GL_ATI_vertex_attrib_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
-GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=OClock
-Name[af]=Horlosie
-Name[be]=Гадзіннік
-Name[bg]=Часовник
-Name[eo]=Horloĝo
-Name[lt]=Laikrodis
-Name[lv]=Pulkstenis
-Name[pl]=O zegar
-Name[ru]=Часы
-Name[sv]=Oclock
-Name[th]=นาฬิกา
-Name[ven]=Ntha ha Thoho
-Name[zu]=Iwashi
-Comment=Clock
-Comment[af]=Horlosie
-Comment[ar]=ساعة
-Comment[be]=Гадзіннік
-Comment[bg]=Часовник
-Comment[bs]=Sat
-Comment[cs]=Hodiny
-Comment[da]=Ur
-Comment[de]=Uhr
-Comment[el]=Ρολόι
-Comment[eo]=Iu horloĝo
-Comment[es]=Reloj
-Comment[et]=Kell
-Comment[eu]=Erlojua
-Comment[fi]=Kello
-Comment[fr]=Horloge
-Comment[he]=שעון
-Comment[hu]=óra
-Comment[is]=Klukka
-Comment[it]=Orologio
-Comment[ja]=時計
-Comment[lt]=Laikrodis
-Comment[lv]=Pulkstenis
-Comment[nl]=Klok
-Comment[nn]=Klokke
-Comment[no]=Rund klokke
-Comment[pl]=Okrągły zegar
-Comment[pt]=Rel\8eógio
-Comment[pt_BR]=Relógio
-Comment[ro]=Ceas
-Comment[ru]=Часы
-Comment[sk]=Hodiny
-Comment[sl]=Ura
-Comment[sv]=Klocka
-Comment[ta]=¸Ê¸¡Ãõ
-Comment[th]=นาฬิกา
-Comment[tr]=Saat
-Comment[uk]=Годинник
-Comment[ven]=Tshifhinga
-Comment[vi]=Đồng hô`
-Comment[xh]=Iwatshi
-Comment[zh_CN]=时钟
-Comment[zh_TW]=時鐘
-Comment[zu]=Iwashi
-Exec=oclock
-Terminal=false
-Icon=oclock.png
-Type=Application
-Categories=Utility;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Type=XSession
-Exec=twm
-TryExec=twm
-Name=TWM
-Comment=The Tab Window Manager
-Comment[nl]=De Tab Window Manager
-Comment[sv]=FlikfĂśnsterhanteraren
-Comment[pl]=Prosty zarządca okien twm
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=Twm
-Comment=Tab Window Manager
-Comment[pl]=Prosty zarządca okien twm
-Exec=twm
-TryExec=twm
-
-[Window Manager]
-SessionManaged=false
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=X Calc
-Comment=Scientific calculator for X
-Comment[pl]=Kalkulator naukowy dla X
-GenericName=Calculator
-GenericName[pl]=Kalkulator
-Exec=xcalc
-Icon=xcalc
-Type=Application
-Categories=Utility;Calculator;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=X Clipboard
-Name[af]=X Klipbord
-Name[ar]=حافظة اكس
-Name[az]=X Ara yaddaşı
-Name[br]=Golver X
-Name[ca]=Portapapers X
-Name[da]=X Klippebord
-Name[de]=X-Clipboard
-Name[el]=Πρόχειρο του X
-Name[eo]=XPoŝo
-Name[es]=Portapapeles de X
-Name[eu]=X Paperzorroa
-Name[fi]=X-leikepöytä
-Name[fr]=Presse-papiers X
-Name[hr]=X odlagalište
-Name[hu]=Vágólap
-Name[is]=X klemmuspjald
-Name[it]=Appunti di X
-Name[ko]=X용 클립보드
-Name[lv]=X Starpliktuve
-Name[mk]=X инсерти
-Name[no]=X-utklippstavle
-Name[oc]=Tapissaria X
-Name[pl]=X schowek
-Name[pt]=Área de Transferência X
-Name[pt_BR]=Área de Transferência X
-Name[ro]=Clipboard X
-Name[ru]=Буфер обмена X
-Name[sv]=X Klippbord
-Name[ta]=X À¢ÊôÒôÀĨ¸
-Name[th]=คลิปบอร์ดของ X
-Name[tr]=X Panosu
-Name[uk]=Кишеня X
-Name[ven]=Bodo yau Farisa
-Name[xh]=Ibhodi eqhotyoshelweyo ye X
-Name[zh_CN]=X 剪贴板
-Name[zh_TW]=X 剪貼簿
-Name[zu]=X Ibhodi eliciphiziwe
-Comment=X11 Clipboard viewer
-Comment[af]=Klipbord Aansig
-Comment[ar]=عارض الحافظة
-Comment[bg]=Преглед за Clipboard
-Comment[br]=Diskouezer golver X
-Comment[bs]=Preglednik clipboard-a
-Comment[ca]=Visualitzador del tauler X
-Comment[cs]=Prohlížeč clipboardu
-Comment[da]=X Klippebordsfremviser
-Comment[de]=Inhalt der Zwischenablage anzeigen
-Comment[el]=Προβολή Πρόχειρου
-Comment[eo]=Rigardilo por la X-poŝenhavo
-Comment[es]=Visor del portapapeles para X
-Comment[fi]=X-leikepöydän näyttäjä
-Comment[eu]=Arbelaren Ikusgailua
-Comment[fi]=Leikepöydän näyttäjä
-Comment[fr]=Pour afficher le contenu du presse-papiers
-Comment[he]=מציג לוח עריכה
-Comment[hr]=Preglednik odlagališta
-Comment[hu]=Grafikus vágólap néző
-Comment[is]=Klippiborðsskoðari
-Comment[it]=Visualizzatore degli appunti
-Comment[ja]=クリップボードビューア
-Comment[lt]=Laikinos talpyklės žiūriklis
-Comment[lv]=Starpliktuves Skatītājs
-Comment[nl]=klembordweergaveprogramma
-Comment[nn]=Utklippstavlevisar
-Comment[no]=Fremviser for utklippstavlen
-Comment[pl]=Przeglądarka schowka dla X11
-Comment[pt]=Visualizador da área de tranferência do X
-Comment[pt_BR]=Visualizador da área de transferência do X
-Comment[ro]=Vizualizor de clipboard
-Comment[ru]=Программа просмотра буфера X
-Comment[sk]=Prehliadač schránky
-Comment[sl]=Pregledovalnik odložišča
-Comment[sv]=Klippbordsvisare
-Comment[ta]=´ðÎôÀĨ¸ì ¸¡ðÊ
-Comment[th]=ตัวแสดงเนื้อหาคลิปบอร์ด
-Comment[tr]=Pano Görüntüleyici
-Comment[uk]=Переглядач кишені
-Comment[ven]=Muvhoni wa Bodo yau Farisa
-Comment[vi]=Trình xem clipboard
-Comment[xh]=Umboniseli Womfanekiso Obheka Phambili
-Comment[zh_CN]=剪贴板查看器
-Comment[zh_TW]=剪貼簿檢視器
-Comment[zu]=Umboniseli Webhodi eliciphizekayo
-Exec=xclipboard
-Icon=xclipboard.png
-Type=Application
-Terminal=false
-Categories=Utility;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-SwallowTitle=xclock
-SwallowTitle[no]=xclock
-SwallowTitle[pl]=xclock
-SwallowExec=xclock -padding 0
-Name=X Clock
-Name[af]=X Horlosie
-Name[ar]=ساعة اكس
-Name[az]=X Saatı
-Name[be]=X Гадзіннік
-Name[bg]=Часовник на X
-Name[br]=Eureier X
-Name[bs]=X Sat
-Name[ca]=Rellotge X
-Name[da]=X Ur
-Name[de]=X-Clock
-Name[el]=Ρολόι X
-Name[eo]=XHorloĝo
-Name[es]=Reloj de X
-Name[fi]=X-kello
-Name[fr]=XClock
-Name[hr]=X Sat
-Name[is]=X-klukka
-Name[ko]=X용 시계
-Name[lv]=X Pulkstenis
-Name[mi]=Karaka X
-Name[mk]=X часовник
-Name[nn]=X-klokke
-Name[no]=X-klokke
-Name[oc]=orlotge X
-Name[pl]=X zegar
-Name[pt]=Relógio X
-Name[pt_BR]=Relógio X
-Name[ro]=Ceas X
-Name[ru]=Часы для X
-Name[sv]=X clock
-# bogus
-# Name[ta]=X ¸Ê¸¡Ãõ
-Name[th]=นาฬิกาของ X
-Name[tr]=X Saati
-Name[ven]=Tshifhinga tsha X
-Name[vi]=Đồng hô` X
-Name[xh]=Ikloko ye X
-Name[zh_CN]=X 时钟
-Name[zh_TW]=X 時鐘
-Name[zu]=X Iwashi
-Comment=Clock
-Comment[af]=Horlosie
-Comment[ar]=ساعة
-Comment[be]=Гадзіннік
-Comment[bg]=Часовник
-Comment[bs]=Sat
-Comment[cs]=Hodiny
-Comment[da]=Ur
-Comment[de]=Uhr
-Comment[el]=Ρολόι
-Comment[eo]=Iu horloĝo
-Comment[es]=Reloj
-Comment[et]=Kell
-Comment[eu]=Erlojua
-Comment[fi]=Kello
-Comment[fr]=Horloge
-Comment[he]=שעון
-Comment[hu]=óra
-Comment[is]=Klukka
-Comment[it]=Orologio
-Comment[ja]=時計
-Comment[lt]=Laikrodis
-Comment[lv]=Pulkstenis
-Comment[nl]=klok
-Comment[nn]=Klokke
-Comment[no]=Rund klokke
-Comment[pl]=Zegar
-Comment[pt]=Relógio
-Comment[pt_BR]=Relógio
-Comment[ro]=Ceas
-Comment[ru]=Часы
-Comment[sk]=Hodiny
-Comment[sl]=Ura
-Comment[sv]=Klocka
-# bogus
-# Comment[ta]=¸Ê¸¡Ãõ
-Comment[th]=นาฬิกา
-Comment[tr]=Saat
-Comment[uk]=Годинник
-Comment[ven]=Tshifhinga
-Comment[vi]=Đồng hô`
-Comment[xh]=Iwatshi
-Comment[zh_CN]=时钟
-Comment[zh_TW]=時鐘
-Comment[zu]=Iwashi
-Exec=xclock
-Icon=xclock.png
-Terminal=false
-Type=Application
-Categories=Utility;Clock;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Name=X Console
-Name[br]=Letrin X
-Name[ca]=Consola X
-Name[cs]= X Console
-Name[da]=X konsol
-Name[fi]=X-konsoli
-Name[hr]=X konzola
-Name[hu]=X konzol
-Name[is]=X kerfisskjár
-Name[it]=Console di X
-Name[no]=X-konsoll
-Name[pl]=X Konsola
-Name[pt]=Consola X
-Name[pt_BR]=Console X
-Name[ro]=Consola X
-Name[ru]=XConsole
-Name[sv]=X Konsol
-Comment=X Console viewer
-Comment[br]=Diskouezer al letrin X
-Comment[ca]=Visualitzador de la consola X
-Comment[cs]=Konsole pro Xwindow
-Comment[da]=X konsol fremviser
-Comment[de]=X-Konsole
-Comment[es]=Consola para X
-Comment[fi]=X-Konsoli
-Comment[fr]=Affichage de la console sous X
-Comment[hr]=X konzola
-Comment[hu]=X konzol néző
-Comment[is]=xconsole: Birta skilaboð send til kerfisskjás
-Comment[it]=Console per Xwin
-Comment[no]=X-konsoll
-Comment[pl]=X Konsola
-Comment[pt]=Consola X
-Comment[pt_BR]=Console X
-Comment[ro]=Consolă de X
-Comment[ru]=Консоль для Xwindow
-Comment[sk]=Konzola pre Xwindow
-Comment[sl]=Konzola za okna X
-Comment[sv]=X Konsolvisare
-Exec=/usr/X11R6/bin/xconsole
-Icon=xconsole.png
-TerminalOptions=
-Terminal=false
-Type=Application
-Categories=Utility;X-X11;
-Encoding=UTF-8
-# vi: encoding=utf-8
+++ /dev/null
-#!/bin/sh
-#
-# xdm: Starts the X Display Manager
-#
-# Version: @(#) /etc/rc.d/init.d/xdm 1.3
-#
-# chkconfig: 5 95 5
-# description: Starts and stops the X Display Manager at startup and \
-# shutdown. can run one of several display managers; gdm, kdm, \
-# or xdm, in that order of preferential treatment.
-#
-# config: /etc/X11/xdm/xdm-config
-# probe: true
-# hide: true
-
-. /etc/rc.d/init.d/functions
-
-# Get service config
-if [ -f /etc/sysconfig/xdm ]; then
- . /etc/sysconfig/xdm
-fi
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/xdm ]; then
- msg_starting "X Display Manager"
- daemon /usr/X11R6/bin/xdm
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xdm
- else
- msg_already_running "X Display Manager"
- fi
- ;;
- stop)
- if [ -f /var/lock/subsys/xdm ]; then
- msg_stopping "X Display Manager"
- killproc xdm
- rm -f /var/lock/subsys/xdm
- else
- msg_not_running "X Display Manager"
- fi
- ;;
- status)
- status xdm
- exit $?
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- exit $?
- ;;
- *)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
- exit 3
-esac
-
-exit $RETVAL
+++ /dev/null
-#%PAM-1.0
-auth required pam_listfile.so item=user sense=deny file=/etc/security/blacklist onerr=succeed
-auth required pam_listfile.so item=user sense=deny file=/etc/security/blacklist.xdm onerr=succeed
-auth required pam_unix.so
-auth required pam_tally.so file=/var/log/faillog onerr=succeed no_magic_root
-auth required pam_shells.so
-auth required pam_nologin.so
-account required pam_tally.so deny=0 file=/var/log/faillog onerr=succeed no_magic_root
-account required pam_access.so
-account required pam_time.so
-account required pam_unix.so
-password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
-password required pam_unix.so md5 shadow use_authtok
-password required pam_make.so /var/db
-session required pam_unix.so
-session required pam_env.so
-session required pam_limits.so change_uid
-session optional pam_console.so
+++ /dev/null
-# Customized setings for xdm
-
-# Define nice level for xdm
-SERVICE_RUN_NICE_LEVEL="+0"
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=X Editor
-Name[af]=X Redigeerder
-Name[az]=X Editoru
-Name[be]=X рэдактар
-Name[bg]=Редактор X
-Name[ca]=Editor X
-Name[eo]=XRedaktilo
-Name[es]=Editor de X
-Name[fi]=X-editori
-Name[fr]=XEdit
-Name[gl]=Editor X
-Name[hr]=X uređivač
-Name[hu]=Xedit
-Name[id]=Editor X
-Name[is]=X-ritill
-Name[it]=Editor X
-Name[ko]=X용 편집기
-Name[lv]=X Redaktors
-Name[mi]=Kaiwhakatika X
-Name[nn]=X-redigering
-Name[no]=X-redigerer
-Name[oc]=Editor X
-Name[pl]=X edytor
-Name[pt]=Editor X
-Name[pt_BR]=Editor X
-Name[ro]=Editor X
-Name[ru]=Редактор X
-Name[sv]=X editor
-Name[tr]=X Düzenleyicisi
-Name[uk]=Редактор X
-Name[ven]=X Musengulusi
-Name[vi]=Trình biên soạn X
-Name[xh]=Umhleli ka X
-Name[zh_TW]=X 編輯器
-Name[zu]=UX Umhleli
-Comment=Text Editor
-Comment[af]=Teks Redigeerder
-Comment[ar]=محرر نصوص
-Comment[be]=Тэкставы рэдактар
-Comment[bg]=Текст Редактор
-Comment[bs]=Tekst editor
-Comment[cs]=Textový editor
-Comment[da]=Tekst-editor
-Comment[de]=Texteditor
-Comment[el]=Διορθωτής Κειμένου
-Comment[eo]=Tekstredaktilo
-Comment[es]=Editor de texto
-Comment[et]=Tekstiredaktor
-Comment[eu]=Testu Editorea
-Comment[fi]=Tekstieditori
-Comment[fr]=Éditeur de texte
-Comment[he]=עורך טקסט
-Comment[hu]=szövegszerkesztő
-Comment[is]=Textaritill
-Comment[it]=Editor di testi
-Comment[ja]=テキストエディタ
-Comment[lt]=Teksto redaktorius
-Comment[lv]=Teksta Redaktors
-Comment[mt]=Editur tat-test
-Comment[nl]=teksteditor
-Comment[nn]=Skriveprogram
-Comment[no]=Tekstredigerer
-Comment[pl]=Edytor tekstowy
-Comment[pt]=Editor de Texto
-Comment[pt_BR]=Editor de Texto
-Comment[ro]=Editor de text
-Comment[ru]=Текстовый редактор
-Comment[sk]=Textový editor
-Comment[sl]=Urejevalnik besedil
-Comment[sv]=Texteditor
-Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
-Comment[th]=เครื่องมือแก้ไขข้อความ
-Comment[tr]=Metin Düzenleyici
-Comment[uk]=Редактор текстів
-Comment[ven]=Musengulusi wa Manwalwa
-Comment[vi]=Trình biên soạn text
-Comment[xh]=Umhleli Wokubhaliweyo
-Comment[zh_CN]=文本编辑器
-Comment[zh_TW]=文字編輯器
-Comment[zu]=Umhleli Wokubhaliweyo
-Exec=xedit
-Icon=xedit.png
-Type=Application
-Terminal=false
-Categories=Utility;TextEditor;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=X Eyes
-Name[af]=X Oë
-Name[az]=X Gözlər
-Name[be]=X вочы
-Name[bg]=X Очи
-Name[br]=Daoulagad X
-Name[cs]=Oči
-Name[da]=X-øjne
-Name[de]=X-Eyes
-Name[eo]=XOkuloj
-Name[es]=Ojos de X
-Name[fi]=X-silmät
-Name[fr]=XEyes
-Name[is]=X-augu
-Name[ko]=눈
-Name[lv]=X Acis
-Name[mi]=Whatu X
-Name[mk]=X очи
-Name[nn]=X-auge
-Name[no]=X-øyne
-Name[pl]=X oczy
-Name[pt]=Olhos X
-Name[ro]=Ochi
-Name[ru]=Глаза X
-Name[sv]=X Ögon
-Name[ta]=X ¸ñ¸û
-Name[th]=ดวงตาของ X
-Name[tr]=X Gözler
-Name[uk]=Очі X
-Name[ven]=Mato a X
-Name[xh]=Amehlo ka X
-Name[zh_CN]=X 眼睛
-Name[zu]=Amehlo ka X
-Comment=Eyes following the X mouse
-Comment[pl]=Oczy podążające za kursorem myszy w X
-Exec=xeyes
-Icon=xeyes.png
-Terminal=false
-Type=Application
-Categories=Amusement;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-#
-# Default font server configuration file for PLD
-#
-
-# allow a max of 4 clients to connect to this font server
-client-limit = 4
-
-# when a font server reaches its limit, start up a new one
-clone-self = on
-
-# alternate font servers for clients to use
-#alternate-servers = foo:7101,bar:7102
-
-# where to look for fonts
-# Some of these are commented out, i.e. the TrueType and Type1
-# directories in /usr/share, because they aren't forced to be
-# installed alongside X.
-#
-
-catalogue = /usr/share/fonts/misc:unscaled,
- /usr/share/fonts/75dpi:unscaled,
- /usr/share/fonts/100dpi:unscaled,
- /usr/share/fonts/misc,
- /usr/share/fonts/75dpi,
- /usr/share/fonts/100dpi,
- /usr/share/fonts/Type1,
- /usr/share/fonts/TTF,
- /usr/share/fonts/Speedo
-
-# in 12 points, decipoints
-default-point-size = 120
-
-# 100 x 100 and 75 x 75
-default-resolutions = 75,75,100,100
-
-# how to log errors
-use-syslog = on
-
-# don't listen to TCP ports by default for security reasons
-no-listen = tcp
-
-# font cache control, specified in KB
-#cache-hi-mark = 2048
-#cache-low-mark = 1433
-#cache-balance = 70
+++ /dev/null
-#!/bin/sh
-#
-# xfs: Starts the X Font Server
-#
-# Version: $Revision$
-#
-# chkconfig: 345 90 10
-# description: Starts and stops the X Font Server at boot time and shutdown.
-#
-# processname: xfs
-# config: /etc/X11/fs/config
-# hide: true
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# Get service config
-if [ -f /etc/sysconfig/xfs ]; then
- . /etc/sysconfig/xfs
-fi
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/xfs ]; then
- msg_starting "X Font Server"
- rm -fr /tmp/.font-unix
- daemon xfs \
- $([ -n "$XFS_PORT" ] && echo "-port $XFS_PORT") \
- $([ -n "$XFS_OPTIONS" ] && echo "$XFS_OPTIONS")
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xfs
- else
- msg_already_running "X Font Server"
- fi
- ;;
- stop)
- if [ -f /var/lock/subsys/xfs ]; then
- msg_stopping "X Font Server"
- killproc xfs
- rm -f /var/lock/subsys/xfs
- else
- msg_not_running "X Font Server"
- fi
- ;;
- status)
- status xfs
- exit $?
- ;;
- restart)
- $0 stop
- $0 start
- exit $?
- ;;
- reload|force-reload)
- if [ -f /var/lock/subsys/xfs ]; then
- msg_reloading "X Font Server"
- killproc xfs -USR1
- RETVAL=$?
- else
- msg_not_running "X Font Server" >&2
- exit 7
- fi
- ;;
- *)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
- exit 3
-esac
-
-exit $RETVAL
+++ /dev/null
-# Customized setings for xfs
-
-# Specifies the TCP port number on which the server will listen for
-# connections. The default port number is 7100.
-XFS_PORT="7100"
-
-XFS_OPTIONS="-daemon -droppriv"
-
-# Define nice level for xfs
-SERVICE_RUN_NICE_LEVEL="+0"
+++ /dev/null
-diff -crN -x Makefile xc/lib/font/FreeType/ft.h xc.new/lib/font/FreeType/ft.h
-*** xc/lib/font/FreeType/ft.h Sun Apr 25 18:32:21 1999
---- xc.new/lib/font/FreeType/ft.h Sun Oct 10 01:48:10 1999
-***************
-*** 64,69 ****
---- 64,70 ----
- {
- int has_cmap;
- TT_CharMap cmap;
-+ int base;
- struct font_encoding *encoding;
- struct font_encoding_mapping *mapping;
- };
-***************
-*** 78,83 ****
---- 79,85 ----
-
- int ttf_pick_cmap(char*, int, char*, TT_Face, struct ttf_mapping *);
- int ftstrcasecmp(const char *s1, const char *s2);
-+ unsigned ttf_remap(unsigned code, struct ttf_mapping *tm);
-
- /* ftutil.c */
-
-***************
-*** 85,90 ****
- int ttf_u2a(int, char*, char*, int);
- int FTtoXReturnCode(int);
- int ttf_GetEnglishName(TT_Face, char *, int);
-!
-!
-
---- 87,91 ----
- int ttf_u2a(int, char*, char*, int);
- int FTtoXReturnCode(int);
- int ttf_GetEnglishName(TT_Face, char *, int);
-! int ttf_checkForTTCName(char*, char**, int*);
-
-diff -crN -x Makefile xc/lib/font/FreeType/ftenc.c xc.new/lib/font/FreeType/ftenc.c
-*** xc/lib/font/FreeType/ftenc.c Sun Apr 25 18:32:21 1999
---- xc.new/lib/font/FreeType/ftenc.c Sun Oct 10 02:51:55 1999
-***************
-*** 23,28 ****
---- 23,29 ----
- */
-
- /* TrueType-dependent encoding code */
-+ #include <string.h>
-
- #include "fontmisc.h" /* defines xalloc and friends */
- #include "fontenc.h"
-***************
-*** 41,46 ****
---- 42,48 ----
- struct font_encoding *encoding;
- struct font_encoding_mapping *mapping;
- TT_CharMap cmap;
-+
-
- char *encoding_name=0;
-
-***************
-*** 51,56 ****
---- 53,59 ----
-
- if(!strcasecmp(encoding_name, "truetype-raw")) {
- tm->has_cmap=0;
-+ tm->base=0;
- tm->encoding=0;
- tm->mapping=0;
- return 0;
-***************
-*** 61,66 ****
---- 64,79 ----
- &cmap)) {
- tm->has_cmap=1;
- tm->cmap=cmap;
-+ if(!strcasecmp(encoding_name, "microsoft-symbol")) {
-+ /* deal with undocumented lossage */
-+ TT_Face_Properties properties;
-+ if(!TT_Get_Face_Properties(face, &properties) &&
-+ properties.os2!=0)
-+ tm->base=properties.os2->usFirstCharIndex-0x20;
-+ else
-+ tm->base=0;
-+ } else
-+ tm->base=0;
- tm->encoding=encoding;
- tm->mapping=mapping;
- return 0;
-***************
-*** 82,87 ****
---- 95,101 ----
- if(!find_cmap(FONT_ENCODING_UNICODE, 0, 0, face, &cmap)) {
- tm->has_cmap=1;
- tm->cmap=cmap;
-+ tm->base=0;
- tm->encoding=0;
- tm->mapping=0;
- return 0;
-***************
-*** 91,96 ****
---- 105,111 ----
- if(!TT_Get_CharMap(face, 0, &cmap)) {
- tm->has_cmap=1;
- tm->cmap=cmap;
-+ tm->base=0;
- tm->encoding=0;
- tm->mapping=0;
- return 0;
-***************
-*** 98,103 ****
---- 113,119 ----
-
- /* Tough. */
- tm->has_cmap=0;
-+ tm->base=0;
- tm->encoding=0;
- tm->mapping=0;
- return 0;
-***************
-*** 170,175 ****
---- 186,192 ----
- else
- return 0;
- }
-+ index += tm->base;
- if(tm->has_cmap)
- return TT_Char_Index(tm->cmap, index);
- else
-diff -crN -x Makefile xc/lib/font/FreeType/ftfuncs.c xc.new/lib/font/FreeType/ftfuncs.c
-*** xc/lib/font/FreeType/ftfuncs.c Sun Jun 13 19:06:17 1999
---- xc.new/lib/font/FreeType/ftfuncs.c Sun Oct 10 01:49:04 1999
-***************
-*** 23,28 ****
---- 23,30 ----
-
- /* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.11 1999/06/13 13:47:29 dawes Exp $ */
-
-+ #include <string.h>
-+
- #include "fontmisc.h"
- #include "fntfilst.h"
- #include "fontutil.h"
-***************
-*** 134,140 ****
-
- face->instances=0;
-
-! if(ttc_checkForTTCName(fileName, &realFileName, &faceNumber)) {
- ftrc=TT_Open_Collection(ftypeEngine, realFileName, faceNumber,
- &face->face);
- } else {
---- 136,142 ----
-
- face->instances=0;
-
-! if(ttf_checkForTTCName(fileName, &realFileName, &faceNumber)) {
- ftrc=TT_Open_Collection(ftypeEngine, realFileName, faceNumber,
- &face->face);
- } else {
-***************
-*** 775,781 ****
- static void
- FreeTypeFreeXFont(FontPtr pFont, int freeProps)
- {
-- int i;
- TTFFont *tf;
-
- if(pFont) {
---- 777,782 ----
-***************
-*** 812,818 ****
- int rawAverageWidth)
- {
- int i, j, maxprops;
-- unsigned long code;
- char *sp, *ep, val[256];
- TT_Instance_Metrics imetrics;
- int upm; /* units per em */
---- 813,818 ----
-***************
-*** 1573,1579 ****
- FontEncoding charEncoding, unsigned long *glyphCount,
- CharInfoPtr *glyphs, int nlevels)
- {
-- int idx;
- unsigned code;
- TTFFont *tf;
- CharInfoPtr *gp;
---- 1573,1578 ----
-diff -crN -x Makefile xc/lib/font/FreeType/ftfuncs.h xc.new/lib/font/FreeType/ftfuncs.h
-*** xc/lib/font/FreeType/ftfuncs.h Sun Apr 25 18:32:22 1999
---- xc.new/lib/font/FreeType/ftfuncs.h Sun Oct 10 01:45:15 1999
-***************
-*** 6,14 ****
- /* Glyphs are held in segments of this size */
- #define FONTSEGMENTSIZE 16
-
-- /* defined in atom.c */
-- Atom MakeAtom(char *, unsigned, int);
--
- /* A structure that holds bitmap order and padding info. */
-
- typedef struct {
---- 6,11 ----
-diff -crN -x Makefile xc/lib/font/FreeType/ftutil.c xc.new/lib/font/FreeType/ftutil.c
-*** xc/lib/font/FreeType/ftutil.c Sun Apr 25 18:32:22 1999
---- xc.new/lib/font/FreeType/ftutil.c Sun Oct 10 01:50:22 1999
-***************
-*** 161,167 ****
- int
- ttf_GetEnglishName(TT_Face face, char *name, int nameID)
- {
-! int i, j, nrec;
- unsigned short slen;
- unsigned short nrPlatformID, nrEncodingID, nrLanguageID, nrNameID;
- char *s;
---- 161,167 ----
- int
- ttf_GetEnglishName(TT_Face face, char *name, int nameID)
- {
-! int i, nrec;
- unsigned short slen;
- unsigned short nrPlatformID, nrEncodingID, nrLanguageID, nrNameID;
- char *s;
-***************
-*** 179,185 ****
- nrLanguageID==0x0c09 || nrLanguageID==0x1009 ||
- nrLanguageID==0x1409 || nrLanguageID==0x1809)) ||
- /* or for Apple, Unicode, English */
-! ((nrPlatformID==0 && nrNameID==nameID &
- nrLanguageID==0))) {
- if(!TT_Get_Name_String(face, i, &s, &slen))
- return ttf_u2a(slen, s, name, MSBFirst);
---- 179,185 ----
- nrLanguageID==0x0c09 || nrLanguageID==0x1009 ||
- nrLanguageID==0x1409 || nrLanguageID==0x1809)) ||
- /* or for Apple, Unicode, English */
-! ((nrPlatformID==0 && nrNameID==nameID &&
- nrLanguageID==0))) {
- if(!TT_Get_Name_String(face, i, &s, &slen))
- return ttf_u2a(slen, s, name, MSBFirst);
-***************
-*** 206,212 ****
- }
-
- int
-! ttc_checkForTTCName(char *fileName, char **realFileName, int *faceNumber)
- {
- int length;
- int fn;
---- 206,212 ----
- }
-
- int
-! ttf_checkForTTCName(char *fileName, char **realFileName, int *faceNumber)
- {
- int length;
- int fn;
-diff -crN -x Makefile xc/lib/font/fontfile/fontenc.c xc.new/lib/font/fontfile/fontenc.c
-*** xc/lib/font/fontfile/fontenc.c Sun Oct 10 03:03:10 1999
---- xc.new/lib/font/fontfile/fontenc.c Sun Oct 10 02:24:00 1999
-***************
-*** 518,537 ****
- {0,0,0,0,0,0,0}
- };
-
-! /* Apparently, Microsoft Symbol aims at being compatible with Unicode
-! * by using the 16 columns of the Private Use Area starting at code
-! * 0xF000. */
-!
-! static unsigned
-! eight_bit_to_microsoft_symbol(unsigned code, void *client_data)
-! {
-! return code+0xF000;
-! }
-
- static struct font_encoding_mapping microsoft_symbol[]=
-! {{FONT_ENCODING_TRUETYPE,3,0,eight_bit_to_microsoft_symbol,0,0,0},
- /* You never know */
-! {FONT_ENCODING_TRUETYPE,3,1,eight_bit_to_microsoft_symbol,0,0,0},
- {0,0,0,0,0,0,0}};
-
- static struct font_encoding_mapping apple_roman[]=
---- 518,531 ----
- {0,0,0,0,0,0,0}
- };
-
-! /* Microsoft Symbol is treated specially in ftenc.c, where we add
-! * usFirstCharIndex-0x20 to the glyph index before applying the
-! * cmap. */
-
- static struct font_encoding_mapping microsoft_symbol[]=
-! {{FONT_ENCODING_TRUETYPE,3,0,0,0,0,0},
- /* You never know */
-! {FONT_ENCODING_TRUETYPE,3,1,0,0,0,0},
- {0,0,0,0,0,0,0}};
-
- static struct font_encoding_mapping apple_roman[]=
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=X Load
-Comment=System load average display for X
-Comment[it]=Mostra in una finestra X il carico medio del sistema
-Comment[pl]=Pokazywanie średniego obciążenia systemu
-Exec=xload
-Icon=xload
-SwallowExec=xload -nolabel -fg green -bg Black -hl red -update 3 -geometry 25x25
-Type=Application
-Categories=Utility;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Name=X Magnifier
-Name[pl]=X Powiększenie
-Comment=Magnify parts of the screen
-Comment[pl]=Powiększenie części ekranu
-GenericName=Desktop Magnifier
-Exec=xmag
-Icon=xmag
-Type=Application
-Categories=Utility;X-X11;
-# vi: encoding=utf-8
+++ /dev/null
-[Desktop Entry]
-MimeType=
-Comment=Terminal emulator for X11
-Comment[br]=Termenell X
-Comment[ca]=Terminal X
-Comment[cs]=Terminál pro X Window
-Comment[de]=X-Terminal
-Comment[es]=Emulador de terminal para X
-Comment[fi]=X-Terminaali
-Comment[fr]=Emulateur de terminal xterm
-Comment[hu]=X terminál
-Comment[is]=xterm: X skjáhermir
-Comment[it]=Terminale per X Window
-Comment[no]=X-terminal
-Comment[pl]=Emulator terminala dla X11
-Comment[pt]=Terminal X
-Comment[pt_BR]=Terminal X
-Comment[ro]=Terminal pentru X Window
-Comment[ru]=Терминал для X Window
-Comment[sk]=Terminál pre X Window
-Comment[sl]=Terminalski emulator za X11
-Name=XTerm
-Exec=/usr/X11R6/bin/xterm -ls -ut
-Icon=xterm.png
-TerminalOptions=
-Path=
-Type=Application
-Terminal=false
-Categories=TerminalEmulator;X-X11;
-Encoding=UTF-8
-# vi: encoding=utf-8