From 91a30d5622174febaa2107b010effcf2fb5b9a2e Mon Sep 17 00:00:00 2001
From: marha <marha@users.sourceforge.net>
Date: Fri, 8 Jan 2010 13:17:02 +0000
Subject: Git update 8 jan 2010

---
 xorg-server/hw/kdrive/ephyr/ephyr.c          |  131 +-
 xorg-server/hw/kdrive/ephyr/ephyr.h          |    6 +-
 xorg-server/hw/kdrive/ephyr/ephyr_draw.c     |    7 +-
 xorg-server/hw/kdrive/ephyr/ephyrinit.c      |   15 +-
 xorg-server/hw/kdrive/ephyr/ephyrvideo.c     |    2 +-
 xorg-server/hw/kdrive/fake/fake.c            |   84 +-
 xorg-server/hw/kdrive/fake/fake.h            |    4 +-
 xorg-server/hw/kdrive/fake/fakeinit.c        |    4 +-
 xorg-server/hw/kdrive/fbdev/fbdev.c          |  228 +--
 xorg-server/hw/kdrive/fbdev/fbdev.h          |   44 +-
 xorg-server/hw/kdrive/fbdev/fbinit.c         |   14 +-
 xorg-server/hw/kdrive/linux/Makefile.am      |   31 +-
 xorg-server/hw/kdrive/linux/bus.c            |  132 --
 xorg-server/hw/kdrive/linux/evdev.c          |   24 +-
 xorg-server/hw/kdrive/linux/linux.c          |   44 +-
 xorg-server/hw/kdrive/linux/mouse.c          |   48 +-
 xorg-server/hw/kdrive/linux/ms.c             |    6 +-
 xorg-server/hw/kdrive/linux/ps2.c            |    4 +-
 xorg-server/hw/kdrive/src/Makefile.am        |    2 -
 xorg-server/hw/kdrive/src/kcmap.c            |  145 +-
 xorg-server/hw/kdrive/src/kcurscol.c         |   94 --
 xorg-server/hw/kdrive/src/kdrive.c           |  217 +--
 xorg-server/hw/kdrive/src/kdrive.h           |  110 +-
 xorg-server/hw/kdrive/src/kinfo.c            |    2 -
 xorg-server/hw/kdrive/src/kmap.c             |  172 --
 xorg-server/hw/kdrive/src/kmode.c            |   38 +-
 xorg-server/hw/kdrive/src/kshadow.c          |   34 +-
 xorg-server/hw/kdrive/src/kxv.h              |   38 +-
 xorg-server/hw/xfree86/common/xf86Mode.c     |   14 +-
 xorg-server/hw/xfree86/common/xf86str.h      |   16 +-
 xorg-server/hw/xfree86/libxorg.c             |    0
 xorg-server/hw/xfree86/loader/sdksyms.c      | 2344 --------------------------
 xorg-server/hw/xfree86/os-support/xorgos.c   |    0
 xorg-server/hw/xfree86/ramdac/xf86BitOrder.c |    2 -
 xorg-server/hw/xfree86/xaa/l-xaaBitmap.c     |    2 -
 xorg-server/hw/xfree86/xaa/l-xaaStipple.c    |    2 -
 xorg-server/hw/xfree86/xaa/l-xaaTEGlyph.c    |    2 -
 xorg-server/hw/xfree86/xaa/l3-xaaBitmap.c    |    3 -
 xorg-server/hw/xfree86/xaa/l3-xaaStipple.c   |    3 -
 xorg-server/hw/xfree86/xaa/lf-xaaBitmap.c    |    3 -
 xorg-server/hw/xfree86/xaa/lf-xaaStipple.c   |    3 -
 xorg-server/hw/xfree86/xaa/lf-xaaTEGlyph.c   |    3 -
 xorg-server/hw/xfree86/xaa/lf3-xaaBitmap.c   |    4 -
 xorg-server/hw/xfree86/xaa/lf3-xaaStipple.c  |    4 -
 xorg-server/hw/xfree86/xaa/m-xaaBitmap.c     |    2 -
 xorg-server/hw/xfree86/xaa/m-xaaStipple.c    |    2 -
 xorg-server/hw/xfree86/xaa/m-xaaTEGlyph.c    |    2 -
 xorg-server/hw/xfree86/xaa/m3-xaaBitmap.c    |    3 -
 xorg-server/hw/xfree86/xaa/m3-xaaStipple.c   |    3 -
 xorg-server/hw/xfree86/xaa/mf-xaaBitmap.c    |    3 -
 xorg-server/hw/xfree86/xaa/mf-xaaStipple.c   |    3 -
 xorg-server/hw/xfree86/xaa/mf-xaaTEGlyph.c   |    3 -
 xorg-server/hw/xfree86/xaa/mf3-xaaBitmap.c   |    4 -
 xorg-server/hw/xfree86/xaa/mf3-xaaStipple.c  |    4 -
 xorg-server/hw/xfree86/xaa/s-xaaDashLine.c   |    2 -
 xorg-server/hw/xfree86/xaa/s-xaaLine.c       |    2 -
 xorg-server/hw/xfree86/xorg.c                |    0
 xorg-server/hw/xwin/winprefslex.c            | 2191 ------------------------
 xorg-server/hw/xwin/winprefsyacc.c           | 2261 -------------------------
 xorg-server/hw/xwin/winprefsyacc.h           |  130 --
 60 files changed, 554 insertions(+), 8146 deletions(-)
 delete mode 100644 xorg-server/hw/kdrive/linux/bus.c
 delete mode 100644 xorg-server/hw/kdrive/src/kcurscol.c
 delete mode 100644 xorg-server/hw/kdrive/src/kmap.c
 delete mode 100644 xorg-server/hw/xfree86/libxorg.c
 delete mode 100644 xorg-server/hw/xfree86/loader/sdksyms.c
 delete mode 100644 xorg-server/hw/xfree86/os-support/xorgos.c
 delete mode 100644 xorg-server/hw/xfree86/ramdac/xf86BitOrder.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/l-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/l-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/l-xaaTEGlyph.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/l3-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/l3-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/lf-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/lf-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/lf-xaaTEGlyph.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/lf3-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/lf3-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/m-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/m-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/m-xaaTEGlyph.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/m3-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/m3-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/mf-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/mf-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/mf-xaaTEGlyph.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/mf3-xaaBitmap.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/mf3-xaaStipple.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/s-xaaDashLine.c
 delete mode 100644 xorg-server/hw/xfree86/xaa/s-xaaLine.c
 delete mode 100644 xorg-server/hw/xfree86/xorg.c
 delete mode 100644 xorg-server/hw/xwin/winprefslex.c
 delete mode 100644 xorg-server/hw/xwin/winprefsyacc.c
 delete mode 100644 xorg-server/hw/xwin/winprefsyacc.h

(limited to 'xorg-server/hw')

diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index b6a2adaff..b21559bba 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -101,77 +101,77 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
     }
 
   if (EphyrWantGrayScale)
-    screen->fb[0].depth = 8;
+    screen->fb.depth = 8;
 
-  if (screen->fb[0].depth && screen->fb[0].depth != hostx_get_depth())
+  if (screen->fb.depth && screen->fb.depth != hostx_get_depth())
     {
-      if (screen->fb[0].depth < hostx_get_depth()
-	  && (screen->fb[0].depth == 24 || screen->fb[0].depth == 16
-	      || screen->fb[0].depth == 8))
+      if (screen->fb.depth < hostx_get_depth()
+	  && (screen->fb.depth == 24 || screen->fb.depth == 16
+	      || screen->fb.depth == 8))
 	{
-	  hostx_set_server_depth(screen, screen->fb[0].depth);
+	  hostx_set_server_depth(screen, screen->fb.depth);
 	}
       else
 	ErrorF("\nXephyr: requested screen depth not supported, setting to match hosts.\n");
     }
   
-  screen->fb[0].depth = hostx_get_server_depth(screen);
+  screen->fb.depth = hostx_get_server_depth(screen);
   screen->rate = 72;
   
-  if (screen->fb[0].depth <= 8)
+  if (screen->fb.depth <= 8)
     {
       if (EphyrWantGrayScale)
-	screen->fb[0].visuals = ((1 << StaticGray) | (1 << GrayScale));
+	screen->fb.visuals = ((1 << StaticGray) | (1 << GrayScale));
       else
-	screen->fb[0].visuals = ((1 << StaticGray) |
-				 (1 << GrayScale) |
-				 (1 << StaticColor) |
-				 (1 << PseudoColor) |
-				 (1 << TrueColor) |
-				 (1 << DirectColor));
+	screen->fb.visuals = ((1 << StaticGray) |
+			      (1 << GrayScale) |
+			      (1 << StaticColor) |
+			      (1 << PseudoColor) |
+			      (1 << TrueColor) |
+			      (1 << DirectColor));
       
-      screen->fb[0].redMask   = 0x00;
-      screen->fb[0].greenMask = 0x00;
-      screen->fb[0].blueMask  = 0x00;
-      screen->fb[0].depth        = 8;
-      screen->fb[0].bitsPerPixel = 8;
+      screen->fb.redMask   = 0x00;
+      screen->fb.greenMask = 0x00;
+      screen->fb.blueMask  = 0x00;
+      screen->fb.depth        = 8;
+      screen->fb.bitsPerPixel = 8;
     }
   else 
     {
-      screen->fb[0].visuals = (1 << TrueColor);
+      screen->fb.visuals = (1 << TrueColor);
       
-      if (screen->fb[0].depth <= 15)
+      if (screen->fb.depth <= 15)
 	{
-	  screen->fb[0].depth = 15;
-	  screen->fb[0].bitsPerPixel = 16;
+	  screen->fb.depth = 15;
+	  screen->fb.bitsPerPixel = 16;
 	}
-      else if (screen->fb[0].depth <= 16)
+      else if (screen->fb.depth <= 16)
 	{
-	  screen->fb[0].depth = 16;
-	  screen->fb[0].bitsPerPixel = 16;
+	  screen->fb.depth = 16;
+	  screen->fb.bitsPerPixel = 16;
 	}
-      else if (screen->fb[0].depth <= 24)
+      else if (screen->fb.depth <= 24)
 	{
-	  screen->fb[0].depth = 24;
-	  screen->fb[0].bitsPerPixel = 32;
+	  screen->fb.depth = 24;
+	  screen->fb.bitsPerPixel = 32;
 	}
-      else if (screen->fb[0].depth <= 30)
+      else if (screen->fb.depth <= 30)
 	{
-	  screen->fb[0].depth = 30;
-	  screen->fb[0].bitsPerPixel = 32;
+	  screen->fb.depth = 30;
+	  screen->fb.bitsPerPixel = 32;
 	}
       else
 	{
 	  ErrorF("\nXephyr: Unsupported screen depth %d\n",
-	         screen->fb[0].depth);
+	         screen->fb.depth);
 	  return FALSE;
 	}
 
       hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask);
 
-      screen->fb[0].redMask = (Pixel) redMask;
-      screen->fb[0].greenMask = (Pixel) greenMask;
-      screen->fb[0].blueMask = (Pixel) blueMask;
+      screen->fb.redMask = (Pixel) redMask;
+      screen->fb.greenMask = (Pixel) greenMask;
+      screen->fb.blueMask = (Pixel) blueMask;
 
     }
   
@@ -220,6 +220,22 @@ ephyrWindowLinear (ScreenPtr	pScreen,
   return priv->base + row * priv->bytes_per_line + offset;
 }
 
+/**
+ * Figure out display buffer size. If fakexa is enabled, allocate a larger
+ * buffer so that fakexa has space to put offscreen pixmaps.
+ */
+int
+ephyrBufferHeight(KdScreenInfo *screen)
+{
+    int buffer_height;
+    if (ephyrFuncs.initAccel == NULL)
+	buffer_height = screen->height;
+    else
+	buffer_height = 3 * screen->height;
+    return buffer_height;
+}
+
+
 Bool
 ephyrMapFramebuffer (KdScreenInfo *screen)
 {
@@ -234,30 +250,19 @@ ephyrMapFramebuffer (KdScreenInfo *screen)
   KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height);
   KdSetPointerMatrix (&m);
   
-  priv->bytes_per_line = ((screen->width * screen->fb[0].bitsPerPixel + 31) >> 5) << 2;
-  
-  /* point the framebuffer to the data in an XImage */
-  /* If fakexa is enabled, allocate a larger buffer so that fakexa has space to
-   * put offscreen pixmaps.
-   */
-  if (ephyrFuncs.initAccel == NULL)
-    buffer_height = screen->height;
-  else
-    buffer_height = 3 * screen->height;
+  priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
+
+  buffer_height = ephyrBufferHeight(screen);
 
   priv->base = hostx_screen_init (screen, screen->width, screen->height, buffer_height);
 
-  screen->memory_base  = (CARD8 *) (priv->base);
-  screen->memory_size  = priv->bytes_per_line * buffer_height;
-  screen->off_screen_base = priv->bytes_per_line * screen->height;
-  
   if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All))
     {
       scrpriv->shadow = FALSE;
       
-      screen->fb[0].byteStride = priv->bytes_per_line;
-      screen->fb[0].pixelStride = screen->width;
-      screen->fb[0].frameBuffer = (CARD8 *) (priv->base);
+      screen->fb.byteStride = priv->bytes_per_line;
+      screen->fb.pixelStride = screen->width;
+      screen->fb.frameBuffer = (CARD8 *) (priv->base);
     }
   else
     {
@@ -266,7 +271,7 @@ ephyrMapFramebuffer (KdScreenInfo *screen)
       
       EPHYR_LOG("allocing shadow");
       
-      KdShadowFbAlloc (screen, 0, 
+      KdShadowFbAlloc (screen,
 		       scrpriv->randr & (RR_Rotate_90|RR_Rotate_270));
     }
   
@@ -302,7 +307,7 @@ ephyrUnmapFramebuffer (KdScreenInfo *screen)
   EphyrScrPriv  *scrpriv = screen->driver;
   
   if (scrpriv->shadow)
-    KdShadowFbFree (screen, 0);
+    KdShadowFbFree (screen);
   
   /* Note, priv->base will get freed when XImage recreated */
   
@@ -566,10 +571,10 @@ ephyrRandRSetConfig (ScreenPtr		pScreen,
   (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap (pScreen),
 				  pScreen->width,
 				  pScreen->height,
-				  screen->fb[0].depth,
-				  screen->fb[0].bitsPerPixel,
-				  screen->fb[0].byteStride,
-				  screen->fb[0].frameBuffer);
+				  screen->fb.depth,
+				  screen->fb.bitsPerPixel,
+				  screen->fb.byteStride,
+				  screen->fb.frameBuffer);
   
   /* set the subpixel order */
   
@@ -730,7 +735,7 @@ ephyrScreenFini (KdScreenInfo *screen)
 {
     EphyrScrPriv  *scrpriv = screen->driver;
     if (scrpriv->shadow) {
-        KdShadowFbFree (screen, 0);
+        KdShadowFbFree (screen);
     }
     xfree(screen->driver);
     screen->driver = NULL;
@@ -1022,7 +1027,7 @@ ephyrCardFini (KdCardInfo *card)
 }
 
 void
-ephyrGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+ephyrGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
 {
   /* XXX Not sure if this is right */
   
@@ -1039,7 +1044,7 @@ ephyrGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
 }
 
 void
-ephyrPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+ephyrPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
 {
   int min, max, p;
 
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.h b/xorg-server/hw/kdrive/ephyr/ephyr.h
index f5ea144b3..41a82bf9d 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.h
@@ -116,10 +116,10 @@ void
 ephyrCardFini (KdCardInfo *card);
 
 void
-ephyrGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+ephyrGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
 
 void
-ephyrPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+ephyrPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
 
 Bool
 ephyrMapFramebuffer (KdScreenInfo *screen);
@@ -180,6 +180,8 @@ extern Bool ephyrCursorInit(ScreenPtr pScreen);
 
 extern void ephyrCursorEnable(ScreenPtr pScreen);
 
+extern int ephyrBufferHeight(KdScreenInfo *screen);
+
 /* ephyr_draw.c */
 
 Bool
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr_draw.c b/xorg-server/hw/kdrive/ephyr/ephyr_draw.c
index 7b579c24b..f9fac8007 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr_draw.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr_draw.c
@@ -428,6 +428,7 @@ ephyrDrawInit(ScreenPtr pScreen)
     KdScreenPriv(pScreen);
     KdScreenInfo *screen = pScreenPriv->screen;
     EphyrScrPriv *scrpriv = screen->driver;
+    EphyrPriv *priv = screen->card->driver;
     EphyrFakexaPriv *fakexa;
     Bool success;
 
@@ -441,9 +442,9 @@ ephyrDrawInit(ScreenPtr pScreen)
 	return FALSE;
     }
 
-    fakexa->exa->memoryBase = screen->memory_base;
-    fakexa->exa->memorySize = screen->memory_size;
-    fakexa->exa->offScreenBase = screen->off_screen_base;
+    fakexa->exa->memoryBase = (CARD8 *) (priv->base);
+    fakexa->exa->memorySize = priv->bytes_per_line * ephyrBufferHeight(screen);
+    fakexa->exa->offScreenBase = priv->bytes_per_line * screen->height;
 
     /* Since we statically link against EXA, we shouldn't have to be smart about
      * versioning.
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index 2b72b4e0a..c7bfb5bec 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -40,17 +40,18 @@ extern Bool noGlxVisualInit;
 #endif
 extern Bool   ephyrNoXV;
 
+#ifdef KDRIVE_EVDEV
+extern KdPointerDriver	LinuxEvdevMouseDriver;
+extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
+#endif
+
 void processScreenArg (char *screen_size, char *parent_id) ;
 
 void
 InitCard (char *name)
 {
-    KdCardAttr	attr;
-
     EPHYR_DBG("mark");
-
-
-    KdCardInfoAdd (&ephyrFuncs, &attr, 0);
+    KdCardInfoAdd (&ephyrFuncs, 0);
 }
 
 void
@@ -66,11 +67,11 @@ InitInput (int argc, char **argv)
   KdPointerInfo *pi;
 
   KdAddKeyboardDriver(&EphyrKeyboardDriver);
-#ifdef linux
+#ifdef KDRIVE_EVDEV
   KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
 #endif
   KdAddPointerDriver(&EphyrMouseDriver);
-#ifdef linux
+#ifdef KDRIVE_EVDEV
   KdAddPointerDriver(&LinuxEvdevMouseDriver);
 #endif
 
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrvideo.c b/xorg-server/hw/kdrive/ephyr/ephyrvideo.c
index bb2ee1032..6624ab98a 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrvideo.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrvideo.c
@@ -302,7 +302,7 @@ ephyrInitVideo (ScreenPtr pScreen)
 
     EPHYR_LOG ("enter\n") ;
 
-    if (screen->fb[0].bitsPerPixel == 8) {
+    if (screen->fb.bitsPerPixel == 8) {
         EPHYR_LOG_ERROR ("8 bits depth not supported\n") ;
         return FALSE ;
     }
diff --git a/xorg-server/hw/kdrive/fake/fake.c b/xorg-server/hw/kdrive/fake/fake.c
index ea88f0edb..809e309a6 100644
--- a/xorg-server/hw/kdrive/fake/fake.c
+++ b/xorg-server/hw/kdrive/fake/fake.c
@@ -69,45 +69,45 @@ fakeScreenInitialize (KdScreenInfo *screen, FakeScrPriv *scrpriv)
     if (screen->height <= 0)
 	screen->height = 1;
     
-    if (!screen->fb[0].depth)
-	screen->fb[0].depth = 16;
+    if (!screen->fb.depth)
+	screen->fb.depth = 16;
 
-    if (screen->fb[0].depth <= 8)
+    if (screen->fb.depth <= 8)
     {
-	screen->fb[0].visuals = ((1 << StaticGray) |
-				 (1 << GrayScale) |
-				 (1 << StaticColor) |
-				 (1 << PseudoColor) |
-				 (1 << TrueColor) |
-				 (1 << DirectColor));
+	screen->fb.visuals = ((1 << StaticGray) |
+			      (1 << GrayScale) |
+			      (1 << StaticColor) |
+			      (1 << PseudoColor) |
+			      (1 << TrueColor) |
+			      (1 << DirectColor));
     }
     else 
     {
-	screen->fb[0].visuals = (1 << TrueColor);
+	screen->fb.visuals = (1 << TrueColor);
 #define Mask(o,l)   (((1 << l) - 1) << o)
-	if (screen->fb[0].depth <= 15)
+	if (screen->fb.depth <= 15)
 	{
-	    screen->fb[0].depth = 15;
-	    screen->fb[0].bitsPerPixel = 16;
-	    screen->fb[0].redMask = Mask (10, 5);
-	    screen->fb[0].greenMask = Mask (5, 5);
-	    screen->fb[0].blueMask = Mask (0, 5);
+	    screen->fb.depth = 15;
+	    screen->fb.bitsPerPixel = 16;
+	    screen->fb.redMask = Mask (10, 5);
+	    screen->fb.greenMask = Mask (5, 5);
+	    screen->fb.blueMask = Mask (0, 5);
 	}
-	else if (screen->fb[0].depth <= 16)
+	else if (screen->fb.depth <= 16)
 	{
-	    screen->fb[0].depth = 16;
-	    screen->fb[0].bitsPerPixel = 16;
-	    screen->fb[0].redMask = Mask (11, 5);
-	    screen->fb[0].greenMask = Mask (5, 6);
-	    screen->fb[0].blueMask = Mask (0, 5);
+	    screen->fb.depth = 16;
+	    screen->fb.bitsPerPixel = 16;
+	    screen->fb.redMask = Mask (11, 5);
+	    screen->fb.greenMask = Mask (5, 6);
+	    screen->fb.blueMask = Mask (0, 5);
 	}
 	else
 	{
-	    screen->fb[0].depth = 24;
-	    screen->fb[0].bitsPerPixel = 32;
-	    screen->fb[0].redMask = Mask (16, 8);
-	    screen->fb[0].greenMask = Mask (8, 8);
-	    screen->fb[0].blueMask = Mask (0, 8);
+	    screen->fb.depth = 24;
+	    screen->fb.bitsPerPixel = 32;
+	    screen->fb.redMask = Mask (16, 8);
+	    screen->fb.greenMask = Mask (8, 8);
+	    screen->fb.blueMask = Mask (0, 8);
 	}
     }
 
@@ -167,26 +167,22 @@ fakeMapFramebuffer (KdScreenInfo *screen)
     
     KdSetPointerMatrix (&m);
     
-    priv->bytes_per_line = ((screen->width * screen->fb[0].bitsPerPixel + 31) >> 5) << 2;
+    priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
     if (priv->base)
 	free (priv->base);
     priv->base = malloc (priv->bytes_per_line * screen->height);
-    screen->memory_base = (CARD8 *) (priv->base);
-    screen->memory_size = 0;
-    screen->off_screen_base = 0;
     
     if (scrpriv->shadow)
     {
-	if (!KdShadowFbAlloc (screen, 0, 
-			      scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
+	if (!KdShadowFbAlloc (screen, scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
 	    return FALSE;
     }
     else
     {
-        screen->fb[0].byteStride = priv->bytes_per_line;
-        screen->fb[0].pixelStride = (priv->bytes_per_line * 8/
-				     screen->fb[0].bitsPerPixel);
-        screen->fb[0].frameBuffer = (CARD8 *) (priv->base);
+        screen->fb.byteStride = priv->bytes_per_line;
+        screen->fb.pixelStride = (priv->bytes_per_line * 8/
+				     screen->fb.bitsPerPixel);
+        screen->fb.frameBuffer = (CARD8 *) (priv->base);
     }
     
     return TRUE;
@@ -219,7 +215,7 @@ Bool
 fakeUnmapFramebuffer (KdScreenInfo *screen)
 {
     FakePriv		*priv = screen->card->driver;
-    KdShadowFbFree (screen, 0);
+    KdShadowFbFree (screen);
     if (priv->base)
     {
 	free (priv->base);
@@ -341,10 +337,10 @@ fakeRandRSetConfig (ScreenPtr		pScreen,
     (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap (pScreen),
 				    pScreen->width,
 				    pScreen->height,
-				    screen->fb[0].depth,
-				    screen->fb[0].bitsPerPixel,
-				    screen->fb[0].byteStride,
-				    screen->fb[0].frameBuffer);
+				    screen->fb.depth,
+				    screen->fb.bitsPerPixel,
+				    screen->fb.byteStride,
+				    screen->fb.frameBuffer);
     
     /* set the subpixel order */
     
@@ -463,7 +459,7 @@ fakeCardFini (KdCardInfo *card)
 }
 
 void
-fakeGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+fakeGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
 {
     while (n--)
     {
@@ -475,6 +471,6 @@ fakeGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
 }
 
 void
-fakePutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+fakePutColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
 {
 }
diff --git a/xorg-server/hw/kdrive/fake/fake.h b/xorg-server/hw/kdrive/fake/fake.h
index 3c4a51bbc..d5058606a 100644
--- a/xorg-server/hw/kdrive/fake/fake.h
+++ b/xorg-server/hw/kdrive/fake/fake.h
@@ -85,10 +85,10 @@ void
 fakeCardFini (KdCardInfo *card);
 
 void
-fakeGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+fakeGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
 
 void
-fakePutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+fakePutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
 
 Bool
 fakeMapFramebuffer (KdScreenInfo *screen);
diff --git a/xorg-server/hw/kdrive/fake/fakeinit.c b/xorg-server/hw/kdrive/fake/fakeinit.c
index 0472a7183..87c221d37 100644
--- a/xorg-server/hw/kdrive/fake/fakeinit.c
+++ b/xorg-server/hw/kdrive/fake/fakeinit.c
@@ -28,9 +28,7 @@
 void
 InitCard (char *name)
 {
-    KdCardAttr	attr;
-
-    KdCardInfoAdd (&fakeFuncs, &attr, 0);
+    KdCardInfoAdd (&fakeFuncs, 0);
 }
 
 void
diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.c b/xorg-server/hw/kdrive/fbdev/fbdev.c
index 4eeca289a..d4604ad29 100644
--- a/xorg-server/hw/kdrive/fbdev/fbdev.c
+++ b/xorg-server/hw/kdrive/fbdev/fbdev.c
@@ -32,32 +32,31 @@ extern int KdTsPhyScreen;
 
 char *fbdevDevicePath = NULL;
 
-Bool
+static Bool
 fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
 {
-    int		    k;
     unsigned long   off;
 
-    if (fbdevDevicePath == NULL) 
+    if (fbdevDevicePath == NULL)
       fbdevDevicePath = "/dev/fb0";
 
     if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
       {
-	ErrorF("Error opening framebuffer %s: %s\n", 
+	ErrorF("Error opening framebuffer %s: %s\n",
 	       fbdevDevicePath, strerror(errno));
         return FALSE;
       }
 
     /* quiet valgrind */
     memset (&priv->fix, '\0', sizeof (priv->fix));
-    if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
+    if (ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix) < 0) {
 	perror("Error with /dev/fb ioctl FIOGET_FSCREENINFO");
 	close (priv->fd);
 	return FALSE;
     }
     /* quiet valgrind */
     memset (&priv->var, '\0', sizeof (priv->var));
-    if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
+    if (ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var) < 0) {
 	perror("Error with /dev/fb ioctl FIOGET_VSCREENINFO");
 	close (priv->fd);
 	return FALSE;
@@ -68,8 +67,8 @@ fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
 				   PROT_READ|PROT_WRITE,
 				   MAP_SHARED,
 				   priv->fd, 0);
-    
-    if (priv->fb_base == (char *)-1) 
+
+    if (priv->fb_base == (char *)-1)
     {
         perror("ERROR: mmap framebuffer fails!");
 	close (priv->fd);
@@ -88,14 +87,14 @@ fbdevCardInit (KdCardInfo *card)
     priv = (FbdevPriv *) xalloc (sizeof (FbdevPriv));
     if (!priv)
 	return FALSE;
-    
+
     if (!fbdevInitialize (card, priv))
     {
 	xfree (priv);
 	return FALSE;
     }
     card->driver = priv;
-    
+
     return TRUE;
 }
 
@@ -124,7 +123,7 @@ static void
 fbdevConvertMonitorTiming (const KdMonitorTiming *t, struct fb_var_screeninfo *var)
 {
     memset (var, 0, sizeof (struct fb_var_screeninfo));
-    
+
     var->xres = t->horizontal;
     var->yres = t->vertical;
     var->xres_virtual = t->horizontal;
@@ -148,7 +147,7 @@ fbdevConvertMonitorTiming (const KdMonitorTiming *t, struct fb_var_screeninfo *v
       var->sync |= FB_SYNC_VERT_HIGH_ACT;
 }
 
-Bool
+static Bool
 fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
 {
     FbdevPriv	*priv = screen->card->driver;
@@ -160,10 +159,10 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
     int k;
 
     k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
-    
+
     if (!screen->width || !screen->height)
     {
-	if (k >= 0) 
+	if (k >= 0)
 	{
 	    screen->width = var.xres;
 	    screen->height = var.yres;
@@ -175,12 +174,12 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
 	}
 	screen->rate = 103; /* FIXME: should get proper value from fb driver */
     }
-    if (!screen->fb[0].depth)
+    if (!screen->fb.depth)
     {
-	if (k >= 0) 
-	    screen->fb[0].depth = var.bits_per_pixel;
+	if (k >= 0)
+	    screen->fb.depth = var.bits_per_pixel;
 	else
-	    screen->fb[0].depth = 16;
+	    screen->fb.depth = 16;
     }
 
     if ((screen->width != var.xres) || (screen->height != var.yres))
@@ -196,7 +195,7 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
     }
 
     var.activate = FB_ACTIVATE_NOW;
-    var.bits_per_pixel = screen->fb[0].depth;
+    var.bits_per_pixel = screen->fb.depth;
     var.nonstd = 0;
     var.grayscale = 0;
 
@@ -217,65 +216,65 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
     ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var);
     depth = priv->var.bits_per_pixel;
     gray = priv->var.grayscale;
-    
+
     switch (priv->fix.visual) {
     case FB_VISUAL_PSEUDOCOLOR:
 	if (gray)
 	{
-	    screen->fb[0].visuals = (1 << StaticGray);
+	    screen->fb.visuals = (1 << StaticGray);
 	    /* could also support GrayScale, but what's the point? */
 	}
 	else
 	{
-	    screen->fb[0].visuals = ((1 << StaticGray) |
+	    screen->fb.visuals = ((1 << StaticGray) |
 			       (1 << GrayScale) |
 			       (1 << StaticColor) |
 			       (1 << PseudoColor) |
 			       (1 << TrueColor) |
 			       (1 << DirectColor));
 	}
-	screen->fb[0].blueMask  = 0x00;
-	screen->fb[0].greenMask = 0x00;
-	screen->fb[0].redMask   = 0x00;
+	screen->fb.blueMask  = 0x00;
+	screen->fb.greenMask = 0x00;
+	screen->fb.redMask   = 0x00;
 	break;
     case FB_VISUAL_STATIC_PSEUDOCOLOR:
 	if (gray)
 	{
-	    screen->fb[0].visuals = (1 << StaticGray);
+	    screen->fb.visuals = (1 << StaticGray);
 	}
 	else
 	{
-	    screen->fb[0].visuals = (1 << StaticColor);
+	    screen->fb.visuals = (1 << StaticColor);
 	}
-	screen->fb[0].blueMask  = 0x00;
-	screen->fb[0].greenMask = 0x00;
-	screen->fb[0].redMask   = 0x00;
+	screen->fb.blueMask  = 0x00;
+	screen->fb.greenMask = 0x00;
+	screen->fb.redMask   = 0x00;
 	break;
     case FB_VISUAL_TRUECOLOR:
     case FB_VISUAL_DIRECTCOLOR:
-	screen->fb[0].visuals = (1 << TrueColor);
+	screen->fb.visuals = (1 << TrueColor);
 #define Mask(o,l)   (((1 << l) - 1) << o)
-	screen->fb[0].redMask = Mask (priv->var.red.offset, priv->var.red.length);
-	screen->fb[0].greenMask = Mask (priv->var.green.offset, priv->var.green.length);
-	screen->fb[0].blueMask = Mask (priv->var.blue.offset, priv->var.blue.length);
+	screen->fb.redMask = Mask (priv->var.red.offset, priv->var.red.length);
+	screen->fb.greenMask = Mask (priv->var.green.offset, priv->var.green.length);
+	screen->fb.blueMask = Mask (priv->var.blue.offset, priv->var.blue.length);
 
 	/*
 	 * This is a kludge so that Render will work -- fill in the gaps
 	 * in the pixel
 	 */
-	screen->fb[0].redMask = fbdevMakeContig (screen->fb[0].redMask,
-						 screen->fb[0].greenMask|
-						 screen->fb[0].blueMask);
+	screen->fb.redMask = fbdevMakeContig (screen->fb.redMask,
+						 screen->fb.greenMask|
+						 screen->fb.blueMask);
 
-	screen->fb[0].greenMask = fbdevMakeContig (screen->fb[0].greenMask,
-						   screen->fb[0].redMask|
-						   screen->fb[0].blueMask);
+	screen->fb.greenMask = fbdevMakeContig (screen->fb.greenMask,
+						   screen->fb.redMask|
+						   screen->fb.blueMask);
 
-	screen->fb[0].blueMask = fbdevMakeContig (screen->fb[0].blueMask,
-						  screen->fb[0].redMask|
-						  screen->fb[0].greenMask);
+	screen->fb.blueMask = fbdevMakeContig (screen->fb.blueMask,
+						  screen->fb.redMask|
+						  screen->fb.greenMask);
 
-	allbits = screen->fb[0].redMask | screen->fb[0].greenMask | screen->fb[0].blueMask;
+	allbits = screen->fb.redMask | screen->fb.greenMask | screen->fb.blueMask;
 	depth = 32;
 	while (depth && !(allbits & (1 << (depth - 1))))
 	    depth--;
@@ -284,8 +283,8 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
 	return FALSE;
 	break;
     }
-    screen->fb[0].depth = depth;
-    screen->fb[0].bitsPerPixel = priv->var.bits_per_pixel;
+    screen->fb.depth = depth;
+    screen->fb.bitsPerPixel = priv->var.bits_per_pixel;
 
     scrpriv->randr = screen->randr;
 
@@ -309,8 +308,8 @@ fbdevScreenInit (KdScreenInfo *screen)
     }
     return TRUE;
 }
-    
-void *
+
+static void *
 fbdevWindowLinear (ScreenPtr	pScreen,
 		   CARD32	row,
 		   CARD32	offset,
@@ -338,36 +337,32 @@ fbdevMapFramebuffer (KdScreenInfo *screen)
 	scrpriv->shadow = TRUE;
     else
 	scrpriv->shadow = FALSE;
-    
+
     KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height);
-    
+
     KdSetPointerMatrix (&m);
-    
+
     screen->width = priv->var.xres;
     screen->height = priv->var.yres;
-    screen->memory_base = (CARD8 *) (priv->fb);
-    screen->memory_size = priv->fix.smem_len;
-    
+
     if (scrpriv->shadow)
     {
-	if (!KdShadowFbAlloc (screen, 0, 
+	if (!KdShadowFbAlloc (screen,
 			      scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
 	    return FALSE;
-	screen->off_screen_base = screen->memory_size;
     }
     else
     {
-        screen->fb[0].byteStride = priv->fix.line_length;
-        screen->fb[0].pixelStride = (priv->fix.line_length * 8 / 
+        screen->fb.byteStride = priv->fix.line_length;
+        screen->fb.pixelStride = (priv->fix.line_length * 8 /
     				 priv->var.bits_per_pixel);
-        screen->fb[0].frameBuffer = (CARD8 *) (priv->fb);
-	screen->off_screen_base = screen->fb[0].byteStride * screen->height;
+        screen->fb.frameBuffer = (CARD8 *) (priv->fb);
     }
-    
+
     return TRUE;
 }
 
-void
+static void
 fbdevSetScreenSizes (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
@@ -391,14 +386,14 @@ fbdevSetScreenSizes (ScreenPtr pScreen)
     }
 }
 
-Bool
+static Bool
 fbdevUnmapFramebuffer (KdScreenInfo *screen)
 {
-    KdShadowFbFree (screen, 0);
+    KdShadowFbFree (screen);
     return TRUE;
 }
 
-Bool
+static Bool
 fbdevSetShadow (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
@@ -449,7 +444,7 @@ fbdevSetShadow (ScreenPtr pScreen)
 
 
 #ifdef RANDR
-Bool
+static Bool
 fbdevRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
 {
     KdScreenPriv(pScreen);
@@ -458,29 +453,29 @@ fbdevRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
     RRScreenSizePtr	    pSize;
     Rotation		    randr;
     int			    n;
-    
+
     *rotations = RR_Rotate_All|RR_Reflect_All;
-    
+
     for (n = 0; n < pScreen->numDepths; n++)
 	if (pScreen->allowedDepths[n].numVids)
 	    break;
     if (n == pScreen->numDepths)
 	return FALSE;
-    
+
     pSize = RRRegisterSize (pScreen,
 			    screen->width,
 			    screen->height,
 			    screen->width_mm,
 			    screen->height_mm);
-    
+
     randr = KdSubRotation (scrpriv->randr, screen->randr);
-    
+
     RRSetCurrentConfig (pScreen, randr, 0, pSize);
-    
+
     return TRUE;
 }
 
-Bool
+static Bool
 fbdevRandRSetConfig (ScreenPtr		pScreen,
 		     Rotation		randr,
 		     int		rate,
@@ -512,20 +507,20 @@ fbdevRandRSetConfig (ScreenPtr		pScreen,
 	KdDisableScreen (pScreen);
 
     oldscr = *scrpriv;
-    
+
     oldwidth = screen->width;
     oldheight = screen->height;
     oldmmwidth = pScreen->mmWidth;
     oldmmheight = pScreen->mmHeight;
-    
+
     /*
      * Set new configuration
      */
-    
+
     scrpriv->randr = KdAddRotation (screen->randr, randr);
 
     fbdevUnmapFramebuffer (screen);
-    
+
     if (!fbdevMapFramebuffer (screen))
 	goto bail4;
 
@@ -542,13 +537,13 @@ fbdevRandRSetConfig (ScreenPtr		pScreen,
     (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap (pScreen),
 				    pScreen->width,
 				    pScreen->height,
-				    screen->fb[0].depth,
-				    screen->fb[0].bitsPerPixel,
-				    screen->fb[0].byteStride,
-				    screen->fb[0].frameBuffer);
-    
+				    screen->fb.depth,
+				    screen->fb.bitsPerPixel,
+				    screen->fb.byteStride,
+				    screen->fb.frameBuffer);
+
     /* set the subpixel order */
-    
+
     KdSetSubpixelOrder (pScreen, scrpriv->randr);
     if (wasEnabled)
 	KdEnableScreen (pScreen);
@@ -563,17 +558,17 @@ bail4:
     pScreen->height = oldheight;
     pScreen->mmWidth = oldmmwidth;
     pScreen->mmHeight = oldmmheight;
-    
+
     if (wasEnabled)
 	KdEnableScreen (pScreen);
     return FALSE;
 }
 
-Bool
+static Bool
 fbdevRandRInit (ScreenPtr pScreen)
 {
     rrScrPrivPtr    pScrPriv;
-    
+
     if (!RRScreenInit (pScreen))
 	return FALSE;
 
@@ -584,7 +579,7 @@ fbdevRandRInit (ScreenPtr pScreen)
 }
 #endif
 
-Bool
+static Bool
 fbdevCreateColormap (ColormapPtr pmap)
 {
     ScreenPtr		pScreen = pmap->pScreen;
@@ -594,7 +589,7 @@ fbdevCreateColormap (ColormapPtr pmap)
     int			i;
     int			nent;
     xColorItem		*pdefs;
-    
+
     switch (priv->fix.visual) {
     case FB_VISUAL_STATIC_PSEUDOCOLOR:
 	pVisual = pmap->pVisual;
@@ -604,7 +599,7 @@ fbdevCreateColormap (ColormapPtr pmap)
 	    return FALSE;
 	for (i = 0; i < nent; i++)
 	    pdefs[i].pixel = i;
-	fbdevGetColors (pScreen, 0, nent, pdefs);
+	fbdevGetColors (pScreen, nent, pdefs);
 	for (i = 0; i < nent; i++)
 	{
 	    pmap->red[i].co.local.red = pdefs[i].red;
@@ -639,7 +634,7 @@ fbdevFinishInitScreen (ScreenPtr pScreen)
     if (!fbdevRandRInit (pScreen))
 	return FALSE;
 #endif
-    
+
     return TRUE;
 }
 
@@ -655,6 +650,21 @@ fbdevPreserve (KdCardInfo *card)
 {
 }
 
+static int
+fbdevUpdateFbColormap(FbdevPriv *priv, int minidx, int maxidx)
+{
+    struct fb_cmap cmap;
+
+    cmap.start = minidx;
+    cmap.len = maxidx - minidx + 1;
+    cmap.red = &priv->red[minidx];
+    cmap.green = &priv->green[minidx];
+    cmap.blue = &priv->blue[minidx];
+    cmap.transp = 0;
+
+    return ioctl(priv->fd, FBIOPUTCMAP, &cmap);
+}
+
 Bool
 fbdevEnable (ScreenPtr pScreen)
 {
@@ -663,7 +673,7 @@ fbdevEnable (ScreenPtr pScreen)
     int			k;
 
     priv->var.activate = FB_ACTIVATE_NOW|FB_CHANGE_CMAP_VBL;
-    
+
     /* display it on the LCD */
     k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &priv->var);
     if (k < 0)
@@ -671,13 +681,12 @@ fbdevEnable (ScreenPtr pScreen)
 	perror ("FBIOPUT_VSCREENINFO");
 	return FALSE;
     }
-    
+
     if (priv->fix.visual == FB_VISUAL_DIRECTCOLOR)
     {
-	struct fb_cmap	cmap;
 	int		i;
 
-	for (i = 0; 
+	for (i = 0;
 	     i < (1 << priv->var.red.length) ||
 	     i < (1 << priv->var.green.length) ||
 	     i < (1 << priv->var.blue.length); i++)
@@ -686,13 +695,8 @@ fbdevEnable (ScreenPtr pScreen)
 	    priv->green[i] = i * 65535 / ((1 << priv->var.green.length) - 1);
 	    priv->blue[i] = i * 65535 / ((1 << priv->var.blue.length) - 1);
 	}
-	cmap.start = 0;
-	cmap.len = i;
-	cmap.red = &priv->red[0];
-	cmap.green = &priv->green[0];
-	cmap.blue = &priv->blue[0];
-	cmap.transp = 0;
-	ioctl (priv->fd, FBIOPUTCMAP, &cmap);
+
+	fbdevUpdateFbColormap(priv, 0, i);
     }
     return TRUE;
 }
@@ -742,14 +746,17 @@ void
 fbdevCardFini (KdCardInfo *card)
 {
     FbdevPriv	*priv = card->driver;
-    
+
     munmap (priv->fb_base, priv->fix.smem_len);
     close (priv->fd);
     xfree (priv);
 }
 
+/*
+ * Retrieve actual colormap and return selected n entries in pdefs.
+ */
 void
-fbdevGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+fbdevGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
 {
     KdScreenPriv(pScreen);
     FbdevPriv	    *priv = pScreenPriv->card->driver;
@@ -789,12 +796,14 @@ fbdevGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
     }
 }
 
+/*
+ * Change colormap by updating n entries described in pdefs.
+ */
 void
-fbdevPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+fbdevPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
 {
     KdScreenPriv(pScreen);
     FbdevPriv	*priv = pScreenPriv->card->driver;
-    struct fb_cmap  cmap;
     int		    p;
     int		    min, max;
 
@@ -812,11 +821,6 @@ fbdevPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
 	    max = p;
 	pdefs++;
     }
-    cmap.start = min;
-    cmap.len = max - min + 1;
-    cmap.red = &priv->red[min];
-    cmap.green = &priv->green[min];
-    cmap.blue = &priv->blue[min];
-    cmap.transp = 0;
-    ioctl (priv->fd, FBIOPUTCMAP, &cmap);
+
+    fbdevUpdateFbColormap(priv, min, max);
 }
diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.h b/xorg-server/hw/kdrive/fbdev/fbdev.h
index 3da8e4753..ebac6ad8b 100644
--- a/xorg-server/hw/kdrive/fbdev/fbdev.h
+++ b/xorg-server/hw/kdrive/fbdev/fbdev.h
@@ -51,18 +51,12 @@ typedef struct _fbdevScrPriv {
 extern KdCardFuncs  fbdevFuncs;
 extern char*        fbdevDevicePath;
 
-Bool
-fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
-
 Bool
 fbdevCardInit (KdCardInfo *card);
 
 Bool
 fbdevScreenInit (KdScreenInfo *screen);
 
-Bool
-fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv);
-
 Bool
 fbdevInitScreen (ScreenPtr pScreen);
 
@@ -94,46 +88,12 @@ void
 fbdevCardFini (KdCardInfo *card);
 
 void
-fbdevGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+fbdevGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
 
 void
-fbdevPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+fbdevPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
 
 Bool
 fbdevMapFramebuffer (KdScreenInfo *screen);
 
-void *
-fbdevWindowLinear (ScreenPtr	pScreen,
-		   CARD32	row,
-		   CARD32	offset,
-		   int		mode,
-		   CARD32	*size,
-		   void		*closure);
-
-void
-fbdevSetScreenSizes (ScreenPtr pScreen);
-
-Bool
-fbdevUnmapFramebuffer (KdScreenInfo *screen);
-
-Bool
-fbdevSetShadow (ScreenPtr pScreen);
-
-Bool
-fbdevCreateColormap (ColormapPtr pmap);
-
-#ifdef RANDR
-Bool
-fbdevRandRGetInfo (ScreenPtr pScreen, Rotation *rotations);
-
-Bool
-fbdevRandRSetConfig (ScreenPtr		pScreen,
-		     Rotation		randr,
-		     int		rate,
-		     RRScreenSizePtr	pSize);
-Bool
-fbdevRandRInit (ScreenPtr pScreen);
-
-#endif
-
 #endif /* _FBDEV_H_ */
diff --git a/xorg-server/hw/kdrive/fbdev/fbinit.c b/xorg-server/hw/kdrive/fbdev/fbinit.c
index de80c79aa..93646f6d7 100644
--- a/xorg-server/hw/kdrive/fbdev/fbinit.c
+++ b/xorg-server/hw/kdrive/fbdev/fbinit.c
@@ -28,9 +28,7 @@
 void
 InitCard (char *name)
 {
-    KdCardAttr	attr;
-
-    KdCardInfoAdd (&fbdevFuncs, &attr, 0);
+    KdCardInfoAdd (&fbdevFuncs, 0);
 }
 
 void
@@ -60,11 +58,11 @@ ddxProcessArgument (int argc, char **argv, int i)
 {
   if (!strcmp (argv[i], "-fb"))
     {
-      if (i+1 < argc) 
+      if (i+1 < argc)
 	{
 	  fbdevDevicePath = argv[i+1];
 	  return 2;
-	} 
+	}
       UseMsg();
       exit(1);
     }
@@ -86,18 +84,18 @@ KdCardFuncs	fbdevFuncs = {
     fbdevRestore,	    /* restore */
     fbdevScreenFini,	    /* scrfini */
     fbdevCardFini,	    /* cardfini */
-    
+
     0,			    /* initCursor */
     0,			    /* enableCursor */
     0,			    /* disableCursor */
     0,			    /* finiCursor */
     0,			    /* recolorCursor */
-    
+
     0,			    /* initAccel */
     0,			    /* enableAccel */
     0,			    /* disableAccel */
     0,			    /* finiAccel */
-    
+
     fbdevGetColors,    	    /* getColors */
     fbdevPutColors,	    /* putColors */
 };
diff --git a/xorg-server/hw/kdrive/linux/Makefile.am b/xorg-server/hw/kdrive/linux/Makefile.am
index 13df142f7..fe4a3d183 100644
--- a/xorg-server/hw/kdrive/linux/Makefile.am
+++ b/xorg-server/hw/kdrive/linux/Makefile.am
@@ -6,19 +6,22 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H
 
 noinst_LTLIBRARIES = liblinux.la
 
-if TSLIB
-TSLIB_C = tslib.c
+liblinux_la_SOURCES =
+
+liblinux_la_SOURCES += linux.c klinux.h
+
+if KDRIVE_KBD
+liblinux_la_SOURCES += keyboard.c
+endif
+
+if KDRIVE_EVDEV
+liblinux_la_SOURCES += evdev.c
 endif
 
-KDRIVE_HW_SOURCES =	\
-	evdev.c		\
-	keyboard.c	\
-	linux.c
-
-liblinux_la_SOURCES = 	\
-	bus.c		\
-	mouse.c		\
-	ms.c		\
-	ps2.c		\
-	$(KDRIVE_HW_SOURCES) \
-	$(TSLIB_C)
+if KDRIVE_MOUSE
+liblinux_la_SOURCES += mouse.c ms.c ps2.c
+endif
+
+if TSLIB
+liblinux_la_SOURCES += tslib.c
+endif
diff --git a/xorg-server/hw/kdrive/linux/bus.c b/xorg-server/hw/kdrive/linux/bus.c
deleted file mode 100644
index de9b90f5a..000000000
--- a/xorg-server/hw/kdrive/linux/bus.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright � 2000 Keith Packard
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <kdrive-config.h>
-#endif
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/Xpoll.h>
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include "kdrive.h"
-
-/* /dev/adbmouse is a busmouse */
-
-static void
-BusRead (int adbPort, void *closure)
-{
-    unsigned char   buf[3];
-    int		    n;
-    int		    dx, dy;
-    unsigned long   flags;
-
-    n = read (adbPort, buf, 3);
-    if (n == 3)
-    {
-	flags = KD_MOUSE_DELTA;
-	dx = (char) buf[1];
-	dy = -(char) buf[2];
-	if ((buf[0] & 4) == 0)
-	    flags |= KD_BUTTON_1;
-	if ((buf[0] & 2) == 0)
-	    flags |= KD_BUTTON_2;
-	if ((buf[0] & 1) == 0)
-	    flags |= KD_BUTTON_3;
-        KdEnqueuePointerEvent (closure, flags, dx, dy, 0);
-    }
-}
-
-char	*BusNames[] = {
-    "/dev/adbmouse",
-    "/dev/mouse",
-};
-
-#define NUM_BUS_NAMES	(sizeof (BusNames) / sizeof (BusNames[0]))
-
-static int
-BusInit (KdPointerInfo *pi)
-{
-    int	    i, fd = 0;
-
-    if (!pi->path || (strcmp(pi->path, "auto") == 0))
-    {
-        for (i = 0; i < NUM_BUS_NAMES; i++)
-        {
-            if ((fd = open (BusNames[i], 0)) >= 0)
-            {
-                close(fd);
-                xfree(pi->path);
-                pi->path = strdup(BusNames[i]);
-                return Success;
-            }
-        }
-    }
-    else
-    {
-        if ((fd = open(pi->path, 0)) >= 0)
-        {
-            close(fd);
-            return Success;
-        }
-    }
-
-    return !Success;
-}
-
-static int
-BusEnable (KdPointerInfo *pi)
-{
-    int fd = open(pi->path, 0);
-
-    if (fd >= 0)
-    {
-        KdRegisterFd(fd, BusRead, pi);
-        pi->driverPrivate = (void *)fd;
-        return Success;
-    }
-    else
-    {
-        return !Success;
-    }
-}
-
-static void
-BusDisable (KdPointerInfo *pi)
-{
-    KdUnregisterFd(pi, (int)pi->driverPrivate, TRUE);
-}
-
-static void
-BusFini (KdPointerInfo *pi)
-{
-    return;
-}
-
-KdPointerDriver BusMouseDriver = {
-    "bus",
-    BusInit,
-    BusEnable,
-    BusDisable,
-    BusFini,
-    NULL
-};
diff --git a/xorg-server/hw/kdrive/linux/evdev.c b/xorg-server/hw/kdrive/linux/evdev.c
index 096a2ddc3..485a2b557 100644
--- a/xorg-server/hw/kdrive/linux/evdev.c
+++ b/xorg-server/hw/kdrive/linux/evdev.c
@@ -48,7 +48,7 @@ typedef struct _kevdev {
     int                            abs[ABS_MAX + 1];
     int                            prevabs[ABS_MAX + 1];
     long                    key[NBITS(KEY_MAX + 1)];
-    
+
     /* supported device info */
     long                    relbits[NBITS(REL_MAX + 1)];
     long                    absbits[NBITS(ABS_MAX + 1)];
@@ -106,12 +106,12 @@ EvdevPtrMotion (KdPointerInfo    *pi, struct input_event *ev)
             int a;
             for (a = 0; a <= ke->max_rel; a++)
             {
-                if (ISBITSET (ke->relbits, a)) 
+                if (ISBITSET (ke->relbits, a))
 		{
                     if (a == 0)
                         KdEnqueuePointerEvent(pi, flags, ke->rel[a], 0, 0);
                     else if (a == 1)
-                        KdEnqueuePointerEvent(pi, flags, 0, ke->rel[a], 0); 
+                        KdEnqueuePointerEvent(pi, flags, 0, ke->rel[a], 0);
                 }
 		ke->rel[a] = 0;
             }
@@ -131,9 +131,9 @@ EvdevPtrMotion (KdPointerInfo    *pi, struct input_event *ev)
             ErrorF ("\n");
             break;
         }
-    
-    if (ev->code == REL_WHEEL) {           
-      for (i = 0; i < abs (ev->value); i++) 
+
+    if (ev->code == REL_WHEEL) {
+      for (i = 0; i < abs (ev->value); i++)
       {
         if (ev->value > 0)
           flags |= KD_BUTTON_4;
@@ -150,7 +150,7 @@ EvdevPtrMotion (KdPointerInfo    *pi, struct input_event *ev)
         KdEnqueuePointerEvent (pi, flags, 0, 0, 0);
       }
     }
-    
+
 }
 
 static void
@@ -164,7 +164,7 @@ EvdevPtrRead (int evdevPort, void *closure)
 
     n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
     if (n <= 0) {
-        if (errno == ENODEV) 
+        if (errno == ENODEV)
             DeleteInputDeviceRequest(pi->dixdev);
         return;
     }
@@ -231,7 +231,7 @@ EvdevPtrInit (KdPointerInfo *pi)
 
 static Status
 EvdevPtrEnable (KdPointerInfo *pi)
-{        
+{
     int fd;
     unsigned long   ev[NBITS(EV_MAX)];
     Kevdev            *ke;
@@ -352,7 +352,7 @@ EvdevPtrFini (KdPointerInfo *pi)
 
 
 /*
- * Evdev keyboard functions 
+ * Evdev keyboard functions
  */
 
 static void
@@ -374,7 +374,7 @@ EvdevKbdRead (int evdevPort, void *closure)
 
     n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
     if (n <= 0) {
-        if (errno == ENODEV) 
+        if (errno == ENODEV)
             DeleteInputDeviceRequest(ki->dixdev);
         return;
     }
@@ -395,7 +395,7 @@ static Status
 EvdevKbdInit (KdKeyboardInfo *ki)
 {
     int fd;
-    
+
     if (!ki->path) {
         ErrorF("Couldn't find evdev device path\n");
         return BadValue;
diff --git a/xorg-server/hw/kdrive/linux/linux.c b/xorg-server/hw/kdrive/linux/linux.c
index f76c2cbd9..9863c1424 100644
--- a/xorg-server/hw/kdrive/linux/linux.c
+++ b/xorg-server/hw/kdrive/linux/linux.c
@@ -33,6 +33,22 @@
 #include <X11/keysym.h>
 #include <linux/apm_bios.h>
 
+#ifdef KDRIVE_MOUSE
+extern KdPointerDriver	LinuxMouseDriver;
+extern KdPointerDriver	Ps2MouseDriver;
+extern KdPointerDriver	MsMouseDriver;
+#endif
+#ifdef TSLIB
+extern KdPointerDriver	TsDriver;
+#endif
+#ifdef KDRIVE_EVDEV
+extern KdPointerDriver	LinuxEvdevMouseDriver;
+extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
+#endif
+#ifdef KDRIVE_KBD
+extern KdKeyboardDriver	LinuxKeyboardDriver;
+#endif
+
 static int  vtno;
 int  LinuxConsoleFd;
 int  LinuxApmFd = -1;
@@ -79,7 +95,7 @@ LinuxInit (void)
 	vtno = kdVirtualTerminal;
     else
     {
-	if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0) 
+	if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0)
 	{
 	    FatalError(
 		       "LinuxInit: Cannot open /dev/tty0 (%s)\n",
@@ -129,8 +145,8 @@ LinuxSetSwitchMode (int mode)
 {
     struct sigaction	act;
     struct vt_mode	VT;
-    
-    if (ioctl(LinuxConsoleFd, VT_GETMODE, &VT) < 0) 
+
+    if (ioctl(LinuxConsoleFd, VT_GETMODE, &VT) < 0)
     {
 	FatalError ("LinuxInit: VT_GETMODE failed\n");
     }
@@ -141,7 +157,7 @@ LinuxSetSwitchMode (int mode)
 	sigemptyset (&act.sa_mask);
 	act.sa_flags = 0;
 	sigaction (SIGUSR1, &act, 0);
-    
+
 	VT.mode = mode;
 	VT.relsig = SIGUSR1;
 	VT.acqsig = SIGUSR1;
@@ -152,12 +168,12 @@ LinuxSetSwitchMode (int mode)
 	sigemptyset (&act.sa_mask);
 	act.sa_flags = 0;
 	sigaction (SIGUSR1, &act, 0);
-    
+
 	VT.mode = mode;
 	VT.relsig = 0;
 	VT.acqsig = 0;
     }
-    if (ioctl(LinuxConsoleFd, VT_SETMODE, &VT) < 0) 
+    if (ioctl(LinuxConsoleFd, VT_SETMODE, &VT) < 0)
     {
 	FatalError("LinuxInit: VT_SETMODE failed\n");
     }
@@ -237,7 +253,7 @@ LinuxEnable (void)
      */
     LinuxApmFd = open ("/dev/apm_bios", 2);
     if (LinuxApmFd < 0 && errno == ENOENT)
-	LinuxApmFd = open ("/dev/misc/apm_bios", 2); 
+	LinuxApmFd = open ("/dev/misc/apm_bios", 2);
     if (LinuxApmFd >= 0)
     {
 	LinuxApmRunning = TRUE;
@@ -245,7 +261,7 @@ LinuxEnable (void)
 	RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
 	AddEnabledDevice (LinuxApmFd);
     }
-	
+
     /*
      * now get the VT
      */
@@ -308,8 +324,8 @@ LinuxFini (void)
 	 * Find a legal VT to switch to, either the one we started from
 	 * or the lowest active one that isn't ours
 	 */
-	if (activeVT < 0 || 
-	    activeVT == vts.v_active || 
+	if (activeVT < 0 ||
+	    activeVT == vts.v_active ||
 	    !(vts.v_state & (1 << activeVT)))
 	{
 	    for (activeVT = 1; activeVT < 16; activeVT++)
@@ -345,15 +361,21 @@ LinuxFini (void)
 void
 KdOsAddInputDrivers (void)
 {
+#ifdef KDRIVE_MOUSE
     KdAddPointerDriver(&LinuxMouseDriver);
     KdAddPointerDriver(&MsMouseDriver);
     KdAddPointerDriver(&Ps2MouseDriver);
+#endif
 #ifdef TSLIB
     KdAddPointerDriver(&TsDriver);
 #endif
+#ifdef KDRIVE_EVDEV
     KdAddPointerDriver(&LinuxEvdevMouseDriver);
-    KdAddKeyboardDriver(&LinuxKeyboardDriver);
     KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
+#endif
+#ifdef KDRIVE_KBD
+    KdAddKeyboardDriver(&LinuxKeyboardDriver);
+#endif
 }
 
 static void
diff --git a/xorg-server/hw/kdrive/linux/mouse.c b/xorg-server/hw/kdrive/linux/mouse.c
index 6f399b586..007263e4b 100644
--- a/xorg-server/hw/kdrive/linux/mouse.c
+++ b/xorg-server/hw/kdrive/linux/mouse.c
@@ -112,7 +112,7 @@ MouseFlush (Kbufio *b, char *buf, int size)
     CARD32  done = now + 100;
     int	    c;
     int	    n = 0;
-    
+
     while ((c = MouseReadByte (b, done - now)) != -1)
     {
 	if (buf)
@@ -170,7 +170,7 @@ static Bool
 MouseWriteByte (int fd, unsigned char c, int timeout)
 {
     int	ret;
-    
+
 #ifdef DEBUG_BYTES
     ErrorF ("\tput %02x\n", c);
 #endif
@@ -234,7 +234,7 @@ typedef struct _kmouse {
     int			invalid;/* total invalid bytes for this protocol */
     unsigned long	state;	/* private per protocol, init to prot->state */
 } Kmouse;
-    
+
 static int mouseValid (KdPointerInfo *pi, unsigned char *ev, int ne)
 {
     Kmouse		*km = pi->driverPrivate;
@@ -271,16 +271,16 @@ static Bool MouseReasonable (KdPointerInfo *pi, unsigned long flags, int dx, int
 {
     Kmouse		*km = pi->driverPrivate;
 
-    if (km->stage == MouseWorking) 
+    if (km->stage == MouseWorking)
 	return TRUE;
-    if (dx < -50 || dx > 50) 
+    if (dx < -50 || dx > 50)
     {
 #ifdef DEBUG
 	ErrorF ("Large X %d\n", dx);
 #endif
 	return FALSE;
     }
-    if (dy < -50 || dy > 50) 
+    if (dy < -50 || dy > 50)
     {
 #ifdef DEBUG
 	ErrorF ("Large Y %d\n", dy);
@@ -299,7 +299,7 @@ static Bool ps2Parse (KdPointerInfo *pi, unsigned char *ev, int ne)
     int		    dx, dy, dz;
     unsigned long   flags;
     unsigned long   flagsrelease = 0;
-    
+
     flags = KD_MOUSE_DELTA;
     if (ev[0] & 4)
 	flags |= KD_BUTTON_2;
@@ -307,7 +307,7 @@ static Bool ps2Parse (KdPointerInfo *pi, unsigned char *ev, int ne)
 	flags |= KD_BUTTON_3;
     if (ev[0] & 1)
 	flags |= KD_BUTTON_1;
-    
+
     if (ne > 3)
     {
 	dz = (int) (signed char) ev[3];
@@ -322,7 +322,7 @@ static Bool ps2Parse (KdPointerInfo *pi, unsigned char *ev, int ne)
 	    flagsrelease = KD_BUTTON_5;
 	}
     }
-	
+
     dx = ev[1];
     if (ev[0] & 0x10)
 	dx -= 256;
@@ -407,14 +407,14 @@ static const KmouseProt exps2Prot = {
 #define PSM_4DMOUSE_ID          6
 #define PSM_4DPLUS_ID           8
 
-static unsigned char	ps2_init[] = { 
+static unsigned char	ps2_init[] = {
     PSMC_ENABLE_DEV,
     0,
 };
 
 #define NINIT_PS2   1
 
-static unsigned char    wheel_3button_init[] = { 
+static unsigned char    wheel_3button_init[] = {
     PSMC_SET_SAMPLING_RATE, 200,
     PSMC_SET_SAMPLING_RATE, 100,
     PSMC_SET_SAMPLING_RATE,  80,
@@ -431,7 +431,7 @@ static unsigned char    wheel_5button_init[] = {
     PSMC_SET_SAMPLING_RATE, 200,
     PSMC_SET_SAMPLING_RATE, 200,
     PSMC_SET_SAMPLING_RATE,  80,
-    PSMC_SEND_DEV_ID, 
+    PSMC_SEND_DEV_ID,
     0
 };
 
@@ -439,8 +439,8 @@ static unsigned char    wheel_5button_init[] = {
 
 static unsigned char	intelli_init[] = {
     PSMC_SET_SAMPLING_RATE, 200,
-    PSMC_SET_SAMPLING_RATE, 100, 
-    PSMC_SET_SAMPLING_RATE,  80, 
+    PSMC_SET_SAMPLING_RATE, 100,
+    PSMC_SET_SAMPLING_RATE,  80,
     0
 };
 
@@ -453,7 +453,7 @@ ps2SkipInit (KdPointerInfo *pi, int ninit, Bool ret_next)
     int	    c = -1;
     int	    skipping;
     Bool    waiting;
-    
+
     skipping = 0;
     waiting = FALSE;
     while (ninit || ret_next)
@@ -486,7 +486,7 @@ ps2Init (KdPointerInfo *pi)
     int		    id;
     unsigned char   *init;
     int		    ninit;
-    
+
     /* Send Intellimouse initialization sequence */
     MouseWriteBytes (km->iob.fd, intelli_init, strlen ((char *) intelli_init), 100);
     /*
@@ -530,7 +530,7 @@ static Bool busParse (KdPointerInfo *pi, unsigned char *ev, int ne)
     Kmouse	    *km = pi->driverPrivate;
     int		    dx, dy;
     unsigned long   flags;
-    
+
     flags = KD_MOUSE_DELTA;
     dx = (signed char) ev[1];
     dy = -(signed char) ev[2];
@@ -636,14 +636,14 @@ static Bool logiParse (KdPointerInfo *pi, unsigned char *ev, int ne)
     unsigned long   flags;
 
     flags = KD_MOUSE_DELTA;
-    
+
     if (ne == 3)
     {
 	if (ev[0] & 0x20)
 	    flags |= KD_BUTTON_1;
 	if (ev[0] & 0x10)
 	    flags |= KD_BUTTON_3;
-    
+
 	dx = (signed char)(((ev[0] & 0x03) << 6) | (ev[1] & 0x3F));
 	dy = (signed char)(((ev[0] & 0x0C) << 4) | (ev[2] & 0x3F));
 	flags |= km->state & KD_BUTTON_2;
@@ -686,7 +686,7 @@ static Bool mscParse (KdPointerInfo *pi, unsigned char *ev, int ne)
     unsigned long   flags;
 
     flags = KD_MOUSE_DELTA;
-    
+
     if (!(ev[0] & 0x4))
 	flags |= KD_BUTTON_1;
     if (!(ev[0] & 0x2))
@@ -871,7 +871,7 @@ MouseRead (int mousePort, void *closure)
 		    switch (km->stage)
 		    {
 		    case MouseBroken:
-#ifdef DEBUG			
+#ifdef DEBUG
 			ErrorF ("Mouse protocol %s seems OK\n",
 				km->prot->name);
 #endif
@@ -939,7 +939,7 @@ MouseInit (KdPointerInfo *pi)
 
     if (!pi)
         return BadImplementation;
-    
+
     if (!pi->path || strcmp(pi->path, "auto") == 0) {
         for (i = 0; i < NUM_DEFAULT_MOUSE; i++) {
             fd = open (kdefaultMouse[i], 2);
@@ -952,7 +952,7 @@ MouseInit (KdPointerInfo *pi)
     else {
         fd = open (pi->path, 2);
     }
-	    
+
     if (fd < 0)
         return BadMatch;
 
@@ -1008,7 +1008,7 @@ MouseDisable (KdPointerInfo *pi)
     Kmouse *km;
     if (!pi || !pi->driverPrivate)
         return;
-    
+
     km = pi->driverPrivate;
     KdUnregisterFd (pi, km->iob.fd, TRUE);
 }
diff --git a/xorg-server/hw/kdrive/linux/ms.c b/xorg-server/hw/kdrive/linux/ms.c
index 5786ed170..b6151cd90 100644
--- a/xorg-server/hw/kdrive/linux/ms.c
+++ b/xorg-server/hw/kdrive/linux/ms.c
@@ -83,7 +83,7 @@ MsRead (int port, void *closure)
 		flags |= KD_BUTTON_1;
 	    if (b[0] & 0x10)
 		flags |= KD_BUTTON_3;
-	    
+
 	    dx = (char)(((b[0] & 0x03) << 6) | (b[1] & 0x3F));
 	    dy = (char)(((b[0] & 0x0C) << 4) | (b[2] & 0x3F));
             n -= 3;
@@ -103,8 +103,8 @@ MsInit (KdPointerInfo *pi)
         pi->path = strdup("/dev/mouse");
     if (!pi->name)
         pi->name = strdup("Microsoft protocol mouse");
-    
-    return Success; 
+
+    return Success;
 }
 
 static Status
diff --git a/xorg-server/hw/kdrive/linux/ps2.c b/xorg-server/hw/kdrive/linux/ps2.c
index 396758481..552a3c7cb 100644
--- a/xorg-server/hw/kdrive/linux/ps2.c
+++ b/xorg-server/hw/kdrive/linux/ps2.c
@@ -99,7 +99,7 @@ Ps2Read (int ps2Port, void *closure)
 		flags |= right_button;
 	    if (b[0] & 1)
 		flags |= left_button;
-		
+
 	    dx = b[1];
 	    if (b[0] & 0x10)
 		dx -= 256;
@@ -146,7 +146,7 @@ static Status
 Ps2Enable (KdPointerInfo *pi)
 {
     int fd;
-    
+
     if (!pi)
         return BadImplementation;
 
diff --git a/xorg-server/hw/kdrive/src/Makefile.am b/xorg-server/hw/kdrive/src/Makefile.am
index 7ac23c2aa..51375b950 100644
--- a/xorg-server/hw/kdrive/src/Makefile.am
+++ b/xorg-server/hw/kdrive/src/Makefile.am
@@ -15,12 +15,10 @@ endif
 libkdrive_la_SOURCES =	\
 	fourcc.h	\
 	kcmap.c		\
-	kcurscol.c	\
 	kdrive.c	\
 	kdrive.h	\
 	kinfo.c		\
 	kinput.c	\
-	kmap.c		\
 	kmode.c		\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
diff --git a/xorg-server/hw/kdrive/src/kcmap.c b/xorg-server/hw/kdrive/src/kcmap.c
index 2c33e798a..40697e091 100644
--- a/xorg-server/hw/kdrive/src/kcmap.c
+++ b/xorg-server/hw/kdrive/src/kcmap.c
@@ -30,10 +30,10 @@
  */
 
 void
-KdSetColormap (ScreenPtr pScreen, int fb)
+KdSetColormap (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
-    ColormapPtr	pCmap = pScreenPriv->pInstalledmap[fb];
+    ColormapPtr	pCmap = pScreenPriv->pInstalledmap;
     Pixel	pixels[KD_MAX_PSEUDO_SIZE];
     xrgb	colors[KD_MAX_PSEUDO_SIZE];
     xColorItem	defs[KD_MAX_PSEUDO_SIZE];
@@ -41,12 +41,12 @@ KdSetColormap (ScreenPtr pScreen, int fb)
 
     if (!pScreenPriv->card->cfuncs->putColors)
 	return;
-    if (pScreenPriv->screen->fb[fb].depth > KD_MAX_PSEUDO_DEPTH)
+    if (pScreenPriv->screen->fb.depth > KD_MAX_PSEUDO_DEPTH)
 	return;
-    
+
     if (!pScreenPriv->enabled)
 	return;
-    
+
     if (!pCmap)
 	return;
 
@@ -54,13 +54,13 @@ KdSetColormap (ScreenPtr pScreen, int fb)
      * Make DIX convert pixels into RGB values -- this handles
      * true/direct as well as pseudo/static visuals
      */
-    
-    for (i = 0; i < (1 << pScreenPriv->screen->fb[fb].depth); i++)
+
+    for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++)
 	pixels[i] = i;
 
-    QueryColors (pCmap, (1 << pScreenPriv->screen->fb[fb].depth), pixels, colors);
-    
-    for (i = 0; i < (1 << pScreenPriv->screen->fb[fb].depth); i++)
+    QueryColors (pCmap, (1 << pScreenPriv->screen->fb.depth), pixels, colors);
+
+    for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++)
     {
 	defs[i].pixel = i;
 	defs[i].red = colors[i].red;
@@ -69,8 +69,8 @@ KdSetColormap (ScreenPtr pScreen, int fb)
 	defs[i].flags = DoRed|DoGreen|DoBlue;
     }
 
-    (*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, fb,
-					     (1 << pScreenPriv->screen->fb[fb].depth),
+    (*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen,
+					     (1 << pScreenPriv->screen->fb.depth),
 					     defs);
 
     /* recolor hardware cursor */
@@ -87,77 +87,35 @@ KdEnableColormap (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
     int	    i;
-    int	    fb;
-    Bool    done = FALSE;
 
     if (!pScreenPriv->card->cfuncs->putColors)
 	return;
-    for (fb = 0; fb < KD_MAX_FB && pScreenPriv->screen->fb[fb].depth; fb++)
+
+    if (pScreenPriv->screen->fb.depth <= KD_MAX_PSEUDO_DEPTH)
     {
-	if (pScreenPriv->screen->fb[fb].depth <= KD_MAX_PSEUDO_DEPTH && !done)
-	{
-	    for (i = 0; i < (1 << pScreenPriv->screen->fb[fb].depth); i++)
-		pScreenPriv->systemPalette[i].pixel = i;
-	    (*pScreenPriv->card->cfuncs->getColors) (pScreen, fb,
-						   (1 << pScreenPriv->screen->fb[fb].depth),
-						   pScreenPriv->systemPalette);
-	    done = TRUE;
-	}
-	KdSetColormap (pScreen, fb);
+	for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++)
+	    pScreenPriv->systemPalette[i].pixel = i;
+	(*pScreenPriv->card->cfuncs->getColors) (pScreen,
+						 (1 << pScreenPriv->screen->fb.depth),
+						 pScreenPriv->systemPalette);
     }
+    KdSetColormap (pScreen);
 }
 
 void
 KdDisableColormap (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
-    int	    fb;
 
     if (!pScreenPriv->card->cfuncs->putColors)
 	return;
-    for (fb = 0; fb < KD_MAX_FB && pScreenPriv->screen->fb[fb].depth; fb++)
-    {
-	if (pScreenPriv->screen->fb[fb].depth <= KD_MAX_PSEUDO_DEPTH)
-	{
-	    (*pScreenPriv->card->cfuncs->putColors) (pScreen, fb,
-						     (1 << pScreenPriv->screen->fb[fb].depth),
-						     pScreenPriv->systemPalette);
-	    break;
-	}
-    }
-}
 
-static int
-KdColormapFb (ColormapPtr   pCmap)
-{
-    ScreenPtr	pScreen = pCmap->pScreen;
-    KdScreenPriv (pScreen);
-    KdScreenInfo    *screen = pScreenPriv->screen;
-    int		d;
-    DepthPtr	depth;
-    int		v;
-    VisualID	vid = pCmap->pVisual->vid;
-    int		fb;
-
-    if (screen->fb[1].depth)
+    if (pScreenPriv->screen->fb.depth <= KD_MAX_PSEUDO_DEPTH)
     {
-	for (d = 0; d < pScreen->numDepths; d++)
-	{
-	    depth = &pScreen->allowedDepths[d];
-	    for (v = 0; v < depth->numVids; v++)
-	    {
-		if (depth->vids[v] == vid)
-		{
-		    for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++)
-		    {
-			if (depth->depth == screen->fb[fb].depth)
-			    return fb;
-		    }
-		}
-	    }
-	}
+	(*pScreenPriv->card->cfuncs->putColors) (pScreen,
+						 (1 << pScreenPriv->screen->fb.depth),
+						 pScreenPriv->systemPalette);
     }
-    return 0;
 }
 
 /*
@@ -173,21 +131,20 @@ void
 KdInstallColormap (ColormapPtr pCmap)
 {
     KdScreenPriv(pCmap->pScreen);
-    int		fb = KdColormapFb (pCmap);
 
-    if (pCmap == pScreenPriv->pInstalledmap[fb])
+    if (pCmap == pScreenPriv->pInstalledmap)
 	return;
 
     /* Tell X clients that the installed colormap is going away. */
-    if (pScreenPriv->pInstalledmap[fb])
-	WalkTree(pScreenPriv->pInstalledmap[fb]->pScreen, TellLostMap,
-		 (pointer) &(pScreenPriv->pInstalledmap[fb]->mid));
+    if (pScreenPriv->pInstalledmap)
+	WalkTree(pScreenPriv->pInstalledmap->pScreen, TellLostMap,
+		 (pointer) &(pScreenPriv->pInstalledmap->mid));
 
     /* Take note of the new installed colorscreen-> */
-    pScreenPriv->pInstalledmap[fb] = pCmap;
+    pScreenPriv->pInstalledmap = pCmap;
+
+    KdSetColormap (pCmap->pScreen);
 
-    KdSetColormap (pCmap->pScreen, fb);
-    
     /* Tell X clients of the new colormap */
     WalkTree(pCmap->pScreen, TellGainedMap, (pointer) &(pCmap->mid));
 }
@@ -195,7 +152,7 @@ KdInstallColormap (ColormapPtr pCmap)
 /*
  * KdUninstallColormap
  *
- * This function uninstalls a colormap by either installing 
+ * This function uninstalls a colormap by either installing
  * the default X colormap or erasing the installed colormap pointer.
  * The default X colormap itself cannot be uninstalled.
  */
@@ -203,12 +160,11 @@ void
 KdUninstallColormap (ColormapPtr pCmap)
 {
     KdScreenPriv(pCmap->pScreen);
-    int		fb = KdColormapFb (pCmap);
     Colormap	defMapID;
     ColormapPtr defMap;
 
     /* ignore if not installed */
-    if (pCmap != pScreenPriv->pInstalledmap[fb])
+    if (pCmap != pScreenPriv->pInstalledmap)
 	return;
 
     /* ignore attempts to uninstall default colormap */
@@ -216,17 +172,17 @@ KdUninstallColormap (ColormapPtr pCmap)
     if ((Colormap) pCmap->mid == defMapID)
 	return;
 
-    /* install default if on same fb */
+    /* install default */
     dixLookupResourceByType((pointer *)&defMap, defMapID, RT_COLORMAP,
 			    serverClient, DixInstallAccess);
-    if (defMap && KdColormapFb (defMap) == fb)
+    if (defMap)
 	(*pCmap->pScreen->InstallColormap)(defMap);
     else
     {
 	/* uninstall and clear colormap pointer */
 	WalkTree(pCmap->pScreen, TellLostMap,
 		 (pointer) &(pCmap->mid));
-	pScreenPriv->pInstalledmap[fb] = 0;
+	pScreenPriv->pInstalledmap = 0;
     }
 }
 
@@ -234,16 +190,12 @@ int
 KdListInstalledColormaps (ScreenPtr pScreen, Colormap *pCmaps)
 {
     KdScreenPriv(pScreen);
-    int		fb;
     int		n = 0;
-    
-    for (fb = 0; fb < KD_MAX_FB && pScreenPriv->screen->fb[fb].depth; fb++)
+
+    if (pScreenPriv->pInstalledmap)
     {
-	if (pScreenPriv->pInstalledmap[fb])
-	{
-	    *pCmaps++ = pScreenPriv->pInstalledmap[fb]->mid;
-	    n++;
-	}
+	*pCmaps++ = pScreenPriv->pInstalledmap->mid;
+	n++;
     }
     return n;
 }
@@ -261,20 +213,19 @@ KdStoreColors (ColormapPtr pCmap, int ndef, xColorItem *pdefs)
     KdScreenPriv(pCmap->pScreen);
     VisualPtr           pVisual;
     xColorItem          expanddefs[KD_MAX_PSEUDO_SIZE];
-    int			fb = KdColormapFb (pCmap);
 
-    if (pCmap != pScreenPriv->pInstalledmap[fb])
+    if (pCmap != pScreenPriv->pInstalledmap)
 	return;
-    
+
     if (!pScreenPriv->card->cfuncs->putColors)
 	return;
-    
-    if (pScreenPriv->screen->fb[fb].depth > KD_MAX_PSEUDO_DEPTH)
+
+    if (pScreenPriv->screen->fb.depth > KD_MAX_PSEUDO_DEPTH)
 	return;
-    
+
     if (!pScreenPriv->enabled)
 	return;
-    
+
     /* Check for DirectColor or TrueColor being simulated on a PseudoColor device. */
     pVisual = pCmap->pVisual;
     if ((pVisual->class | DynamicClass) == DirectColor)
@@ -287,8 +238,8 @@ KdStoreColors (ColormapPtr pCmap, int ndef, xColorItem *pdefs)
 	pdefs = expanddefs;
     }
 
-    (*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, fb, ndef, pdefs);
-    
+    (*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, ndef, pdefs);
+
     /* recolor hardware cursor */
     if (pScreenPriv->card->cfuncs->recolorCursor)
 	(*pScreenPriv->card->cfuncs->recolorCursor) (pCmap->pScreen, ndef, pdefs);
diff --git a/xorg-server/hw/kdrive/src/kcurscol.c b/xorg-server/hw/kdrive/src/kcurscol.c
deleted file mode 100644
index 6a17df30f..000000000
--- a/xorg-server/hw/kdrive/src/kcurscol.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright � 1999 Keith Packard
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <kdrive-config.h>
-#endif
-#include "kdrive.h"
-#include "cursorstr.h"
-
-static int
-KdComputeCmapShift (unsigned long mask)
-{
-    int	shift;
-    unsigned long   bit;
-    
-    shift = 16;
-    bit = 0x80000000;
-    while (!(mask & bit))
-    {
-	shift--;
-	bit >>= 1;
-    }
-    return shift;
-}
-
-#define Shift(v,d)  ((d) < 0 ? ((v) >> (-d)) : ((v) << (d)))
-
-void
-KdAllocateCursorPixels (ScreenPtr	pScreen,
-			int		fb,
-			CursorPtr	pCursor, 
-			Pixel		*source,
-			Pixel		*mask)
-{
-    xColorItem	    sourceColor, maskColor;
-    int		    r, g, b;
-    KdScreenPriv(pScreen);
-
-    if (pScreenPriv->screen->fb[fb].redMask)
-    {
-
-	r = KdComputeCmapShift (pScreenPriv->screen->fb[fb].redMask);
-	g = KdComputeCmapShift (pScreenPriv->screen->fb[fb].greenMask);
-	b = KdComputeCmapShift (pScreenPriv->screen->fb[fb].blueMask);
-	*source = ((Shift(pCursor->foreRed,r) & pScreenPriv->screen->fb[fb].redMask) |
-			    (Shift(pCursor->foreGreen,g) & pScreenPriv->screen->fb[fb].greenMask) |
-			    (Shift(pCursor->foreBlue,b) & pScreenPriv->screen->fb[fb].blueMask));
-	*mask = ((Shift(pCursor->backRed,r) & pScreenPriv->screen->fb[fb].redMask) |
-			  (Shift(pCursor->backGreen,g) & pScreenPriv->screen->fb[fb].greenMask) |
-			  (Shift(pCursor->backBlue,b) & pScreenPriv->screen->fb[fb].blueMask));
-    }
-    else
-    {
-	/*
-	 * Set these to an invalid pixel value so that
-	 * when the store colors comes through, the cursor
-	 * won't get recolored
-	 */
-	*source = ~0;
-	*mask = ~0;
-	
-	sourceColor.red = pCursor->foreRed;
-	sourceColor.green = pCursor->foreGreen;
-	sourceColor.blue = pCursor->foreBlue;
-	FakeAllocColor(pScreenPriv->pInstalledmap[fb], &sourceColor);
-	maskColor.red = pCursor->backRed;
-	maskColor.green = pCursor->backGreen;
-	maskColor.blue = pCursor->backBlue;
-	FakeAllocColor(pScreenPriv->pInstalledmap[fb], &maskColor);
-	FakeFreeColor(pScreenPriv->pInstalledmap[fb], sourceColor.pixel);
-	FakeFreeColor(pScreenPriv->pInstalledmap[fb], maskColor.pixel);
-	*source = sourceColor.pixel;
-	*mask = maskColor.pixel;
-    }
-}
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index 5cfe54ff8..7675c1e86 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -148,9 +148,9 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
 	REGION_EMPTY(pScreen, &pWin->borderClip);
 	REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
     }
-    
+
     ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-    
+
     if (WasViewable)
     {
 	if (pWin->firstChild)
@@ -185,7 +185,7 @@ void
 KdDisableScreen (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
-    
+
     if (!pScreenPriv->enabled)
 	return;
     if (!pScreenPriv->closed)
@@ -209,7 +209,7 @@ KdDoSwitchCmd (char *reason)
     {
 	char    *command = xalloc (strlen (kdSwitchCmd) +
 				   1 +
-				   strlen (reason) + 
+				   strlen (reason) +
 				   1);
 	if (!command)
 	    return;
@@ -389,10 +389,9 @@ KdParseScreen (KdScreenInfo *screen,
 {
     char    delim;
     char    save[1024];
-    int	    fb;
     int	    i;
     int	    pixels, mm;
-    
+
     screen->dumb = kdDumbDriver;
     screen->softCursor = kdSoftCursor;
     screen->origin = kdOrigin;
@@ -403,22 +402,21 @@ KdParseScreen (KdScreenInfo *screen,
     screen->height_mm = 0;
     screen->subpixel_order = kdSubpixelOrder;
     screen->rate = 0;
-    for (fb = 0; fb < KD_MAX_FB; fb++)
-	screen->fb[fb].depth = 0;
+    screen->fb.depth = 0;
     if (!arg)
 	return;
     if (strlen (arg) >= sizeof (save))
 	return;
-    
+
     for (i = 0; i < 2; i++)
     {
 	arg = KdParseFindNext (arg, "x/@XY", save, &delim);
 	if (!save[0])
 	    return;
-	
+
 	pixels = atoi(save);
 	mm = 0;
-	
+
 	if (delim == '/')
 	{
 	    arg = KdParseFindNext (arg, "x@XY", save, &delim);
@@ -426,7 +424,7 @@ KdParseScreen (KdScreenInfo *screen,
 		return;
 	    mm = atoi(save);
 	}
-	
+
 	if (i == 0)
 	{
 	    screen->width = pixels;
@@ -476,26 +474,19 @@ KdParseScreen (KdScreenInfo *screen,
 	arg = KdParseFindNext (arg, "xY", save, &delim);
 	screen->randr |= RR_Reflect_Y;
     }
-    
-    fb = 0;
-    while (fb < KD_MAX_FB)
+
+    arg = KdParseFindNext (arg, "x/,", save, &delim);
+    if (save[0])
     {
-	arg = KdParseFindNext (arg, "x/,", save, &delim);
-	if (!save[0])
-	    break;
-	screen->fb[fb].depth = atoi(save);
+	screen->fb.depth = atoi(save);
 	if (delim == '/')
 	{
 	    arg = KdParseFindNext (arg, "x,", save, &delim);
-	    if (!save[0])
-		break;
-	    screen->fb[fb].bitsPerPixel = atoi (save);
+	    if (save[0])
+		screen->fb.bitsPerPixel = atoi (save);
 	}
 	else
-	    screen->fb[fb].bitsPerPixel = 0;
-	if (delim != ',')
-	    break;
-	fb++;
+	    screen->fb.bitsPerPixel = 0;
     }
 
     if (delim == 'x')
@@ -538,7 +529,7 @@ void
 KdUseMsg (void)
 {
     ErrorF("\nTinyX Device Dependent Usage:\n");
-    ErrorF("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP{,DEPTH/BPP}[xFREQ]]  Specify screen characteristics\n");
+    ErrorF("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]]  Specify screen characteristics\n");
     ErrorF("-rgba rgb/bgr/vrgb/vbgr/none   Specify subpixel ordering for LCD panels\n");
     ErrorF("-mouse driver [,n,,options]    Specify the pointer driver and its options (n is the number of buttons)\n");
     ErrorF("-keybd driver [,,options]      Specify the keyboard driver and its options\n");
@@ -691,7 +682,7 @@ KdOsInit (KdOsFuncs *pOsFuncs)
     kdOsFuncs = pOsFuncs;
     if (pOsFuncs)
     {
-	if (serverGeneration == 1) 
+	if (serverGeneration == 1)
 	{
 	    KdDoSwitchCmd ("start");
             if (pOsFuncs->Init)
@@ -704,7 +695,7 @@ Bool
 KdAllocatePrivates (ScreenPtr pScreen)
 {
     KdPrivScreenPtr	pScreenPriv;
-    
+
     if (kdGeneration != serverGeneration)
 	kdGeneration = serverGeneration;
 
@@ -741,20 +732,20 @@ KdCloseScreen (int index, ScreenPtr pScreen)
     KdScreenInfo    *screen = pScreenPriv->screen;
     KdCardInfo	    *card = pScreenPriv->card;
     Bool	    ret;
-    
+
     pScreenPriv->closed = TRUE;
     pScreen->CloseScreen = pScreenPriv->CloseScreen;
     if(pScreen->CloseScreen)
         ret = (*pScreen->CloseScreen) (index, pScreen);
     else
 	ret = TRUE;
-    
+
     if (pScreenPriv->dpmsState != KD_DPMS_NORMAL)
 	(*card->cfuncs->dpms) (pScreen, KD_DPMS_NORMAL);
-    
+
     if (screen->mynum == card->selected)
 	KdDisableScreen (pScreen);
-    
+
     /*
      * Restore video hardware when last screen is closed
      */
@@ -763,7 +754,7 @@ KdCloseScreen (int index, ScreenPtr pScreen)
 	if (kdEnabled && card->cfuncs->restore)
 	    (*card->cfuncs->restore) (card);
     }
-	
+
     if (!pScreenPriv->screen->dumb && card->cfuncs->finiAccel)
 	(*card->cfuncs->finiAccel) (pScreen);
 
@@ -794,9 +785,9 @@ KdCloseScreen (int index, ScreenPtr pScreen)
 	    }
 	}
     }
-    
+
     pScreenPriv->screen->pScreen = 0;
-    
+
     xfree ((pointer) pScreenPriv);
     return ret;
 }
@@ -806,10 +797,10 @@ KdSaveScreen (ScreenPtr pScreen, int on)
 {
     KdScreenPriv(pScreen);
     int	    dpmsState;
-    
+
     if (!pScreenPriv->card->cfuncs->dpms)
 	return FALSE;
-    
+
     dpmsState = pScreenPriv->dpmsState;
     switch (on) {
     case SCREEN_SAVER_OFF:
@@ -861,7 +852,7 @@ KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr)
     int			subpixel_order = screen->subpixel_order;
     Rotation		subpixel_dir;
     int			i;
-    
+
     static struct {
 	int	    subpixel_order;
 	Rotation    direction;
@@ -874,7 +865,7 @@ KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr)
 
     static struct {
 	int	bit;
-	int	normal; 
+	int	normal;
 	int	reflect;
     } reflects[] = {
 	{ RR_Reflect_X, SubPixelHorizontalRGB,	SubPixelHorizontalBGR },
@@ -882,7 +873,7 @@ KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr)
 	{ RR_Reflect_Y, SubPixelVerticalRGB,	SubPixelVerticalBGR },
 	{ RR_Reflect_Y, SubPixelVerticalRGB,	SubPixelVerticalRGB },
     };
-    
+
     /* map subpixel to direction */
     for (i = 0; i < 4; i++)
 	if (orders[i].subpixel_order == subpixel_order)
@@ -890,7 +881,7 @@ KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr)
     if (i < 4)
     {
 	subpixel_dir = KdAddRotation (randr & RR_Rotate_All, orders[i].direction);
-	
+
 	/* map back to subpixel order */
 	for (i = 0; i < 4; i++)
 	    if (orders[i].direction & subpixel_dir)
@@ -919,7 +910,6 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     KdScreenInfo	*screen = kdCurrentScreen;
     KdCardInfo		*card = screen->card;
     KdPrivScreenPtr	pScreenPriv;
-    int			fb;
     /*
      * note that screen->fb is set up for the nominal orientation
      * of the screen; that means if randr is rotated, the values
@@ -931,7 +921,7 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     KdAllocatePrivates (pScreen);
 
     pScreenPriv = KdGetScreenPriv(pScreen);
-    
+
     if (!rotated)
     {
 	width = screen->width;
@@ -949,8 +939,7 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     screen->pScreen = pScreen;
     pScreenPriv->screen = screen;
     pScreenPriv->card = card;
-    for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++)
-	pScreenPriv->bytesPerPixel[fb] = screen->fb[fb].bitsPerPixel >> 3;
+    pScreenPriv->bytesPerPixel = screen->fb.bitsPerPixel >> 3;
     pScreenPriv->dpmsState = KD_DPMS_NORMAL;
 #ifdef PANORAMIX
     dixScreenOrigins[pScreen->myNum] = screen->origin;
@@ -963,12 +952,12 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
      * our GC functions; fbFinishScreenInit initializes MI
      * backing store
      */
-    if (!fbSetupScreen (pScreen, 
-			screen->fb[0].frameBuffer, 
-			width, height, 
-			monitorResolution, monitorResolution, 
-			screen->fb[0].pixelStride,
-			screen->fb[0].bitsPerPixel))
+    if (!fbSetupScreen (pScreen,
+			screen->fb.frameBuffer,
+			width, height,
+			monitorResolution, monitorResolution,
+			screen->fb.pixelStride,
+			screen->fb.bitsPerPixel))
     {
 	return FALSE;
     }
@@ -980,42 +969,20 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     pScreen->UninstallColormap	= KdUninstallColormap;
     pScreen->ListInstalledColormaps = KdListInstalledColormaps;
     pScreen->StoreColors	= KdStoreColors;
-     
+
     pScreen->SaveScreen		= KdSaveScreen;
     pScreen->CreateWindow	= KdCreateWindow;
 
-#if KD_MAX_FB > 1
-    if (screen->fb[1].depth)
+    if (!fbFinishScreenInit (pScreen,
+			     screen->fb.frameBuffer,
+			     width, height,
+			     monitorResolution, monitorResolution,
+			     screen->fb.pixelStride,
+			     screen->fb.bitsPerPixel))
     {
-	if (!fbOverlayFinishScreenInit (pScreen, 
-					screen->fb[0].frameBuffer, 
-					screen->fb[1].frameBuffer, 
-					width, height, 
-					monitorResolution, monitorResolution,
-					screen->fb[0].pixelStride,
-					screen->fb[1].pixelStride,
-					screen->fb[0].bitsPerPixel,
-					screen->fb[1].bitsPerPixel,
-					screen->fb[0].depth,
-					screen->fb[1].depth))
-	{
-	    return FALSE;
-	}
-    }
-    else
-#endif
-    {
-	if (!fbFinishScreenInit (pScreen, 
-				 screen->fb[0].frameBuffer, 
-				 width, height,
-				 monitorResolution, monitorResolution,
-				 screen->fb[0].pixelStride,
-				 screen->fb[0].bitsPerPixel))
-	{
-	    return FALSE;
-	}
+	return FALSE;
     }
-    
+
     /*
      * Fix screen sizes; for some reason mi takes dpi instead of mm.
      * Rounding errors are annoying
@@ -1028,14 +995,14 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
 	pScreen->mmHeight = *height_mmp;
     else
 	*height_mmp = pScreen->mmHeight;
-    
+
     /*
      * Plug in our own block/wakeup handlers.
      * miScreenInit installs NoopDDA in both places
      */
     pScreen->BlockHandler	= KdBlockHandler;
     pScreen->WakeupHandler	= KdWakeupHandler;
-    
+
 #ifdef RENDER
     if (!fbPictureInit (pScreen, 0, 0))
 	return FALSE;
@@ -1043,26 +1010,26 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     if (card->cfuncs->initScreen)
 	if (!(*card->cfuncs->initScreen) (pScreen))
 	    return FALSE;
-	    
+
     if (!screen->dumb && card->cfuncs->initAccel)
 	if (!(*card->cfuncs->initAccel) (pScreen))
 	    screen->dumb = TRUE;
-    
+
     if (card->cfuncs->finishInitScreen)
 	if (!(*card->cfuncs->finishInitScreen) (pScreen))
 	    return FALSE;
-	    
+
 #if 0
     fbInitValidateTree (pScreen);
 #endif
-    
+
 #if 0
     pScreen->backingStoreSupport = Always;
     miInitializeBackingStore (pScreen);
 #endif
 
 
-    /* 
+    /*
      * Wrap CloseScreen, the order now is:
      *	KdCloseScreen
      *	miBSCloseScreen
@@ -1073,9 +1040,9 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
 
     pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;
     pScreen->CreateScreenResources = KdCreateScreenResources;
-    
+
     if (screen->softCursor ||
-	!card->cfuncs->initCursor || 
+	!card->cfuncs->initCursor ||
 	!(*card->cfuncs->initCursor) (pScreen))
     {
 	/* Use MI for cursor display and event queueing. */
@@ -1083,7 +1050,7 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
 	miDCInitialize(pScreen, &kdPointerScreenFuncs);
     }
 
-    
+
     if (!fbCreateDefColormap (pScreen))
     {
 	return FALSE;
@@ -1100,7 +1067,7 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
 	if(kdOsFuncs->Enable)
 	    (*kdOsFuncs->Enable) ();
     }
-    
+
     if (screen->mynum == card->selected)
     {
 	if(card->cfuncs->preserve)
@@ -1115,7 +1082,7 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
 	if (!screen->dumb && card->cfuncs->enableAccel)
 	    (*card->cfuncs->enableAccel) (pScreen);
     }
-    
+
     return TRUE;
 }
 
@@ -1126,9 +1093,9 @@ KdInitScreen (ScreenInfo    *pScreenInfo,
 	      char	    **argv)
 {
     KdCardInfo	*card = screen->card;
-    
+
     (*card->cfuncs->scrinit) (screen);
-    
+
     if (!card->cfuncs->initAccel)
 	screen->dumb = TRUE;
     if (!card->cfuncs->initCursor)
@@ -1143,7 +1110,6 @@ KdSetPixmapFormats (ScreenInfo	*pScreenInfo)
     KdScreenInfo    *screen;
     int		    i;
     int		    bpp;
-    int		    fb;
     PixmapFormatRec *format;
 
     for (i = 1; i <= 32; i++)
@@ -1159,33 +1125,30 @@ KdSetPixmapFormats (ScreenInfo	*pScreenInfo)
     {
 	for (screen = card->screenList; screen; screen = screen->next)
 	{
-	    for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++)
-	    {
-		bpp = screen->fb[fb].bitsPerPixel;
-		if (bpp == 24)
-		    bpp = 32;
-		if (!depthToBpp[screen->fb[fb].depth])
-		    depthToBpp[screen->fb[fb].depth] = bpp;
-		else if (depthToBpp[screen->fb[fb].depth] != bpp) 
-		    return FALSE;
-	    }
+	    bpp = screen->fb.bitsPerPixel;
+	    if (bpp == 24)
+		bpp = 32;
+	    if (!depthToBpp[screen->fb.depth])
+		depthToBpp[screen->fb.depth] = bpp;
+	    else if (depthToBpp[screen->fb.depth] != bpp)
+		return FALSE;
 	}
     }
-    
+
     /*
      * Fill in additional formats
      */
     for (i = 0; i < NUM_KD_DEPTHS; i++)
 	if (!depthToBpp[kdDepths[i].depth])
 	    depthToBpp[kdDepths[i].depth] = kdDepths[i].bpp;
-	
+
     pScreenInfo->imageByteOrder     = IMAGE_BYTE_ORDER;
     pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
     pScreenInfo->bitmapScanlinePad  = BITMAP_SCANLINE_PAD;
     pScreenInfo->bitmapBitOrder     = BITMAP_BIT_ORDER;
-    
+
     pScreenInfo->numPixmapFormats = 0;
-    
+
     for (i = 1; i <= 32; i++)
     {
 	if (depthToBpp[i])
@@ -1196,7 +1159,7 @@ KdSetPixmapFormats (ScreenInfo	*pScreenInfo)
 	    format->scanlinePad = BITMAP_SCANLINE_PAD;
 	}
     }
-    
+
     return TRUE;
 }
 
@@ -1214,20 +1177,15 @@ KdAddScreen (ScreenInfo	    *pScreenInfo,
     {
 	unsigned long	visuals;
 	Pixel		rm, gm, bm;
-	int		fb;
-	
+
 	visuals = 0;
 	rm = gm = bm = 0;
-	for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++)
+	if (pScreenInfo->formats[i].depth == screen->fb.depth)
 	{
-	    if (pScreenInfo->formats[i].depth == screen->fb[fb].depth)
-	    {
-		visuals = screen->fb[fb].visuals;
-		rm = screen->fb[fb].redMask;
-		gm = screen->fb[fb].greenMask;
-		bm = screen->fb[fb].blueMask;
-		break;
-	    }
+	    visuals = screen->fb.visuals;
+	    rm = screen->fb.redMask;
+	    gm = screen->fb.greenMask;
+	    bm = screen->fb.blueMask;
 	}
 	fbSetVisualTypesAndMasks (pScreenInfo->formats[i].depth,
 				  visuals,
@@ -1236,7 +1194,7 @@ KdAddScreen (ScreenInfo	    *pScreenInfo,
     }
 
     kdCurrentScreen = screen;
-    
+
     AddScreen (KdScreenInit, argc, argv);
 }
 
@@ -1246,10 +1204,9 @@ int
 KdDepthToFb (ScreenPtr	pScreen, int depth)
 {
     KdScreenPriv(pScreen);
-    int	    fb;
 
-    for (fb = 0; fb <= KD_MAX_FB && pScreenPriv->screen->fb[fb].frameBuffer; fb++)
-	if (pScreenPriv->screen->fb[fb].depth == depth)
+    for (fb = 0; fb <= KD_MAX_FB && pScreenPriv->screen->fb.frameBuffer; fb++)
+	if (pScreenPriv->screen->fb.depth == depth)
 	    return fb;
 }
 
@@ -1292,14 +1249,14 @@ KdInitOutput (ScreenInfo    *pScreenInfo,
 		KdInitScreen (pScreenInfo, screen, argc, argv);
 	}
     }
-    
+
     /*
      * Merge the various pixmap formats together, this can fail
      * when two screens share depth but not bitsPerPixel
      */
     if (!KdSetPixmapFormats (pScreenInfo))
 	return;
-    
+
     /*
      * Add all of the screens
      */
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index 9620391c6..35ce03660 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -53,45 +53,15 @@
 #define KD_DPMS_POWERDOWN   3
 #define KD_DPMS_MAX	    KD_DPMS_POWERDOWN
 
-#ifndef KD_MAX_FB
-#define KD_MAX_FB   FB_OVERLAY_MAX
-#endif
-
-#ifndef KD_MAX_CARD_ADDRESS
-#define KD_MAX_CARD_ADDRESS 8
-#endif
-
 #define Status int
 
-/*
- * Configuration information per video card
- */
-
-typedef struct _KdCardAttr {
-    CARD32  io;
-    CARD32  address[KD_MAX_CARD_ADDRESS];
-    int	    naddr;
-
-    /* PCI bus info */
-    CARD16  vendorID;
-    CARD16  deviceID;
-    CARD8   domain;
-    CARD8   bus;
-    CARD8   slot;
-    CARD8   func;
-} KdCardAttr;
-
 typedef struct _KdCardInfo {
     struct _KdCardFuncs	    *cfuncs;
     void		    *closure;
-    KdCardAttr		    attr;
     void		    *driver;
     struct _KdScreenInfo    *screenList;
     int			    selected;
     struct _KdCardInfo	    *next;
-
-    Bool		    needSync;
-    int			    lastMarker;
 } KdCardInfo;
 
 extern KdCardInfo	*kdCardInfo;
@@ -130,10 +100,7 @@ typedef struct _KdScreenInfo {
     Bool        softCursor;
     int		mynum;
     DDXPointRec	origin;
-    KdFrameBuffer   fb[KD_MAX_FB];
-    CARD8	*memory_base;
-    unsigned long   memory_size;
-    unsigned long   off_screen_base;
+    KdFrameBuffer   fb;
 } KdScreenInfo;
 
 typedef struct _KdCardFuncs {
@@ -161,8 +128,8 @@ typedef struct _KdCardFuncs {
     void        (*disableAccel) (ScreenPtr);
     void        (*finiAccel) (ScreenPtr);
 
-    void        (*getColors) (ScreenPtr, int, int, xColorItem *);
-    void        (*putColors) (ScreenPtr, int, int, xColorItem *);
+    void        (*getColors) (ScreenPtr, int, xColorItem *);
+    void        (*putColors) (ScreenPtr, int, xColorItem *);
 
 } KdCardFuncs;
 
@@ -175,11 +142,11 @@ typedef struct {
 
     Bool	    enabled;
     Bool	    closed;
-    int		    bytesPerPixel[KD_MAX_FB];
+    int		    bytesPerPixel;
 
     int		    dpmsState;
 
-    ColormapPtr     pInstalledmap[KD_MAX_FB];         /* current colormap */
+    ColormapPtr     pInstalledmap;                    /* current colormap */
     xColorItem      systemPalette[KD_MAX_PSEUDO_SIZE];/* saved windows colors */
 
     CreateScreenResourcesProcPtr    CreateScreenResources;
@@ -242,7 +209,7 @@ struct _KdPointerInfo {
         int z;
         int flags;
         int absrel;
-    } heldEvent;         
+    } heldEvent;
     unsigned char         buttonState;
     Bool                  transformCoordinates;
     int                   pressureThreshold;
@@ -392,12 +359,9 @@ extern KdOsFuncs	*kdOsFuncs;
     dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v)
 #define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen)
 
-/* knoop.c */
-extern GCOps		kdNoopOps;
-
 /* kcmap.c */
 void
-KdSetColormap (ScreenPtr pScreen, int fb);
+KdSetColormap (ScreenPtr pScreen);
 
 void
 KdEnableColormap (ScreenPtr pScreen);
@@ -417,14 +381,6 @@ KdListInstalledColormaps (ScreenPtr pScreen, Colormap *pCmaps);
 void
 KdStoreColors (ColormapPtr pCmap, int ndef, xColorItem *pdefs);
 
-/* kcurscol.c */
-void
-KdAllocateCursorPixels (ScreenPtr	pScreen,
-			int		fb,
-			CursorPtr	pCursor, 
-			Pixel		*source,
-			Pixel		*mask);
-
 /* kdrive.c */
 extern miPointerScreenFuncRec kdPointerScreenFuncs;
 
@@ -517,17 +473,16 @@ void
 KdInitOutput (ScreenInfo    *pScreenInfo,
 	      int	    argc,
 	      char	    **argv);
- 
+
 void
 KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr);
 
 void
 KdBacktrace (int signum);
-    
+
 /* kinfo.c */
 KdCardInfo *
 KdCardInfoAdd (KdCardFuncs  *funcs,
-	       KdCardAttr   *attr,
 	       void	    *closure);
 
 KdCardInfo *
@@ -584,7 +539,7 @@ _KdEnqueuePointerEvent(KdPointerInfo *pi, int type, int x, int y, int z,
 
 void
 KdReleaseAllKeys (void);
-    
+
 void
 KdSetLed (KdKeyboardInfo *ki, int led, Bool on);
 
@@ -604,7 +559,7 @@ KdBlockHandler (int		screen,
 		pointer		readmask);
 
 void
-KdWakeupHandler (int		screen, 
+KdWakeupHandler (int		screen,
 		 pointer    	data,
 		 unsigned long	result,
 		 pointer	readmask);
@@ -624,37 +579,6 @@ KdRingBell (KdKeyboardInfo      *ki,
             int                 pitch,
             int                 duration);
 
-extern KdPointerDriver	LinuxMouseDriver;
-extern KdPointerDriver	LinuxEvdevMouseDriver;
-extern KdPointerDriver	Ps2MouseDriver;
-extern KdPointerDriver	BusMouseDriver;
-extern KdPointerDriver	MsMouseDriver;
-extern KdPointerDriver	TsDriver;
-extern KdKeyboardDriver	LinuxKeyboardDriver;
-extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
-extern KdOsFuncs	LinuxFuncs;
-
-extern KdPointerDriver	VxWorksMouseDriver;
-extern KdKeyboardDriver	VxWorksKeyboardDriver;
-extern KdOsFuncs	VxWorksFuncs;
-
-/* kmap.c */
-
-#define KD_MAPPED_MODE_REGISTERS    0
-#define KD_MAPPED_MODE_FRAMEBUFFER  1
-
-void *
-KdMapDevice (CARD32 addr, CARD32 size);
-
-void
-KdUnmapDevice (void *addr, CARD32 size);
-
-void
-KdSetMappedMode (CARD32 addr, CARD32 size, int mode);
-
-void
-KdResetMappedMode (CARD32 addr, CARD32 size, int mode);
-
 /* kmode.c */
 const KdMonitorTiming *
 KdFindMode (KdScreenInfo    *screen,
@@ -669,14 +593,14 @@ KdTuneMode (KdScreenInfo    *screen,
 
 #ifdef RANDR
 Bool
-KdRandRGetInfo (ScreenPtr pScreen, 
+KdRandRGetInfo (ScreenPtr pScreen,
 		int randr,
-		Bool (*supported) (ScreenPtr pScreen, 
+		Bool (*supported) (ScreenPtr pScreen,
 				   const KdMonitorTiming *));
 
 const KdMonitorTiming *
 KdRandRGetTiming (ScreenPtr	    pScreen,
-		  Bool		    (*supported) (ScreenPtr pScreen, 
+		  Bool		    (*supported) (ScreenPtr pScreen,
 						  const KdMonitorTiming *),
 		  int		    rate,
 		  RRScreenSizePtr   pSize);
@@ -684,14 +608,14 @@ KdRandRGetTiming (ScreenPtr	    pScreen,
 
 /* kshadow.c */
 Bool
-KdShadowFbAlloc (KdScreenInfo *screen, int fb, Bool rotate);
+KdShadowFbAlloc (KdScreenInfo *screen, Bool rotate);
 
 void
-KdShadowFbFree (KdScreenInfo *screen, int fb);
+KdShadowFbFree (KdScreenInfo *screen);
 
 Bool
 KdShadowSet (ScreenPtr pScreen, int randr, ShadowUpdateProc update, ShadowWindowProc window);
-    
+
 void
 KdShadowUnset (ScreenPtr pScreen);
 
diff --git a/xorg-server/hw/kdrive/src/kinfo.c b/xorg-server/hw/kdrive/src/kinfo.c
index 95afc7963..0825ee24f 100644
--- a/xorg-server/hw/kdrive/src/kinfo.c
+++ b/xorg-server/hw/kdrive/src/kinfo.c
@@ -29,7 +29,6 @@ KdCardInfo  *kdCardInfo;
 
 KdCardInfo *
 KdCardInfoAdd (KdCardFuncs  *funcs,
-	       KdCardAttr   *attr,
 	       void	    *closure)
 {
     KdCardInfo	*ci, **prev;
@@ -40,7 +39,6 @@ KdCardInfoAdd (KdCardFuncs  *funcs,
     for (prev = &kdCardInfo; *prev; prev = &(*prev)->next);
     *prev = ci;
     ci->cfuncs = funcs;
-    ci->attr = *attr;
     ci->closure = closure;
     ci->screenList = 0;
     ci->selected = 0;
diff --git a/xorg-server/hw/kdrive/src/kmap.c b/xorg-server/hw/kdrive/src/kmap.c
deleted file mode 100644
index 60e8ae134..000000000
--- a/xorg-server/hw/kdrive/src/kmap.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright � 1999 Keith Packard
- *
- * 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 <kdrive-config.h>
-#include "kdrive.h"
-
-#include <errno.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#ifdef HAVE_ASM_MTRR_H
-#include <asm/mtrr.h>
-#endif
-
-#include <sys/ioctl.h>
-
-void *
-KdMapDevice (CARD32 addr, CARD32 size)
-{
-#ifdef WINDOWS
-    void    *a;
-    void    *d;
-
-    d = VirtualAlloc (NULL, size, MEM_RESERVE, PAGE_NOACCESS);
-    if (!d)
-	return NULL;
-    DRAW_DEBUG ((DEBUG_S3INIT, "Virtual address of 0x%x is 0x%x", addr, d));
-    a = VirtualCopyAddr (addr);
-    DRAW_DEBUG ((DEBUG_S3INIT, "Translated address is 0x%x", a));
-    if (!VirtualCopy (d, a, size, 
-		      PAGE_READWRITE|PAGE_NOCACHE|PAGE_PHYSICAL))
-    {
-	DRAW_DEBUG ((DEBUG_FAILURE, "VirtualCopy failed %d",
-		    GetLastError ()));
-	return NULL;
-    }
-    DRAW_DEBUG ((DEBUG_S3INIT, "Device mapped successfully"));
-    return d;
-#endif
-#ifdef linux
-    void    *a;
-    int	    fd;
-
-#ifdef __arm__
-    fd = open ("/dev/mem", O_RDWR|O_SYNC);
-#else
-    fd = open ("/dev/mem", O_RDWR);
-#endif
-    if (fd < 0)
-	FatalError ("KdMapDevice: failed to open /dev/mem (%s)\n",
-		    strerror (errno));
-    
-    a = mmap ((caddr_t) 0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, addr);
-    close (fd);
-    if ((long) a == -1)
-	FatalError ("KdMapDevice: failed to map frame buffer (%s)\n",
-		    strerror (errno));
-    return a;
-#endif
-}
-
-void
-KdUnmapDevice (void *addr, CARD32 size)
-{
-#ifdef WINDOWS
-    VirtualFree (addr, size, MEM_DECOMMIT);
-    VirtualFree (addr, 0, MEM_RELEASE);
-#endif
-#ifdef linux
-    munmap (addr, size);
-#endif
-}
-
-#ifdef HAVE_ASM_MTRR_H
-static int  mtrr;
-#endif
-
-void
-KdSetMappedMode (CARD32 addr, CARD32 size, int mode)
-{
-#ifdef HAVE_ASM_MTRR_H
-    struct mtrr_sentry  sentry;
-    unsigned long    	base, bound;
-    unsigned int	type = MTRR_TYPE_WRBACK;
-
-    if (addr < 0x100000)
-	return;
-    if (!mtrr)
-	mtrr = open ("/proc/mtrr", 2);
-    if (mtrr > 0)
-    {
-	unsigned long nsize;
-	base = addr & ~((1<<22)-1);
-	bound = ((addr + size) + ((1<<22) - 1)) & ~((1<<22) - 1);
-	nsize = 1;
-	while (nsize < (bound - base))
-	    nsize <<= 1;
-	switch (mode) {
-	case KD_MAPPED_MODE_REGISTERS:
-	    type = MTRR_TYPE_UNCACHABLE;
-	    break;
-	case KD_MAPPED_MODE_FRAMEBUFFER:
-	    type = MTRR_TYPE_WRCOMB;
-	    break;
-	}
-	sentry.base = base;
-	sentry.size = nsize;
-	sentry.type = type;
-	
-	if (ioctl (mtrr, MTRRIOC_ADD_ENTRY, &sentry) < 0)
-	    ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (%s)\n",
-		    base, bound - base, type, strerror(errno));
-    }
-#endif
-}
-
-void
-KdResetMappedMode (CARD32 addr, CARD32 size, int mode)
-{
-#ifdef HAVE_ASM_MTRR_H
-    struct mtrr_sentry  sentry;
-    unsigned long    	base, bound;
-    unsigned int	type = MTRR_TYPE_WRBACK;
-
-    if (addr < 0x100000)
-	return;
-    if (!mtrr)
-	mtrr = open ("/proc/mtrr", 2);
-    if (mtrr > 0)
-    {
-	unsigned long	nsize;
-	base = addr & ~((1<<22)-1);
-	bound = ((addr + size) + ((1<<22) - 1)) & ~((1<<22) - 1);
-	nsize = 1;
-	while (nsize < (bound - base))
-	    nsize <<= 1;
-	switch (mode) {
-	case KD_MAPPED_MODE_REGISTERS:
-	    type = MTRR_TYPE_UNCACHABLE;
-	    break;
-	case KD_MAPPED_MODE_FRAMEBUFFER:
-	    type = MTRR_TYPE_WRCOMB;
-	    break;
-	}
-	sentry.base = base;
-	sentry.size = nsize;
-	sentry.type = type;
-	
-	if (ioctl (mtrr, MTRRIOC_DEL_ENTRY, &sentry) < 0)
-	    ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (%s)\n",
-		    base, bound - base, type, strerror(errno));
-    }
-#endif
-}
diff --git a/xorg-server/hw/kdrive/src/kmode.c b/xorg-server/hw/kdrive/src/kmode.c
index d02cb55e1..38b7bc881 100644
--- a/xorg-server/hw/kdrive/src/kmode.c
+++ b/xorg-server/hw/kdrive/src/kmode.c
@@ -15,7 +15,7 @@
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  * 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 
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * Author:  Keith Packard, SuSE, Inc.
@@ -38,7 +38,7 @@ const KdMonitorTiming  kdMonitorTimings[] = {
 	            17,	    12,	    32,     KdSyncNegative,
 	            1,      11,     14,     KdSyncNegative,
     },
-    
+
     /* Other VESA modes */
     {	640,	350,	85,	31500,			    /* VESA */
 		    32,	    96,	    192,    KdSyncPositive, /* 26.413 */
@@ -60,7 +60,7 @@ const KdMonitorTiming  kdMonitorTimings[] = {
         16,     80,  160, KdSyncPositive, /* 32.954 */
         1,      45,   49, KdSyncPositive, /* 52.727 */
     },
-    
+
     /* 640x480 modes */
     {	640,	480,	85,	36000,			    /* VESA */
 		    56,	    80,	    192,    KdSyncNegative, /* 43.269 */
@@ -78,7 +78,7 @@ const KdMonitorTiming  kdMonitorTimings[] = {
 		   16,	    48,	    160,    KdSyncNegative, /* 31.469 */
 		   10,	    33,	    45,	    KdSyncNegative, /* 59.940 */
     },
-    
+
     /* 800x600 modes */
     {	800,	600,	85,	56250,			    /* VESA */
 		    32,	    152,    248,    KdSyncPositive, /* 53.674 */
@@ -102,7 +102,7 @@ const KdMonitorTiming  kdMonitorTimings[] = {
 		    24,	    128,    224,    KdSyncPositive, /* 35.156 */
 		    1,	    22,	    25,	    KdSyncPositive, /* 56.250 */
     },
-    
+
     /* 1024x768 modes */
     {	1024,	768,	85,	94500,			    /* VESA */
 		    48,	    208,    352,    KdSyncPositive, /* 68.677 */
@@ -120,13 +120,13 @@ const KdMonitorTiming  kdMonitorTimings[] = {
 		    24,	    160,    320,    KdSyncNegative, /* 48.363 */
 		    3,	    29,	    38,	    KdSyncNegative, /* 60.004 */
     },
-    
+
     /* 1152x864 mode */
     {	1152,	864,	75,	108000,			    /* VESA */
 		    64,	    256,    448,    KdSyncPositive, /* 67.500 */
 		    1,	    32,	    36,	    KdSyncPositive, /* 75.000 */
     },
-    
+
     /* 1152x900 modes */
     {	1152,	900,	85,	122500,			    /* ADDED */
 		    48,	    208,    384,    KdSyncPositive, /* 79.753 */
@@ -315,19 +315,17 @@ KdTuneMode (KdScreenInfo    *screen,
 					  const KdMonitorTiming *))
 {
     const KdMonitorTiming   *t;
-    
+
     while (!(*usable) (screen))
     {
 	/*
 	 * Fix requested depth and geometry until it works
 	 */
-	if (screen->fb[1].depth)
-	    screen->fb[1].depth = 0;
-	else if (screen->fb[0].depth > 16)
-	    screen->fb[0].depth = 16;
-	else if (screen->fb[0].depth > 8)
-	    screen->fb[0].depth = 8;
-	else 
+	if (screen->fb.depth > 16)
+	    screen->fb.depth = 16;
+	else if (screen->fb.depth > 8)
+	    screen->fb.depth = 8;
+	else
 	{
 	    t = kdFindPrevSize (KdFindMode (screen, supported));
 	    if (!t)
@@ -344,14 +342,14 @@ KdTuneMode (KdScreenInfo    *screen,
 Bool
 KdRandRGetInfo (ScreenPtr pScreen,
 		int randr,
-		Bool (*supported) (ScreenPtr pScreen, 
+		Bool (*supported) (ScreenPtr pScreen,
 				   const KdMonitorTiming *))
 {
     KdScreenPriv(pScreen);
     KdScreenInfo	    *screen = pScreenPriv->screen;
     int			    i;
     const KdMonitorTiming   *t;
-    
+
     for (i = 0, t = kdMonitorTimings; i < NUM_MONITOR_TIMINGS; i++, t++)
     {
 	if ((*supported) (pScreen, t))
@@ -373,20 +371,20 @@ KdRandRGetInfo (ScreenPtr pScreen,
 		RRSetCurrentConfig (pScreen, randr, t->rate, pSize);
 	}
     }
-    
+
     return TRUE;
 }
 
 const KdMonitorTiming *
 KdRandRGetTiming (ScreenPtr	    pScreen,
-		  Bool		    (*supported) (ScreenPtr pScreen, 
+		  Bool		    (*supported) (ScreenPtr pScreen,
 						  const KdMonitorTiming *),
 		  int		    rate,
 		  RRScreenSizePtr   pSize)
 {
     int			    i;
     const KdMonitorTiming   *t;
-    
+
     for (i = 0, t = kdMonitorTimings; i < NUM_MONITOR_TIMINGS; i++, t++)
     {
 	if (t->horizontal == pSize->width &&
diff --git a/xorg-server/hw/kdrive/src/kshadow.c b/xorg-server/hw/kdrive/src/kshadow.c
index ea44812db..cf3391dba 100644
--- a/xorg-server/hw/kdrive/src/kshadow.c
+++ b/xorg-server/hw/kdrive/src/kshadow.c
@@ -26,36 +26,36 @@
 #include "kdrive.h"
 
 Bool
-KdShadowFbAlloc (KdScreenInfo *screen, int fb, Bool rotate)
+KdShadowFbAlloc (KdScreenInfo *screen, Bool rotate)
 {
     int	    paddedWidth;
     void    *buf;
     int	    width = rotate ? screen->height : screen->width;
     int	    height = rotate ? screen->width : screen->height;
-    int	    bpp = screen->fb[fb].bitsPerPixel;
+    int	    bpp = screen->fb.bitsPerPixel;
 
     /* use fb computation for width */
     paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits);
     buf = xalloc (paddedWidth * height);
     if (!buf)
 	return FALSE;
-    if (screen->fb[fb].shadow)
-	xfree (screen->fb[fb].frameBuffer);
-    screen->fb[fb].shadow = TRUE;
-    screen->fb[fb].frameBuffer = buf;
-    screen->fb[fb].byteStride = paddedWidth;
-    screen->fb[fb].pixelStride = paddedWidth * 8 / bpp;
+    if (screen->fb.shadow)
+	xfree (screen->fb.frameBuffer);
+    screen->fb.shadow = TRUE;
+    screen->fb.frameBuffer = buf;
+    screen->fb.byteStride = paddedWidth;
+    screen->fb.pixelStride = paddedWidth * 8 / bpp;
     return TRUE;
 }
 
 void
-KdShadowFbFree (KdScreenInfo *screen, int fb)
+KdShadowFbFree (KdScreenInfo *screen)
 {
-    if (screen->fb[fb].shadow)
+    if (screen->fb.shadow)
     {
-	xfree (screen->fb[fb].frameBuffer);
-	screen->fb[fb].frameBuffer = 0;
-	screen->fb[fb].shadow = FALSE;
+	xfree (screen->fb.frameBuffer);
+	screen->fb.frameBuffer = 0;
+	screen->fb.shadow = FALSE;
     }
 }
 
@@ -64,14 +64,12 @@ KdShadowSet (ScreenPtr pScreen, int randr, ShadowUpdateProc update, ShadowWindow
 {
     KdScreenPriv(pScreen);
     KdScreenInfo *screen = pScreenPriv->screen;
-    int	 fb;
 
     shadowRemove (pScreen, pScreen->GetScreenPixmap(pScreen));
-    for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++)
+    if(screen->fb.shadow)
     {
-	if (screen->fb[fb].shadow)
-            return shadowAdd (pScreen, pScreen->GetScreenPixmap(pScreen),
-                              update, window, randr, 0);
+	return shadowAdd (pScreen, pScreen->GetScreenPixmap(pScreen),
+			  update, window, randr, 0);
     }
     return TRUE;
 }
diff --git a/xorg-server/hw/kdrive/src/kxv.h b/xorg-server/hw/kdrive/src/kxv.h
index 900baefde..21a295be3 100644
--- a/xorg-server/hw/kdrive/src/kxv.h
+++ b/xorg-server/hw/kdrive/src/kxv.h
@@ -1,6 +1,6 @@
-/* 
+/*
 
-   XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com) 
+   XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com)
    Adapted for KDrive by Pontus Lidman <pontus.lidman@nokia.com>
 
    Copyright (C) 2000, 2001 - Nokia Home Communications
@@ -60,21 +60,21 @@ typedef struct {
   int id;
   int type;
   int byte_order;
-  unsigned char guid[16];               
+  unsigned char guid[16];
   int bits_per_pixel;
   int format;
   int num_planes;
 
   /* for RGB formats only */
   int depth;
-  unsigned int red_mask;       
-  unsigned int green_mask;   
-  unsigned int blue_mask;   
+  unsigned int red_mask;
+  unsigned int green_mask;
+  unsigned int blue_mask;
 
   /* for YUV formats only */
   unsigned int y_sample_bits;
   unsigned int u_sample_bits;
-  unsigned int v_sample_bits;   
+  unsigned int v_sample_bits;
   unsigned int horz_y_period;
   unsigned int horz_u_period;
   unsigned int horz_v_period;
@@ -83,7 +83,7 @@ typedef struct {
   unsigned int vert_v_period;
   char component_order[32];
   int scanline_order;
-} KdImageRec, *KdImagePtr; 
+} KdImageRec, *KdImagePtr;
 
 
 typedef struct {
@@ -92,7 +92,7 @@ typedef struct {
   unsigned short width, height;
   int *pitches; /* bytes */
   int *offsets; /* in bytes from start of framebuffer */
-  DevUnion devPrivate;  
+  DevUnion devPrivate;
 } KdSurfaceRec, *KdSurfacePtr;
 
 
@@ -118,7 +118,7 @@ typedef int (* SetPortAttributeFuncPtr)(KdScreenInfo * screen, Atom attribute,
 typedef int (* GetPortAttributeFuncPtr)(KdScreenInfo * screen, Atom attribute,
 	int *value, pointer data);
 typedef void (* QueryBestSizeFuncPtr)(KdScreenInfo * screen, Bool motion,
-	short vid_w, short vid_h, short drw_w, short drw_h, 
+	short vid_w, short vid_h, short drw_w, short drw_h,
 	unsigned int *p_w, unsigned int *p_h, pointer data);
 typedef int (* PutImageFuncPtr)( KdScreenInfo * screen,  DrawablePtr pDraw,
 	short src_x, short src_y, short drw_x, short drw_y,
@@ -128,8 +128,8 @@ typedef int (* PutImageFuncPtr)( KdScreenInfo * screen,  DrawablePtr pDraw,
 typedef int (* ReputImageFuncPtr)( KdScreenInfo * screen, DrawablePtr pDraw,
 				  short drw_x, short drw_y,
 				  RegionPtr clipBoxes, pointer data );
-typedef int (*QueryImageAttributesFuncPtr)(KdScreenInfo * screen, 
-	int image, unsigned short *width, unsigned short *height, 
+typedef int (*QueryImageAttributesFuncPtr)(KdScreenInfo * screen,
+	int image, unsigned short *width, unsigned short *height,
 	int *pitches, int *offsets);
 
 typedef enum {
@@ -148,7 +148,7 @@ typedef struct {
 } KdVideoEncodingRec, *KdVideoEncodingPtr;
 
 typedef struct {
-  char 	depth;  
+  char 	depth;
   short class;
 } KdVideoFormatRec, *KdVideoFormatPtr;
 
@@ -160,13 +160,13 @@ typedef struct {
 } KdAttributeRec, *KdAttributePtr;
 
 typedef struct {
-  unsigned int type; 
+  unsigned int type;
   int flags;
   char *name;
   int nEncodings;
-  KdVideoEncodingPtr pEncodings;  
+  KdVideoEncodingPtr pEncodings;
   int nFormats;
-  KdVideoFormatPtr pFormats;  
+  KdVideoFormatPtr pFormats;
   int nPorts;
   DevUnion *pPortPrivates;
   int nAttributes;
@@ -188,7 +188,7 @@ typedef struct {
 
 Bool
 KdXVScreenInit(
-   ScreenPtr pScreen, 
+   ScreenPtr pScreen,
    KdVideoAdaptorPtr 	*Adaptors,
    int num
 );
@@ -239,7 +239,7 @@ typedef struct {
 } KdXVScreenRec, *KdXVScreenPtr;
 
 typedef struct {
-  int flags;  
+  int flags;
   PutVideoFuncPtr PutVideo;
   PutStillFuncPtr PutStill;
   GetVideoFuncPtr GetVideo;
@@ -276,4 +276,4 @@ typedef struct _KdXVWindowRec{
 } KdXVWindowRec, *KdXVWindowPtr;
 
 #endif  /* _XVDIX_H_ */
- 
+
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c
index 4a948d752..949d4fcfa 100644
--- a/xorg-server/hw/xfree86/common/xf86Mode.c
+++ b/xorg-server/hw/xfree86/common/xf86Mode.c
@@ -941,14 +941,13 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
 ModeStatus
 xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags)
 {
-    ClockRangesPtr cp;
+    ClockRangePtr cp;
     int i, k, gap, minimumGap = CLOCK_TOLERANCE + 1;
     int extraFlags = 0;
     int clockIndex = -1;
     int MulFactor = 1;
     int DivFactor = 1;
     int ModePrivFlags = 0;
-    Bool allowDiv2;
     ModeStatus status = MODE_NOMODE;
 
     /* Some sanity checking */
@@ -1005,8 +1004,7 @@ xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags)
 		 * find a matching clock.
 		 */
     
-		allowDiv2 = (cp->strategy & LOOKUP_CLKDIV2) != 0;
-		i = xf86GetNearestClock(scrp, mode->Clock, allowDiv2,
+		i = xf86GetNearestClock(scrp, mode->Clock, 0,
 			   cp->ClockDivFactor, cp->ClockMulFactor, &k);
 		/*
 		 * If the clock is too far from the requested clock, this
@@ -1194,7 +1192,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
     int saveType;
     PixmapFormatRec *BankFormat;
     ClockRangePtr cp;
-    ClockRangesPtr storeClockRanges;
+    ClockRangePtr storeClockRanges;
     int numTimings = 0;
     range hsync[MAX_HSYNC];
     range vrefresh[MAX_VREFRESH];
@@ -1300,8 +1298,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
     }
 
     /*
-     * Store the clockRanges for later use by the VidMode extension. Must
-     * also store the strategy, since ClockDiv2 flag is stored there.
+     * Store the clockRanges for later use by the VidMode extension.
      */
     storeClockRanges = scrp->clockRanges;
     while (storeClockRanges != NULL) {
@@ -1309,11 +1306,10 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
     }
     for (cp = clockRanges; cp != NULL; cp = cp->next,
 	   	storeClockRanges = storeClockRanges->next) {
-	storeClockRanges = xnfalloc(sizeof(ClockRanges));
+	storeClockRanges = xnfalloc(sizeof(ClockRange));
 	if (scrp->clockRanges == NULL)
 	    scrp->clockRanges = storeClockRanges;
 	memcpy(storeClockRanges, cp, sizeof(ClockRange));
-	storeClockRanges->strategy = strategy;
     }
 
     /* Determine which pixmap format to pass to miScanLineWidth() */
diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h
index 7b0b758d4..de1f1b60a 100644
--- a/xorg-server/hw/xfree86/common/xf86str.h
+++ b/xorg-server/hw/xfree86/common/xf86str.h
@@ -241,20 +241,6 @@ typedef struct x_ClockRange {
     int			PrivFlags;
 } ClockRange, *ClockRangePtr;
 
-/* Need to store the strategy with clockRange for VidMode extension */
-typedef struct x_ClockRanges {
-    struct x_ClockRanges *next;
-    int			minClock;
-    int			maxClock;
-    int			clockIndex;	/* -1 for programmable clocks */
-    Bool		interlaceAllowed;
-    Bool		doubleScanAllowed;
-    int			ClockMulFactor;
-    int			ClockDivFactor;
-    int			PrivFlags;
-    int			strategy;
-} ClockRanges, *ClockRangesPtr;
-
 /*
  * The driverFunc. xorgDriverFuncOp specifies the action driver should
  * perform. If requested option is not supported function should return
@@ -786,7 +772,7 @@ typedef struct _ScrnInfoRec {
     Bool		silkenMouse;
 
     /* Storage for clockRanges and adjustFlags for use with the VidMode ext */
-    ClockRangesPtr	clockRanges;
+    ClockRangePtr	clockRanges;
     int			adjustFlags;
 
     /*
diff --git a/xorg-server/hw/xfree86/libxorg.c b/xorg-server/hw/xfree86/libxorg.c
deleted file mode 100644
index e69de29bb..000000000
diff --git a/xorg-server/hw/xfree86/loader/sdksyms.c b/xorg-server/hw/xfree86/loader/sdksyms.c
deleted file mode 100644
index 022ec73a9..000000000
--- a/xorg-server/hw/xfree86/loader/sdksyms.c
+++ /dev/null
@@ -1,2344 +0,0 @@
-/* This file is automatically generated by sdksyms.sh. */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-
-/* These must be included first */
-#include "misc.h"
-#include "miscstruct.h"
-
-
-/* render/Makefile.am */
-#include "picture.h"
-#include "mipict.h"
-#include "glyphstr.h"
-#include "picturestr.h"
-#include "renderedge.h"
-
-
-/* fb/Makefile.am -- module */
-/*
-#include "fb.h"
-#include "fbrop.h"
-#include "fboverlay.h"
-#include "wfbrename.h"
-#include "fbpict.h"
- */
-
-
-/* miext/shadow/Makefile.am -- module */
-/*
-#include "shadow.h"
- */
-
-
-/* miext/damage/Makefile.am */
-#include "damage.h"
-#include "damagestr.h"
-
-
-/* Xext/Makefile.am -- half is module, half is builtin */
-/*
-#include "xvdix.h"
-#include "xvmcext.h"
- */
-#include "geext.h"
-#include "geint.h"
-#include "shmint.h"
-#if XINERAMA
-# include "panoramiXsrv.h"
-# include "panoramiX.h"
-#endif
-
-
-/* hw/xfree86/int10/Makefile.am -- module */
-/*
-#include "xf86int10.h"
- */
-
-
-/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */
-#include "xf86i2c.h"
-/*
-#include "bt829.h"
-#include "fi1236.h"
-#include "msp3430.h"
-#include "tda8425.h"
-#include "tda9850.h"
-#include "tda9885.h"
-#include "uda1380.h"
-#include "i2c_def.h"
- */
-
-
-/* hw/xfree86/modes/Makefile.am */
-#include "xf86Crtc.h"
-#include "xf86Modes.h"
-#include "xf86RandR12.h"
-/* #include "xf86Rename.h" */
-
-
-/* hw/xfree86/ddc/Makefile.am */
-#include "edid.h"
-#include "xf86DDC.h"
-
-
-/* hw/xfree86/dri2/Makefile.am -- module */
-/*
-#if DRI2
-# include "dri2.h"
-#endif
- */
-
-
-/* hw/xfree86/vgahw/Makefile.am -- module */
-/*
-#include "vgaHW.h"
- */
-
-
-/* hw/xfree86/fbdevhw/Makefile.am -- module */
-/*
-#include "fbdevhw.h"
- */
-
-
-/* hw/xfree86/common/Makefile.am */
-#include "compiler.h"
-#include "fourcc.h"
-#include "xf86.h"
-#include "xf86Module.h"
-#include "xf86Opt.h"
-#include "xf86PciInfo.h"
-#include "xf86Priv.h"
-#include "xf86Privstr.h"
-#include "xf86cmap.h"
-#include "xf86fbman.h"
-#include "xf86str.h"
-#include "xf86Xinput.h"
-#include "xf86VGAarbiter.h"
-#include "xisb.h"
-#if XV
-# include "xf86xv.h"
-# include "xf86xvmc.h"
-# include "xf86xvpriv.h"
-#endif
-/* XF86VidMode code is in libextmod module */
-/*
-#if XF86VIDMODE
-# include "vidmodeproc.h"
-#endif
- */
-#include "xorgVersion.h"
-#if defined(__sparc__) || defined(__sparc)
-# include "xf86sbusBus.h"
-#endif
-
-
-/* hw/xfree86/ramdac/Makefile.am */
-#include "BT.h"
-#include "IBM.h"
-#include "TI.h"
-#include "xf86Cursor.h"
-#include "xf86RamDac.h"
-
-
-/* hw/xfree86/shadowfb/Makefile.am -- module */
-/*
-#include "shadowfb.h"
- */
-
-
-/* hw/xfree86/os-support/solaris/Makefile.am */
-#if defined(sun386)
-# include "agpgart.h"
-#endif
-
-
-/* hw/xfree86/os-support/Makefile.am */
-#include "xf86_OSproc.h"
-#include "xf86_OSlib.h"
-
-
-/* hw/xfree86/os-support/bus/Makefile.am */
-#include "xf86Pci.h"
-#if defined(__sparc__) || defined(__sparc)
-# include "xf86Sbus.h"
-#endif
-
-
-/* hw/xfree86/xaa/Makefile.am -- module */
-/*
-#include "xaa.h"
-#include "xaalocal.h"
-#include "xaarop.h"
-#include "xaaWrapper.h"
- */
-
-
-/* hw/xfree86/dixmods/extmod/Makefile.am -- module */
-/*
-#include "dgaproc.h"
- */
-
-
-/* hw/xfree86/parser/Makefile.am */
-#include "xf86Parser.h"
-#include "xf86Optrec.h"
-
-
-/* hw/xfree86/vbe/Makefile.am -- module */
-/*
-#include "vbe.h"
-#include "vbeModes.h"
- */
-
-
-/* hw/xfree86/dri/Makefile.am -- module */
-/*
-#if XF86DRI
-# include "dri.h"
-# include "sarea.h"
-# include "dristruct.h"
-#endif
- */
-
-
-/* hw/xfree86/xf8_16bpp/Makefile.am -- module */
-/*
-#include "cfb8_16.h"
- */
-
-
-/* mi/Makefile.am */
-#include "mibank.h"
-#include "micmap.h"
-#include "miline.h"
-#include "mipointer.h"
-#include "mi.h"
-#include "mibstore.h"
-#include "migc.h"
-#include "mipointrst.h"
-#include "mizerarc.h"
-#include "micoord.h"
-#include "mifillarc.h"
-#include "mispans.h"
-#include "miwideline.h"
-#include "mistruct.h"
-#include "mifpoly.h"
-#include "mioverlay.h"
-
-
-/* randr/Makefile.am */
-#include "randrstr.h"
-#include "rrtransform.h"
-
-
-/* dbe/Makefile.am -- module */
-/*
-#include "dbestruct.h"
- */
-
-
-/* exa/Makefile.am -- module */
-/*
-#include "exa.h"
- */
-
-
-/* xfixes/Makefile.am */
-#include "xfixes.h"
-
-
-/* include/Makefile.am */
-#include "XIstubs.h"
-#include "bstore.h"
-#include "bstorestr.h"
-#include "closestr.h"
-#include "closure.h"
-#include "colormap.h"
-#include "colormapst.h"
-#include "hotplug.h"
-#include "cursor.h"
-#include "cursorstr.h"
-#include "dix.h"
-#include "dixaccess.h"
-#include "dixevents.h"
-#include "dixfont.h"
-#include "dixfontstr.h"
-#include "dixgrabs.h"
-#include "dixstruct.h"
-#include "exevents.h"
-#include "extension.h"
-#include "extinit.h"
-#include "extnsionst.h"
-#include "gc.h"
-#include "gcstruct.h"
-#include "globals.h"
-#include "input.h"
-#include "inputstr.h"
-/* already included */
-/*
-#include "misc.h"
-#include "miscstruct.h"
- */
-#include "opaque.h"
-#include "os.h"
-#include "pixmap.h"
-#include "pixmapstr.h"
-#include "privates.h"
-#include "property.h"
-#include "propertyst.h"
-#include "ptrveloc.h"
-#include "region.h"
-#include "regionstr.h"
-#include "registry.h"
-#include "resource.h"
-#include "rgb.h"
-#include "screenint.h"
-#include "scrnintstr.h"
-#include "selection.h"
-#include "servermd.h"
-#include "site.h"
-#include "swaprep.h"
-#include "swapreq.h"
-#include "validate.h"
-#include "window.h"
-#include "windowstr.h"
-#include "xace.h"
-#include "xkbfile.h"
-#include "xkbsrv.h"
-#include "xkbstr.h"
-#include "xkbrules.h"
-#include "xserver-properties.h"
-
-/*
- * These symbols are referenced to ensure they
- * will be available in the X Server binary.
- */
-/* topdir=../../.. */
-_X_HIDDEN void *xorg_symbols[] = {
-    (void *) &WaitForSomething,
-    (void *) &ReadRequestFromClient,
-    (void *) &InsertFakeRequest,
-    (void *) &ResetCurrentRequest,
-    (void *) &FlushAllOutput,
-    (void *) &FlushIfCriticalOutputPending,
-    (void *) &SetCriticalOutputPending,
-    (void *) &WriteToClient,
-    (void *) &ResetOsBuffers,
-    (void *) &InitConnectionLimits,
-    (void *) &NotifyParentProcess,
-    (void *) &CreateWellKnownSockets,
-    (void *) &ResetWellKnownSockets,
-    (void *) &CloseWellKnownConnections,
-    (void *) &AuthorizationIDOfClient,
-    (void *) &ClientAuthorized,
-    (void *) &EstablishNewConnections,
-    (void *) &CheckConnections,
-    (void *) &CloseDownConnection,
-    (void *) &AddGeneralSocket,
-    (void *) &RemoveGeneralSocket,
-    (void *) &AddEnabledDevice,
-    (void *) &RemoveEnabledDevice,
-    (void *) &OnlyListenToOneClient,
-    (void *) &ListenToAllClients,
-    (void *) &IgnoreClient,
-    (void *) &AttendClient,
-    (void *) &MakeClientGrabImpervious,
-    (void *) &MakeClientGrabPervious,
-    (void *) &GetTimeInMillis,
-    (void *) &AdjustWaitForDelay,
-    (void *) &TimerInit,
-    (void *) &TimerForce,
-    (void *) &TimerSet,
-    (void *) &TimerCheck,
-    (void *) &TimerCancel,
-    (void *) &TimerFree,
-    (void *) &SetScreenSaverTimer,
-    (void *) &FreeScreenSaverTimer,
-    (void *) &AutoResetServer,
-    (void *) &GiveUp,
-    (void *) &UseMsg,
-    (void *) &ProcessCommandLine,
-    (void *) &set_font_authorizations,
-    (void *) &Xalloc,
-    (void *) &Xcalloc,
-    (void *) &Xrealloc,
-    (void *) &Xfree,
-    (void *) &XNFalloc,
-    (void *) &XNFcalloc,
-    (void *) &XNFrealloc,
-    (void *) &Xstrdup,
-    (void *) &XNFstrdup,
-    (void *) &Xprintf,
-    (void *) &Xvprintf,
-    (void *) &XNFprintf,
-    (void *) &XNFvprintf,
-    (void *) &OsSignal,
-    (void *) &OsRegisterSigWrapper,
-    (void *) &auditTrailLevel,
-    (void *) &LockServer,
-    (void *) &UnlockServer,
-    (void *) &OsLookupColor,
-    (void *) &OsInit,
-    (void *) &OsCleanup,
-    (void *) &OsVendorFatalError,
-    (void *) &OsVendorInit,
-    (void *) &OsBlockSignals,
-    (void *) &OsReleaseSignals,
-    (void *) &System,
-    (void *) &Popen,
-    (void *) &Pclose,
-    (void *) &Fopen,
-    (void *) &Fclose,
-    (void *) &CheckUserParameters,
-    (void *) &CheckUserAuthorization,
-    (void *) &AddHost,
-    (void *) &ForEachHostInFamily,
-    (void *) &RemoveHost,
-    (void *) &GetHosts,
-    (void *) &InvalidHost,
-    (void *) &LocalClient,
-    (void *) &LocalClientCred,
-    (void *) &GetLocalClientCreds,
-    (void *) &FreeLocalClientCreds,
-    (void *) &ChangeAccessControl,
-    (void *) &GetAccessControl,
-    (void *) &AddLocalHosts,
-    (void *) &ResetHosts,
-    (void *) &EnableLocalHost,
-    (void *) &DisableLocalHost,
-    (void *) &AccessUsingXdmcp,
-    (void *) &DefineSelf,
-    (void *) &AugmentSelf,
-    (void *) &RegisterAuthorizations,
-    (void *) &InitAuthorization,
-    (void *) &AuthorizationFromID,
-    (void *) &CheckAuthorization,
-    (void *) &ResetAuthorization,
-    (void *) &RemoveAuthorization,
-    (void *) &AddAuthorization,
-    (void *) &ddxProcessArgument,
-    (void *) &ddxUseMsg,
-    (void *) &ReplyCallback,
-    (void *) &FlushCallback,
-    (void *) &AbortDDX,
-    (void *) &ddxGiveUp,
-    (void *) &TimeSinceLastInputEvent,
-    (void *) &strlcpy,
-    (void *) &strlcat,
-    (void *) &LogInit,
-    (void *) &LogClose,
-    (void *) &LogSetParameter,
-    (void *) &LogVWrite,
-    (void *) &LogWrite,
-    (void *) &LogVMessageVerb,
-    (void *) &LogMessageVerb,
-    (void *) &LogMessage,
-    (void *) &FreeAuditTimer,
-    (void *) &AuditF,
-    (void *) &VAuditF,
-    (void *) &FatalError,
-    (void *) &VErrorF,
-    (void *) &ErrorF,
-    (void *) &Error,
-    (void *) &LogPrintMarkers,
-    (void *) &xorg_backtrace,
-    (void *) &SwapLongs,
-    (void *) &SwapShorts,
-    (void *) &MakePredeclaredAtoms,
-    (void *) &Ones,
-    (void *) &globalSerialNumber,
-    (void *) &serverGeneration,
-    (void *) &AddScreen,
-    (void *) &GetScratchPixmapHeader,
-    (void *) &FreeScratchPixmapHeader,
-    (void *) &CreateScratchPixmapsForScreen,
-    (void *) &FreeScratchPixmapsForScreen,
-    (void *) &AllocatePixmap,
-    (void *) &ValidateGC,
-    (void *) &ChangeGC,
-    (void *) &DoChangeGC,
-    (void *) &dixChangeGC,
-    (void *) &CreateGC,
-    (void *) &CopyGC,
-    (void *) &FreeGC,
-    (void *) &CreateScratchGC,
-    (void *) &FreeGCperDepth,
-    (void *) &CreateGCperDepth,
-    (void *) &CreateDefaultStipple,
-    (void *) &FreeDefaultStipple,
-    (void *) &SetDashes,
-    (void *) &VerifyRectOrder,
-    (void *) &SetClipRects,
-    (void *) &GetScratchGC,
-    (void *) &FreeScratchGC,
-    (void *) &miEmptyBox,
-    (void *) &miEmptyData,
-    (void *) &miBrokenData,
-    (void *) &InitRegions,
-    (void *) &miRegionCreate,
-    (void *) &miRegionInit,
-    (void *) &miRegionDestroy,
-    (void *) &miRegionUninit,
-    (void *) &miRegionCopy,
-    (void *) &miIntersect,
-    (void *) &miUnion,
-    (void *) &miRegionAppend,
-    (void *) &miRegionValidate,
-    (void *) &miRectsToRegion,
-    (void *) &miSubtract,
-    (void *) &miInverse,
-    (void *) &miRectIn,
-    (void *) &miTranslateRegion,
-    (void *) &miRegionReset,
-    (void *) &miRegionBreak,
-    (void *) &miPointInRegion,
-    (void *) &miRegionEqual,
-    (void *) &miRegionNotEmpty,
-    (void *) &miRegionEmpty,
-    (void *) &miRegionExtents,
-    (void *) &miPrintRegion,
-    (void *) &TraverseTree,
-    (void *) &WalkTree,
-    (void *) &CreateRootWindow,
-    (void *) &InitRootWindow,
-    (void *) &RegisterRealChildHeadProc,
-    (void *) &RealChildHead,
-    (void *) &CreateWindow,
-    (void *) &DeleteWindow,
-    (void *) &DestroySubwindows,
-    (void *) &ChangeWindowAttributes,
-    (void *) &ChangeWindowDeviceCursor,
-    (void *) &WindowGetDeviceCursor,
-    (void *) &GetWindowAttributes,
-    (void *) &GravityTranslate,
-    (void *) &ConfigureWindow,
-    (void *) &CirculateWindow,
-    (void *) &ReparentWindow,
-    (void *) &MapWindow,
-    (void *) &MapSubwindows,
-    (void *) &UnmapWindow,
-    (void *) &UnmapSubwindows,
-    (void *) &HandleSaveSet,
-    (void *) &PointInWindowIsVisible,
-    (void *) &NotClippedByChildren,
-    (void *) &SendVisibilityNotify,
-    (void *) &dixSaveScreens,
-    (void *) &SaveScreens,
-    (void *) &FindWindowWithOptional,
-    (void *) &CheckWindowOptionalNeed,
-    (void *) &MakeWindowOptional,
-    (void *) &MoveWindowInStack,
-    (void *) &SetWinSize,
-    (void *) &SetBorderSize,
-    (void *) &ResizeChildrenWinSize,
-    (void *) &ShapeExtensionInit,
-    (void *) &SendShapeNotify,
-    (void *) &CreateBoundingShape,
-    (void *) &CreateClipShape,
-    (void *) &DisableMapUnmapEvents,
-    (void *) &EnableMapUnmapEvents,
-    (void *) &XkbRF_GetComponents,
-    (void *) &XkbRF_LoadRules,
-    (void *) &XkbRF_LoadRulesByName,
-    (void *) &XkbRF_Create,
-    (void *) &XkbRF_Free,
-    (void *) &InputEventList,
-    (void *) &InputEventListLen,
-    (void *) &defaultKeyboardControl,
-    (void *) &defaultPointerControl,
-    (void *) &set_key_down,
-    (void *) &set_key_up,
-    (void *) &key_is_down,
-    (void *) &InitCoreDevices,
-    (void *) &InitXTestDevices,
-    (void *) &AddInputDevice,
-    (void *) &EnableDevice,
-    (void *) &ActivateDevice,
-    (void *) &DisableDevice,
-    (void *) &InitAndStartDevices,
-    (void *) &CloseDownDevices,
-    (void *) &UndisplayDevices,
-    (void *) &RemoveDevice,
-    (void *) &NumMotionEvents,
-    (void *) &RegisterPointerDevice,
-    (void *) &RegisterKeyboardDevice,
-    (void *) &dixLookupDevice,
-    (void *) &QueryMinMaxKeyCodes,
-    (void *) &SetKeySymsMap,
-    (void *) &InitButtonClassDeviceStruct,
-    (void *) &InitValuatorClassDeviceStruct,
-    (void *) &InitPointerAccelerationScheme,
-    (void *) &InitAbsoluteClassDeviceStruct,
-    (void *) &InitFocusClassDeviceStruct,
-    (void *) &InitPtrFeedbackClassDeviceStruct,
-    (void *) &InitStringFeedbackClassDeviceStruct,
-    (void *) &InitBellFeedbackClassDeviceStruct,
-    (void *) &InitLedFeedbackClassDeviceStruct,
-    (void *) &InitIntegerFeedbackClassDeviceStruct,
-    (void *) &InitPointerDeviceStruct,
-    (void *) &InitKeyboardDeviceStruct,
-    (void *) &ApplyPointerMapping,
-    (void *) &BadDeviceMap,
-    (void *) &NoteLedState,
-    (void *) &MaybeStopHint,
-    (void *) &ProcessPointerEvent,
-    (void *) &ProcessKeyboardEvent,
-    (void *) &LegalModifier,
-    (void *) &ProcessInputEvents,
-    (void *) &InitInput,
-    (void *) &GetMaximumEventsNum,
-    (void *) &GetEventList,
-    (void *) &InitEventList,
-    (void *) &FreeEventList,
-    (void *) &CreateClassesChangedEvent,
-    (void *) &GetPointerEvents,
-    (void *) &GetKeyboardEvents,
-    (void *) &GetKeyboardValuatorEvents,
-    (void *) &GetProximityEvents,
-    (void *) &PostSyntheticMotion,
-    (void *) &GetMotionHistorySize,
-    (void *) &AllocateMotionHistory,
-    (void *) &GetMotionHistory,
-    (void *) &AttachDevice,
-    (void *) &GetPairedDevice,
-    (void *) &GetMaster,
-    (void *) &AllocDevicePair,
-    (void *) &DeepCopyDeviceClasses,
-    (void *) &generate_modkeymap,
-    (void *) &change_modmap,
-    (void *) &AllocXTestDevice,
-    (void *) &IsXTestDevice,
-    (void *) &GetXTestDevice,
-    (void *) &SendDevicePresenceEvent,
-    (void *) &GetEventFilter,
-    (void *) &GetWindowXI2Mask,
-    (void *) &NewInputDeviceRequest,
-    (void *) &DeleteInputDeviceRequest,
-    (void *) &DDXRingBell,
-    (void *) &EnableCursor,
-    (void *) &cursorScreenDevPriv,
-    (void *) &rootCursor,
-    (void *) &FreeCursor,
-    (void *) &AllocARGBCursor,
-    (void *) &AllocGlyphCursor,
-    (void *) &CreateRootCursor,
-    (void *) &ServerBitsFromGlyph,
-    (void *) &CursorMetricsFromGlyph,
-    (void *) &CheckCursorConfinement,
-    (void *) &NewCurrentScreen,
-    (void *) &PointerConfinedToScreen,
-    (void *) &GetSpritePosition,
-    (void *) &XineramaGetCursorScreen,
-    (void *) &GEExtensions,
-    (void *) &GERegisterExtension,
-    (void *) &GEInitEvent,
-    (void *) &GEExtensionInit,
-    (void *) &clients,
-    (void *) &serverClient,
-    (void *) &currentMaxClients,
-    (void *) &dispatchExceptionAtReset,
-    (void *) &checkForInput,
-    (void *) &SetInputCheck,
-    (void *) &CloseDownClient,
-    (void *) &UpdateCurrentTime,
-    (void *) &UpdateCurrentTimeIf,
-    (void *) &dixDestroyPixmap,
-    (void *) &InitClient,
-    (void *) &NextAvailableClient,
-    (void *) &SendErrorToClient,
-    (void *) &MarkClientException,
-    (void *) &CreateConnectionBlock,
-    (void *) &CompareISOLatin1Lowered,
-    (void *) &dixLookupWindow,
-    (void *) &dixLookupDrawable,
-    (void *) &dixLookupGC,
-    (void *) &dixLookupClient,
-    (void *) &NoopDDA,
-    (void *) &AlterSaveSetForClient,
-    (void *) &DeleteWindowFromAnySaveSet,
-    (void *) &BlockHandler,
-    (void *) &WakeupHandler,
-    (void *) &RegisterBlockAndWakeupHandlers,
-    (void *) &RemoveBlockAndWakeupHandlers,
-    (void *) &InitBlockAndWakeupHandlers,
-    (void *) &ProcessWorkQueue,
-    (void *) &ProcessWorkQueueZombies,
-    (void *) &QueueWorkProc,
-    (void *) &ClientSleep,
-    (void *) &ClientSignal,
-    (void *) &ClientWakeup,
-    (void *) &ClientIsAsleep,
-    (void *) &MakeAtom,
-    (void *) &ValidAtom,
-    (void *) &NameForAtom,
-    (void *) &AtomError,
-    (void *) &FreeAllAtoms,
-    (void *) &InitAtoms,
-    (void *) &SetVendorRelease,
-    (void *) &SetVendorString,
-    (void *) &SetMaskForEvent,
-    (void *) &ConfineToShape,
-    (void *) &IsParent,
-    (void *) &GetCurrentRootWindow,
-    (void *) &GetSpriteWindow,
-    (void *) &NoticeEventTime,
-    (void *) &EnqueueEvent,
-    (void *) &ActivatePointerGrab,
-    (void *) &DeactivatePointerGrab,
-    (void *) &ActivateKeyboardGrab,
-    (void *) &DeactivateKeyboardGrab,
-    (void *) &ActivateFocusInGrab,
-    (void *) &AllowSome,
-    (void *) &ReleaseActiveGrabs,
-    (void *) &DeliverEventsToWindow,
-    (void *) &DeliverDeviceEvents,
-    (void *) &InitializeSprite,
-    (void *) &UpdateSpriteForScreen,
-    (void *) &WindowHasNewCursor,
-    (void *) &CheckDeviceGrabs,
-    (void *) &DeliverFocusedEvent,
-    (void *) &DeliverGrabbedEvent,
-    (void *) &FixKeyState,
-    (void *) &RecalculateDeliverableEvents,
-    (void *) &OtherClientGone,
-    (void *) &DoFocusEvents,
-    (void *) &SetInputFocus,
-    (void *) &GrabDevice,
-    (void *) &InitEvents,
-    (void *) &CloseDownEvents,
-    (void *) &DeleteWindowFromAnyEvents,
-    (void *) &EventMaskForClient,
-    (void *) &DeliverEvents,
-    (void *) &CheckMotion,
-    (void *) &WriteEventsToClient,
-    (void *) &TryClientEvents,
-    (void *) &WindowsRestructured,
-    (void *) &SetClientPointer,
-    (void *) &PickPointer,
-    (void *) &PickKeyboard,
-    (void *) &IsInterferingGrab,
-    (void *) &ReinitializeRootWindow,
-    (void *) &ScreenRestructured,
-    (void *) &ffs,
-    (void *) &AddCallback,
-    (void *) &DeleteCallback,
-    (void *) &CallCallbacks,
-    (void *) &DeleteCallbackList,
-    (void *) &InitCallbackManager,
-    (void *) &ServerGrabCallback,
-    (void *) &EventCallback,
-    (void *) &DeviceEventCallback,
-    (void *) &XItoCoreType,
-    (void *) &DevHasCursor,
-    (void *) &IsPointerDevice,
-    (void *) &IsKeyboardDevice,
-    (void *) &IsPointerEvent,
-    (void *) &IsMaster,
-    (void *) &CopyKeyClass,
-    (void *) &CorePointerProc,
-    (void *) &CoreKeyboardProc,
-    (void *) &SecurityLookupWindow,
-    (void *) &LookupWindow,
-    (void *) &SecurityLookupDrawable,
-    (void *) &LookupDrawable,
-    (void *) &LookupClient,
-    (void *) &ResourceStateCallback,
-    (void *) &CreateNewResourceType,
-    (void *) &CreateNewResourceClass,
-    (void *) &InitClientResources,
-    (void *) &FakeClientID,
-    (void *) &AddResource,
-    (void *) &FreeResource,
-    (void *) &FreeResourceByType,
-    (void *) &ChangeResourceValue,
-    (void *) &FindClientResourcesByType,
-    (void *) &FindAllClientResources,
-    (void *) &FreeClientNeverRetainResources,
-    (void *) &FreeClientResources,
-    (void *) &FreeAllResources,
-    (void *) &LegalNewID,
-    (void *) &LookupClientResourceComplex,
-    (void *) &dixLookupResourceByType,
-    (void *) &dixLookupResourceByClass,
-    (void *) &GetXIDRange,
-    (void *) &GetXIDList,
-    (void *) &lastResourceType,
-    (void *) &TypeMask,
-    (void *) &SecurityLookupIDByType,
-    (void *) &SecurityLookupIDByClass,
-    (void *) &LookupIDByType,
-    (void *) &LookupIDByClass,
-    (void *) &dixRequestPrivate,
-    (void *) &dixAllocatePrivate,
-    (void *) &dixLookupPrivate,
-    (void *) &dixLookupPrivateAddr,
-    (void *) &dixSetPrivate,
-    (void *) &dixRegisterPrivateInitFunc,
-    (void *) &dixRegisterPrivateDeleteFunc,
-    (void *) &dixFreePrivates,
-    (void *) &dixResetPrivates,
-    (void *) &dixLookupPrivateOffset,
-    (void *) &dixRegisterPrivateOffset,
-    (void *) &PictureCmapPolicy,
-    (void *) &PictureParseCmapPolicy,
-    (void *) &RenderErrBase,
-    (void *) &RenderClientPrivateKey,
-    (void *) &CreateColormap,
-    (void *) &FreeColormap,
-    (void *) &TellLostMap,
-    (void *) &TellGainedMap,
-    (void *) &CopyColormapAndFree,
-    (void *) &AllocColor,
-    (void *) &FakeAllocColor,
-    (void *) &FakeFreeColor,
-    (void *) &FindColor,
-    (void *) &QueryColors,
-    (void *) &FreeClientPixels,
-    (void *) &AllocColorCells,
-    (void *) &AllocColorPlanes,
-    (void *) &FreeColors,
-    (void *) &StoreColors,
-    (void *) &IsMapInstalled,
-    (void *) &ResizeVisualArray,
-    (void *) &screenInfo,
-    (void *) &InitOutput,
-    (void *) &FindGlyphHashSet,
-    (void *) &GlyphUninit,
-    (void *) &FindGlyphHashSet,
-    (void *) &FindGlyphRef,
-    (void *) &FindGlyphByHash,
-    (void *) &HashGlyph,
-    (void *) &FreeGlyph,
-    (void *) &AddGlyph,
-    (void *) &DeleteGlyph,
-    (void *) &FindGlyph,
-    (void *) &AllocateGlyph,
-    (void *) &AllocateGlyphHash,
-    (void *) &ResizeGlyphHash,
-    (void *) &ResizeGlyphSet,
-    (void *) &AllocateGlyphSet,
-    (void *) &FreeGlyphSet,
-    (void *) &PictureScreenPrivateKey,
-    (void *) &PictureWindowPrivateKey,
-    (void *) &PictureType,
-    (void *) &PictFormatType,
-    (void *) &GlyphSetType,
-    (void *) &PictureDestroyWindow,
-    (void *) &PictureCloseScreen,
-    (void *) &PictureStoreColors,
-    (void *) &PictureInitIndexedFormat,
-    (void *) &PictureSetSubpixelOrder,
-    (void *) &PictureGetSubpixelOrder,
-    (void *) &PictureCreateDefaultFormats,
-    (void *) &PictureMatchVisual,
-    (void *) &PictureMatchFormat,
-    (void *) &PictureInit,
-    (void *) &PictureGetFilterId,
-    (void *) &PictureGetFilterName,
-    (void *) &PictureAddFilter,
-    (void *) &PictureSetFilterAlias,
-    (void *) &PictureSetDefaultFilters,
-    (void *) &PictureResetFilters,
-    (void *) &PictureFindFilter,
-    (void *) &SetPicturePictFilter,
-    (void *) &SetPictureFilter,
-    (void *) &PictureFinishInit,
-    (void *) &SetPictureToDefaults,
-    (void *) &CreatePicture,
-    (void *) &ChangePicture,
-    (void *) &SetPictureClipRects,
-    (void *) &SetPictureClipRegion,
-    (void *) &SetPictureTransform,
-    (void *) &CopyPicture,
-    (void *) &ValidatePicture,
-    (void *) &FreePicture,
-    (void *) &FreePictFormat,
-    (void *) &CompositePicture,
-    (void *) &CompositeGlyphs,
-    (void *) &CompositeRects,
-    (void *) &CompositeTrapezoids,
-    (void *) &CompositeTriangles,
-    (void *) &CompositeTriStrip,
-    (void *) &CompositeTriFan,
-    (void *) &PictureGradientColor,
-    (void *) &RenderExtensionInit,
-    (void *) &AddTraps,
-    (void *) &CreateSolidPicture,
-    (void *) &CreateLinearGradientPicture,
-    (void *) &CreateRadialGradientPicture,
-    (void *) &CreateConicalGradientPicture,
-    (void *) &PanoramiXRenderInit,
-    (void *) &PanoramiXRenderReset,
-    (void *) &PictTransform_from_xRenderTransform,
-    (void *) &xRenderTransform_from_PictTransform,
-    (void *) &PictureTransformPoint,
-    (void *) &PictureTransformPoint3d,
-    (void *) &miCreatePicture,
-    (void *) &miDestroyPicture,
-    (void *) &miDestroyPictureClip,
-    (void *) &miChangePictureClip,
-    (void *) &miChangePicture,
-    (void *) &miValidatePicture,
-    (void *) &miChangePictureTransform,
-    (void *) &miChangePictureFilter,
-    (void *) &miCompositeSourceValidate,
-    (void *) &miComputeCompositeRegion,
-    (void *) &miPictureInit,
-    (void *) &miRealizeGlyph,
-    (void *) &miUnrealizeGlyph,
-    (void *) &miGlyphs,
-    (void *) &miRenderColorToPixel,
-    (void *) &miRenderPixelToColor,
-    (void *) &miIsSolidAlpha,
-    (void *) &miCompositeRects,
-    (void *) &miTrapezoidBounds,
-    (void *) &miTrapezoids,
-    (void *) &miPointFixedBounds,
-    (void *) &miTriangleBounds,
-    (void *) &miTriangles,
-    (void *) &miTriStrip,
-    (void *) &miTriFan,
-    (void *) &miCreateAlphaPicture,
-    (void *) &miInitIndexed,
-    (void *) &miCloseIndexed,
-    (void *) &miUpdateIndexed,
-    (void *) &RenderSampleCeilY,
-    (void *) &RenderSampleFloorY,
-    (void *) &RenderEdgeStep,
-    (void *) &RenderEdgeInit,
-    (void *) &RenderLineFixedEdgeInit,
-    (void *) &miDamageCreate,
-    (void *) &miDamageRegister,
-    (void *) &miDamageUnregister,
-    (void *) &miDamageDestroy,
-    (void *) &DamageSetup,
-    (void *) &DamageCreate,
-    (void *) &DamageDrawInternal,
-    (void *) &DamageRegister,
-    (void *) &DamageUnregister,
-    (void *) &DamageDestroy,
-    (void *) &DamageSubtract,
-    (void *) &DamageEmpty,
-    (void *) &DamageRegion,
-    (void *) &DamagePendingRegion,
-    (void *) &DamageRegionAppend,
-    (void *) &DamageRegionProcessPending,
-    (void *) &DamageRegionRendered,
-    (void *) &DamageDamageRegion,
-    (void *) &DamageSetReportAfterOp,
-    (void *) &DamageSetPostRenderingFunctions,
-    (void *) &DamageGetScreenFuncs,
-    (void *) &ClientStateCallback,
-    (void *) &ReplyNotSwappd,
-    (void *) &SmartScheduleTime,
-    (void *) &SmartScheduleInterval,
-    (void *) &SmartScheduleSlice,
-    (void *) &SmartScheduleMaxSlice,
-    (void *) &SmartScheduleDisable,
-    (void *) &SmartScheduleStartTimer,
-    (void *) &SmartScheduleStopTimer,
-    (void *) &SmartScheduleInit,
-    (void *) &currentTime,
-    (void *) &lastDeviceEventTime,
-    (void *) &CompareTimeStamps,
-    (void *) &ClientTimeToServerTime,
-    (void *) &InitialVector,
-    (void *) &ProcVector,
-    (void *) &SwappedProcVector,
-    (void *) &ReplySwapVector,
-    (void *) &ProcBadRequest,
-    (void *) &StandardMinorOpcode,
-    (void *) &MinorOpcodeOfRequest,
-    (void *) &EnableDisableExtension,
-    (void *) &EnableDisableExtensionError,
-    (void *) &InitExtensions,
-    (void *) &CloseDownExtensions,
-    (void *) &EventSwapVector,
-    (void *) &NotImplemented,
-    (void *) &AddExtension,
-    (void *) &AddExtensionAlias,
-    (void *) &CheckExtension,
-    (void *) &GetExtensionEntry,
-    (void *) &GEEventType,
-    (void *) &GEEventBase,
-    (void *) &GEErrorBase,
-    (void *) &GEClientPrivateKey,
-    (void *) &ProcGEVector,
-    (void *) &SProcGEVector,
-    (void *) &ShmRegisterFuncs,
-    (void *) &ShmRegisterFbFuncs,
-    (void *) &ShmSegType,
-    (void *) &ShmCompletionCode,
-    (void *) &BadShmSegCode,
-    (void *) &PanoramiXNumScreens,
-    (void *) &panoramiXdataPtr,
-    (void *) &PanoramiXPixWidth,
-    (void *) &PanoramiXPixHeight,
-    (void *) &PanoramiXTranslateVisualID,
-    (void *) &PanoramiXConsolidate,
-    (void *) &PanoramiXCreateConnectionBlock,
-    (void *) &PanoramiXFindIDByScrnum,
-    (void *) &XineramaRegisterConnectionBlockCallback,
-    (void *) &XineramaDeleteResource,
-    (void *) &XineramaReinitData,
-    (void *) &XineramaScreenRegions,
-    (void *) &XRC_DRAWABLE,
-    (void *) &XRT_WINDOW,
-    (void *) &XRT_PIXMAP,
-    (void *) &XRT_GC,
-    (void *) &XRT_COLORMAP,
-    (void *) &XineramaVisualsEqualPtr,
-    (void *) &XineramaGetImageData,
-    (void *) &xf86CreateI2CBusRec,
-    (void *) &xf86DestroyI2CBusRec,
-    (void *) &xf86I2CBusInit,
-    (void *) &xf86I2CFindBus,
-    (void *) &xf86I2CGetScreenBuses,
-    (void *) &xf86CreateI2CDevRec,
-    (void *) &xf86DestroyI2CDevRec,
-    (void *) &xf86I2CDevInit,
-    (void *) &xf86I2CFindDev,
-    (void *) &xf86I2CProbeAddress,
-    (void *) &xf86I2CWriteRead,
-    (void *) &xf86I2CReadStatus,
-    (void *) &xf86I2CReadByte,
-    (void *) &xf86I2CReadBytes,
-    (void *) &xf86I2CReadWord,
-    (void *) &xf86I2CWriteByte,
-    (void *) &xf86I2CWriteBytes,
-    (void *) &xf86I2CWriteWord,
-    (void *) &xf86I2CWriteVec,
-    (void *) &ConfiguredMonitor,
-    (void *) &dixLookupProperty,
-    (void *) &dixChangeWindowProperty,
-    (void *) &ChangeWindowProperty,
-    (void *) &DeleteProperty,
-    (void *) &DeleteAllWindowProperties,
-    (void *) &defaultScreenSaverTime,
-    (void *) &defaultScreenSaverInterval,
-    (void *) &ScreenSaverTime,
-    (void *) &ScreenSaverInterval,
-    (void *) &screenSaverSuspended,
-    (void *) &defaultFontPath,
-    (void *) &monitorResolution,
-    (void *) &defaultColorVisualClass,
-    (void *) &WindowTable,
-    (void *) &GrabInProgress,
-    (void *) &noTestExtensions,
-    (void *) &dixScreenOrigins,
-    (void *) &ConnectionInfo,
-    (void *) &DPMSStandbyTime,
-    (void *) &DPMSSuspendTime,
-    (void *) &DPMSOffTime,
-    (void *) &DPMSPowerLevel,
-    (void *) &DPMSEnabled,
-    (void *) &DPMSDisabledSwitch,
-    (void *) &DPMSCapableFlag,
-    (void *) &PanoramiXExtensionDisabledHack,
-    (void *) &noCompositeExtension,
-    (void *) &noDamageExtension,
-    (void *) &noDbeExtension,
-    (void *) &noDPMSExtension,
-    (void *) &noGlxExtension,
-    (void *) &noScreenSaverExtension,
-    (void *) &noMITShmExtension,
-    (void *) &noRRExtension,
-    (void *) &noRenderExtension,
-    (void *) &noResExtension,
-    (void *) &noXFree86DGAExtension,
-    (void *) &noXFree86DRIExtension,
-    (void *) &noXFixesExtension,
-    (void *) &noPanoramiXExtension,
-    (void *) &noXvExtension,
-    (void *) &noDRI2Extension,
-    (void *) &defaultTextFont,
-    (void *) &defaultCursorFont,
-    (void *) &MaxClients,
-    (void *) &isItTimeToYield,
-    (void *) &dispatchException,
-    (void *) &TimeOutValue,
-    (void *) &ScreenSaverBlanking,
-    (void *) &ScreenSaverAllowExposures,
-    (void *) &defaultScreenSaverBlanking,
-    (void *) &defaultScreenSaverAllowExposures,
-    (void *) &display,
-    (void *) &defaultBackingStore,
-    (void *) &disableBackingStore,
-    (void *) &enableBackingStore,
-    (void *) &PartialNetwork,
-    (void *) &logoScreenSaver,
-    (void *) &defeatAccessControl,
-    (void *) &maxBigRequestSize,
-    (void *) &party_like_its_1989,
-    (void *) &whiteRoot,
-    (void *) &CoreDump,
-    (void *) &DontPropagateMasks,
-    (void *) &screenIsSaved,
-    (void *) &savedScreenInfo,
-    (void *) &PixmapWidthPaddingInfo,
-    (void *) &RRTransformInit,
-    (void *) &RRTransformFini,
-    (void *) &RRTransformEqual,
-    (void *) &RRTransformSetFilter,
-    (void *) &RRTransformCopy,
-    (void *) &RRTransformCompute,
-    (void *) &RREventBase,
-    (void *) &ProcRandrVector,
-    (void *) &SProcRandrVector,
-    (void *) &rrPrivKey,
-    (void *) &RRClientType,
-    (void *) &RRClientPrivateKey,
-    (void *) &RRCrtcType,
-    (void *) &RRExtensionInit,
-    (void *) &RRScreenSetSizeRange,
-    (void *) &RRScreenSizeNotify,
-    (void *) &RRScreenSizeSet,
-    (void *) &RRSendConfigNotify,
-    (void *) &ProcRRGetScreenSizeRange,
-    (void *) &ProcRRSetScreenSize,
-    (void *) &ProcRRGetScreenResources,
-    (void *) &ProcRRGetScreenResourcesCurrent,
-    (void *) &ProcRRSetScreenConfig,
-    (void *) &ProcRRGetScreenInfo,
-    (void *) &RRDeliverScreenEvent,
-    (void *) &miRandRInit,
-    (void *) &miRRGetInfo,
-    (void *) &miRRCrtcSet,
-    (void *) &miRROutputSetProperty,
-    (void *) &miRROutputGetProperty,
-    (void *) &miRROutputValidateMode,
-    (void *) &miRRModeDestroy,
-    (void *) &RRTellChanged,
-    (void *) &RRGetInfo,
-    (void *) &RRInit,
-    (void *) &RRScreenInit,
-    (void *) &RRFirstOutput,
-    (void *) &RRGetRotation,
-    (void *) &RRVerticalRefresh,
-    (void *) &RRRegisterSize,
-    (void *) &RRRegisterRate,
-    (void *) &RRSetCurrentConfig,
-    (void *) &RRScreenInit,
-    (void *) &RRGetRotation,
-    (void *) &RRCrtcChanged,
-    (void *) &RRCrtcCreate,
-    (void *) &RRCrtcSetRotations,
-    (void *) &RRCrtcSetTransformSupport,
-    (void *) &RRCrtcNotify,
-    (void *) &RRDeliverCrtcEvent,
-    (void *) &RRCrtcSet,
-    (void *) &RRCrtcGammaSet,
-    (void *) &RRCrtcGammaGet,
-    (void *) &RRCrtcGammaNotify,
-    (void *) &RRCrtcGammaSetSize,
-    (void *) &RRCrtcGetScanoutSize,
-    (void *) &RRTransformCompute,
-    (void *) &RRCrtcGetTransform,
-    (void *) &RRCrtcPendingTransform,
-    (void *) &RRCrtcDestroy,
-    (void *) &RRCrtcTransformSet,
-    (void *) &RRCrtcInit,
-    (void *) &ProcRRGetCrtcInfo,
-    (void *) &ProcRRSetCrtcConfig,
-    (void *) &ProcRRGetCrtcGammaSize,
-    (void *) &ProcRRGetCrtcGamma,
-    (void *) &ProcRRSetCrtcGamma,
-    (void *) &ProcRRSetCrtcTransform,
-    (void *) &ProcRRGetCrtcTransform,
-    (void *) &RRClientKnowsRates,
-    (void *) &RRModeGet,
-    (void *) &RRModeDestroy,
-    (void *) &RRModesForScreen,
-    (void *) &RRModeInit,
-    (void *) &ProcRRCreateMode,
-    (void *) &ProcRRDestroyMode,
-    (void *) &ProcRRAddOutputMode,
-    (void *) &ProcRRDeleteOutputMode,
-    (void *) &RROutputChanged,
-    (void *) &RROutputCreate,
-    (void *) &RROutputSetClones,
-    (void *) &RROutputSetModes,
-    (void *) &RROutputAddUserMode,
-    (void *) &RROutputDeleteUserMode,
-    (void *) &RROutputSetCrtcs,
-    (void *) &RROutputSetConnection,
-    (void *) &RROutputSetSubpixelOrder,
-    (void *) &RROutputSetPhysicalSize,
-    (void *) &RRDeliverOutputEvent,
-    (void *) &RROutputDestroy,
-    (void *) &ProcRRGetOutputInfo,
-    (void *) &ProcRRSetOutputPrimary,
-    (void *) &ProcRRGetOutputPrimary,
-    (void *) &RROutputInit,
-    (void *) &RRPointerMoved,
-    (void *) &RRPointerScreenConfigured,
-    (void *) &RRDeleteAllOutputProperties,
-    (void *) &RRGetOutputProperty,
-    (void *) &RRQueryOutputProperty,
-    (void *) &RRDeleteOutputProperty,
-    (void *) &RRPostPendingProperties,
-    (void *) &RRChangeOutputProperty,
-    (void *) &RRConfigureOutputProperty,
-    (void *) &ProcRRChangeOutputProperty,
-    (void *) &ProcRRGetOutputProperty,
-    (void *) &ProcRRListOutputProperties,
-    (void *) &ProcRRQueryOutputProperty,
-    (void *) &ProcRRConfigureOutputProperty,
-    (void *) &ProcRRDeleteOutputProperty,
-    (void *) &RRXineramaExtensionInit,
-    (void *) &ExtensionModuleList,
-    (void *) &LoadSubModule,
-    (void *) &UnloadSubModule,
-    (void *) &UnloadModule,
-    (void *) &LoaderSymbol,
-    (void *) &LoaderListDirs,
-    (void *) &LoaderFreeDirList,
-    (void *) &LoaderErrorMsg,
-    (void *) &LoadExtension,
-    (void *) &LoaderGetOS,
-    (void *) &LoaderShouldIgnoreABI,
-    (void *) &LoaderGetABIVersion,
-    (void *) &xf86SetIntOption,
-    (void *) &xf86SetRealOption,
-    (void *) &xf86SetStrOption,
-    (void *) &xf86SetBoolOption,
-    (void *) &xf86CheckIntOption,
-    (void *) &xf86CheckRealOption,
-    (void *) &xf86CheckStrOption,
-    (void *) &xf86CheckBoolOption,
-    (void *) &xf86AddNewOption,
-    (void *) &xf86NewOption,
-    (void *) &xf86NextOption,
-    (void *) &xf86OptionListCreate,
-    (void *) &xf86OptionListMerge,
-    (void *) &xf86OptionListFree,
-    (void *) &xf86OptionName,
-    (void *) &xf86OptionValue,
-    (void *) &xf86OptionListReport,
-    (void *) &xf86FindOption,
-    (void *) &xf86FindOptionValue,
-    (void *) &xf86MarkOptionUsed,
-    (void *) &xf86MarkOptionUsedByName,
-    (void *) &xf86CheckIfOptionUsed,
-    (void *) &xf86CheckIfOptionUsedByName,
-    (void *) &xf86ShowUnusedOptions,
-    (void *) &xf86ProcessOptions,
-    (void *) &xf86TokenToOptinfo,
-    (void *) &xf86TokenToOptName,
-    (void *) &xf86IsOptionSet,
-    (void *) &xf86GetOptValString,
-    (void *) &xf86GetOptValInteger,
-    (void *) &xf86GetOptValULong,
-    (void *) &xf86GetOptValReal,
-    (void *) &xf86GetOptValFreq,
-    (void *) &xf86GetOptValBool,
-    (void *) &xf86ReturnOptValBool,
-    (void *) &xf86NameCmp,
-    (void *) &xf86NormalizeName,
-    (void *) &xf86ReplaceIntOption,
-    (void *) &xf86ReplaceRealOption,
-    (void *) &xf86ReplaceBoolOption,
-    (void *) &xf86ReplaceStrOption,
-    (void *) &pciTag,
-    (void *) &xf86scanpci,
-    (void *) &xf86MapDomainMemory,
-    (void *) &xf86MapLegacyIO,
-    (void *) &xf86DoConfigure,
-    (void *) &xf86DoShowOptions,
-    (void *) &xf86DoConfigurePass1,
-    (void *) &xf86ScreenKey,
-    (void *) &xf86CreateRootWindowKey,
-    (void *) &xf86PixmapKey,
-    (void *) &xf86Screens,
-    (void *) &byte_reversed,
-    (void *) &pciSlotClaimed,
-    (void *) &fbSlotClaimed,
-    (void *) &xf86ConfigDRI,
-    (void *) &xf86inSuspend,
-    (void *) &xf86DRI2Enabled,
-    (void *) &VTSwitchEnabled,
-    (void *) &xf86CheckPciSlot,
-    (void *) &xf86ClaimPciSlot,
-    (void *) &xf86UnclaimPciSlot,
-    (void *) &xf86ParsePciBusString,
-    (void *) &xf86ComparePciBusString,
-    (void *) &xf86FormatPciBusNumber,
-    (void *) &xf86GetFbInfoForScreen,
-    (void *) &xf86ClaimFbSlot,
-    (void *) &xf86ClaimNoSlot,
-    (void *) &xf86EnableAccess,
-    (void *) &xf86IsPrimaryPci,
-    (void *) &xf86DriverHasEntities,
-    (void *) &xf86AddEntityToScreen,
-    (void *) &xf86SetEntityInstanceForScreen,
-    (void *) &xf86GetNumEntityInstances,
-    (void *) &xf86GetDevFromEntity,
-    (void *) &xf86RemoveEntityFromScreen,
-    (void *) &xf86GetEntityInfo,
-    (void *) &xf86GetPciInfoForEntity,
-    (void *) &xf86SetEntityFuncs,
-    (void *) &xf86CheckPciMemBase,
-    (void *) &xf86IsEntityPrimary,
-    (void *) &xf86EnterServerState,
-    (void *) &xf86FindScreenForEntity,
-    (void *) &xf86GetLastScrnFlag,
-    (void *) &xf86SetLastScrnFlag,
-    (void *) &xf86IsEntityShared,
-    (void *) &xf86SetEntityShared,
-    (void *) &xf86IsEntitySharable,
-    (void *) &xf86SetEntitySharable,
-    (void *) &xf86IsPrimInitDone,
-    (void *) &xf86SetPrimInitDone,
-    (void *) &xf86ClearPrimInitDone,
-    (void *) &xf86AllocateEntityPrivateIndex,
-    (void *) &xf86GetEntityPrivate,
-    (void *) &xf86AddBusDeviceToConfigure,
-    (void *) &xf86LockZoom,
-    (void *) &xf86InitViewport,
-    (void *) &xf86SetViewport,
-    (void *) &xf86ZoomViewport,
-    (void *) &xf86SwitchMode,
-    (void *) &xf86GetPointerScreenFuncs,
-    (void *) &xf86InitOrigins,
-    (void *) &xf86ReconfigureLayout,
-    (void *) &xf86CVTMode,
-    (void *) &xf86DPMSInit,
-    (void *) &DPMSSet,
-    (void *) &DPMSSupported,
-    (void *) &DGAInit,
-    (void *) &DGAReInitModes,
-    (void *) &xf86SetDGAMode,
-    (void *) &SetTimeSinceLastInputEvent,
-    (void *) &xf86AddInputHandler,
-    (void *) &xf86RemoveInputHandler,
-    (void *) &xf86DisableInputHandler,
-    (void *) &xf86EnableInputHandler,
-    (void *) &xf86AddGeneralHandler,
-    (void *) &xf86RemoveGeneralHandler,
-    (void *) &xf86DisableGeneralHandler,
-    (void *) &xf86EnableGeneralHandler,
-    (void *) &xf86InterceptSignals,
-    (void *) &xf86InterceptSigIll,
-    (void *) &xf86EnableVTSwitch,
-    (void *) &xf86ProcessActionEvent,
-    (void *) &xf86PrintBacktrace,
-    (void *) &xf86AddDriver,
-    (void *) &xf86DeleteDriver,
-    (void *) &xf86AllocateScreen,
-    (void *) &xf86DeleteScreen,
-    (void *) &xf86AllocateScrnInfoPrivateIndex,
-    (void *) &xf86AddPixFormat,
-    (void *) &xf86SetDepthBpp,
-    (void *) &xf86PrintDepthBpp,
-    (void *) &xf86SetWeight,
-    (void *) &xf86SetDefaultVisual,
-    (void *) &xf86SetGamma,
-    (void *) &xf86SetDpi,
-    (void *) &xf86SetBlackWhitePixels,
-    (void *) &xf86EnableDisableFBAccess,
-    (void *) &xf86VDrvMsgVerb,
-    (void *) &xf86DrvMsgVerb,
-    (void *) &xf86DrvMsg,
-    (void *) &xf86MsgVerb,
-    (void *) &xf86Msg,
-    (void *) &xf86ErrorFVerb,
-    (void *) &xf86ErrorF,
-    (void *) &xf86TokenToString,
-    (void *) &xf86StringToToken,
-    (void *) &xf86ShowClocks,
-    (void *) &xf86PrintChipsets,
-    (void *) &xf86MatchDevice,
-    (void *) &xf86MatchPciInstances,
-    (void *) &xf86GetClocks,
-    (void *) &xf86GetVisualName,
-    (void *) &xf86GetVerbosity,
-    (void *) &xf86GetPix24,
-    (void *) &xf86GetDepth,
-    (void *) &xf86GetWeight,
-    (void *) &xf86GetGamma,
-    (void *) &xf86GetFlipPixels,
-    (void *) &xf86GetServerName,
-    (void *) &xf86ServerIsExiting,
-    (void *) &xf86ServerIsResetting,
-    (void *) &xf86ServerIsInitialising,
-    (void *) &xf86ServerIsOnlyDetecting,
-    (void *) &xf86CaughtSignal,
-    (void *) &xf86GetVidModeAllowNonLocal,
-    (void *) &xf86GetVidModeEnabled,
-    (void *) &xf86GetModInDevAllowNonLocal,
-    (void *) &xf86GetModInDevEnabled,
-    (void *) &xf86GetAllowMouseOpenFail,
-    (void *) &xf86IsPc98,
-    (void *) &xf86DisableRandR,
-    (void *) &xorgGetVersion,
-    (void *) &xf86GetModuleVersion,
-    (void *) &xf86LoadDrvSubModule,
-    (void *) &xf86LoadSubModule,
-    (void *) &xf86LoadOneModule,
-    (void *) &xf86UnloadSubModule,
-    (void *) &xf86LoaderCheckSymbol,
-    (void *) &xf86SetBackingStore,
-    (void *) &xf86SetSilkenMouse,
-    (void *) &xf86FindXvOptions,
-    (void *) &xf86GetOS,
-    (void *) &xf86ConfigPciEntity,
-    (void *) &xf86ConfigFbEntity,
-    (void *) &xf86ConfigActivePciEntity,
-    (void *) &xf86IsScreenPrimary,
-    (void *) &xf86RegisterRootWindowProperty,
-    (void *) &xf86IsUnblank,
-    (void *) &xf86GetPixFormat,
-    (void *) &xf86GetBppFromDepth,
-    (void *) &xf86GetNearestClock,
-    (void *) &xf86ModeStatusToString,
-    (void *) &xf86LookupMode,
-    (void *) &xf86CheckModeForMonitor,
-    (void *) &xf86InitialCheckModeForDriver,
-    (void *) &xf86CheckModeForDriver,
-    (void *) &xf86ValidateModes,
-    (void *) &xf86DeleteMode,
-    (void *) &xf86PruneDriverModes,
-    (void *) &xf86SetCrtcForModes,
-    (void *) &xf86PrintModes,
-    (void *) &xf86ShowClockRanges,
-    (void *) &xf86ModeHSync,
-    (void *) &xf86ModeVRefresh,
-    (void *) &xf86SetModeDefaultName,
-    (void *) &xf86SetModeCrtc,
-    (void *) &xf86DuplicateMode,
-    (void *) &xf86DuplicateModes,
-    (void *) &xf86ModesEqual,
-    (void *) &xf86PrintModeline,
-    (void *) &xf86ModesAdd,
-    (void *) &xf86CollectOptions,
-    (void *) &xf86RandRInit,
-    (void *) &xf86GetRotation,
-    (void *) &xf86RandRSetNewVirtualAndDimensions,
-    (void *) &VidModeExtensionInit,
-    (void *) &xf86addNewOption,
-    (void *) &xf86optionListDup,
-    (void *) &xf86optionListFree,
-    (void *) &xf86optionName,
-    (void *) &xf86optionValue,
-    (void *) &xf86newOption,
-    (void *) &xf86nextOption,
-    (void *) &xf86findOption,
-    (void *) &xf86findOptionValue,
-    (void *) &xf86optionListCreate,
-    (void *) &xf86optionListMerge,
-    (void *) &xf86nameCompare,
-    (void *) &xf86uLongToString,
-    (void *) &xf86parseOption,
-    (void *) &xf86printOptionList,
-    (void *) &xf86openConfigFile,
-    (void *) &xf86setBuiltinConfig,
-    (void *) &xf86readConfigFile,
-    (void *) &xf86closeConfigFile,
-    (void *) &xf86freeConfig,
-    (void *) &xf86writeConfigFile,
-    (void *) &xf86findDevice,
-    (void *) &xf86findLayout,
-    (void *) &xf86findMonitor,
-    (void *) &xf86findModes,
-    (void *) &xf86findModeLine,
-    (void *) &xf86findScreen,
-    (void *) &xf86findInput,
-    (void *) &xf86findInputByDriver,
-    (void *) &xf86findVideoAdaptor,
-    (void *) &xf86addListItem,
-    (void *) &xf86itemNotSublist,
-    (void *) &xf86pathIsAbsolute,
-    (void *) &xf86pathIsSafe,
-    (void *) &xf86addComment,
-    (void *) &xf86ModeHSync,
-    (void *) &xf86ModeVRefresh,
-    (void *) &xf86ModeBandwidth,
-    (void *) &xf86ModeWidth,
-    (void *) &xf86ModeHeight,
-    (void *) &xf86DuplicateMode,
-    (void *) &xf86DuplicateModes,
-    (void *) &xf86SetModeDefaultName,
-    (void *) &xf86SetModeCrtc,
-    (void *) &xf86ModesEqual,
-    (void *) &xf86PrintModeline,
-    (void *) &xf86ModesAdd,
-    (void *) &xf86DDCGetModes,
-    (void *) &xf86CVTMode,
-    (void *) &xf86GTFMode,
-    (void *) &xf86ModeIsReduced,
-    (void *) &xf86ValidateModesFlags,
-    (void *) &xf86ValidateModesClocks,
-    (void *) &xf86ValidateModesSize,
-    (void *) &xf86ValidateModesSync,
-    (void *) &xf86ValidateModesBandwidth,
-    (void *) &xf86ValidateModesReducedBlanking,
-    (void *) &xf86PruneInvalidModes,
-    (void *) &xf86PruneDuplicateModes,
-    (void *) &xf86ValidateModesFlags,
-    (void *) &xf86ValidateModesUserConfig,
-    (void *) &xf86GetMonitorModes,
-    (void *) &xf86GetDefaultModes,
-    (void *) &xf86DDCApplyQuirks,
-    (void *) &miDCInitialize,
-    (void *) &miPointerInitialize,
-    (void *) &miPointerWarpCursor,
-    (void *) &miPointerCurrentScreen,
-    (void *) &miPointerGetScreen,
-    (void *) &miPointerSetScreen,
-    (void *) &miPointerGetPosition,
-    (void *) &miPointerSetPosition,
-    (void *) &miPointerUpdateSprite,
-    (void *) &miPointerScreenKey,
-    (void *) &xf86InitCursor,
-    (void *) &xf86CreateCursorInfoRec,
-    (void *) &xf86DestroyCursorInfoRec,
-    (void *) &xf86ForceHWCursor,
-    (void *) &xf86CrtcConfigPrivateIndex,
-    (void *) &xf86CrtcConfigInit,
-    (void *) &xf86CrtcSetSizeRange,
-    (void *) &xf86CrtcCreate,
-    (void *) &xf86CrtcDestroy,
-    (void *) &xf86CrtcSetModeTransform,
-    (void *) &xf86CrtcSetMode,
-    (void *) &xf86CrtcSetOrigin,
-    (void *) &xf86CrtcRotate,
-    (void *) &xf86RotateDestroy,
-    (void *) &xf86RotateFreeShadow,
-    (void *) &xf86RotateCloseScreen,
-    (void *) &xf86CrtcInUse,
-    (void *) &xf86OutputCreate,
-    (void *) &xf86OutputUseScreenMonitor,
-    (void *) &xf86OutputRename,
-    (void *) &xf86OutputDestroy,
-    (void *) &xf86ProbeOutputModes,
-    (void *) &xf86SetScrnInfoModes,
-    (void *) &xf86CrtcScreenInit,
-    (void *) &xf86InitialConfiguration,
-    (void *) &xf86DPMSSet,
-    (void *) &xf86SaveScreen,
-    (void *) &xf86DisableUnusedFunctions,
-    (void *) &xf86OutputFindClosestMode,
-    (void *) &xf86SetSingleMode,
-    (void *) &xf86OutputSetEDID,
-    (void *) &xf86OutputGetEDIDModes,
-    (void *) &xf86OutputGetEDID,
-    (void *) &xf86DiDGAInit,
-    (void *) &xf86DiDGAReInit,
-    (void *) &xf86CrtcSetScreenSubpixelOrder,
-    (void *) &xf86ConnectorGetName,
-    (void *) &xf86SetDesiredModes,
-    (void *) &xf86_cursors_init,
-    (void *) &xf86_reload_cursors,
-    (void *) &xf86_show_cursors,
-    (void *) &xf86_hide_cursors,
-    (void *) &xf86_cursors_fini,
-    (void *) &xf86_crtc_clip_video_helper,
-    (void *) &xf86_wrap_crtc_notify,
-    (void *) &xf86_unwrap_crtc_notify,
-    (void *) &xf86_crtc_notify,
-    (void *) &xf86_crtc_supports_gamma,
-    (void *) &xf86RandR12CreateScreenResources,
-    (void *) &xf86RandR12Init,
-    (void *) &xf86RandR12SetRotations,
-    (void *) &xf86RandR12SetTransformSupport,
-    (void *) &xf86RandR12SetConfig,
-    (void *) &xf86RandR12GetRotation,
-    (void *) &xf86RandR12GetOriginalVirtualSize,
-    (void *) &xf86RandR12PreInit,
-    (void *) &xf86RandR12TellChanged,
-    (void *) &xf86DoEDID_DDC1,
-    (void *) &xf86DoEDID_DDC2,
-    (void *) &xf86DoEEDID,
-    (void *) &xf86PrintEDID,
-    (void *) &xf86InterpretEDID,
-    (void *) &xf86InterpretEEDID,
-    (void *) &xf86EdidMonitorSet,
-    (void *) &xf86SetDDCproperties,
-    (void *) &xf86DDCGetModes,
-    (void *) &xf86MonitorIsHDMI,
-    (void *) &xf86DoDisplayID,
-    (void *) &xf86DisplayIDMonitorSet,
-    (void *) &FindDMTMode,
-    (void *) &DMTModes,
-    (void *) &xf86MonitorIsHDMI,
-    (void *) &xf86ConfigFile,
-    (void *) &xf86AllowMouseOpenFail,
-    (void *) &xf86fpFlag,
-    (void *) &xf86sFlag,
-    (void *) &xf86bsEnableFlag,
-    (void *) &xf86bsDisableFlag,
-    (void *) &xf86silkenMouseDisableFlag,
-    (void *) &xf86xkbdirFlag,
-    (void *) &xf86LayoutName,
-    (void *) &xf86ScreenName,
-    (void *) &xf86PointerName,
-    (void *) &xf86KeyboardName,
-    (void *) &xf86FbBpp,
-    (void *) &xf86Depth,
-    (void *) &xf86Pix24,
-    (void *) &xf86Weight,
-    (void *) &xf86FlipPixels,
-    (void *) &xf86Gamma,
-    (void *) &xf86ServerName,
-    (void *) &xf86IsolateDevice,
-    (void *) &xf86Info,
-    (void *) &xf86ModulePath,
-    (void *) &xf86ModPathFrom,
-    (void *) &xf86LogFile,
-    (void *) &xf86LogFileFrom,
-    (void *) &xf86LogFileWasOpened,
-    (void *) &xf86ConfigLayout,
-    (void *) &xf86DriverList,
-    (void *) &xf86NumDrivers,
-    (void *) &xf86Resetting,
-    (void *) &xf86Initialising,
-    (void *) &xf86NumScreens,
-    (void *) &xf86VisualNames,
-    (void *) &xf86Verbose,
-    (void *) &xf86LogVerbose,
-    (void *) &xorgHWAccess,
-    (void *) &xf86RegisteredPropertiesTable,
-    (void *) &xf86BusProbe,
-    (void *) &xf86AccessInit,
-    (void *) &xf86AccessEnter,
-    (void *) &xf86AccessLeave,
-    (void *) &xf86EntityInit,
-    (void *) &xf86FindPrimaryDevice,
-    (void *) &xf86PostProbe,
-    (void *) &xf86ClearEntityListForScreen,
-    (void *) &xf86AddDevToEntity,
-    (void *) &xf86PostScreenInit,
-    (void *) &xf86PathIsSafe,
-    (void *) &xf86DefaultModes,
-    (void *) &xf86NumDefaultModes,
-    (void *) &DoConfigure,
-    (void *) &DoShowOptions,
-    (void *) &xf86Wakeup,
-    (void *) &xf86SigWrapper,
-    (void *) &xf86HandlePMEvents,
-    (void *) &xf86PMGetEventFromOs,
-    (void *) &xf86PMConfirmEventToOs,
-    (void *) &xf86LogInit,
-    (void *) &xf86CloseLog,
-    (void *) &xf86LoadModules,
-    (void *) &xf86SetVerbosity,
-    (void *) &xf86SetLogVerbosity,
-    (void *) &xf86CallDriverProbe,
-    (void *) &xf86Events,
-    (void *) &xf86HandleColormaps,
-    (void *) &xf86ChangeGamma,
-    (void *) &xf86ChangeGammaRamp,
-    (void *) &xf86GetGammaRampSize,
-    (void *) &xf86GetGammaRamp,
-    (void *) &xf86RegisterOffscreenManager,
-    (void *) &xf86InitFBManagerRegion,
-    (void *) &xf86InitFBManagerArea,
-    (void *) &xf86InitFBManager,
-    (void *) &xf86InitFBManagerLinear,
-    (void *) &xf86FBManagerRunning,
-    (void *) &xf86AllocateOffscreenArea,
-    (void *) &xf86AllocateLinearOffscreenArea,
-    (void *) &xf86AllocateOffscreenLinear,
-    (void *) &xf86FreeOffscreenArea,
-    (void *) &xf86FreeOffscreenLinear,
-    (void *) &xf86ResizeOffscreenArea,
-    (void *) &xf86ResizeOffscreenLinear,
-    (void *) &xf86RegisterFreeBoxCallback,
-    (void *) &xf86PurgeUnlockedOffscreenAreas,
-    (void *) &xf86QueryLargestOffscreenArea,
-    (void *) &xf86QueryLargestOffscreenLinear,
-    (void *) &inputInfo,
-    (void *) &CloseInputDevice,
-    (void *) &AddOtherInputDevices,
-    (void *) &OpenInputDevice,
-    (void *) &SetDeviceMode,
-    (void *) &SetDeviceValuators,
-    (void *) &ChangeDeviceControl,
-    (void *) &xf86InputDevs,
-    (void *) &xf86PostMotionEvent,
-    (void *) &xf86PostMotionEventP,
-    (void *) &xf86PostProximityEvent,
-    (void *) &xf86PostProximityEventP,
-    (void *) &xf86PostButtonEvent,
-    (void *) &xf86PostButtonEventP,
-    (void *) &xf86PostKeyEvent,
-    (void *) &xf86PostKeyEventP,
-    (void *) &xf86PostKeyboardEvent,
-    (void *) &xf86ActivateDevice,
-    (void *) &xf86FirstLocalDevice,
-    (void *) &xf86ScaleAxis,
-    (void *) &xf86XInputSetScreen,
-    (void *) &xf86ProcessCommonOptions,
-    (void *) &xf86InitValuatorAxisStruct,
-    (void *) &xf86InitValuatorDefaults,
-    (void *) &xf86AddEnabledDevice,
-    (void *) &xf86RemoveEnabledDevice,
-    (void *) &xf86DisableDevice,
-    (void *) &xf86EnableDevice,
-    (void *) &xf86AddInputDriver,
-    (void *) &xf86DeleteInputDriver,
-    (void *) &xf86AllocateInput,
-    (void *) &xf86LookupInputDriver,
-    (void *) &xf86LookupInput,
-    (void *) &xf86DeleteInput,
-    (void *) &xf86MotionHistoryAllocate,
-    (void *) &xf86CollectInputOptions,
-    (void *) &xf86VGAarbiterInit,
-    (void *) &xf86VGAarbiterFini,
-    (void *) &xf86VGAarbiterWrapFunctions,
-    (void *) &xf86VGAarbiterLock,
-    (void *) &xf86VGAarbiterUnlock,
-    (void *) &xf86VGAarbiterDeviceDecodes,
-    (void *) &xf86VGAarbiterAllowDRI,
-    (void *) &XisbNew,
-    (void *) &XisbFree,
-    (void *) &XisbRead,
-    (void *) &XisbWrite,
-    (void *) &XisbTrace,
-    (void *) &XisbBlockDuration,
-    (void *) &xf86XVScreenInit,
-    (void *) &xf86XVRegisterGenericAdaptorDriver,
-    (void *) &xf86XVListGenericAdaptors,
-    (void *) &xf86XVRegisterOffscreenImages,
-    (void *) &xf86XVQueryOffscreenImages,
-    (void *) &xf86XVAllocateVideoAdaptorRec,
-    (void *) &xf86XVFreeVideoAdaptorRec,
-    (void *) &xf86XVFillKeyHelper,
-    (void *) &xf86XVFillKeyHelperDrawable,
-    (void *) &xf86XVClipVideoHelper,
-    (void *) &xf86XVCopyYUV12ToPacked,
-    (void *) &xf86XVCopyPacked,
-    (void *) &XvGetScreenKeyProc,
-    (void *) &XvGetRTPortProc,
-    (void *) &XvScreenInitProc,
-    (void *) &xf86XvMCScreenInit,
-    (void *) &xf86XvMCCreateAdaptorRec,
-    (void *) &xf86XvMCDestroyAdaptorRec,
-    (void *) &XvMCScreenInitProc,
-    (void *) &XF86XvScreenKey,
-    (void *) &RamDacHWPrivateIndex,
-    (void *) &RamDacScreenPrivateIndex,
-    (void *) &RamDacCreateInfoRec,
-    (void *) &RamDacHelperCreateInfoRec,
-    (void *) &RamDacDestroyInfoRec,
-    (void *) &RamDacHelperDestroyInfoRec,
-    (void *) &RamDacInit,
-    (void *) &RamDacHandleColormaps,
-    (void *) &RamDacFreeRec,
-    (void *) &RamDacGetHWIndex,
-    (void *) &BTramdacProbe,
-    (void *) &BTramdacSave,
-    (void *) &BTramdacRestore,
-    (void *) &BTramdacSetBpp,
-    (void *) &IBMramdacProbe,
-    (void *) &IBMramdacSave,
-    (void *) &IBMramdacRestore,
-    (void *) &IBMramdac526SetBpp,
-    (void *) &IBMramdac640SetBpp,
-    (void *) &IBMramdac526CalculateMNPCForClock,
-    (void *) &IBMramdac640CalculateMNPCForClock,
-    (void *) &IBMramdac526HWCursorInit,
-    (void *) &IBMramdac640HWCursorInit,
-    (void *) &IBMramdac526SetBppWeak,
-    (void *) &TIramdacCalculateMNPForClock,
-    (void *) &TIramdacProbe,
-    (void *) &TIramdacSave,
-    (void *) &TIramdacRestore,
-    (void *) &TIramdac3026SetBpp,
-    (void *) &TIramdac3030SetBpp,
-    (void *) &TIramdacHWCursorInit,
-    (void *) &TIramdacLoadPalette,
-    (void *) &TIramdacLoadPaletteWeak,
-    (void *) &xf86LinearVidMem,
-    (void *) &xf86CheckMTRR,
-    (void *) &xf86MapVidMem,
-    (void *) &xf86UnMapVidMem,
-    (void *) &xf86MapReadSideEffects,
-    (void *) &xf86ReadBIOS,
-    (void *) &xf86EnableIO,
-    (void *) &xf86DisableIO,
-    (void *) &xf86OSRingBell,
-    (void *) &xf86SetReallySlowBcopy,
-    (void *) &xf86SlowBcopy,
-    (void *) &xf86OpenSerial,
-    (void *) &xf86SetSerial,
-    (void *) &xf86SetSerialSpeed,
-    (void *) &xf86ReadSerial,
-    (void *) &xf86WriteSerial,
-    (void *) &xf86CloseSerial,
-    (void *) &xf86FlushInput,
-    (void *) &xf86WaitForInput,
-    (void *) &xf86SerialSendBreak,
-    (void *) &xf86SetSerialModemState,
-    (void *) &xf86GetSerialModemState,
-    (void *) &xf86SerialModemSetBits,
-    (void *) &xf86SerialModemClearBits,
-    (void *) &xf86LoadKernelModule,
-    (void *) &xf86AgpGARTSupported,
-    (void *) &xf86GetAGPInfo,
-    (void *) &xf86AcquireGART,
-    (void *) &xf86ReleaseGART,
-    (void *) &xf86AllocateGARTMemory,
-    (void *) &xf86DeallocateGARTMemory,
-    (void *) &xf86BindGARTMemory,
-    (void *) &xf86UnbindGARTMemory,
-    (void *) &xf86EnableAGP,
-    (void *) &xf86GARTCloseScreen,
-    (void *) &xf86InstallSIGIOHandler,
-    (void *) &xf86RemoveSIGIOHandler,
-    (void *) &xf86BlockSIGIO,
-    (void *) &xf86UnblockSIGIO,
-    (void *) &xf86AssertBlockedSIGIO,
-    (void *) &xf86SIGIOSupported,
-    (void *) &miInitializeBanking,
-    (void *) &miScanLineWidth,
-    (void *) &miInstalledMaps,
-    (void *) &miListInstalledColormaps,
-    (void *) &miInstallColormap,
-    (void *) &miUninstallColormap,
-    (void *) &miResolveColor,
-    (void *) &miInitializeColormap,
-    (void *) &miExpandDirectColors,
-    (void *) &miCreateDefColormap,
-    (void *) &miClearVisualTypes,
-    (void *) &miSetVisualTypes,
-    (void *) &miSetPixmapDepths,
-    (void *) &miSetVisualTypesAndMasks,
-    (void *) &miGetDefaultVisualMask,
-    (void *) &miInitVisuals,
-    (void *) &miSetZeroLineBias,
-    (void *) &miZeroLineScreenKey,
-    (void *) &miZeroClipLine,
-    (void *) &miPolyArc,
-    (void *) &miCopyArea,
-    (void *) &miCopyPlane,
-    (void *) &miGetImage,
-    (void *) &miPutImage,
-    (void *) &miCopyRegion,
-    (void *) &miDoCopy,
-    (void *) &miRecolorCursor,
-    (void *) &miStepDash,
-    (void *) &mieqInit,
-    (void *) &mieqFini,
-    (void *) &mieqEnqueue,
-    (void *) &mieqSwitchScreen,
-    (void *) &mieqProcessDeviceEvent,
-    (void *) &mieqProcessInputEvents,
-    (void *) &CopyGetMasterEvent,
-    (void *) &miHandleExposures,
-    (void *) &miSendGraphicsExpose,
-    (void *) &miSendExposures,
-    (void *) &miWindowExposures,
-    (void *) &miPaintWindow,
-    (void *) &miClearDrawable,
-    (void *) &miPolyFillRect,
-    (void *) &miPolyGlyphBlt,
-    (void *) &miImageGlyphBlt,
-    (void *) &miFillPolygon,
-    (void *) &miFillConvexPoly,
-    (void *) &miFillGeneralPoly,
-    (void *) &miPolyPoint,
-    (void *) &miPolyRectangle,
-    (void *) &miPolySegment,
-    (void *) &miPolyText8,
-    (void *) &miPolyText16,
-    (void *) &miImageText8,
-    (void *) &miImageText16,
-    (void *) &miPushPixels,
-    (void *) &miRectAlloc,
-    (void *) &miRegionBroken,
-    (void *) &miModifyPixmapHeader,
-    (void *) &miCreateScreenResources,
-    (void *) &miScreenDevPrivateInit,
-    (void *) &miScreenInit,
-    (void *) &miAllocateGCPrivateIndex,
-    (void *) &miShapedWindowIn,
-    (void *) &miRegisterRedirectBorderClipProc,
-    (void *) &miValidateTree,
-    (void *) &miWideLine,
-    (void *) &miWideDash,
-    (void *) &miClearToBackground,
-    (void *) &miMarkWindow,
-    (void *) &miMarkOverlappedWindows,
-    (void *) &miHandleValidateExposures,
-    (void *) &miMoveWindow,
-    (void *) &miSlideAndSizeWindow,
-    (void *) &miGetLayerWindow,
-    (void *) &miSetShape,
-    (void *) &miChangeBorderWidth,
-    (void *) &miMarkUnrealizedWindow,
-    (void *) &miSegregateChildren,
-    (void *) &miZeroPolyArc,
-    (void *) &miZeroLine,
-    (void *) &miZeroDashLine,
-    (void *) &miPolyFillArc,
-    (void *) &miInitializeBackingStore,
-    (void *) &miChangeGC,
-    (void *) &miDestroyGC,
-    (void *) &miDestroyClip,
-    (void *) &miChangeClip,
-    (void *) &miCopyClip,
-    (void *) &miCopyGC,
-    (void *) &miComputeCompositeClip,
-    (void *) &miZeroArcSetup,
-    (void *) &miFillArcSetup,
-    (void *) &miFillArcSliceSetup,
-    (void *) &miInitSpanGroup,
-    (void *) &miAppendSpans,
-    (void *) &miFillUniqueSpanGroup,
-    (void *) &miFreeSpanGroup,
-    (void *) &miClipSpans,
-    (void *) &miFillSppPoly,
-    (void *) &miRoundJoinClip,
-    (void *) &miRoundCapClip,
-    (void *) &miPolyBuildEdge,
-    (void *) &miPolyBuildPoly,
-    (void *) &miInitOverlay,
-    (void *) &miOverlayGetPrivateClips,
-    (void *) &miOverlayCollectUnderlayRegions,
-    (void *) &miOverlayComputeCompositeClip,
-    (void *) &miOverlayCopyUnderlay,
-    (void *) &miOverlaySetTransFunction,
-    (void *) &miOverlaySetRootClip,
-    (void *) &RegionResType,
-    (void *) &XFixesErrorBase,
-    (void *) &XFixesRegionCopy,
-    (void *) &config_init,
-    (void *) &config_fini,
-    (void *) &SetCriticalEvent,
-    (void *) &GetSpriteCursor,
-    (void *) &ProcAllowEvents,
-    (void *) &MaybeDeliverEventsToClient,
-    (void *) &ProcWarpPointer,
-    (void *) &EventSelectForWindow,
-    (void *) &EventSuppressForWindow,
-    (void *) &ProcSetInputFocus,
-    (void *) &ProcGetInputFocus,
-    (void *) &ProcGrabPointer,
-    (void *) &ProcChangeActivePointerGrab,
-    (void *) &ProcUngrabPointer,
-    (void *) &ProcGrabKeyboard,
-    (void *) &ProcUngrabKeyboard,
-    (void *) &ProcQueryPointer,
-    (void *) &ProcSendEvent,
-    (void *) &ProcUngrabKey,
-    (void *) &ProcGrabKey,
-    (void *) &ProcGrabButton,
-    (void *) &ProcUngrabButton,
-    (void *) &ProcRecolorCursor,
-    (void *) &PostSyntheticMotion,
-    (void *) &SetDefaultFont,
-    (void *) &QueueFontWakeup,
-    (void *) &RemoveFontWakeup,
-    (void *) &FontWakeup,
-    (void *) &OpenFont,
-    (void *) &CloseFont,
-    (void *) &QueryFont,
-    (void *) &ListFonts,
-    (void *) &doListFontsWithInfo,
-    (void *) &doPolyText,
-    (void *) &PolyText,
-    (void *) &doImageText,
-    (void *) &ImageText,
-    (void *) &SetFontPath,
-    (void *) &SetDefaultFontPath,
-    (void *) &GetFontPath,
-    (void *) &DeleteClientFontStuff,
-    (void *) &InitFonts,
-    (void *) &FreeFonts,
-    (void *) &find_old_font,
-    (void *) &GetGlyphs,
-    (void *) &QueryGlyphExtents,
-    (void *) &QueryTextExtents,
-    (void *) &ParseGlyphCachingMode,
-    (void *) &InitGlyphCaching,
-    (void *) &SetGlyphCachingMode,
-    (void *) &BuiltinRegisterFpeFunctions,
-    (void *) &client_auth_generation,
-    (void *) &DeleteFontClientID,
-    (void *) &GetClientResolutions,
-    (void *) &GetDefaultPointSize,
-    (void *) &GetNewFontClientID,
-    (void *) &init_fs_handlers,
-    (void *) &RegisterFPEFunctions,
-    (void *) &remove_fs_handlers,
-    (void *) &StoreFontClientFont,
-    (void *) &CreateGrab,
-    (void *) &DeletePassiveGrab,
-    (void *) &GrabMatchesSecond,
-    (void *) &AddPassiveGrabToList,
-    (void *) &DeletePassiveGrabFromList,
-    (void *) &InitProximityClassDeviceStruct,
-    (void *) &InitValuatorAxisStruct,
-    (void *) &XIDeleteAllDeviceProperties,
-    (void *) &XIDeleteDeviceProperty,
-    (void *) &XIChangeDeviceProperty,
-    (void *) &XIGetDeviceProperty,
-    (void *) &XISetDevicePropertyDeletable,
-    (void *) &XIRegisterPropertyHandler,
-    (void *) &XIUnregisterPropertyHandler,
-    (void *) &XIGetKnownProperty,
-    (void *) &XIGetDevice,
-    (void *) &XIPropToInt,
-    (void *) &XIPropToFloat,
-    (void *) &RegisterOtherDevice,
-    (void *) &UpdateDeviceState,
-    (void *) &ProcessOtherEvent,
-    (void *) &DeviceFocusEvent,
-    (void *) &CheckGrabValues,
-    (void *) &GrabButton,
-    (void *) &GrabKey,
-    (void *) &GrabWindow,
-    (void *) &SelectForWindow,
-    (void *) &AddExtensionClient,
-    (void *) &RecalculateDeviceDeliverableEvents,
-    (void *) &InputClientGone,
-    (void *) &SendEvent,
-    (void *) &SetButtonMapping,
-    (void *) &ChangeKeyMapping,
-    (void *) &DeleteWindowFromAnyExtEvents,
-    (void *) &MaybeSendDeviceMotionNotifyHint,
-    (void *) &CheckDeviceGrabAndHintWindow,
-    (void *) &MaybeStopDeviceHint,
-    (void *) &DeviceEventSuppressForWindow,
-    (void *) &SendEventToAllWindows,
-    (void *) &XI2EventSwap,
-    (void *) &XIShouldNotify,
-    (void *) &XISendDeviceChangedEvent,
-    (void *) &XISetEventMask,
-    (void *) &XICheckInvalidMaskBits,
-    (void *) &XInputExtensionInit,
-    (void *) &AssignTypeAndName,
-    (void *) &InitVelocityData,
-    (void *) &InitTrackers,
-    (void *) &ProcessVelocityData2D,
-    (void *) &BasicComputeAcceleration,
-    (void *) &FreeVelocityData,
-    (void *) &InitializePredictableAccelerationProperties,
-    (void *) &DeletePredictableAccelerationProperties,
-    (void *) &SetAccelerationProfile,
-    (void *) &GetDevicePredictableAccelData,
-    (void *) &SetDeviceSpecificAccelerationProfile,
-    (void *) &AccelerationDefaultCleanup,
-    (void *) &acceleratePointerPredictable,
-    (void *) &acceleratePointerLightweight,
-    (void *) &RegisterResourceName,
-    (void *) &RegisterExtensionNames,
-    (void *) &LookupMajorName,
-    (void *) &LookupRequestName,
-    (void *) &LookupEventName,
-    (void *) &LookupErrorName,
-    (void *) &LookupResourceName,
-    (void *) &dixResetRegistry,
-    (void *) &dixLookupSelection,
-    (void *) &CurrentSelections,
-    (void *) &SelectionCallback,
-    (void *) &InitSelections,
-    (void *) &DeleteWindowFromAnySelections,
-    (void *) &DeleteClientFromAnySelections,
-    (void *) &Swap32Write,
-    (void *) &CopySwap32Write,
-    (void *) &CopySwap16Write,
-    (void *) &SGenericReply,
-    (void *) &SGetWindowAttributesReply,
-    (void *) &SGetGeometryReply,
-    (void *) &SQueryTreeReply,
-    (void *) &SInternAtomReply,
-    (void *) &SGetAtomNameReply,
-    (void *) &SGetPropertyReply,
-    (void *) &SListPropertiesReply,
-    (void *) &SGetSelectionOwnerReply,
-    (void *) &SQueryPointerReply,
-    (void *) &SwapTimeCoordWrite,
-    (void *) &SGetMotionEventsReply,
-    (void *) &STranslateCoordsReply,
-    (void *) &SGetInputFocusReply,
-    (void *) &SQueryKeymapReply,
-    (void *) &SQueryFontReply,
-    (void *) &SQueryTextExtentsReply,
-    (void *) &SListFontsReply,
-    (void *) &SListFontsWithInfoReply,
-    (void *) &SGetFontPathReply,
-    (void *) &SGetImageReply,
-    (void *) &SListInstalledColormapsReply,
-    (void *) &SAllocColorReply,
-    (void *) &SAllocNamedColorReply,
-    (void *) &SAllocColorCellsReply,
-    (void *) &SAllocColorPlanesReply,
-    (void *) &SQColorsExtend,
-    (void *) &SQueryColorsReply,
-    (void *) &SLookupColorReply,
-    (void *) &SQueryBestSizeReply,
-    (void *) &SListExtensionsReply,
-    (void *) &SGetKeyboardMappingReply,
-    (void *) &SGetPointerMappingReply,
-    (void *) &SGetModifierMappingReply,
-    (void *) &SGetKeyboardControlReply,
-    (void *) &SGetPointerControlReply,
-    (void *) &SGetScreenSaverReply,
-    (void *) &SLHostsExtend,
-    (void *) &SListHostsReply,
-    (void *) &SErrorEvent,
-    (void *) &SwapConnSetupInfo,
-    (void *) &WriteSConnectionInfo,
-    (void *) &SwapConnSetupPrefix,
-    (void *) &WriteSConnSetupPrefix,
-    (void *) &SCirculateEvent,
-    (void *) &SClientMessageEvent,
-    (void *) &SColormapEvent,
-    (void *) &SConfigureNotifyEvent,
-    (void *) &SConfigureRequestEvent,
-    (void *) &SCreateNotifyEvent,
-    (void *) &SDestroyNotifyEvent,
-    (void *) &SEnterLeaveEvent,
-    (void *) &SExposeEvent,
-    (void *) &SFocusEvent,
-    (void *) &SGraphicsExposureEvent,
-    (void *) &SGravityEvent,
-    (void *) &SKeyButtonPtrEvent,
-    (void *) &SKeymapNotifyEvent,
-    (void *) &SMapNotifyEvent,
-    (void *) &SMapRequestEvent,
-    (void *) &SMappingEvent,
-    (void *) &SNoExposureEvent,
-    (void *) &SPropertyEvent,
-    (void *) &SReparentEvent,
-    (void *) &SResizeRequestEvent,
-    (void *) &SSelectionClearEvent,
-    (void *) &SSelectionNotifyEvent,
-    (void *) &SSelectionRequestEvent,
-    (void *) &SUnmapNotifyEvent,
-    (void *) &SVisibilityEvent,
-    (void *) &SwapColorItem,
-    (void *) &SwapConnClientPrefix,
-    (void *) &SProcAllocColor,
-    (void *) &SProcAllocColorCells,
-    (void *) &SProcAllocColorPlanes,
-    (void *) &SProcAllocNamedColor,
-    (void *) &SProcChangeActivePointerGrab,
-    (void *) &SProcChangeGC,
-    (void *) &SProcChangeHosts,
-    (void *) &SProcChangeKeyboardControl,
-    (void *) &SProcChangeKeyboardMapping,
-    (void *) &SProcChangePointerControl,
-    (void *) &SProcChangeProperty,
-    (void *) &SProcChangeWindowAttributes,
-    (void *) &SProcClearToBackground,
-    (void *) &SProcConfigureWindow,
-    (void *) &SProcConvertSelection,
-    (void *) &SProcCopyArea,
-    (void *) &SProcCopyColormapAndFree,
-    (void *) &SProcCopyGC,
-    (void *) &SProcCopyPlane,
-    (void *) &SProcCreateColormap,
-    (void *) &SProcCreateCursor,
-    (void *) &SProcCreateGC,
-    (void *) &SProcCreateGlyphCursor,
-    (void *) &SProcCreatePixmap,
-    (void *) &SProcCreateWindow,
-    (void *) &SProcDeleteProperty,
-    (void *) &SProcFillPoly,
-    (void *) &SProcFreeColors,
-    (void *) &SProcGetImage,
-    (void *) &SProcGetMotionEvents,
-    (void *) &SProcGetProperty,
-    (void *) &SProcGrabButton,
-    (void *) &SProcGrabKey,
-    (void *) &SProcGrabKeyboard,
-    (void *) &SProcGrabPointer,
-    (void *) &SProcImageText,
-    (void *) &SProcInternAtom,
-    (void *) &SProcListFonts,
-    (void *) &SProcListFontsWithInfo,
-    (void *) &SProcLookupColor,
-    (void *) &SProcNoOperation,
-    (void *) &SProcOpenFont,
-    (void *) &SProcPoly,
-    (void *) &SProcPolyText,
-    (void *) &SProcPutImage,
-    (void *) &SProcQueryBestSize,
-    (void *) &SProcQueryColors,
-    (void *) &SProcQueryExtension,
-    (void *) &SProcRecolorCursor,
-    (void *) &SProcReparentWindow,
-    (void *) &SProcResourceReq,
-    (void *) &SProcRotateProperties,
-    (void *) &SProcSendEvent,
-    (void *) &SProcSetClipRectangles,
-    (void *) &SProcSetDashes,
-    (void *) &SProcSetFontPath,
-    (void *) &SProcSetInputFocus,
-    (void *) &SProcSetScreenSaver,
-    (void *) &SProcSetSelectionOwner,
-    (void *) &SProcSimpleReq,
-    (void *) &SProcStoreColors,
-    (void *) &SProcStoreNamedColor,
-    (void *) &SProcTranslateCoords,
-    (void *) &SProcUngrabButton,
-    (void *) &SProcUngrabKey,
-    (void *) &SProcWarpPointer,
-    (void *) &XaceHooks,
-    (void *) &XaceHook,
-    (void *) &XaceHookDispatch,
-    (void *) &XaceHookPropertyAccess,
-    (void *) &XaceHookSelectionAccess,
-    (void *) &XaceHookAuditEnd,
-    (void *) &XaceGetConnectionNumber,
-    (void *) &XaceIsLocal,
-    (void *) &XaceCensorImage,
-    (void *) &XkbIndentText,
-    (void *) &XkbAtomText,
-    (void *) &XkbKeysymText,
-    (void *) &XkbStringText,
-    (void *) &XkbKeyNameText,
-    (void *) &XkbModIndexText,
-    (void *) &XkbModMaskText,
-    (void *) &XkbVModIndexText,
-    (void *) &XkbVModMaskText,
-    (void *) &XkbConfigText,
-    (void *) &XkbSIMatchText,
-    (void *) &XkbIMWhichStateMaskText,
-    (void *) &XkbControlsMaskText,
-    (void *) &XkbGeomFPText,
-    (void *) &XkbDoodadTypeText,
-    (void *) &XkbActionTypeText,
-    (void *) &XkbActionText,
-    (void *) &XkbBehaviorText,
-    (void *) &_XkbKSCheckCase,
-    (void *) &XkbFindKeycodeByName,
-    (void *) &XkbInternAtom,
-    (void *) &XkbConvertGetByNameComponents,
-    (void *) &XkbNameMatchesPattern,
-    (void *) &XkbWriteXKBKeycodes,
-    (void *) &XkbWriteXKBKeyTypes,
-    (void *) &XkbWriteXKBCompatMap,
-    (void *) &XkbWriteXKBSymbols,
-    (void *) &XkbWriteXKBGeometry,
-    (void *) &XkbWriteXKBKeymapForNames,
-    (void *) &XkmProbe,
-    (void *) &XkmReadFile,
-    (void *) &xkbDevicePrivateKey,
-    (void *) &xkbUnwrapProc,
-    (void *) &XkbReqCode,
-    (void *) &XkbEventBase,
-    (void *) &XkbKeyboardErrorCode,
-    (void *) &XkbBaseDirectory,
-    (void *) &XkbBinDirectory,
-    (void *) &xkbDebugFlags,
-    (void *) &DeviceKeyPress,
-    (void *) &DeviceButtonPress,
-    (void *) &XkbUseMsg,
-    (void *) &XkbProcessArguments,
-    (void *) &XkbSetExtension,
-    (void *) &SrvXkbFreeCompatMap,
-    (void *) &SrvXkbFreeNames,
-    (void *) &_XkbLookupAnyDevice,
-    (void *) &_XkbLookupKeyboard,
-    (void *) &_XkbLookupBellDevice,
-    (void *) &_XkbLookupLedDevice,
-    (void *) &_XkbLookupButtonDevice,
-    (void *) &SrvXkbAllocKeyboard,
-    (void *) &SrvXkbAllocClientMap,
-    (void *) &SrvXkbAllocServerMap,
-    (void *) &SrvXkbFreeClientMap,
-    (void *) &SrvXkbFreeServerMap,
-    (void *) &SrvXkbAllocIndicatorMaps,
-    (void *) &SrvXkbAllocCompatMap,
-    (void *) &SrvXkbAllocNames,
-    (void *) &SrvXkbAllocControls,
-    (void *) &SrvXkbCopyKeyTypes,
-    (void *) &SrvXkbResizeKeyType,
-    (void *) &SrvXkbFreeKeyboard,
-    (void *) &XkbSetActionKeyMods,
-    (void *) &XkbMaskForVMask,
-    (void *) &SrvXkbVirtualModsToReal,
-    (void *) &XkbAdjustGroup,
-    (void *) &SrvXkbResizeKeySyms,
-    (void *) &SrvXkbResizeKeyActions,
-    (void *) &XkbUpdateKeyTypesFromCore,
-    (void *) &XkbUpdateDescActions,
-    (void *) &XkbUpdateActions,
-    (void *) &XkbGetCoreMap,
-    (void *) &XkbApplyMappingChange,
-    (void *) &XkbSetIndicators,
-    (void *) &XkbUpdateIndicators,
-    (void *) &XkbAllocSrvLedInfo,
-    (void *) &XkbCopySrvLedInfo,
-    (void *) &XkbFindSrvLedInfo,
-    (void *) &XkbApplyLedNameChanges,
-    (void *) &XkbApplyLedMapChanges,
-    (void *) &XkbApplyLedStateChanges,
-    (void *) &XkbFlushLedEvents,
-    (void *) &XkbIndicatorsToUpdate,
-    (void *) &XkbComputeDerivedState,
-    (void *) &XkbCheckSecondaryEffects,
-    (void *) &XkbCheckIndicatorMaps,
-    (void *) &XkbStateChangedFlags,
-    (void *) &XkbSendStateNotify,
-    (void *) &XkbSendMapNotify,
-    (void *) &XkbComputeControlsNotify,
-    (void *) &XkbSendControlsNotify,
-    (void *) &XkbSendCompatMapNotify,
-    (void *) &XkbHandleBell,
-    (void *) &XkbSendAccessXNotify,
-    (void *) &XkbSendNamesNotify,
-    (void *) &XkbSendActionMessage,
-    (void *) &XkbSendExtensionDeviceNotify,
-    (void *) &XkbSendNotification,
-    (void *) &XkbProcessKeyboardEvent,
-    (void *) &XkbHandleActions,
-    (void *) &XkbEnableDisableControls,
-    (void *) &AccessXInit,
-    (void *) &AccessXFilterPressEvent,
-    (void *) &AccessXFilterReleaseEvent,
-    (void *) &AccessXCancelRepeatKey,
-    (void *) &AccessXComputeCurveFactor,
-    (void *) &XkbFindClientResource,
-    (void *) &XkbAddClientResource,
-    (void *) &XkbRemoveResourceClient,
-    (void *) &XkbDDXAccessXBeep,
-    (void *) &XkbDDXUsesSoftRepeat,
-    (void *) &XkbDDXKeybdCtrlProc,
-    (void *) &XkbDDXChangeControls,
-    (void *) &XkbDDXUpdateDeviceIndicators,
-    (void *) &XkbDDXFakePointerMotion,
-    (void *) &XkbDDXFakeDeviceButton,
-    (void *) &XkbDDXTerminateServer,
-    (void *) &XkbDDXSwitchScreen,
-    (void *) &XkbDDXPrivate,
-    (void *) &XkbDisableComputedAutoRepeats,
-    (void *) &XkbSetRepeatKeys,
-    (void *) &SrvXkbLatchModifiers,
-    (void *) &SrvXkbLatchGroup,
-    (void *) &XkbClearAllLatchesAndLocks,
-    (void *) &XkbGetRulesDflts,
-    (void *) &XkbFreeRMLVOSet,
-    (void *) &XkbSetRulesDflts,
-    (void *) &XkbDeleteRulesDflts,
-    (void *) &SProcXkbDispatch,
-    (void *) &XkbLookupNamedGeometry,
-    (void *) &_XkbDupString,
-    (void *) &XkbConvertCase,
-    (void *) &SrvXkbChangeKeycodeRange,
-    (void *) &XkbFreeSrvLedInfo,
-    (void *) &XkbFreeInfo,
-    (void *) &SrvXkbChangeTypesOfKey,
-    (void *) &SrvXkbKeyTypesForCoreSymbols,
-    (void *) &SrvXkbApplyCompatMapToKey,
-    (void *) &SrvXkbApplyVirtualModChanges,
-    (void *) &XkbSendNewKeyboardNotify,
-    (void *) &XkbCopyKeymap,
-    (void *) &XkbCopyDeviceKeymap,
-    (void *) &XkbFilterEvents,
-    (void *) &XkbGetEffectiveGroup,
-    (void *) &XkbDDXList,
-    (void *) &XkbDDXLoadKeymapByNames,
-    (void *) &XkbDDXNamesFromRules,
-    (void *) &XkbCompileKeymap,
-};
diff --git a/xorg-server/hw/xfree86/os-support/xorgos.c b/xorg-server/hw/xfree86/os-support/xorgos.c
deleted file mode 100644
index e69de29bb..000000000
diff --git a/xorg-server/hw/xfree86/ramdac/xf86BitOrder.c b/xorg-server/hw/xfree86/ramdac/xf86BitOrder.c
deleted file mode 100644
index 713934d3b..000000000
--- a/xorg-server/hw/xfree86/ramdac/xf86BitOrder.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define XAAReverseBitOrder xf86ReverseBitOrder
-#include "./../xaa/xaaBitOrder.c"
diff --git a/xorg-server/hw/xfree86/xaa/l-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/l-xaaBitmap.c
deleted file mode 100644
index 4b20dee13..000000000
--- a/xorg-server/hw/xfree86/xaa/l-xaaBitmap.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LSBFIRST
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/l-xaaStipple.c b/xorg-server/hw/xfree86/xaa/l-xaaStipple.c
deleted file mode 100644
index 91c52c778..000000000
--- a/xorg-server/hw/xfree86/xaa/l-xaaStipple.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LSBFIRST
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/l-xaaTEGlyph.c b/xorg-server/hw/xfree86/xaa/l-xaaTEGlyph.c
deleted file mode 100644
index e58359cd2..000000000
--- a/xorg-server/hw/xfree86/xaa/l-xaaTEGlyph.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LSBFIRST
-#include "./xaaTEGlyph.c"
diff --git a/xorg-server/hw/xfree86/xaa/l3-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/l3-xaaBitmap.c
deleted file mode 100644
index 0c1fd552d..000000000
--- a/xorg-server/hw/xfree86/xaa/l3-xaaBitmap.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define LSBFIRST
-#define TRIPLE_BITS
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/l3-xaaStipple.c b/xorg-server/hw/xfree86/xaa/l3-xaaStipple.c
deleted file mode 100644
index 9a182c695..000000000
--- a/xorg-server/hw/xfree86/xaa/l3-xaaStipple.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define LSBFIRST
-#define TRIPLE_BITS
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/lf-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/lf-xaaBitmap.c
deleted file mode 100644
index 031407b9c..000000000
--- a/xorg-server/hw/xfree86/xaa/lf-xaaBitmap.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define LSBFIRST
-#define FIXEDBASE
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/lf-xaaStipple.c b/xorg-server/hw/xfree86/xaa/lf-xaaStipple.c
deleted file mode 100644
index d91265890..000000000
--- a/xorg-server/hw/xfree86/xaa/lf-xaaStipple.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define LSBFIRST
-#define FIXEDBASE
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/lf-xaaTEGlyph.c b/xorg-server/hw/xfree86/xaa/lf-xaaTEGlyph.c
deleted file mode 100644
index c578603f3..000000000
--- a/xorg-server/hw/xfree86/xaa/lf-xaaTEGlyph.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define LSBFIRST
-#define FIXEDBASE
-#include "./xaaTEGlyph.c"
diff --git a/xorg-server/hw/xfree86/xaa/lf3-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/lf3-xaaBitmap.c
deleted file mode 100644
index 0607a7390..000000000
--- a/xorg-server/hw/xfree86/xaa/lf3-xaaBitmap.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define LSBFIRST
-#define TRIPLE_BITS
-#define FIXEDBASE
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/lf3-xaaStipple.c b/xorg-server/hw/xfree86/xaa/lf3-xaaStipple.c
deleted file mode 100644
index af1698b99..000000000
--- a/xorg-server/hw/xfree86/xaa/lf3-xaaStipple.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define LSBFIRST
-#define TRIPLE_BITS
-#define FIXEDBASE
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/m-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/m-xaaBitmap.c
deleted file mode 100644
index d0e3cb33d..000000000
--- a/xorg-server/hw/xfree86/xaa/m-xaaBitmap.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MSBFIRST
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/m-xaaStipple.c b/xorg-server/hw/xfree86/xaa/m-xaaStipple.c
deleted file mode 100644
index 1ba789918..000000000
--- a/xorg-server/hw/xfree86/xaa/m-xaaStipple.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MSBFIRST
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/m-xaaTEGlyph.c b/xorg-server/hw/xfree86/xaa/m-xaaTEGlyph.c
deleted file mode 100644
index 521390c32..000000000
--- a/xorg-server/hw/xfree86/xaa/m-xaaTEGlyph.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MSBFIRST
-#include "./xaaTEGlyph.c"
diff --git a/xorg-server/hw/xfree86/xaa/m3-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/m3-xaaBitmap.c
deleted file mode 100644
index 7b4ce814d..000000000
--- a/xorg-server/hw/xfree86/xaa/m3-xaaBitmap.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define MSBFIRST
-#define TRIPLE_BITS
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/m3-xaaStipple.c b/xorg-server/hw/xfree86/xaa/m3-xaaStipple.c
deleted file mode 100644
index eb2c83e8d..000000000
--- a/xorg-server/hw/xfree86/xaa/m3-xaaStipple.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define MSBFIRST
-#define TRIPLE_BITS
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/mf-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/mf-xaaBitmap.c
deleted file mode 100644
index 36075e65d..000000000
--- a/xorg-server/hw/xfree86/xaa/mf-xaaBitmap.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define MSBFIRST
-#define FIXEDBASE
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/mf-xaaStipple.c b/xorg-server/hw/xfree86/xaa/mf-xaaStipple.c
deleted file mode 100644
index 41b469c71..000000000
--- a/xorg-server/hw/xfree86/xaa/mf-xaaStipple.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define MSBFIRST
-#define FIXEDBASE
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/mf-xaaTEGlyph.c b/xorg-server/hw/xfree86/xaa/mf-xaaTEGlyph.c
deleted file mode 100644
index 3fd657b4b..000000000
--- a/xorg-server/hw/xfree86/xaa/mf-xaaTEGlyph.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define MSBFIRST
-#define FIXEDBASE
-#include "./xaaTEGlyph.c"
diff --git a/xorg-server/hw/xfree86/xaa/mf3-xaaBitmap.c b/xorg-server/hw/xfree86/xaa/mf3-xaaBitmap.c
deleted file mode 100644
index 630775c52..000000000
--- a/xorg-server/hw/xfree86/xaa/mf3-xaaBitmap.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define MSBFIRST
-#define TRIPLE_BITS
-#define FIXEDBASE
-#include "./xaaBitmap.c"
diff --git a/xorg-server/hw/xfree86/xaa/mf3-xaaStipple.c b/xorg-server/hw/xfree86/xaa/mf3-xaaStipple.c
deleted file mode 100644
index c9a86d008..000000000
--- a/xorg-server/hw/xfree86/xaa/mf3-xaaStipple.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define MSBFIRST
-#define TRIPLE_BITS
-#define FIXEDBASE
-#include "./xaaStipple.c"
diff --git a/xorg-server/hw/xfree86/xaa/s-xaaDashLine.c b/xorg-server/hw/xfree86/xaa/s-xaaDashLine.c
deleted file mode 100644
index 5ad3deb92..000000000
--- a/xorg-server/hw/xfree86/xaa/s-xaaDashLine.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define POLYSEGMENT
-#include "./xaaDashLine.c"
diff --git a/xorg-server/hw/xfree86/xaa/s-xaaLine.c b/xorg-server/hw/xfree86/xaa/s-xaaLine.c
deleted file mode 100644
index 12a37f419..000000000
--- a/xorg-server/hw/xfree86/xaa/s-xaaLine.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define POLYSEGMENT
-#include "./xaaLine.c"
diff --git a/xorg-server/hw/xfree86/xorg.c b/xorg-server/hw/xfree86/xorg.c
deleted file mode 100644
index e69de29bb..000000000
diff --git a/xorg-server/hw/xwin/winprefslex.c b/xorg-server/hw/xwin/winprefslex.c
deleted file mode 100644
index c55bd8310..000000000
--- a/xorg-server/hw/xwin/winprefslex.c
+++ /dev/null
@@ -1,2191 +0,0 @@
-
-#line 3 "winprefslex.c"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin  )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-extern int yyleng;
-
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
-     *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE yylex. 
-     *       One obvious solution it to make yy_act a global. I tried that, and saw
-     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
-     *       normally declared as a register variable-- so it is not worth it.
-     */
-    #define  YY_LESS_LINENO(n) \
-            do { \
-                int yyl;\
-                for ( yyl = n; yyl < yyleng; ++yyl )\
-                    if ( yytext[yyl] == '\n' )\
-                        --yylineno;\
-            }while(0)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		*yy_cp = (yy_hold_char); \
-		YY_RESTORE_YY_MORE_OFFSET \
-		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr)  )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-
-	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
-                          : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart (FILE *input_file  );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
-void yy_delete_buffer (YY_BUFFER_STATE b  );
-void yy_flush_buffer (YY_BUFFER_STATE b  );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
-
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
-
-void *yyalloc (yy_size_t  );
-void *yyrealloc (void *,yy_size_t  );
-void yyfree (void *  );
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
-		YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
-	} \
-	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-typedef unsigned char YY_CHAR;
-
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int yylineno;
-
-int yylineno = 1;
-
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[]  );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	(yytext_ptr) = yy_bp; \
-	yyleng = (size_t) (yy_cp - yy_bp); \
-	(yy_hold_char) = *yy_cp; \
-	*yy_cp = '\0'; \
-	(yy_c_buf_p) = yy_cp;
-
-#define YY_NUM_RULES 33
-#define YY_END_OF_BUFFER 34
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-	{
-	flex_int32_t yy_verify;
-	flex_int32_t yy_nxt;
-	};
-static yyconst flex_int16_t yy_accept[186] =
-    {   0,
-        0,    0,   34,   32,    4,    3,   32,   32,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       29,   30,   32,    4,   32,    0,   32,    0,    1,    1,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       31,   31,   32,    0,    2,    2,   32,   32,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       32,   32,   32,   32,   23,   32,   32,    5,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-
-       32,   22,   32,   32,   25,   32,   32,    8,   32,   32,
-       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
-       32,   32,   32,   13,   32,   32,   32,   32,   32,   32,
-       32,   26,   32,   32,   32,    9,   32,   32,   32,   32,
-       21,   32,   32,   32,   32,   16,   14,   15,   32,   32,
-       32,   19,   10,   32,   32,   32,   32,   32,   11,   12,
-       17,   32,   32,   27,   32,   32,   32,   32,   20,   32,
-       32,   32,   32,   32,   28,   24,    7,   32,   32,   32,
-       32,   32,    6,   18,    0
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    5,    6,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    7,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    8,    9,   10,   11,   12,   13,
-       14,    1,   15,    1,    1,   16,   17,   18,   19,   20,
-        1,   21,   22,   23,   24,    1,   25,   26,   27,   28,
-        1,    1,    1,    1,    1,    1,   29,   30,   31,   32,
-
-       33,   34,   35,    1,   36,    1,    1,   37,   38,   39,
-       40,   41,    1,   42,   43,   44,   45,    1,   46,   47,
-       48,   49,   50,    1,   51,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[52] =
-    {   0,
-        1,    2,    3,    3,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1
-    } ;
-
-static yyconst flex_int16_t yy_base[193] =
-    {   0,
-        0,    0,  373,    0,  370,  403,   50,   54,  363,   37,
-       35,   47,   35,   52,   55,   45,   41,   54,   83,   50,
-        0,    0,    0,  367,   74,  362,   97,   74,  403,   93,
-      100,   43,   93,   49,   98,   96,   90,   86,   95,   96,
-      124,   94,  102,  101,  101,  106,   96,  102,  105,  132,
-        0,  403,  146,  148,  403,  150,  147,  138,  134,  136,
-      136,  154,  153,  146,  150,  142,  152,  148,  155,  155,
-      153,  150,  166,  163,  163,  165,  172,  170,  171,  188,
-      193,  183,  190,  181,    0,  195,  190,    0,  191,  201,
-      188,  197,  205,  197,  194,  198,  209,  212,  212,  224,
-
-      218,    0,  220,  226,    0,  228,  231,    0,  232,  233,
-      232,  234,  233,  242,  242,  247,  233,  235,  240,  237,
-      253,  247,  250,    0,  258,  261,  255,  257,  274,  276,
-      277,    0,  272,  268,  280,    0,  269,  272,  277,  279,
-        0,  283,  287,  288,  289,    0,    0,    0,  284,  296,
-      297,    0,    0,  306,  302,  317,  301,  320,    0,    0,
-        0,  310,  317,    0,  314,  315,  313,  314,    0,  315,
-      319,  322,  324,  323,    0,    0,    0,  331,  326,  332,
-      330,  341,    0,    0,  403,  365,  386,  388,  391,  393,
-      396,  399
-
-    } ;
-
-static yyconst flex_int16_t yy_def[193] =
-    {   0,
-      185,    1,  185,  186,  185,  185,  187,  188,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  185,  187,  189,  188,  190,  185,  190,
-      191,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  185,  191,  192,  185,  192,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,    0,  185,  185,  185,  185,  185,
-      185,  185
-
-    } ;
-
-static yyconst flex_int16_t yy_nxt[455] =
-    {   0,
-        4,    5,    6,    6,    7,    8,    9,   10,   11,    4,
-       12,   13,    4,    4,   14,    4,   15,   16,   17,    4,
-       18,   19,   20,    4,    4,    4,    4,    4,   10,   11,
-        4,   12,   13,    4,    4,   14,    4,   15,   16,   17,
-        4,   18,   19,   20,    4,    4,    4,    4,    4,   21,
-       22,   26,   32,   34,   23,   28,   29,   30,   35,   33,
-       36,   37,   38,   41,   42,   43,   39,   57,   49,   40,
-       50,   60,   44,   32,   34,   26,   29,   30,   51,   35,
-       33,   36,   37,   38,   41,   42,   43,   39,   57,   49,
-       40,   50,   60,   44,   45,   29,   30,   46,   28,   29,
-
-       30,   54,   55,   56,   58,   47,   61,   63,   64,   48,
-       62,   65,   66,   67,   59,   45,   70,   71,   46,   72,
-       73,   74,   75,   76,   77,   58,   47,   61,   63,   64,
-       48,   62,   65,   66,   67,   59,   68,   70,   71,   78,
-       72,   73,   74,   75,   76,   77,   69,   54,   55,   56,
-       55,   56,   55,   56,   79,   80,   81,   68,   82,   83,
-       78,   84,   85,   86,   87,   88,   89,   69,   90,   91,
-       92,   93,   94,   95,   96,   79,   80,   81,   97,   82,
-       83,   98,   84,   85,   86,   87,   88,   89,   99,   90,
-       91,   92,   93,   94,   95,   96,  100,  101,  102,   97,
-
-      103,  104,   98,  105,  106,  107,  109,  110,  111,   99,
-      112,  113,  114,  115,  116,  117,  108,  100,  101,  102,
-      118,  103,  104,  119,  105,  106,  107,  109,  110,  111,
-      120,  112,  113,  114,  115,  116,  117,  108,  121,  122,
-      123,  118,  124,  125,  119,  126,  127,  128,  129,  130,
-      131,  120,  132,  133,  134,  135,  136,  137,  138,  121,
-      122,  123,  139,  124,  125,  140,  126,  127,  128,  129,
-      130,  131,  141,  132,  133,  134,  135,  136,  137,  138,
-      142,  143,  144,  139,  145,  146,  140,  147,  148,  149,
-      150,  151,  152,  141,  153,  154,  155,  156,  158,  159,
-
-      160,  142,  143,  144,  157,  145,  146,  161,  147,  148,
-      149,  150,  151,  152,  162,  153,  154,  155,  156,  158,
-      159,  160,  163,  164,  165,  157,  166,  167,  161,  168,
-      169,  170,  171,  172,  173,  162,  174,  175,  176,  177,
-      178,  179,  180,  163,  164,  165,  181,  166,  167,  182,
-      168,  169,  170,  171,  172,  173,  183,  174,  175,  176,
-      177,  178,  179,  180,  184,   23,   52,  181,   24,   31,
-      182,   24,  185,  185,  185,  185,  185,  183,  185,  185,
-      185,  185,  185,  185,  185,  184,   25,   25,   27,   27,
-       27,   26,   26,   28,   28,   28,   53,   53,   53,   54,
-
-       54,   54,    3,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185
-    } ;
-
-static yyconst flex_int16_t yy_chk[455] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    7,   10,   11,    7,    8,    8,    8,   12,   10,
-       13,   14,   15,   16,   17,   18,   15,   32,   20,   15,
-       20,   34,   18,   10,   11,   25,   28,   28,   25,   12,
-       10,   13,   14,   15,   16,   17,   18,   15,   32,   20,
-       15,   20,   34,   18,   19,   30,   30,   19,   27,   27,
-
-       27,   31,   31,   31,   33,   19,   35,   36,   37,   19,
-       35,   38,   39,   40,   33,   19,   42,   43,   19,   44,
-       45,   46,   47,   48,   49,   33,   19,   35,   36,   37,
-       19,   35,   38,   39,   40,   33,   41,   42,   43,   50,
-       44,   45,   46,   47,   48,   49,   41,   53,   53,   53,
-       54,   54,   56,   56,   57,   58,   59,   41,   60,   61,
-       50,   62,   63,   64,   65,   66,   67,   41,   68,   69,
-       70,   71,   72,   73,   74,   57,   58,   59,   75,   60,
-       61,   76,   62,   63,   64,   65,   66,   67,   77,   68,
-       69,   70,   71,   72,   73,   74,   78,   79,   80,   75,
-
-       81,   82,   76,   83,   84,   86,   87,   89,   90,   77,
-       91,   92,   93,   94,   95,   96,   86,   78,   79,   80,
-       97,   81,   82,   98,   83,   84,   86,   87,   89,   90,
-       99,   91,   92,   93,   94,   95,   96,   86,  100,  101,
-      103,   97,  104,  106,   98,  107,  109,  110,  111,  112,
-      113,   99,  114,  115,  116,  117,  118,  119,  120,  100,
-      101,  103,  121,  104,  106,  122,  107,  109,  110,  111,
-      112,  113,  123,  114,  115,  116,  117,  118,  119,  120,
-      125,  126,  127,  121,  128,  129,  122,  130,  131,  133,
-      134,  135,  137,  123,  138,  139,  140,  142,  143,  144,
-
-      145,  125,  126,  127,  142,  128,  129,  149,  130,  131,
-      133,  134,  135,  137,  150,  138,  139,  140,  142,  143,
-      144,  145,  151,  154,  155,  142,  156,  157,  149,  158,
-      162,  163,  165,  166,  167,  150,  168,  170,  171,  172,
-      173,  174,  178,  151,  154,  155,  179,  156,  157,  180,
-      158,  162,  163,  165,  166,  167,  181,  168,  170,  171,
-      172,  173,  174,  178,  182,  186,   26,  179,   24,    9,
-      180,    5,    3,    0,    0,    0,    0,  181,    0,    0,
-        0,    0,    0,    0,    0,  182,  187,  187,  188,  188,
-      188,  189,  189,  190,  190,  190,  191,  191,  191,  192,
-
-      192,  192,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185
-    } ;
-
-/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[34] =
-    {   0,
-1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     };
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "winprefslex.l"
-#line 2 "winprefslex.l"
-/*
- * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- * Copyright (C) Colin Harrison 2005-2008
- *
- * 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.
- *
- * Authors:     Earle F. Philhower, III
- *              Colin Harrison
- */
-/* $XFree86: $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "winprefsyacc.h"
-
-extern YYSTYPE yylval;
-extern char *yytext;
-extern int yyparse(void);
-
-extern void ErrorF (const char* /*f*/, ...);
-
-int yylineno;
-
-/* Copy the parsed string, must be free()d in yacc parser */
-static char *makestr(char *str)
-{
-  char *ptr;
-  ptr = (char*)malloc (strlen(str)+1);
-  if (!ptr)
-    {
-      ErrorF ("winMultiWindowLex:makestr() out of memory\n");
-      exit (-1);
-    }
-  strcpy(ptr, str);
-  return ptr;
-}
-
-#line 702 "winprefslex.c"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals (void );
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int yylex_destroy (void );
-
-int yyget_debug (void );
-
-void yyset_debug (int debug_flag  );
-
-YY_EXTRA_TYPE yyget_extra (void );
-
-void yyset_extra (YY_EXTRA_TYPE user_defined  );
-
-FILE *yyget_in (void );
-
-void yyset_in  (FILE * in_str  );
-
-FILE *yyget_out (void );
-
-void yyset_out  (FILE * out_str  );
-
-int yyget_leng (void );
-
-char *yyget_text (void );
-
-int yyget_lineno (void );
-
-void yyset_lineno (int line_number  );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap (void );
-#else
-extern int yywrap (void );
-#endif
-#endif
-
-    static void yyunput (int c,char *buf_ptr  );
-    
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (void );
-#else
-static int input (void );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-		{ \
-		int c = '*'; \
-		size_t n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else \
-		{ \
-		errno=0; \
-		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
-			{ \
-			if( errno != EINTR) \
-				{ \
-				YY_FATAL_ERROR( "input in flex scanner failed" ); \
-				break; \
-				} \
-			errno=0; \
-			clearerr(yyin); \
-			} \
-		}\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-    
-#line 66 "winprefslex.l"
-
-#line 891 "winprefslex.c"
-
-	if ( !(yy_init) )
-		{
-		(yy_init) = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			yyensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				yy_create_buffer(yyin,YY_BUF_SIZE );
-		}
-
-		yy_load_buffer_state( );
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = (yy_c_buf_p);
-
-		/* Support of yytext. */
-		*yy_cp = (yy_hold_char);
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = (yy_start);
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				(yy_last_accepting_state) = yy_current_state;
-				(yy_last_accepting_cpos) = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 186 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 403 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
-			{
-			int yyl;
-			for ( yyl = 0; yyl < yyleng; ++yyl )
-				if ( yytext[yyl] == '\n' )
-					   
-    yylineno++;
-;
-			}
-
-do_action:	/* This label is used only to access EOF actions. */
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = (yy_hold_char);
-			yy_cp = (yy_last_accepting_cpos);
-			yy_current_state = (yy_last_accepting_state);
-			goto yy_find_action;
-
-case 1:
-/* rule 1 can match eol */
-YY_RULE_SETUP
-#line 67 "winprefslex.l"
-{ /* comment */ return NEWLINE; }
-	YY_BREAK
-case 2:
-/* rule 2 can match eol */
-YY_RULE_SETUP
-#line 68 "winprefslex.l"
-{ /* comment */ return NEWLINE; }
-	YY_BREAK
-case 3:
-/* rule 3 can match eol */
-YY_RULE_SETUP
-#line 69 "winprefslex.l"
-{ return NEWLINE; }
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 70 "winprefslex.l"
-{ /* ignore whitespace */ }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 71 "winprefslex.l"
-{ return MENU; }
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 72 "winprefslex.l"
-{ return ICONDIRECTORY; }
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 73 "winprefslex.l"
-{ return DEFAULTICON; }
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 74 "winprefslex.l"
-{ return ICONS; }
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 75 "winprefslex.l"
-{ return STYLES; }
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 76 "winprefslex.l"
-{ return TOPMOST; }
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 77 "winprefslex.l"
-{ return MAXIMIZE; }
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 78 "winprefslex.l"
-{ return MINIMIZE; }
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 79 "winprefslex.l"
-{ return BOTTOM; }
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 80 "winprefslex.l"
-{ return NOTITLE; }
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 81 "winprefslex.l"
-{ return OUTLINE; }
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 82 "winprefslex.l"
-{ return NOFRAME; }
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 83 "winprefslex.l"
-{ return ROOTMENU; }
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 84 "winprefslex.l"
-{ return DEFAULTSYSMENU; }
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 85 "winprefslex.l"
-{ return SYSMENU; }
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 86 "winprefslex.l"
-{ return SEPARATOR; }
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 87 "winprefslex.l"
-{ return ATSTART; }
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 88 "winprefslex.l"
-{ return ATEND; }
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 89 "winprefslex.l"
-{ return EXEC; }
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 90 "winprefslex.l"
-{ return ALWAYSONTOP; }
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 91 "winprefslex.l"
-{ return DEBUG; }
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 92 "winprefslex.l"
-{ return RELOAD; }
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 93 "winprefslex.l"
-{ return TRAYICON; }
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 94 "winprefslex.l"
-{ return SILENTEXIT; }
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 95 "winprefslex.l"
-{ return LB; }
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 96 "winprefslex.l"
-{ return RB; }
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 97 "winprefslex.l"
-{ yylval.sVal = makestr(yytext+1); \
-                          yylval.sVal[strlen(yylval.sVal)-1] = 0; \
-                          return STRING; }
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 100 "winprefslex.l"
-{ yylval.sVal = makestr(yytext); \
-                          return STRING; }
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 102 "winprefslex.l"
-ECHO;
-	YY_BREAK
-#line 1155 "winprefslex.c"
-case YY_STATE_EOF(INITIAL):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = (yy_hold_char);
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between YY_CURRENT_BUFFER and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state(  );
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++(yy_c_buf_p);
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = (yy_c_buf_p);
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer(  ) )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				(yy_did_buffer_switch_on_eof) = 0;
-
-				if ( yywrap( ) )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				(yy_c_buf_p) =
-					(yytext_ptr) + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				(yy_c_buf_p) =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
-				yy_current_state = yy_get_previous_state(  );
-
-				yy_cp = (yy_c_buf_p);
-				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-} /* end of yylex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (void)
-{
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
-	else
-		{
-			int num_to_read =
-			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
-			int yy_c_buf_p_offset =
-				(int) ((yy_c_buf_p) - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
-						number_to_move - 1;
-
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-			(yy_n_chars), (size_t) num_to_read );
-
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	if ( (yy_n_chars) == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart(yyin  );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
-		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-	}
-
-	(yy_n_chars) += number_to_move;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
-	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-	return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (void)
-{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-    
-	yy_current_state = (yy_start);
-
-	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			(yy_last_accepting_state) = yy_current_state;
-			(yy_last_accepting_cpos) = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 186 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-{
-	register int yy_is_jam;
-    	register char *yy_cp = (yy_c_buf_p);
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		(yy_last_accepting_state) = yy_current_state;
-		(yy_last_accepting_cpos) = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 186 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 185);
-
-	return yy_is_jam ? 0 : yy_current_state;
-}
-
-    static void yyunput (int c, register char * yy_bp )
-{
-	register char *yy_cp;
-    
-    yy_cp = (yy_c_buf_p);
-
-	/* undo effects of setting up yytext */
-	*yy_cp = (yy_hold_char);
-
-	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = (yy_n_chars) + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		register char *source =
-				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
-		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
-		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-    if ( c == '\n' ){
-        --yylineno;
-    }
-
-	(yytext_ptr) = yy_bp;
-	(yy_hold_char) = *yy_cp;
-	(yy_c_buf_p) = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (void)
-#else
-    static int input  (void)
-#endif
-
-{
-	int c;
-    
-	*(yy_c_buf_p) = (yy_hold_char);
-
-	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-			/* This was really a NUL. */
-			*(yy_c_buf_p) = '\0';
-
-		else
-			{ /* need more input */
-			int offset = (yy_c_buf_p) - (yytext_ptr);
-			++(yy_c_buf_p);
-
-			switch ( yy_get_next_buffer(  ) )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart(yyin );
-
-					/*FALLTHROUGH*/
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap( ) )
-						return EOF;
-
-					if ( ! (yy_did_buffer_switch_on_eof) )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					(yy_c_buf_p) = (yytext_ptr) + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
-	*(yy_c_buf_p) = '\0';	/* preserve yytext */
-	(yy_hold_char) = *++(yy_c_buf_p);
-
-	if ( c == '\n' )
-		   
-    yylineno++;
-;
-
-	return c;
-}
-#endif	/* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void yyrestart  (FILE * input_file )
-{
-    
-	if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
-		YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer(yyin,YY_BUF_SIZE );
-	}
-
-	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
-	yy_load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-	/* TODO. We should be able to replace this entire function body
-	 * with
-	 *		yypop_buffer_state();
-	 *		yypush_buffer_state(new_buffer);
-     */
-	yyensure_buffer_stack ();
-	if ( YY_CURRENT_BUFFER == new_buffer )
-		return;
-
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-	yy_load_buffer_state( );
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void yy_load_buffer_state  (void)
-{
-    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-	(yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
-{
-	YY_BUFFER_STATE b;
-    
-	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer(b,file );
-
-	return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- * 
- */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
-{
-    
-	if ( ! b )
-		return;
-
-	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yyfree((void *) b->yy_ch_buf  );
-
-	yyfree((void *) b  );
-}
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
- */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
-
-{
-	int oerrno = errno;
-    
-	yy_flush_buffer(b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-    
-	errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
- */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
-{
-    	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == YY_CURRENT_BUFFER )
-		yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-    	if (new_buffer == NULL)
-		return;
-
-	yyensure_buffer_stack();
-
-	/* This block is copied from yy_switch_to_buffer. */
-	if ( YY_CURRENT_BUFFER )
-		{
-		/* Flush out information for old buffer. */
-		*(yy_c_buf_p) = (yy_hold_char);
-		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-		}
-
-	/* Only push if top exists. Otherwise, replace top. */
-	if (YY_CURRENT_BUFFER)
-		(yy_buffer_stack_top)++;
-	YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-	/* copied from yy_switch_to_buffer. */
-	yy_load_buffer_state( );
-	(yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void yypop_buffer_state (void)
-{
-    	if (!YY_CURRENT_BUFFER)
-		return;
-
-	yy_delete_buffer(YY_CURRENT_BUFFER );
-	YY_CURRENT_BUFFER_LVALUE = NULL;
-	if ((yy_buffer_stack_top) > 0)
-		--(yy_buffer_stack_top);
-
-	if (YY_CURRENT_BUFFER) {
-		yy_load_buffer_state( );
-		(yy_did_buffer_switch_on_eof) = 1;
-	}
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
-	int num_to_alloc;
-    
-	if (!(yy_buffer_stack)) {
-
-		/* First allocation is just for 2 elements, since we don't know if this
-		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
-		 * immediate realloc on the next call.
-         */
-		num_to_alloc = 1;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
-								(num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-								  
-		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-				
-		(yy_buffer_stack_max) = num_to_alloc;
-		(yy_buffer_stack_top) = 0;
-		return;
-	}
-
-	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
-
-		num_to_alloc = (yy_buffer_stack_max) + grow_size;
-		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
-								((yy_buffer_stack),
-								num_to_alloc * sizeof(struct yy_buffer_state*)
-								);
-		if ( ! (yy_buffer_stack) )
-			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
-		/* zero only the new slots.*/
-		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-		(yy_buffer_stack_max) = num_to_alloc;
-	}
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
-{
-	YY_BUFFER_STATE b;
-    
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer(b  );
-
-	return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
-{
-    
-	return yy_scan_bytes(yystr,strlen(yystr) );
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
- * scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
-{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-    
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = _yybytes_len + 2;
-	buf = (char *) yyalloc(n  );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < _yybytes_len; ++i )
-		buf[i] = yybytes[i];
-
-	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer(buf,n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg )
-{
-    	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-		yytext[yyleng] = (yy_hold_char); \
-		(yy_c_buf_p) = yytext + yyless_macro_arg; \
-		(yy_hold_char) = *(yy_c_buf_p); \
-		*(yy_c_buf_p) = '\0'; \
-		yyleng = yyless_macro_arg; \
-		} \
-	while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- * 
- */
-int yyget_lineno  (void)
-{
-        
-    return yylineno;
-}
-
-/** Get the input stream.
- * 
- */
-FILE *yyget_in  (void)
-{
-        return yyin;
-}
-
-/** Get the output stream.
- * 
- */
-FILE *yyget_out  (void)
-{
-        return yyout;
-}
-
-/** Get the length of the current token.
- * 
- */
-int yyget_leng  (void)
-{
-        return yyleng;
-}
-
-/** Get the current token.
- * 
- */
-
-char *yyget_text  (void)
-{
-        return yytext;
-}
-
-/** Set the current line number.
- * @param line_number
- * 
- */
-void yyset_lineno (int  line_number )
-{
-    
-    yylineno = line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * 
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE *  in_str )
-{
-        yyin = in_str ;
-}
-
-void yyset_out (FILE *  out_str )
-{
-        yyout = out_str ;
-}
-
-int yyget_debug  (void)
-{
-        return yy_flex_debug;
-}
-
-void yyset_debug (int  bdebug )
-{
-        yy_flex_debug = bdebug ;
-}
-
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
-     */
-
-    /* We do not touch yylineno unless the option is enabled. */
-    yylineno =  1;
-    
-    (yy_buffer_stack) = 0;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char *) 0;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
-#else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
-     */
-    return 0;
-}
-
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-	while(YY_CURRENT_BUFFER){
-		yy_delete_buffer(YY_CURRENT_BUFFER  );
-		YY_CURRENT_BUFFER_LVALUE = NULL;
-		yypop_buffer_state();
-	}
-
-	/* Destroy the stack itself. */
-	yyfree((yy_buffer_stack) );
-	(yy_buffer_stack) = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
-    yy_init_globals( );
-
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-}
-#endif
-
-void *yyalloc (yy_size_t  size )
-{
-	return (void *) malloc( size );
-}
-
-void *yyrealloc  (void * ptr, yy_size_t  size )
-{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-}
-
-void yyfree (void * ptr )
-{
-	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 102 "winprefslex.l"
-
-
-
-/*
- * Run-of-the mill requirement for yacc
- */
-int
-yywrap (void)
-{
-  return 1;
-}
-
-/*
- * Run a file through the yacc parser
- */
-void
-parse_file (FILE *file)
-{
-  if (!file)
-    return; 
-  
-  yylineno = 1;
-  yyin = file;
-  yyparse ();
-}
-
-
diff --git a/xorg-server/hw/xwin/winprefsyacc.c b/xorg-server/hw/xwin/winprefsyacc.c
deleted file mode 100644
index 797851b95..000000000
--- a/xorg-server/hw/xwin/winprefsyacc.c
+++ /dev/null
@@ -1,2261 +0,0 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-
-
-/* Copy the first part of user declarations.  */
-
-/* Line 189 of yacc.c  */
-#line 1 "winprefsyacc.y"
-
-/*
- * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
- * Copyright (C) Colin Harrison 2005-2008
- *
- * 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.
- *
- * Authors:     Earle F. Philhower, III
- *              Colin Harrison
- */
-/* $XFree86: $ */
-
-#ifdef HAVE_XWIN_CONFIG_H
-#include <xwin-config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "winprefs.h"
-
-/* The following give better error messages in bison at the cost of a few KB */
-#define YYERROR_VERBOSE 1
-
-/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
-#define YYLTYPE_IS_TRIVIAL 1
-#define YYENABLE_NLS 0
-
-/* The global pref settings */
-WINPREFS pref;
-
-/* The working menu */  
-static MENUPARSED menu;
-
-/* Functions for parsing the tokens into out structure */
-/* Defined at the end section of this file */
-
-static void SetIconDirectory (char *path);
-static void SetDefaultIcon (char *fname);
-static void SetRootMenu (char *menu);
-static void SetDefaultSysMenu (char *menu, int pos);
-static void SetTrayIcon (char *fname);
-
-static void OpenMenu(char *menuname);
-static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
-static void CloseMenu(void);
-
-static void OpenIcons(void);
-static void AddIconLine(char *matchstr, char *iconfile);
-static void CloseIcons(void);
-
-static void OpenStyles(void);
-static void AddStyleLine(char *matchstr, unsigned long style);
-static void CloseStyles(void);
-
-static void OpenSysMenu(void);
-static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
-static void CloseSysMenu(void);
-
-static int yyerror (char *s);
-
-extern void ErrorF (const char* /*f*/, ...);
-extern char *yytext;
-extern int yylex(void);
-
-
-
-/* Line 189 of yacc.c  */
-#line 162 "winprefsyacc.c"
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     NEWLINE = 258,
-     MENU = 259,
-     LB = 260,
-     RB = 261,
-     ICONDIRECTORY = 262,
-     DEFAULTICON = 263,
-     ICONS = 264,
-     STYLES = 265,
-     TOPMOST = 266,
-     MAXIMIZE = 267,
-     MINIMIZE = 268,
-     BOTTOM = 269,
-     NOTITLE = 270,
-     OUTLINE = 271,
-     NOFRAME = 272,
-     DEFAULTSYSMENU = 273,
-     SYSMENU = 274,
-     ROOTMENU = 275,
-     SEPARATOR = 276,
-     ATSTART = 277,
-     ATEND = 278,
-     EXEC = 279,
-     ALWAYSONTOP = 280,
-     DEBUG = 281,
-     RELOAD = 282,
-     TRAYICON = 283,
-     FORCEEXIT = 284,
-     SILENTEXIT = 285,
-     STRING = 286
-   };
-#endif
-/* Tokens.  */
-#define NEWLINE 258
-#define MENU 259
-#define LB 260
-#define RB 261
-#define ICONDIRECTORY 262
-#define DEFAULTICON 263
-#define ICONS 264
-#define STYLES 265
-#define TOPMOST 266
-#define MAXIMIZE 267
-#define MINIMIZE 268
-#define BOTTOM 269
-#define NOTITLE 270
-#define OUTLINE 271
-#define NOFRAME 272
-#define DEFAULTSYSMENU 273
-#define SYSMENU 274
-#define ROOTMENU 275
-#define SEPARATOR 276
-#define ATSTART 277
-#define ATEND 278
-#define EXEC 279
-#define ALWAYSONTOP 280
-#define DEBUG 281
-#define RELOAD 282
-#define TRAYICON 283
-#define FORCEEXIT 284
-#define SILENTEXIT 285
-#define STRING 286
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 214 of yacc.c  */
-#line 89 "winprefsyacc.y"
-
-  char *sVal;
-  unsigned long uVal;
-  int iVal;
-
-
-
-/* Line 214 of yacc.c  */
-#line 268 "winprefsyacc.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 264 of yacc.c  */
-#line 280 "winprefsyacc.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
-    int yyi;
-#endif
-{
-  return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
-       && ! ((defined YYMALLOC || defined malloc) \
-	     && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
-	Stack = &yyptr->Stack_alloc;					\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  2
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   98
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  32
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  33
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  65
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  121
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   286
-
-#define YYTRANSLATE(YYX)						\
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint8 yyprhs[] =
-{
-       0,     0,     3,     4,     7,     9,    11,    12,    15,    17,
-      19,    21,    23,    25,    27,    29,    31,    33,    35,    37,
-      39,    43,    47,    52,    56,    60,    64,    69,    75,    81,
-      86,    88,    91,    92,   100,   105,   107,   110,   111,   118,
-     120,   122,   124,   126,   128,   130,   132,   134,   136,   139,
-     142,   147,   149,   152,   153,   160,   161,   163,   165,   171,
-     173,   176,   177,   185,   188,   191
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
-{
-      33,     0,    -1,    -1,    33,    34,    -1,     3,    -1,    36,
-      -1,    -1,     3,    35,    -1,    40,    -1,    41,    -1,    44,
-      -1,    48,    -1,    55,    -1,    60,    -1,    38,    -1,    39,
-      -1,    64,    -1,    37,    -1,    62,    -1,    63,    -1,    28,
-      31,     3,    -1,    20,    31,     3,    -1,    18,    31,    57,
-       3,    -1,     8,    31,     3,    -1,     7,    31,     3,    -1,
-      21,     3,    35,    -1,    31,    25,     3,    35,    -1,    31,
-      24,    31,     3,    35,    -1,    31,     4,    31,     3,    35,
-      -1,    31,    27,     3,    35,    -1,    42,    -1,    42,    43,
-      -1,    -1,     4,    31,     5,    45,    35,    43,     6,    -1,
-      31,    31,     3,    35,    -1,    46,    -1,    46,    47,    -1,
-      -1,     9,     5,    49,    35,    47,     6,    -1,    11,    -1,
-      12,    -1,    13,    -1,    14,    -1,    15,    -1,    16,    -1,
-      17,    -1,    50,    -1,    51,    -1,    50,    51,    -1,    51,
-      50,    -1,    31,    52,     3,    35,    -1,    53,    -1,    53,
-      54,    -1,    -1,    10,     5,    56,    35,    54,     6,    -1,
-      -1,    22,    -1,    23,    -1,    31,    31,    57,     3,    35,
-      -1,    58,    -1,    58,    59,    -1,    -1,    19,     5,     3,
-      61,    35,    59,     6,    -1,    29,     3,    -1,    30,     3,
-      -1,    26,    31,     3,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint8 yyrline[] =
-{
-       0,   132,   132,   133,   136,   137,   141,   142,   145,   146,
-     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
-     159,   162,   165,   168,   171,   174,   175,   176,   177,   178,
-     181,   182,   185,   185,   188,   191,   192,   195,   195,   198,
-     199,   200,   201,   204,   205,   206,   209,   210,   211,   212,
-     215,   218,   219,   222,   222,   225,   226,   227,   230,   233,
-     234,   237,   237,   240,   243,   246
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "NEWLINE", "MENU", "LB", "RB",
-  "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", "MAXIMIZE",
-  "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", "DEFAULTSYSMENU",
-  "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC",
-  "ALWAYSONTOP", "DEBUG", "RELOAD", "TRAYICON", "FORCEEXIT", "SILENTEXIT",
-  "STRING", "$accept", "input", "line", "newline_or_nada", "command",
-  "trayicon", "rootmenu", "defaultsysmenu", "defaulticon", "icondirectory",
-  "menuline", "menulist", "menu", "$@1", "iconline", "iconlist", "icons",
-  "$@2", "group1", "group2", "stylecombo", "styleline", "stylelist",
-  "styles", "$@3", "atspot", "sysmenuline", "sysmenulist", "sysmenu",
-  "$@4", "forceexit", "silentexit", "debug", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    32,    33,    33,    34,    34,    35,    35,    36,    36,
-      36,    36,    36,    36,    36,    36,    36,    36,    36,    36,
-      37,    38,    39,    40,    41,    42,    42,    42,    42,    42,
-      43,    43,    45,    44,    46,    47,    47,    49,    48,    50,
-      50,    50,    50,    51,    51,    51,    52,    52,    52,    52,
-      53,    54,    54,    56,    55,    57,    57,    57,    58,    59,
-      59,    61,    60,    62,    63,    64
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     0,     2,     1,     1,     0,     2,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       3,     3,     4,     3,     3,     3,     4,     5,     5,     4,
-       1,     2,     0,     7,     4,     1,     2,     0,     6,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
-       4,     1,     2,     0,     6,     0,     1,     1,     5,     1,
-       2,     0,     7,     2,     2,     3
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-       2,     0,     1,     4,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     3,     5,    17,    14,
-      15,     8,     9,    10,    11,    12,    13,    18,    19,    16,
-       0,     0,     0,    37,    53,    55,     0,     0,     0,     0,
-      63,    64,    32,    24,    23,     6,     6,    56,    57,     0,
-      61,    21,    65,    20,     6,     6,     0,     0,    22,     6,
-       0,     7,     0,    35,     0,     0,    51,     0,     0,     0,
-       0,    30,     0,     0,    36,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,     0,    52,    54,     0,    59,
-       0,     6,     0,     0,     0,     0,    31,    33,     6,    48,
-      49,     6,    55,    60,    62,    25,     0,     0,     6,     6,
-      34,    50,     0,     6,     6,    26,    29,     6,    28,    27,
-      58
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int8 yydefgoto[] =
-{
-      -1,     1,    16,    56,    17,    18,    19,    20,    21,    22,
-      71,    72,    23,    54,    63,    64,    24,    45,    83,    84,
-      85,    66,    67,    25,    46,    49,    89,    90,    26,    59,
-      27,    28,    29
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -47
-static const yytype_int8 yypact[] =
-{
-     -47,     7,   -47,   -47,    -1,     0,     1,    18,    29,    15,
-      42,    17,    19,    20,    46,    50,   -47,   -47,   -47,   -47,
-     -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,
-      49,    53,    54,   -47,   -47,     6,    55,    56,    57,    58,
-     -47,   -47,   -47,   -47,   -47,    61,    61,   -47,   -47,    62,
-     -47,   -47,   -47,   -47,    61,    61,    35,    38,   -47,    61,
-     -19,   -47,    39,    35,    66,    27,    38,    67,    43,    72,
-      -3,   -19,    70,    74,   -47,   -47,   -47,   -47,   -47,   -47,
-     -47,   -47,   -47,     3,    -8,    75,   -47,   -47,    48,    43,
-      76,    61,    52,    59,    77,    78,   -47,   -47,    61,   -47,
-     -47,    61,     6,   -47,   -47,   -47,    81,    82,    61,    61,
-     -47,   -47,    83,    61,    61,   -47,   -47,    61,   -47,   -47,
-     -47
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int8 yypgoto[] =
-{
-     -47,   -47,   -47,   -46,   -47,   -47,   -47,   -47,   -47,   -47,
-     -47,    16,   -47,   -47,   -47,    25,   -47,   -47,     5,     8,
-     -47,   -47,    26,   -47,   -47,    -9,   -47,     9,   -47,   -47,
-     -47,   -47,   -47
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
-      57,    92,    69,    76,    77,    78,    79,     2,    60,    61,
-       3,     4,    70,    68,     5,     6,     7,     8,    80,    81,
-      82,    93,    94,    33,    95,     9,    10,    11,    47,    48,
-      30,    31,    32,    12,    34,    13,    14,    15,    76,    77,
-      78,    79,    80,    81,    82,   105,    35,    36,    37,    40,
-      38,    39,   110,    41,    42,   111,    43,    44,    50,    51,
-      52,    53,   115,   116,    55,    58,    62,   118,   119,    65,
-      73,   120,    75,    87,    88,    91,    97,    98,   101,   102,
-     108,   109,   104,   106,   113,   114,   117,    96,    74,   100,
-     107,    99,    86,   112,     0,     0,     0,     0,   103
-};
-
-static const yytype_int8 yycheck[] =
-{
-      46,     4,    21,    11,    12,    13,    14,     0,    54,    55,
-       3,     4,    31,    59,     7,     8,     9,    10,    15,    16,
-      17,    24,    25,     5,    27,    18,    19,    20,    22,    23,
-      31,    31,    31,    26,     5,    28,    29,    30,    11,    12,
-      13,    14,    15,    16,    17,    91,    31,     5,    31,     3,
-      31,    31,    98,     3,     5,   101,     3,     3,     3,     3,
-       3,     3,   108,   109,     3,     3,    31,   113,   114,    31,
-      31,   117,     6,     6,    31,     3,     6,     3,     3,    31,
-       3,     3,     6,    31,     3,     3,     3,    71,    63,    84,
-      31,    83,    66,   102,    -1,    -1,    -1,    -1,    89
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,    33,     0,     3,     4,     7,     8,     9,    10,    18,
-      19,    20,    26,    28,    29,    30,    34,    36,    37,    38,
-      39,    40,    41,    44,    48,    55,    60,    62,    63,    64,
-      31,    31,    31,     5,     5,    31,     5,    31,    31,    31,
-       3,     3,     5,     3,     3,    49,    56,    22,    23,    57,
-       3,     3,     3,     3,    45,     3,    35,    35,     3,    61,
-      35,    35,    31,    46,    47,    31,    53,    54,    35,    21,
-      31,    42,    43,    31,    47,     6,    11,    12,    13,    14,
-      15,    16,    17,    50,    51,    52,    54,     6,    31,    58,
-      59,     3,     4,    24,    25,    27,    43,     6,     3,    51,
-      50,     3,    31,    59,     6,    35,    31,    31,     3,     3,
-      35,    35,    57,     3,     3,    35,    35,     3,    35,    35,
-      35
-};
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		(-2)
-#define YYEOF		0
-
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT		goto yyabortlab
-#define YYERROR		goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL		goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
-      yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;							\
-    }								\
-while (YYID (0))
-
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
-    while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
-do {									  \
-  if (yydebug)								  \
-    {									  \
-      YYFPRINTF (stderr, "%s ", Title);					  \
-      yy_symbol_print (stderr,						  \
-		  Type, Value); \
-      YYFPRINTF (stderr, "\n");						  \
-    }									  \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (!yyvaluep)
-    return;
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
-# endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)				\
-do {								\
-  if (yydebug)							\
-    yy_stack_print ((Bottom), (Top));				\
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-	     yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-		       &(yyvsp[(yyi + 1) - (yynrhs)])
-		       		       );
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)		\
-do {					\
-  if (yydebug)				\
-    yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-	switch (*++yyp)
-	  {
-	  case '\'':
-	  case ',':
-	    goto do_not_strip_quotes;
-
-	  case '\\':
-	    if (*++yyp != '\\')
-	      goto do_not_strip_quotes;
-	    /* Fall through.  */
-	  default:
-	    if (yyres)
-	      yyres[yyn] = *yyp;
-	    yyn++;
-	    break;
-
-	  case '"':
-	    if (yyres)
-	      yyres[yyn] = '\0';
-	    return yyn;
-	  }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
-    }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  YYUSE (yyvaluep);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-	break;
-    }
-}
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yystacksize = YYINITDEPTH;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to reallocate the stack.  Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	yytype_int16 *yyss1 = yyss;
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  This used to be a
-	   conditional around just the two extra args, but that might
-	   be undefined if yyoverflow is a macro.  */
-	yyoverflow (YY_("memory exhausted"),
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yystacksize);
-
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-	goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	yytype_int16 *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss_alloc, yyss);
-	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-#  undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 20:
-
-/* Line 1455 of yacc.c  */
-#line 159 "winprefsyacc.y"
-    { SetTrayIcon((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
-    break;
-
-  case 21:
-
-/* Line 1455 of yacc.c  */
-#line 162 "winprefsyacc.y"
-    { SetRootMenu((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
-    break;
-
-  case 22:
-
-/* Line 1455 of yacc.c  */
-#line 165 "winprefsyacc.y"
-    { SetDefaultSysMenu((yyvsp[(2) - (4)].sVal), (yyvsp[(3) - (4)].iVal)); free((yyvsp[(2) - (4)].sVal)); }
-    break;
-
-  case 23:
-
-/* Line 1455 of yacc.c  */
-#line 168 "winprefsyacc.y"
-    { SetDefaultIcon((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
-    break;
-
-  case 24:
-
-/* Line 1455 of yacc.c  */
-#line 171 "winprefsyacc.y"
-    { SetIconDirectory((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
-    break;
-
-  case 25:
-
-/* Line 1455 of yacc.c  */
-#line 174 "winprefsyacc.y"
-    { AddMenuLine("-", CMD_SEPARATOR, ""); }
-    break;
-
-  case 26:
-
-/* Line 1455 of yacc.c  */
-#line 175 "winprefsyacc.y"
-    { AddMenuLine((yyvsp[(1) - (4)].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[(1) - (4)].sVal)); }
-    break;
-
-  case 27:
-
-/* Line 1455 of yacc.c  */
-#line 176 "winprefsyacc.y"
-    { AddMenuLine((yyvsp[(1) - (5)].sVal), CMD_EXEC, (yyvsp[(3) - (5)].sVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(3) - (5)].sVal)); }
-    break;
-
-  case 28:
-
-/* Line 1455 of yacc.c  */
-#line 177 "winprefsyacc.y"
-    { AddMenuLine((yyvsp[(1) - (5)].sVal), CMD_MENU, (yyvsp[(3) - (5)].sVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(3) - (5)].sVal)); }
-    break;
-
-  case 29:
-
-/* Line 1455 of yacc.c  */
-#line 178 "winprefsyacc.y"
-    { AddMenuLine((yyvsp[(1) - (4)].sVal), CMD_RELOAD, ""); free((yyvsp[(1) - (4)].sVal)); }
-    break;
-
-  case 32:
-
-/* Line 1455 of yacc.c  */
-#line 185 "winprefsyacc.y"
-    { OpenMenu((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
-    break;
-
-  case 33:
-
-/* Line 1455 of yacc.c  */
-#line 185 "winprefsyacc.y"
-    {CloseMenu();}
-    break;
-
-  case 34:
-
-/* Line 1455 of yacc.c  */
-#line 188 "winprefsyacc.y"
-    { AddIconLine((yyvsp[(1) - (4)].sVal), (yyvsp[(2) - (4)].sVal)); free((yyvsp[(1) - (4)].sVal)); free((yyvsp[(2) - (4)].sVal)); }
-    break;
-
-  case 37:
-
-/* Line 1455 of yacc.c  */
-#line 195 "winprefsyacc.y"
-    {OpenIcons();}
-    break;
-
-  case 38:
-
-/* Line 1455 of yacc.c  */
-#line 195 "winprefsyacc.y"
-    {CloseIcons();}
-    break;
-
-  case 39:
-
-/* Line 1455 of yacc.c  */
-#line 198 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_TOPMOST; }
-    break;
-
-  case 40:
-
-/* Line 1455 of yacc.c  */
-#line 199 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_MAXIMIZE; }
-    break;
-
-  case 41:
-
-/* Line 1455 of yacc.c  */
-#line 200 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_MINIMIZE; }
-    break;
-
-  case 42:
-
-/* Line 1455 of yacc.c  */
-#line 201 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_BOTTOM; }
-    break;
-
-  case 43:
-
-/* Line 1455 of yacc.c  */
-#line 204 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_NOTITLE; }
-    break;
-
-  case 44:
-
-/* Line 1455 of yacc.c  */
-#line 205 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_OUTLINE; }
-    break;
-
-  case 45:
-
-/* Line 1455 of yacc.c  */
-#line 206 "winprefsyacc.y"
-    { (yyval.uVal)=STYLE_NOFRAME; }
-    break;
-
-  case 46:
-
-/* Line 1455 of yacc.c  */
-#line 209 "winprefsyacc.y"
-    { (yyval.uVal)=(yyvsp[(1) - (1)].uVal); }
-    break;
-
-  case 47:
-
-/* Line 1455 of yacc.c  */
-#line 210 "winprefsyacc.y"
-    { (yyval.uVal)=(yyvsp[(1) - (1)].uVal); }
-    break;
-
-  case 48:
-
-/* Line 1455 of yacc.c  */
-#line 211 "winprefsyacc.y"
-    { (yyval.uVal)=(yyvsp[(1) - (2)].uVal)|(yyvsp[(2) - (2)].uVal); }
-    break;
-
-  case 49:
-
-/* Line 1455 of yacc.c  */
-#line 212 "winprefsyacc.y"
-    { (yyval.uVal)=(yyvsp[(1) - (2)].uVal)|(yyvsp[(2) - (2)].uVal); }
-    break;
-
-  case 50:
-
-/* Line 1455 of yacc.c  */
-#line 215 "winprefsyacc.y"
-    { AddStyleLine((yyvsp[(1) - (4)].sVal), (yyvsp[(2) - (4)].uVal)); free((yyvsp[(1) - (4)].sVal)); }
-    break;
-
-  case 53:
-
-/* Line 1455 of yacc.c  */
-#line 222 "winprefsyacc.y"
-    {OpenStyles();}
-    break;
-
-  case 54:
-
-/* Line 1455 of yacc.c  */
-#line 222 "winprefsyacc.y"
-    {CloseStyles();}
-    break;
-
-  case 55:
-
-/* Line 1455 of yacc.c  */
-#line 225 "winprefsyacc.y"
-    { (yyval.iVal)=AT_END; }
-    break;
-
-  case 56:
-
-/* Line 1455 of yacc.c  */
-#line 226 "winprefsyacc.y"
-    { (yyval.iVal)=AT_START; }
-    break;
-
-  case 57:
-
-/* Line 1455 of yacc.c  */
-#line 227 "winprefsyacc.y"
-    { (yyval.iVal)=AT_END; }
-    break;
-
-  case 58:
-
-/* Line 1455 of yacc.c  */
-#line 230 "winprefsyacc.y"
-    { AddSysMenuLine((yyvsp[(1) - (5)].sVal), (yyvsp[(2) - (5)].sVal), (yyvsp[(3) - (5)].iVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(2) - (5)].sVal)); }
-    break;
-
-  case 61:
-
-/* Line 1455 of yacc.c  */
-#line 237 "winprefsyacc.y"
-    {OpenSysMenu();}
-    break;
-
-  case 62:
-
-/* Line 1455 of yacc.c  */
-#line 237 "winprefsyacc.y"
-    {CloseSysMenu();}
-    break;
-
-  case 63:
-
-/* Line 1455 of yacc.c  */
-#line 240 "winprefsyacc.y"
-    { pref.fForceExit = TRUE; }
-    break;
-
-  case 64:
-
-/* Line 1455 of yacc.c  */
-#line 243 "winprefsyacc.y"
-    { pref.fSilentExit = TRUE; }
-    break;
-
-  case 65:
-
-/* Line 1455 of yacc.c  */
-#line 246 "winprefsyacc.y"
-    { ErrorF("LoadPreferences: %s\n", (yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
-    break;
-
-
-
-/* Line 1455 of yacc.c  */
-#line 1841 "winprefsyacc.c"
-      default: break;
-    }
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
-#else
-      {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
-      }
-#endif
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      if (yychar <= YYEOF)
-	{
-	  /* Return failure if at end of input.  */
-	  if (yychar == YYEOF)
-	    YYABORT;
-	}
-      else
-	{
-	  yydestruct ("Error: discarding",
-		      yytoken, &yylval);
-	  yychar = YYEMPTY;
-	}
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-	{
-	  yyn += YYTERROR;
-	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-	    {
-	      yyn = yytable[yyn];
-	      if (0 < yyn)
-		break;
-	    }
-	}
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-	YYABORT;
-
-
-      yydestruct ("Error: popping",
-		  yystos[yystate], yyvsp);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  *++yyvsp = yylval;
-
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval);
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-		  yystos[*yyssp], yyvsp);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
-}
-
-
-
-/* Line 1675 of yacc.c  */
-#line 250 "winprefsyacc.y"
-
-/*
- * Errors in parsing abort and print log messages
- */
-static int
-yyerror (char *s) 
-{
-  extern int yylineno; /* Handled by flex internally */
-
-  ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
-  return 1;
-}
-
-/* Miscellaneous functions to store TOKENs into the structure */
-static void
-SetIconDirectory (char *path)
-{
-  strncpy (pref.iconDirectory, path, PATH_MAX);
-  pref.iconDirectory[PATH_MAX] = 0;
-}
-
-static void
-SetDefaultIcon (char *fname)
-{
-  strncpy (pref.defaultIconName, fname, NAME_MAX);
-  pref.defaultIconName[NAME_MAX] = 0;
-}
-
-static void
-SetTrayIcon (char *fname)
-{
-  strncpy (pref.trayIconName, fname, NAME_MAX);
-  pref.trayIconName[NAME_MAX] = 0;
-}
-
-static void
-SetRootMenu (char *menu)
-{
-  strncpy (pref.rootMenuName, menu, MENU_MAX);
-  pref.rootMenuName[MENU_MAX] = 0;
-}
-
-static void
-SetDefaultSysMenu (char *menu, int pos)
-{
-  strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
-  pref.defaultSysMenuName[MENU_MAX] = 0;
-  pref.defaultSysMenuPos = pos;
-}
-
-static void
-OpenMenu (char *menuname)
-{
-  if (menu.menuItem) free(menu.menuItem);
-  menu.menuItem = NULL;
-  strncpy(menu.menuName, menuname, MENU_MAX);
-  menu.menuName[MENU_MAX] = 0;
-  menu.menuItems = 0;
-}
-
-static void
-AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
-{
-  if (menu.menuItem==NULL)
-    menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
-  else
-    menu.menuItem = (MENUITEM*)
-      realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
-
-  strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
-  menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
-
-  menu.menuItem[menu.menuItems].cmd = cmd;
-
-  strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
-  menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
-
-  menu.menuItem[menu.menuItems].commandID = 0;
-
-  menu.menuItems++;
-}
-
-static void
-CloseMenu (void)
-{
-  if (menu.menuItem==NULL || menu.menuItems==0)
-    {
-      ErrorF("LoadPreferences: Empty menu detected\n");
-      return;
-    }
-  
-  if (pref.menuItems)
-    pref.menu = (MENUPARSED*)
-      realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
-  else
-    pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
-  
-  memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
-  pref.menuItems++;
-
-  memset (&menu, 0, sizeof(MENUPARSED));
-}
-
-static void 
-OpenIcons (void)
-{
-  if (pref.icon != NULL) {
-    ErrorF("LoadPreferences: Redefining icon mappings\n");
-    free(pref.icon);
-    pref.icon = NULL;
-  }
-  pref.iconItems = 0;
-}
-
-static void
-AddIconLine (char *matchstr, char *iconfile)
-{
-  if (pref.icon==NULL)
-    pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
-  else
-    pref.icon = (ICONITEM*)
-      realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
-
-  strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
-  pref.icon[pref.iconItems].match[MENU_MAX] = 0;
-
-  strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
-  pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
-
-  pref.icon[pref.iconItems].hicon = 0;
-
-  pref.iconItems++;
-}
-
-static void 
-CloseIcons (void)
-{
-}
-
-static void
-OpenStyles (void)
-{
-  if (pref.style != NULL) {
-    ErrorF("LoadPreferences: Redefining window style\n");
-    free(pref.style);
-    pref.style = NULL;
-  }
-  pref.styleItems = 0;
-}
-
-static void
-AddStyleLine (char *matchstr, unsigned long style)
-{
-  if (pref.style==NULL)
-    pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
-  else
-    pref.style = (STYLEITEM*)
-      realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
-
-  strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
-  pref.style[pref.styleItems].match[MENU_MAX] = 0;
-
-  pref.style[pref.styleItems].type = style;
-
-  pref.styleItems++;
-}
-
-static void
-CloseStyles (void)
-{
-}
-
-static void
-OpenSysMenu (void)
-{
-  if (pref.sysMenu != NULL) {
-    ErrorF("LoadPreferences: Redefining system menu\n");
-    free(pref.sysMenu);
-    pref.sysMenu = NULL;
-  }
-  pref.sysMenuItems = 0;
-}
-
-static void
-AddSysMenuLine (char *matchstr, char *menuname, int pos)
-{
-  if (pref.sysMenu==NULL)
-    pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
-  else
-    pref.sysMenu = (SYSMENUITEM*)
-      realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
-
-  strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
-  pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
-
-  strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
-  pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
-
-  pref.sysMenu[pref.sysMenuItems].menuPos = pos;
-
-  pref.sysMenuItems++;
-}
-
-static void
-CloseSysMenu (void)
-{
-}
-
-
diff --git a/xorg-server/hw/xwin/winprefsyacc.h b/xorg-server/hw/xwin/winprefsyacc.h
deleted file mode 100644
index 67470cfb7..000000000
--- a/xorg-server/hw/xwin/winprefsyacc.h
+++ /dev/null
@@ -1,130 +0,0 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-   
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-   
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-   
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     NEWLINE = 258,
-     MENU = 259,
-     LB = 260,
-     RB = 261,
-     ICONDIRECTORY = 262,
-     DEFAULTICON = 263,
-     ICONS = 264,
-     STYLES = 265,
-     TOPMOST = 266,
-     MAXIMIZE = 267,
-     MINIMIZE = 268,
-     BOTTOM = 269,
-     NOTITLE = 270,
-     OUTLINE = 271,
-     NOFRAME = 272,
-     DEFAULTSYSMENU = 273,
-     SYSMENU = 274,
-     ROOTMENU = 275,
-     SEPARATOR = 276,
-     ATSTART = 277,
-     ATEND = 278,
-     EXEC = 279,
-     ALWAYSONTOP = 280,
-     DEBUG = 281,
-     RELOAD = 282,
-     TRAYICON = 283,
-     FORCEEXIT = 284,
-     SILENTEXIT = 285,
-     STRING = 286
-   };
-#endif
-/* Tokens.  */
-#define NEWLINE 258
-#define MENU 259
-#define LB 260
-#define RB 261
-#define ICONDIRECTORY 262
-#define DEFAULTICON 263
-#define ICONS 264
-#define STYLES 265
-#define TOPMOST 266
-#define MAXIMIZE 267
-#define MINIMIZE 268
-#define BOTTOM 269
-#define NOTITLE 270
-#define OUTLINE 271
-#define NOFRAME 272
-#define DEFAULTSYSMENU 273
-#define SYSMENU 274
-#define ROOTMENU 275
-#define SEPARATOR 276
-#define ATSTART 277
-#define ATEND 278
-#define EXEC 279
-#define ALWAYSONTOP 280
-#define DEBUG 281
-#define RELOAD 282
-#define TRAYICON 283
-#define FORCEEXIT 284
-#define SILENTEXIT 285
-#define STRING 286
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 1676 of yacc.c  */
-#line 89 "winprefsyacc.y"
-
-  char *sVal;
-  unsigned long uVal;
-  int iVal;
-
-
-
-/* Line 1676 of yacc.c  */
-#line 122 "winprefsyacc.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
-
-
-- 
cgit v1.2.3