xserver: Branch 'XACE-SELINUX' - 30 commits

Eamon Walsh ewalsh at kemper.freedesktop.org
Wed Sep 26 10:39:37 PDT 2007


 GL/apple/indirect.c                        | 2047 ++++++++++-------------------
 Xext/xvdisp.c                              |    6 
 Xi/allowev.c                               |   12 
 Xi/chgdctl.c                               |   15 
 Xi/chgfctl.c                               |  179 --
 Xi/chgkbd.c                                |    9 
 Xi/chgkmap.c                               |   14 
 Xi/chgprop.c                               |   36 
 Xi/chgptr.c                                |    9 
 Xi/closedev.c                              |    9 
 Xi/devbell.c                               |   18 
 Xi/exevents.c                              |   13 
 Xi/extinit.c                               |   13 
 Xi/getbmap.c                               |   18 
 Xi/getdctl.c                               |   39 
 Xi/getfctl.c                               |   21 
 Xi/getfocus.c                              |    9 
 Xi/getkmap.c                               |   23 
 Xi/getmmap.c                               |   18 
 Xi/getprop.c                               |   10 
 Xi/getselev.c                              |   10 
 Xi/getvers.c                               |   10 
 Xi/grabdev.c                               |   53 
 Xi/grabdevb.c                              |   36 
 Xi/grabdevk.c                              |   36 
 Xi/gtmotion.c                              |   24 
 Xi/opendev.c                               |   21 
 Xi/queryst.c                               |   15 
 Xi/selectev.c                              |   32 
 Xi/sendexev.c                              |   28 
 Xi/setbmap.c                               |   26 
 Xi/setdval.c                               |   36 
 Xi/setfocus.c                              |   13 
 Xi/setmmap.c                               |   19 
 Xi/setmode.c                               |   21 
 Xi/ungrdev.c                               |    9 
 Xi/ungrdevb.c                              |   41 
 Xi/ungrdevk.c                              |   48 
 composite/compext.c                        |    6 
 config/dbus-core.c                         |    3 
 configure.ac                               |   18 
 dix/devices.c                              |   25 
 dix/getevents.c                            |    4 
 exa/exa.c                                  |   67 
 exa/exa.h                                  |   33 
 exa/exa_accel.c                            |   45 
 exa/exa_priv.h                             |   15 
 exa/exa_render.c                           |   29 
 hw/darwin/Makefile.am                      |   74 -
 hw/darwin/apple/Info.plist                 |   38 
 hw/darwin/apple/X11Application.h           |    2 
 hw/darwin/apple/X11Application.m           |    8 
 hw/darwin/apple/X11Controller.m            |   15 
 hw/darwin/apple/bundle-main.c              |   42 
 hw/darwin/darwin.c                         |    4 
 hw/darwin/iokit/xfIOKit.c                  |    4 
 hw/darwin/iokit/xfIOKitCursor.c            |    5 
 hw/darwin/iokit/xfIOKitStartup.c           |    5 
 hw/darwin/quartz/Preferences.m             |    6 
 hw/darwin/quartz/XServer.m                 |    6 
 hw/darwin/quartz/applewm.c                 |    6 
 hw/darwin/quartz/cr/XView.m                |    7 
 hw/darwin/quartz/cr/crAppleWM.m            |    6 
 hw/darwin/quartz/cr/crFrame.m              |    7 
 hw/darwin/quartz/cr/crScreen.m             |    6 
 hw/darwin/quartz/fullscreen/fullscreen.c   |    6 
 hw/darwin/quartz/fullscreen/quartzCursor.c |    6 
 hw/darwin/quartz/pseudoramiX.c             |    6 
 hw/darwin/quartz/quartz.c                  |    6 
 hw/darwin/quartz/quartzAudio.c             |    6 
 hw/darwin/quartz/quartzCocoa.m             |    4 
 hw/darwin/quartz/quartzCursor.c            |    5 
 hw/darwin/quartz/quartzKeyboard.c          |   60 
 hw/darwin/quartz/quartzPasteboard.c        |    6 
 hw/darwin/quartz/xpr/appledri.c            |    5 
 hw/darwin/quartz/xpr/dri.c                 |    5 
 hw/darwin/quartz/xpr/x-hash.c              |    6 
 hw/darwin/quartz/xpr/x-hook.c              |    6 
 hw/darwin/quartz/xpr/x-list.c              |    6 
 hw/darwin/quartz/xpr/xprAppleWM.c          |    6 
 hw/darwin/quartz/xpr/xprCursor.c           |    6 
 hw/darwin/quartz/xpr/xprFrame.c            |    6 
 hw/darwin/quartz/xpr/xprScreen.c           |    6 
 hw/kdrive/ephyr/ephyr_draw.c               |    4 
 hw/vfb/InitOutput.c                        |   16 
 hw/xfree86/ddc/edid.h                      |    9 
 hw/xfree86/modes/xf86Crtc.c                |    5 
 hw/xnest/Init.c                            |   16 
 include/exevents.h                         |    1 
 os/utils.c                                 |   24 
 90 files changed, 1456 insertions(+), 2258 deletions(-)

New commits:
diff-tree 27612748e0ec20f3a23839f0a12e39f598dd722c (from parents)
Merge: b61461425eb15fcff2a58330d74fe5a5a1f226fc 3b114f2603fc2adeec7f5f8f20fe4870afb8dff1
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Wed Sep 26 07:47:29 2007 -0400

    Merge branch 'master' into XACE-SELINUX
    
    Conflicts:
    
    	dix/devices.c

diff --cc dix/devices.c
index 3c2aad8,e05444e..3f4a33d
@@@ -1348,8 -1358,9 +1347,9 @@@
  ProcSetModifierMapping(ClientPtr client)
  {
      xSetModifierMappingReply rep;
+     DeviceIntPtr dev;
 +    int rc;
      REQUEST(xSetModifierMappingReq);
 -    
      REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq);
  
      if (client->req_len != ((stuff->numKeyPerModifier << 1) +
@@@ -1360,13 -1371,13 +1360,15 @@@
      rep.length = 0;
      rep.sequenceNumber = client->sequence;
  
 -    rep.success = DoSetModifierMapping(client, (KeyCode *)&stuff[1],
 -                                       stuff->numKeyPerModifier);
 +    rc = DoSetModifierMapping(client, (KeyCode *)&stuff[1],
 +			      stuff->numKeyPerModifier, &rep);
 +    if (rc != Success)
 +	return rc;
  
-     /* FIXME: Send mapping notifies for all the extended devices as well. */
      SendMappingNotify(MappingModifier, 0, 0, client);
+     for (dev = inputInfo.devices; dev; dev = dev->next)
+         if (dev->key && dev->coreEvents)
+             SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev);
      WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep);
      return client->noClientException;
  }
diff --cc exa/exa_priv.h
index 27749d7,a26933d..b1023a6
@@@ -150,10 -150,14 +150,14 @@@
  #define EXA_PIXMAP_SCORE_PINNED	    1000
  #define EXA_PIXMAP_SCORE_INIT	    1001
  
 -#define ExaGetPixmapPriv(p)	((ExaPixmapPrivPtr)(p)->devPrivates[exaPixmapPrivateIndex].ptr)
 -#define ExaSetPixmapPriv(p,a)	((p)->devPrivates[exaPixmapPrivateIndex].ptr = (pointer) (a))
 +#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixLookupPrivate(&(p)->devPrivates, exaPixmapPrivateKey))
 +#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a)
  #define ExaPixmapPriv(p)	ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
  
+ #define EXA_RANGE_PITCH (1 << 0)
+ #define EXA_RANGE_WIDTH (1 << 1)
+ #define EXA_RANGE_HEIGHT (1 << 2)
+ 
  typedef struct {
      ExaOffscreenArea *area;
      int		    score;	/**< score for the move-in vs move-out heuristic */
diff-tree 3b114f2603fc2adeec7f5f8f20fe4870afb8dff1 (from 31a7994ac7365562ef1d00e0a7b25f967a961a4e)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Sep 25 07:55:17 2007 -0400

    Input: Properly swap DevicePresenceNotify events.

diff --git a/Xi/extinit.c b/Xi/extinit.c
index a61746e..73bae5e 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -929,6 +929,8 @@ SEventIDispatch(xEvent * from, xEvent * 
 	DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
     else if (type == ChangeDeviceNotify)
 	DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
+    else if (type == DevicePresenceNotify)
+	DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify);
     else {
 	FatalError("XInputExtension: Impossible event!\n");
     }
@@ -974,6 +976,7 @@ XInputExtensionInit(void)
 	EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
 	EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
 	EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
+	EventSwapVector[DevicePresenceNotify] = SEventIDispatch;
     } else {
 	FatalError("IExtensionInit: AddExtensions failed\n");
     }
diff-tree 31a7994ac7365562ef1d00e0a7b25f967a961a4e (from 56ffc381d32687242dd094395fcf2216339bab2a)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Mon Sep 24 13:33:01 2007 -0400

    Input: Return errors to the dispatcher instead of sending them ourself.
    
    Also fixed two "unused variable: stuff" warnings.

diff --git a/Xi/allowev.c b/Xi/allowev.c
index 85b6eaf..cf075e1 100644
--- a/Xi/allowev.c
+++ b/Xi/allowev.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -103,10 +100,8 @@ ProcXAllowDeviceEvents(ClientPtr client)
     REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
 
     thisdev = LookupDeviceIntRec(stuff->deviceid);
-    if (thisdev == NULL) {
-	SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice);
-	return Success;
-    }
+    if (thisdev == NULL)
+	return BadDevice;
     time = ClientTimeToServerTime(stuff->time);
 
     switch (stuff->mode) {
@@ -129,9 +124,8 @@ ProcXAllowDeviceEvents(ClientPtr client)
 	AllowSome(client, time, thisdev, THAWED_BOTH);
 	break;
     default:
-	SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue);
 	client->errorValue = stuff->mode;
-	return Success;
+	return BadValue;
     }
     return Success;
 }
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 9676fb7..055f459 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -56,14 +56,11 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>	/* control constants */
 #include "XIstubs.h"
 
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "exevents.h"
@@ -153,11 +150,8 @@ ProcXChangeDeviceControl(ClientPtr clien
 	    a = &dev->valuator->axes[r->first_valuator];
 	    for (i = 0; i < r->num_valuators; i++)
 		if (*(resolution + i) < (a + i)->min_resolution ||
-		    *(resolution + i) > (a + i)->max_resolution) {
-		    SendErrorToClient(client, IReqCode,
-				      X_ChangeDeviceControl, 0, BadValue);
-		    return Success;
-		}
+		    *(resolution + i) > (a + i)->max_resolution)
+		    return BadValue;
 	    for (i = 0; i < r->num_valuators; i++)
 		(a++)->resolution = *resolution++;
 
@@ -269,11 +263,8 @@ out:
 
         WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep);
     }
-    else {
-        SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, ret);
-    }
 
-    return Success;
+    return ret;
 }
 
 /***********************************************************************
diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c
index 2e0e13c..46bb8e7 100644
--- a/Xi/chgfctl.c
+++ b/Xi/chgfctl.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>	/* control constants */
 
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -119,9 +116,7 @@ ChangeKbdFeedback(ClientPtr client, Devi
 	    t = defaultKeyboardControl.click;
 	else if (t < 0 || t > 100) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	kctrl.click = t;
     }
@@ -132,9 +127,7 @@ ChangeKbdFeedback(ClientPtr client, Devi
 	    t = defaultKeyboardControl.bell;
 	else if (t < 0 || t > 100) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	kctrl.bell = t;
     }
@@ -145,9 +138,7 @@ ChangeKbdFeedback(ClientPtr client, Devi
 	    t = defaultKeyboardControl.bell_pitch;
 	else if (t < 0) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	kctrl.bell_pitch = t;
     }
@@ -158,9 +149,7 @@ ChangeKbdFeedback(ClientPtr client, Devi
 	    t = defaultKeyboardControl.bell_duration;
 	else if (t < 0) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	kctrl.bell_duration = t;
     }
@@ -174,15 +163,10 @@ ChangeKbdFeedback(ClientPtr client, Devi
 	key = (KeyCode) f->key;
 	if (key < 8 || key > 255) {
 	    client->errorValue = key;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
-	}
-	if (!(mask & DvAutoRepeatMode)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadMatch);
-	    return Success;
+	    return BadValue;
 	}
+	if (!(mask & DvAutoRepeatMode))
+	    return BadMatch;
     }
 
     if (mask & DvAutoRepeatMode) {
@@ -210,9 +194,7 @@ ChangeKbdFeedback(ClientPtr client, Devi
 		(defaultKeyboardControl.autoRepeats[inx] & kmask);
 	} else {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
     }
 
@@ -250,9 +232,7 @@ ChangePtrFeedback(ClientPtr client, Devi
 	    pctrl.num = defaultPointerControl.num;
 	else if (accelNum < 0) {
 	    client->errorValue = accelNum;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	} else
 	    pctrl.num = accelNum;
     }
@@ -265,9 +245,7 @@ ChangePtrFeedback(ClientPtr client, Devi
 	    pctrl.den = defaultPointerControl.den;
 	else if (accelDenom <= 0) {
 	    client->errorValue = accelDenom;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	} else
 	    pctrl.den = accelDenom;
     }
@@ -280,9 +258,7 @@ ChangePtrFeedback(ClientPtr client, Devi
 	    pctrl.threshold = defaultPointerControl.threshold;
 	else if (threshold < 0) {
 	    client->errorValue = threshold;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	} else
 	    pctrl.threshold = threshold;
     }
@@ -341,21 +317,16 @@ ChangeStringFeedback(ClientPtr client, D
 	}
     }
 
-    if (f->num_keysyms > s->ctrl.max_symbols) {
-	SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			  BadValue);
-	return Success;
-    }
+    if (f->num_keysyms > s->ctrl.max_symbols)
+	return BadValue;
+
     sup_syms = s->ctrl.symbols_supported;
     for (i = 0; i < f->num_keysyms; i++) {
 	for (j = 0; j < s->ctrl.num_symbols_supported; j++)
 	    if (*(syms + i) == *(sup_syms + j))
 		break;
-	if (j == s->ctrl.num_symbols_supported) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadMatch);
-	    return Success;
-	}
+	if (j == s->ctrl.num_symbols_supported)
+	    return BadMatch;
     }
 
     s->ctrl.num_symbols_displayed = f->num_keysyms;
@@ -393,9 +364,7 @@ ChangeBellFeedback(ClientPtr client, Dev
 	    t = defaultKeyboardControl.bell;
 	else if (t < 0 || t > 100) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	bctrl.percent = t;
     }
@@ -406,9 +375,7 @@ ChangeBellFeedback(ClientPtr client, Dev
 	    t = defaultKeyboardControl.bell_pitch;
 	else if (t < 0) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	bctrl.pitch = t;
     }
@@ -419,9 +386,7 @@ ChangeBellFeedback(ClientPtr client, Dev
 	    t = defaultKeyboardControl.bell_duration;
 	else if (t < 0) {
 	    client->errorValue = t;
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			      BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	bctrl.duration = t;
     }
@@ -485,38 +450,27 @@ ProcXChangeFeedbackControl(ClientPtr cli
 
     len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     switch (stuff->feedbackid) {
     case KbdFeedbackClass:
-	if (len != (sizeof(xKbdFeedbackCtl) >> 2)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
-			      0, BadLength);
-	    return Success;
-	}
+	if (len != (sizeof(xKbdFeedbackCtl) >> 2))
+	    return BadLength;
+
 	for (k = dev->kbdfeed; k; k = k->next)
-	    if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id) {
-		ChangeKbdFeedback(client, dev, stuff->mask, k,
-				  (xKbdFeedbackCtl *) & stuff[1]);
-		return Success;
-	    }
+	    if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id)
+		return ChangeKbdFeedback(client, dev, stuff->mask, k,
+					 (xKbdFeedbackCtl *) & stuff[1]);
 	break;
     case PtrFeedbackClass:
-	if (len != (sizeof(xPtrFeedbackCtl) >> 2)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
-			      0, BadLength);
-	    return Success;
-	}
+	if (len != (sizeof(xPtrFeedbackCtl) >> 2))
+	    return BadLength;
+
 	for (p = dev->ptrfeed; p; p = p->next)
-	    if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id) {
-		ChangePtrFeedback(client, dev, stuff->mask, p,
-				  (xPtrFeedbackCtl *) & stuff[1]);
-		return Success;
-	    }
+	    if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id)
+		return ChangePtrFeedback(client, dev, stuff->mask, p,
+					 (xPtrFeedbackCtl *) & stuff[1]);
 	break;
     case StringFeedbackClass:
     {
@@ -526,63 +480,46 @@ ProcXChangeFeedbackControl(ClientPtr cli
 	if (client->swapped) {
 	    swaps(&f->num_keysyms, n);
 	}
-	if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
-			      0, BadLength);
-	    return Success;
-	}
+	if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms))
+	    return BadLength;
+
 	for (s = dev->stringfeed; s; s = s->next)
-	    if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id) {
-		ChangeStringFeedback(client, dev, stuff->mask, s,
-				     (xStringFeedbackCtl *) & stuff[1]);
-		return Success;
-	    }
+	    if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id)
+		return ChangeStringFeedback(client, dev, stuff->mask, s,
+					    (xStringFeedbackCtl *) & stuff[1]);
 	break;
     }
     case IntegerFeedbackClass:
-	if (len != (sizeof(xIntegerFeedbackCtl) >> 2)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
-			      0, BadLength);
-	    return Success;
-	}
+	if (len != (sizeof(xIntegerFeedbackCtl) >> 2))
+	    return BadLength;
+
 	for (i = dev->intfeed; i; i = i->next)
-	    if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id) {
-		ChangeIntegerFeedback(client, dev, stuff->mask, i,
-				      (xIntegerFeedbackCtl *) & stuff[1]);
-		return Success;
-	    }
+	    if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id)
+		return ChangeIntegerFeedback(client, dev, stuff->mask, i,
+					     (xIntegerFeedbackCtl *)&stuff[1]);
 	break;
     case LedFeedbackClass:
-	if (len != (sizeof(xLedFeedbackCtl) >> 2)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
-			      0, BadLength);
-	    return Success;
-	}
+	if (len != (sizeof(xLedFeedbackCtl) >> 2))
+	    return BadLength;
+
 	for (l = dev->leds; l; l = l->next)
-	    if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id) {
-		ChangeLedFeedback(client, dev, stuff->mask, l,
-				  (xLedFeedbackCtl *) & stuff[1]);
-		return Success;
-	    }
+	    if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id)
+		return ChangeLedFeedback(client, dev, stuff->mask, l,
+					 (xLedFeedbackCtl *) & stuff[1]);
 	break;
     case BellFeedbackClass:
-	if (len != (sizeof(xBellFeedbackCtl) >> 2)) {
-	    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
-			      0, BadLength);
-	    return Success;
-	}
+	if (len != (sizeof(xBellFeedbackCtl) >> 2))
+	    return BadLength;
+
 	for (b = dev->bell; b; b = b->next)
-	    if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id) {
-		ChangeBellFeedback(client, dev, stuff->mask, b,
-				   (xBellFeedbackCtl *) & stuff[1]);
-		return Success;
-	    }
+	    if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id)
+		return ChangeBellFeedback(client, dev, stuff->mask, b,
+					  (xBellFeedbackCtl *) & stuff[1]);
 	break;
     default:
 	break;
     }
 
-    SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, BadMatch);
-    return Success;
+    return BadMatch;
 }
 
diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c
index 2cf8225..83de646 100644
--- a/Xi/chgkbd.c
+++ b/Xi/chgkbd.c
@@ -56,14 +56,11 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
 #include "globals.h"
-#include "extnsionst.h"
 
 #include "exevents.h"
 #include "exglobals.h"
@@ -98,10 +95,8 @@ SProcXChangeKeyboardDevice(ClientPtr cli
 int
 ProcXChangeKeyboardDevice(ClientPtr client)
 {
-    REQUEST(xChangeKeyboardDeviceReq);
+    /* REQUEST(xChangeKeyboardDeviceReq); */
     REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
 
-    SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0,
-                      BadDevice);
-    return Success;
+    return BadDevice;
 }
diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c
index eac520f..bfdc1ce 100644
--- a/Xi/chgkmap.c
+++ b/Xi/chgkmap.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exevents.h"
 #include "exglobals.h"
@@ -111,18 +108,13 @@ ProcXChangeDeviceKeyMapping(ClientPtr cl
     REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
     len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2);
 
     ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
 			   stuff->firstKeyCode, stuff->keyCodes,
 			   stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]);
 
-    if (ret != Success)
-	SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, ret);
-    return Success;
+    return ret;
 }
diff --git a/Xi/chgprop.c b/Xi/chgprop.c
index 59a93c6..13463dd 100644
--- a/Xi/chgprop.c
+++ b/Xi/chgprop.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 
 #include "exevents.h"
@@ -115,30 +112,22 @@ ProcXChangeDeviceDontPropagateList(Clien
     REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
 
     if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) +
-	stuff->count) {
-	SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
-			  BadLength);
-	return Success;
-    }
+	stuff->count)
+	return BadLength;
 
     rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
-    if (rc != Success) {
-	SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
-			  rc);
-	return Success;
-    }
+    if (rc != Success)
+	return rc;
 
     if (stuff->mode != AddToList && stuff->mode != DeleteFromList) {
 	client->errorValue = stuff->window;
-	SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
-			  BadMode);
-	return Success;
+	return BadMode;
     }
 
-    if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
-			   stuff->count, tmp, NULL,
-			   X_ChangeDeviceDontPropagateList) != Success)
-	return Success;
+    if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
+				 stuff->count, tmp, NULL,
+				 X_ChangeDeviceDontPropagateList)) != Success)
+	return rc;
 
     others = wOtherInputMasks(pWin);
     if (!others && stuff->mode == DeleteFromList)
@@ -153,11 +142,8 @@ ProcXChangeDeviceDontPropagateList(Clien
 	    tmp[i].mask |= others->dontPropagateMask[i];
 
 	if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) !=
-	    Success) {
-	    SendErrorToClient(client, IReqCode,
-			      X_ChangeDeviceDontPropagateList, 0, BadClass);
-	    return Success;
-	}
+	    Success)
+	    return BadClass;
     }
 
     return Success;
diff --git a/Xi/chgptr.c b/Xi/chgptr.c
index a949068..2ce81d1 100644
--- a/Xi/chgptr.c
+++ b/Xi/chgptr.c
@@ -56,8 +56,6 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
@@ -65,7 +63,6 @@ SOFTWARE.
 #include "windowstr.h"	/* window structure  */
 #include "scrnintstr.h"	/* screen structure  */
 
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 
 #include "dixevents.h"
@@ -101,10 +98,8 @@ SProcXChangePointerDevice(ClientPtr clie
 int
 ProcXChangePointerDevice(ClientPtr client)
 {
-    REQUEST(xChangePointerDeviceReq);
+    /* REQUEST(xChangePointerDeviceReq); */
     REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
 
-    SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0,
-                      BadDevice);
-    return Success;
+    return BadDevice;
 }
diff --git a/Xi/closedev.c b/Xi/closedev.c
index 8d38ec8..1ec3fa1 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -56,15 +56,12 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include "scrnintstr.h"	/* screen structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -151,10 +148,8 @@ ProcXCloseDevice(ClientPtr client)
     REQUEST_SIZE_MATCH(xCloseDeviceReq);
 
     d = LookupDeviceIntRec(stuff->deviceid);
-    if (d == NULL) {
-	SendErrorToClient(client, IReqCode, X_CloseDevice, 0, BadDevice);
-	return Success;
-    }
+    if (d == NULL)
+	return BadDevice;
 
     if (d->grab && SameClient(d->grab, client))
 	(*d->DeactivateGrab) (d);	/* release active grab */
diff --git a/Xi/devbell.c b/Xi/devbell.c
index ba873c7..83e844d 100644
--- a/Xi/devbell.c
+++ b/Xi/devbell.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -108,14 +105,12 @@ ProcXDeviceBell(ClientPtr client)
     dev = LookupDeviceIntRec(stuff->deviceid);
     if (dev == NULL) {
 	client->errorValue = stuff->deviceid;
-	SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadDevice);
-	return Success;
+	return BadDevice;
     }
 
     if (stuff->percent < -100 || stuff->percent > 100) {
 	client->errorValue = stuff->percent;
-	SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
-	return Success;
+	return BadValue;
     }
     if (stuff->feedbackclass == KbdFeedbackClass) {
 	for (k = dev->kbdfeed; k; k = k->next)
@@ -123,8 +118,7 @@ ProcXDeviceBell(ClientPtr client)
 		break;
 	if (!k) {
 	    client->errorValue = stuff->feedbackid;
-	    SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	base = k->ctrl.bell;
 	proc = k->BellProc;
@@ -136,8 +130,7 @@ ProcXDeviceBell(ClientPtr client)
 		break;
 	if (!b) {
 	    client->errorValue = stuff->feedbackid;
-	    SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
-	    return Success;
+	    return BadValue;
 	}
 	base = b->ctrl.percent;
 	proc = b->BellProc;
@@ -145,8 +138,7 @@ ProcXDeviceBell(ClientPtr client)
 	class = BellFeedbackClass;
     } else {
 	client->errorValue = stuff->feedbackclass;
-	SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
-	return Success;
+	return BadValue;
     }
     newpercent = (base * stuff->percent) / 100;
     if (stuff->percent < 0)
diff --git a/Xi/extinit.c b/Xi/extinit.c
index b1ec321..a61746e 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -58,8 +58,6 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>
-#include <X11/Xproto.h>
 #include "inputstr.h"
 #include "gcstruct.h"	/* pointer for extnsionst.h */
 #include "extnsionst.h"	/* extension entry   */
@@ -289,9 +287,7 @@ ProcIDispatch(ClientPtr client)
 	return (ProcXGetDeviceControl(client));
     else if (stuff->data == X_ChangeDeviceControl)
 	return (ProcXChangeDeviceControl(client));
-    else {
-	SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest);
-    }
+
     return (BadRequest);
 }
 
@@ -378,9 +374,7 @@ SProcIDispatch(ClientPtr client)
 	return (SProcXGetDeviceControl(client));
     else if (stuff->data == X_ChangeDeviceControl)
 	return (SProcXChangeDeviceControl(client));
-    else {
-	SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest);
-    }
+
     return (BadRequest);
 }
 
diff --git a/Xi/getbmap.c b/Xi/getbmap.c
index 5e8cf07..ebb0613 100644
--- a/Xi/getbmap.c
+++ b/Xi/getbmap.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -106,18 +103,13 @@ ProcXGetDeviceButtonMapping(ClientPtr cl
     rep.sequenceNumber = client->sequence;
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     b = dev->button;
-    if (b == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0,
-			  BadMatch);
-	return Success;
-    }
+    if (b == NULL)
+	return BadMatch;
+
     rep.nElts = b->numButtons;
     rep.length = (rep.nElts + (4 - 1)) / 4;
     WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep);
diff --git a/Xi/getdctl.c b/Xi/getdctl.c
index 88f061e..8a84e91 100644
--- a/Xi/getdctl.c
+++ b/Xi/getdctl.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -250,10 +247,8 @@ ProcXGetDeviceControl(ClientPtr client)
     REQUEST_SIZE_MATCH(xGetDeviceControlReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     rep.repType = X_Reply;
     rep.RepType = X_GetDeviceControl;
@@ -262,29 +257,20 @@ ProcXGetDeviceControl(ClientPtr client)
 
     switch (stuff->control) {
     case DEVICE_RESOLUTION:
-	if (!dev->valuator) {
-	    SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
-			      BadMatch);
-	    return Success;
-	}
+	if (!dev->valuator)
+	    return BadMatch;
 	total_length = sizeof(xDeviceResolutionState) +
 	    (3 * sizeof(int) * dev->valuator->numAxes);
 	break;
     case DEVICE_ABS_CALIB:
-        if (!dev->absolute) {
-            SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
-                              BadMatch);
-            return Success;
-        }
+        if (!dev->absolute)
+	    return BadMatch;
 
         total_length = sizeof(xDeviceAbsCalibCtl);
         break;
     case DEVICE_ABS_AREA:
-        if (!dev->absolute) {
-            SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
-                              BadMatch);
-            return Success;
-        }
+        if (!dev->absolute)
+	    return BadMatch;
 
         total_length = sizeof(xDeviceAbsAreaCtl);
         break;
@@ -295,15 +281,12 @@ ProcXGetDeviceControl(ClientPtr client)
         total_length = sizeof(xDeviceEnableCtl);
         break;
     default:
-	SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadValue);
-	return Success;
+	return BadValue;
     }
 
     buf = (char *)xalloc(total_length);
-    if (!buf) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadAlloc);
-	return Success;
-    }
+    if (!buf)
+	return BadAlloc;
     savbuf = buf;
 
     switch (stuff->control) {
diff --git a/Xi/getfctl.c b/Xi/getfctl.c
index 5ca90db..7dff32f 100644
--- a/Xi/getfctl.c
+++ b/Xi/getfctl.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -308,10 +305,8 @@ ProcXGetFeedbackControl(ClientPtr client
     REQUEST_SIZE_MATCH(xGetFeedbackControlReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     rep.repType = X_Reply;
     rep.RepType = X_GetFeedbackControl;
@@ -345,16 +340,12 @@ ProcXGetFeedbackControl(ClientPtr client
 	total_length += sizeof(xBellFeedbackState);
     }
 
-    if (total_length == 0) {
-	SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadMatch);
-	return Success;
-    }
+    if (total_length == 0)
+	return BadMatch;
 
     buf = (char *)xalloc(total_length);
-    if (!buf) {
-	SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadAlloc);
-	return Success;
-    }
+    if (!buf)
+	return BadAlloc;
     savbuf = buf;
 
     for (k = dev->kbdfeed; k; k = k->next)
diff --git a/Xi/getfocus.c b/Xi/getfocus.c
index 245b5f1..073913b 100644
--- a/Xi/getfocus.c
+++ b/Xi/getfocus.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "windowstr.h"	/* focus struct      */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -101,10 +98,8 @@ ProcXGetDeviceFocus(ClientPtr client)
     REQUEST_SIZE_MATCH(xGetDeviceFocusReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL || !dev->focus) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceFocus, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL || !dev->focus)
+	return BadDevice;
 
     rep.repType = X_Reply;
     rep.RepType = X_GetDeviceFocus;
diff --git a/Xi/getkmap.c b/Xi/getkmap.c
index 989f3d5..eaa0cff 100644
--- a/Xi/getkmap.c
+++ b/Xi/getkmap.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "swaprep.h"
@@ -102,29 +99,21 @@ ProcXGetDeviceKeyMapping(ClientPtr clien
     REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0,
-			  BadDevice);
-	return Success;
-    }
-
-    if (dev->key == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadMatch);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+    if (dev->key == NULL)
+	return BadMatch;
     k = &dev->key->curKeySyms;
 
     if ((stuff->firstKeyCode < k->minKeyCode) ||
 	(stuff->firstKeyCode > k->maxKeyCode)) {
 	client->errorValue = stuff->firstKeyCode;
-	SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue);
-	return Success;
+	return BadValue;
     }
 
     if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) {
 	client->errorValue = stuff->count;
-	SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue);
-	return Success;
+	return BadValue;
     }
 
     rep.repType = X_Reply;
diff --git a/Xi/getmmap.c b/Xi/getmmap.c
index 038937e..8a99d63 100644
--- a/Xi/getmmap.c
+++ b/Xi/getmmap.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>	/* Request macro     */
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -102,18 +99,13 @@ ProcXGetDeviceModifierMapping(ClientPtr 
     REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     kp = dev->key;
-    if (kp == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0,
-			  BadMatch);
-	return Success;
-    }
+    if (kp == NULL)
+	return BadMatch;
+
     maxkeys = kp->maxKeysPerModifier;
 
     rep.repType = X_Reply;
diff --git a/Xi/getprop.c b/Xi/getprop.c
index 6fa1986..531e65f 100644
--- a/Xi/getprop.c
+++ b/Xi/getprop.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structs    */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "swaprep.h"
@@ -116,11 +113,8 @@ ProcXGetDeviceDontPropagateList(ClientPt
     rep.count = 0;
 
     rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
-    if (rc != Success) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0,
-			  rc);
-	return Success;
-    }
+    if (rc != Success)
+	return rc;
 
     if ((others = wOtherInputMasks(pWin)) != 0) {
 	for (i = 0; i < EMASKSIZE; i++)
diff --git a/Xi/getselev.c b/Xi/getselev.c
index 9c5f219..819b2db 100644
--- a/Xi/getselev.c
+++ b/Xi/getselev.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window struct     */
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "swaprep.h"
@@ -118,11 +115,8 @@ ProcXGetSelectedExtensionEvents(ClientPt
     rep.all_clients_count = 0;
 
     rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
-    if (rc != Success) {
-	SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0,
-			  rc);
-	return Success;
-    }
+    if (rc != Success)
+	return rc;
 
     if ((pOthers = wOtherInputMasks(pWin)) != 0) {
 	for (others = pOthers->inputClients; others; others = others->next)
diff --git a/Xi/getvers.c b/Xi/getvers.c
index b3f4c1c..a223a5d 100644
--- a/Xi/getvers.c
+++ b/Xi/getvers.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -102,11 +99,8 @@ ProcXGetExtensionVersion(ClientPtr clien
     REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
 
     if (stuff->length != (sizeof(xGetExtensionVersionReq) +
-			  stuff->nbytes + 3) >> 2) {
-	SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0,
-			  BadLength);
-	return Success;
-    }
+			  stuff->nbytes + 3) >> 2)
+	return BadLength;
 
     rep.repType = X_Reply;
     rep.RepType = X_GetExtensionVersion;
diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index e2809ef..b303695 100644
--- a/Xi/grabdev.c
+++ b/Xi/grabdev.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "dixevents.h"	/* GrabDevice */
@@ -109,7 +106,7 @@ SProcXGrabDevice(ClientPtr client)
 int
 ProcXGrabDevice(ClientPtr client)
 {
-    int error;
+    int rc;
     xGrabDeviceReply rep;
     DeviceIntPtr dev;
     struct tmask tmp[EMASKSIZE];
@@ -117,10 +114,8 @@ ProcXGrabDevice(ClientPtr client)
     REQUEST(xGrabDeviceReq);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
 
-    if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) {
-	SendErrorToClient(client, IReqCode, X_GrabDevice, 0, BadLength);
-	return Success;
-    }
+    if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count)
+	return BadLength;
 
     rep.repType = X_Reply;
     rep.RepType = X_GrabDevice;
@@ -128,25 +123,22 @@ ProcXGrabDevice(ClientPtr client)
     rep.length = 0;
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GrabDevice, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+
+    if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
+				 stuff->event_count, tmp, dev,
+				 X_GrabDevice)) != Success)
+	return rc;
+
+    rc = GrabDevice(client, dev, stuff->this_device_mode,
+		    stuff->other_devices_mode, stuff->grabWindow,
+		    stuff->ownerEvents, stuff->time,
+		    tmp[stuff->deviceid].mask, &rep.status);
+
+    if (rc != Success)
+	return rc;
 
-    if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
-			   stuff->event_count, tmp, dev,
-			   X_GrabDevice) != Success)
-	return Success;
-
-    error = GrabDevice(client, dev, stuff->this_device_mode,
-		       stuff->other_devices_mode, stuff->grabWindow,
-		       stuff->ownerEvents, stuff->time,
-		       tmp[stuff->deviceid].mask, &rep.status);
-
-    if (error != Success) {
-	SendErrorToClient(client, IReqCode, X_GrabDevice, 0, error);
-	return Success;
-    }
     WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep);
     return Success;
 }
@@ -172,15 +164,12 @@ CreateMaskFromList(ClientPtr client, XEv
 
     for (i = 0; i < count; i++, list++) {
 	device = *list >> 8;
-	if (device > 255) {
-	    SendErrorToClient(client, IReqCode, req, 0, BadClass);
+	if (device > 255)
 	    return BadClass;
-	}
+
 	tdev = LookupDeviceIntRec(device);
-	if (tdev == NULL || (dev != NULL && tdev != dev)) {
-	    SendErrorToClient(client, IReqCode, req, 0, BadClass);
+	if (tdev == NULL || (dev != NULL && tdev != dev))
 	    return BadClass;
-	}
 
 	for (j = 0; j < ExtEventIndex; j++)
 	    if (EventInfo[j].type == (*list & 0xff)) {
diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c
index df62d0c..21e46fc 100644
--- a/Xi/grabdevb.c
+++ b/Xi/grabdevb.c
@@ -56,14 +56,11 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "exevents.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -117,28 +114,19 @@ ProcXGrabDeviceButton(ClientPtr client)
     REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
 
     if (stuff->length !=
-	(sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count) {
-	SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadLength);
-	return Success;
-    }
+	(sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count)
+	return BadLength;
 
     dev = LookupDeviceIntRec(stuff->grabbed_device);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+
     if (stuff->modifier_device != UseXKeyboard) {
 	mdev = LookupDeviceIntRec(stuff->modifier_device);
-	if (mdev == NULL) {
-	    SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0,
-			      BadDevice);
-	    return Success;
-	}
-	if (mdev->key == NULL) {
-	    SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0,
-			      BadMatch);
-	    return Success;
-	}
+	if (mdev == NULL)
+	    return BadDevice;
+	if (mdev->key == NULL)
+	    return BadMatch;
     } else
 	mdev = (DeviceIntPtr) LookupKeyboardDevice();
 
@@ -147,13 +135,11 @@ ProcXGrabDeviceButton(ClientPtr client)
     if ((ret = CreateMaskFromList(client, class,
 				  stuff->event_count, tmp, dev,
 				  X_GrabDeviceButton)) != Success)
-	return Success;
+	return ret;
     ret = GrabButton(client, dev, stuff->this_device_mode,
 		     stuff->other_devices_mode, stuff->modifiers, mdev,
 		     stuff->button, stuff->grabWindow, stuff->ownerEvents,
 		     (Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask);
 
-    if (ret != Success)
-	SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, ret);
-    return (Success);
+    return ret;
 }
diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c
index b74592f..8da36ba 100644
--- a/Xi/grabdevk.c
+++ b/Xi/grabdevk.c
@@ -56,14 +56,11 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "exevents.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -115,27 +112,19 @@ ProcXGrabDeviceKey(ClientPtr client)
     REQUEST(xGrabDeviceKeyReq);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
 
-    if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) {
-	SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadLength);
-	return Success;
-    }
+    if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count)
+	return BadLength;
 
     dev = LookupDeviceIntRec(stuff->grabbed_device);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     if (stuff->modifier_device != UseXKeyboard) {
 	mdev = LookupDeviceIntRec(stuff->modifier_device);
-	if (mdev == NULL) {
-	    SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice);
-	    return Success;
-	}
-	if (mdev->key == NULL) {
-	    SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadMatch);
-	    return Success;
-	}
+	if (mdev == NULL)
+	    return BadDevice;
+	if (mdev->key == NULL)
+	    return BadMatch;
     } else
 	mdev = (DeviceIntPtr) LookupKeyboardDevice();
 
@@ -144,17 +133,12 @@ ProcXGrabDeviceKey(ClientPtr client)
     if ((ret = CreateMaskFromList(client, class,
 				  stuff->event_count, tmp, dev,
 				  X_GrabDeviceKey)) != Success)
-	return Success;
+	return ret;
 
     ret = GrabKey(client, dev, stuff->this_device_mode,
 		  stuff->other_devices_mode, stuff->modifiers, mdev,
 		  stuff->key, stuff->grabWindow, stuff->ownerEvents,
 		  tmp[stuff->grabbed_device].mask);
 
-    if (ret != Success) {
-	SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, ret);
-	return Success;
-    }
-
-    return Success;
+    return ret;
 }
diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c
index cfc7f89..51d4248 100644
--- a/Xi/gtmotion.c
+++ b/Xi/gtmotion.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exevents.h"
 #include "exglobals.h"
@@ -110,17 +107,11 @@ ProcXGetDeviceMotionEvents(ClientPtr cli
 
     REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
     v = dev->valuator;
-    if (v == NULL || v->numAxes == 0) {
-	SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
-			  BadMatch);
-	return Success;
-    }
+    if (v == NULL || v->numAxes == 0)
+	return BadMatch;
     if (dev->valuator->motionHintWindow)
 	MaybeStopDeviceHint(dev, client);
     axes = v->numAxes;
@@ -145,11 +136,8 @@ ProcXGetDeviceMotionEvents(ClientPtr cli
 	size = sizeof(Time) + (axes * sizeof(INT32));
 	tsize = num_events * size;
 	coords = (INT32 *) ALLOCATE_LOCAL(tsize);
-	if (!coords) {
-	    SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
-			      BadAlloc);
-	    return Success;
-	}
+	if (!coords)
+	    return BadAlloc;
 	rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords,	/* XXX */
 					  start.milliseconds, stop.milliseconds,
 					  (ScreenPtr) NULL);
diff --git a/Xi/opendev.c b/Xi/opendev.c
index 0b0671d..dfefe05 100644
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@ -56,14 +56,11 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
 #include "windowstr.h"	/* window structure  */
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -107,26 +104,20 @@ ProcXOpenDevice(ClientPtr client)
     REQUEST_SIZE_MATCH(xOpenDeviceReq);
 
     if (stuff->deviceid == inputInfo.pointer->id ||
-	stuff->deviceid == inputInfo.keyboard->id) {
-	SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
-	return Success;
-    }
+	stuff->deviceid == inputInfo.keyboard->id)
+	return BadDevice;
 
     if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) {	/* not open */
 	for (dev = inputInfo.off_devices; dev; dev = dev->next)
 	    if (dev->id == stuff->deviceid)
 		break;
-	if (dev == NULL) {
-	    SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
-	    return Success;
-	}
+	if (dev == NULL)
+	    return BadDevice;
     }
 
     OpenInputDevice(dev, client, &status);
-    if (status != Success) {
-	SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status);
-	return Success;
-    }
+    if (status != Success)
+	return status;
 
     rep.repType = X_Reply;
     rep.RepType = X_OpenDevice;
diff --git a/Xi/queryst.c b/Xi/queryst.c
index 972cd2c..2b66b7e 100644
--- a/Xi/queryst.c
+++ b/Xi/queryst.c
@@ -38,13 +38,10 @@ from The Open Group.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exevents.h"
 #include "exglobals.h"
@@ -100,10 +97,8 @@ ProcXQueryDeviceState(ClientPtr client)
     rep.sequenceNumber = client->sequence;
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     v = dev->valuator;
     if (v != NULL && v->motionHintWindow != NULL)
@@ -126,10 +121,8 @@ ProcXQueryDeviceState(ClientPtr client)
 	num_classes++;
     }
     buf = (char *)xalloc(total_length);
-    if (!buf) {
-	SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, BadAlloc);
-	return Success;
-    }
+    if (!buf)
+	return BadAlloc;
     savbuf = buf;
 
     if (k != NULL) {
diff --git a/Xi/selectev.c b/Xi/selectev.c
index d52db1b..a5cf567 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -57,13 +57,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exevents.h"
 #include "exglobals.h"
@@ -164,40 +161,29 @@ ProcXSelectExtensionEvent(ClientPtr clie
     REQUEST(xSelectExtensionEventReq);
     REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
 
-    if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) {
-	SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
-			  BadLength);
-	return Success;
-    }
+    if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count)
+	return BadLength;
 
     ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
-    if (ret != Success) {
-	SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, ret);
-	return Success;
-    }
+    if (ret != Success)
+	return ret;
 
     if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1],
-                                &stuff->count) != Success) {
-       SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
-                         BadAlloc);
-       return Success;
-    }
+                                &stuff->count) != Success)
+	return BadAlloc;
 
     if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1],
 				  stuff->count, tmp, NULL,
 				  X_SelectExtensionEvent)) != Success)
-	return Success;
+	return ret;
 
     for (i = 0; i < EMASKSIZE; i++)
 	if (tmp[i].dev != NULL) {
 	    if ((ret =
 		 SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client,
 				 tmp[i].mask, ExtExclusiveMasks[i],
-				 ExtValidMasks[i])) != Success) {
-		SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
-				  ret);
-		return Success;
-	    }
+				 ExtValidMasks[i])) != Success)
+		return ret;
 	}
 
     return Success;
diff --git a/Xi/sendexev.c b/Xi/sendexev.c
index eac9abe..20b415a 100644
--- a/Xi/sendexev.c
+++ b/Xi/sendexev.c
@@ -57,13 +57,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* Window            */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exevents.h"
 #include "exglobals.h"
@@ -131,38 +128,29 @@ ProcXSendExtensionEvent(ClientPtr client
     REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
 
     if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count +
-	(stuff->num_events * (sizeof(xEvent) >> 2))) {
-	SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadLength);
-	return Success;
-    }
+	(stuff->num_events * (sizeof(xEvent) >> 2)))
+	return BadLength;
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     /* The client's event type must be one defined by an extension. */
 
     first = ((xEvent *) & stuff[1]);
     if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
-	  (first->u.u.type < lastEvent))) {
+	  (first->u.u.type < lastEvent)))
 	client->errorValue = first->u.u.type;
-	SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadValue);
-	return Success;
-    }
+	return BadValue;
 
     list = (XEventClass *) (first + stuff->num_events);
     if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev,
 				  X_SendExtensionEvent)) != Success)
-	return Success;
+	return ret;
 
     ret = (SendEvent(client, dev, stuff->destination,
 		     stuff->propagate, (xEvent *) & stuff[1],
 		     tmp[stuff->deviceid].mask, stuff->num_events));
 
-    if (ret != Success)
-	SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, ret);
-
-    return Success;
+    return ret;
 }
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index 1f5970d..40f0f9a 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -59,13 +59,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "exevents.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -104,11 +101,8 @@ ProcXSetDeviceButtonMapping(ClientPtr cl
     REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
 
     if (stuff->length != (sizeof(xSetDeviceButtonMappingReq) +
-			  stuff->map_length + 3) >> 2) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0,
-			  BadLength);
-	return Success;
-    }
+			  stuff->map_length + 3) >> 2)
+	return BadLength;
 
     rep.repType = X_Reply;
     rep.RepType = X_SetDeviceButtonMapping;
@@ -117,18 +111,14 @@ ProcXSetDeviceButtonMapping(ClientPtr cl
     rep.status = MappingSuccess;
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]);
 
-    if (ret == BadValue || ret == BadMatch) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0, ret);
-	return Success;
-    } else {
+    if (ret == BadValue || ret == BadMatch)
+	return ret;
+    else {
 	rep.status = ret;
 	WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep);
     }
diff --git a/Xi/setdval.c b/Xi/setdval.c
index e947a74..cb35b91 100644
--- a/Xi/setdval.c
+++ b/Xi/setdval.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -106,24 +103,17 @@ ProcXSetDeviceValuators(ClientPtr client
     rep.sequenceNumber = client->sequence;
 
     if (stuff->length != (sizeof(xSetDeviceValuatorsReq) >> 2) +
-	stuff->num_valuators) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadLength);
-	return Success;
-    }
+	stuff->num_valuators)
+	return BadLength;
+
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadDevice);
-	return Success;
-    }
-    if (dev->valuator == NULL) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadMatch);
-	return Success;
-    }
-
-    if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadValue);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+    if (dev->valuator == NULL)
+	return BadMatch;
+
+    if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes)
+	return BadValue;
 
     if ((dev->grab) && !SameClient(dev->grab, client))
 	rep.status = AlreadyGrabbed;
@@ -133,11 +123,9 @@ ProcXSetDeviceValuators(ClientPtr client
 					stuff->num_valuators);
 
     if (rep.status != Success && rep.status != AlreadyGrabbed)
-	SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0,
-			  rep.status);
-    else
-	WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep);
+	return rep.status;
 
+    WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep);
     return Success;
 }
 
diff --git a/Xi/setfocus.c b/Xi/setfocus.c
index aaf88ce..74de17e 100644
--- a/Xi/setfocus.c
+++ b/Xi/setfocus.c
@@ -56,8 +56,6 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "windowstr.h"	/* focus struct      */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
@@ -65,7 +63,6 @@ SOFTWARE.
 
 #include "dixevents.h"
 
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -106,15 +103,11 @@ ProcXSetDeviceFocus(ClientPtr client)
     REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
 
     dev = LookupDeviceIntRec(stuff->device);
-    if (dev == NULL || !dev->focus) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceFocus, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL || !dev->focus)
+	return BadDevice;
 
     ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo,
 			stuff->time, TRUE);
-    if (ret != Success)
-	SendErrorToClient(client, IReqCode, X_SetDeviceFocus, 0, ret);
 
-    return Success;
+    return ret;
 }
diff --git a/Xi/setmmap.c b/Xi/setmmap.c
index e30213e..19ec71b 100644
--- a/Xi/setmmap.c
+++ b/Xi/setmmap.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "exevents.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -103,11 +100,8 @@ ProcXSetDeviceModifierMapping(ClientPtr 
     REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0,
-			  BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
 
     rep.repType = X_Reply;
     rep.RepType = X_SetDeviceModifierMapping;
@@ -125,11 +119,8 @@ ProcXSetDeviceModifierMapping(ClientPtr 
 	    SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev);
 	WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
 			   &rep);
-    } else {
-	if (ret == -1)
-	    ret = BadValue;
-	SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0, ret);
-    }
+    } else if (ret == -1)
+	return BadValue;
 
     return Success;
 }
diff --git a/Xi/setmode.c b/Xi/setmode.c
index 688f2a2..957721c 100644
--- a/Xi/setmode.c
+++ b/Xi/setmode.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 #include "XIstubs.h"
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -105,14 +102,10 @@ ProcXSetDeviceMode(ClientPtr client)
     rep.sequenceNumber = client->sequence;
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadDevice);
-	return Success;
-    }
-    if (dev->valuator == NULL) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadMatch);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+    if (dev->valuator == NULL)
+	return BadMatch;
     if ((dev->grab) && !SameClient(dev->grab, client))
 	rep.status = AlreadyGrabbed;
     else
@@ -120,10 +113,8 @@ ProcXSetDeviceMode(ClientPtr client)
 
     if (rep.status == Success)
 	dev->valuator->mode = stuff->mode;
-    else if (rep.status != AlreadyGrabbed) {
-	SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, rep.status);
-	return Success;
-    }
+    else if (rep.status != AlreadyGrabbed)
+	return rep.status;
 
     WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep);
     return Success;
diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c
index 0abbd2e..505d669 100644
--- a/Xi/ungrdev.c
+++ b/Xi/ungrdev.c
@@ -56,12 +56,9 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 
@@ -102,10 +99,8 @@ ProcXUngrabDevice(ClientPtr client)
     REQUEST_SIZE_MATCH(xUngrabDeviceReq);
 
     dev = LookupDeviceIntRec(stuff->deviceid);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_UngrabDevice, 0, BadDevice);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
     grab = dev->grab;
 
     time = ClientTimeToServerTime(stuff->time);
diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c
index b9f236b..0dfe805 100644
--- a/Xi/ungrdevb.c
+++ b/Xi/ungrdevb.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "dixgrabs.h"
@@ -111,41 +108,27 @@ ProcXUngrabDeviceButton(ClientPtr client
     REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
 
     dev = LookupDeviceIntRec(stuff->grabbed_device);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadDevice);
-	return Success;
-    }
-    if (dev->button == NULL) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadMatch);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+    if (dev->button == NULL)
+	return BadMatch;
 
     if (stuff->modifier_device != UseXKeyboard) {
 	mdev = LookupDeviceIntRec(stuff->modifier_device);
-	if (mdev == NULL) {
-	    SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
-			      BadDevice);
-	    return Success;
-	}
-	if (mdev->key == NULL) {
-	    SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
-			      BadMatch);
-	    return Success;
-	}
+	if (mdev == NULL)
+	    return BadDevice;
+	if (mdev->key == NULL)
+	    return BadMatch;
     } else
 	mdev = (DeviceIntPtr) LookupKeyboardDevice();
 
     rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
-    if (rc != Success) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc);
-	return Success;
-    }
+    if (rc != Success)
+	return rc;
 
     if ((stuff->modifiers != AnyModifier) &&
-	(stuff->modifiers & ~AllModifiersMask)) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadValue);
-	return Success;
-    }
+	(stuff->modifiers & ~AllModifiersMask))
+	return BadValue;
 
     temporaryGrab.resource = client->clientAsMask;
     temporaryGrab.device = dev;
diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c
index d316990..e6307af 100644
--- a/Xi/ungrdevk.c
+++ b/Xi/ungrdevk.c
@@ -56,13 +56,10 @@ SOFTWARE.
 #include <dix-config.h>
 #endif
 
-#include <X11/X.h>	/* for inputstr.h    */
-#include <X11/Xproto.h>	/* Request macro     */
 #include "inputstr.h"	/* DeviceIntPtr      */
 #include "windowstr.h"	/* window structure  */
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
 #include "extinit.h"	/* LookupDeviceIntRec */
 #include "exglobals.h"
 #include "dixgrabs.h"
@@ -111,45 +108,32 @@ ProcXUngrabDeviceKey(ClientPtr client)
     REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
 
     dev = LookupDeviceIntRec(stuff->grabbed_device);
-    if (dev == NULL) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadDevice);
-	return Success;
-    }
-    if (dev->key == NULL) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadMatch);
-	return Success;
-    }
+    if (dev == NULL)
+	return BadDevice;
+    if (dev->key == NULL)
+	return BadMatch;
 
     if (stuff->modifier_device != UseXKeyboard) {
 	mdev = LookupDeviceIntRec(stuff->modifier_device);
-	if (mdev == NULL) {
-	    SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0,
-			      BadDevice);
-	    return Success;
-	}
-	if (mdev->key == NULL) {
-	    SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadMatch);
-	    return Success;
-	}
+	if (mdev == NULL)
+	    return BadDevice;
+	if (mdev->key == NULL)
+	    return BadMatch;
     } else
 	mdev = (DeviceIntPtr) LookupKeyboardDevice();
 
     rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
-    if (rc != Success) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, rc);
-	return Success;
-    }
+    if (rc != Success)
+	return rc;
+
     if (((stuff->key > dev->key->curKeySyms.maxKeyCode) ||
 	 (stuff->key < dev->key->curKeySyms.minKeyCode))
-	&& (stuff->key != AnyKey)) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadValue);
-	return Success;
-    }
+	&& (stuff->key != AnyKey))
+	return BadValue;
+
     if ((stuff->modifiers != AnyModifier) &&
-	(stuff->modifiers & ~AllModifiersMask)) {
-	SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadValue);
-	return Success;
-    }
+	(stuff->modifiers & ~AllModifiersMask))
+	return BadValue;
 
     temporaryGrab.resource = client->clientAsMask;
     temporaryGrab.device = dev;
diff-tree 56ffc381d32687242dd094395fcf2216339bab2a (from aa0325db7e8ab11d9418cae14f11c488f443ccaa)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date:   Wed Sep 26 16:47:54 2007 +0200

    EXA: Removed duplicated exaGetDrawablePixmap() calls.

diff --git a/exa/exa_render.c b/exa/exa_render.c
index 4c93128..2ad5304 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -384,7 +384,6 @@ exaTryDriverComposite(CARD8		op,
 				   width, height))
 	return 1;
 
-    pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
     exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
 
     REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
@@ -395,12 +394,12 @@ exaTryDriverComposite(CARD8		op,
     pixmaps[0].pReg = pixmaps[0].as_src ? NULL : &region;
     pixmaps[1].as_dst = FALSE;
     pixmaps[1].as_src = TRUE;
-    pixmaps[1].pPix = exaGetDrawablePixmap (pSrc->pDrawable);
+    pixmaps[1].pPix = pSrcPix;
     pixmaps[1].pReg = NULL;
     if (pMask) {
 	pixmaps[2].as_dst = FALSE;
 	pixmaps[2].as_src = TRUE;
-	pixmaps[2].pPix = exaGetDrawablePixmap (pMask->pDrawable);
+	pixmaps[2].pPix = pMaskPix;
 	pixmaps[2].pReg = NULL;
 	exaDoMigration(pixmaps, 3, TRUE);
     } else {
diff-tree aa0325db7e8ab11d9418cae14f11c488f443ccaa (from ae8b4f7dcf1291a2f5a0d0159f3e6089eea0578a)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Wed Sep 26 15:26:42 2007 +0200

    Xephyr: fix compiler warnings
    
    	* hw/kdrive/ephyr/ephyr_draw.c:
    	  (ephyrDownloadFromScreen),
    	  (ephyrUploadToScreen): fix compiler warnings

diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
index 93ef27a..422b7c6 100644
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ b/hw/kdrive/ephyr/ephyr_draw.c
@@ -308,7 +308,7 @@ ephyrDownloadFromScreen(PixmapPtr pSrc, 
     KdScreenInfo *screen = pScreenPriv->screen;
     EphyrScrPriv *scrpriv = screen->driver;
     EphyrFakexaPriv *fakexa = scrpriv->fakexa;
-    char *src;
+    unsigned char *src;
     int src_pitch, cpp;
 
     if (pSrc->drawable.bitsPerPixel < 8)
@@ -345,7 +345,7 @@ ephyrUploadToScreen(PixmapPtr pDst, int 
     KdScreenInfo *screen = pScreenPriv->screen;
     EphyrScrPriv *scrpriv = screen->driver;
     EphyrFakexaPriv *fakexa = scrpriv->fakexa;
-    char *dst;
+    unsigned char *dst;
     int dst_pitch, cpp;
 
     if (pDst->drawable.bitsPerPixel < 8)
diff-tree ae8b4f7dcf1291a2f5a0d0159f3e6089eea0578a (from 988f446fe00ac2b92c484a4440613dd82191eadd)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date:   Mon Sep 24 22:06:52 2007 +0200

    EXA: Added pitch limitations.
    
    Drivers can now specify the max pitches that the accelerator supports.

diff --git a/exa/exa.c b/exa/exa.c
index 6205027..ae6b70f 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -278,6 +278,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w
     REGION_NULL(pScreen, &pExaPixmap->validSys);
     REGION_NULL(pScreen, &pExaPixmap->validFB);
 
+    /* Check whether this pixmap can be used for acceleration. */
+    pExaPixmap->accel_blocked = 0;
+
+    if (pExaScr->info->maxPitchPixels) {
+        int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8;
+
+        if (pExaPixmap->fb_pitch > max_pitch)
+            pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
+    }
+
+    if (pExaScr->info->maxPitchBytes &&
+        pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes)
+        pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
+
+    if (w > pExaScr->info->maxX)
+        pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH;
+
+    if (h > pExaScr->info->maxY)
+        pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT;
+
     return pPixmap;
 }
 
@@ -707,6 +727,39 @@ exaDriverInit (ScreenPtr		pScreen,
 	return FALSE;
     }
 
+    /* If the driver doesn't set any max pitch values, we'll just assume
+     * that there's a limitation by pixels, and that it's the same as
+     * maxX.
+     */
+    if (!pScreenInfo->maxPitchPixels && !pScreenInfo->maxPitchBytes)
+    {
+        pScreenInfo->maxPitchPixels = pScreenInfo->maxX;
+    }
+
+    /* If set, maxPitchPixels must not be smaller than maxX. */
+    if (pScreenInfo->maxPitchPixels &&
+        pScreenInfo->maxPitchPixels < pScreenInfo->maxX)
+    {
+        LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::maxPitchPixels "
+                   "is smaller than ExaDriverRec::maxX\n",
+                   pScreen->myNum);
+	return FALSE;
+    }
+
+    /* If set, maxPitchBytes must not be smaller than maxX * 4.
+     * This is to ensure that a 32bpp pixmap with the maximum width
+     * can be handled wrt the pitch.
+     */
+    if (pScreenInfo->maxPitchBytes &&
+        pScreenInfo->maxPitchBytes < (pScreenInfo->maxX * 4))
+    {
+        LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::maxPitchBytes "
+                   "doesn't allow a 32bpp pixmap with width equal to "
+                   "ExaDriverRec::maxX\n",
+                   pScreen->myNum);
+	return FALSE;
+    }
+
 #ifdef RENDER
     ps = GetPictureScreenIfSet(pScreen);
 #endif
diff --git a/exa/exa.h b/exa/exa.h
index 9ea5933..491e6b1 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -39,7 +39,7 @@
 #include "fb.h"
 
 #define EXA_VERSION_MAJOR   2
-#define EXA_VERSION_MINOR   2
+#define EXA_VERSION_MINOR   3
 #define EXA_VERSION_RELEASE 0
 
 typedef struct _ExaOffscreenArea ExaOffscreenArea;
@@ -671,6 +671,37 @@ typedef struct _ExaDriver {
 	 */
 	#define EXA_PREPARE_MASK	2
 	/** @} */
+
+    /**
+     * maxPitchPixels controls the pitch limitation for rendering from
+     * the card.
+     * The driver should never receive a request for rendering a pixmap
+     * that has a pitch (in pixels) beyond maxPitchPixels.
+     *
+     * Setting this field is optional -- if your hardware doesn't have
+     * a pitch limitation in pixels, don't set this. If neither this value
+     * nor maxPitchBytes is set, then maxPitchPixels is set to maxX.
+     * If set, it must not be smaller than maxX.
+     *
+     * @sa maxPitchBytes
+     */
+    int maxPitchPixels;
+
+    /**
+     * maxPitchBytes controls the pitch limitation for rendering from
+     * the card.
+     * The driver should never receive a request for rendering a pixmap
+     * that has a pitch (in bytes) beyond maxPitchBytes.
+     *
+     * Setting this field is optional -- if your hardware doesn't have
+     * a pitch limitation in bytes, don't set this.
+     * If set, it must not be smaller than maxX * 4.
+     * There's no default value for maxPitchBytes.
+     *
+     * @sa maxPitchPixels
+     */
+    int maxPitchBytes;
+
     /** @} */
 } ExaDriverRec, *ExaDriverPtr;
 
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 2acade2..028d936 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -43,7 +43,8 @@ exaFillSpans(DrawablePtr pDrawable, GCPt
     ScreenPtr	    pScreen = pDrawable->pScreen;
     ExaScreenPriv (pScreen);
     RegionPtr	    pClip = fbGetCompositeClip(pGC);
-    PixmapPtr	    pPixmap;
+    PixmapPtr	    pPixmap = exaGetDrawablePixmap (pDrawable);
+    ExaPixmapPriv (pPixmap);
     BoxPtr	    pextent, pbox;
     int		    nbox;
     int		    extentX1, extentX2, extentY1, extentY2;
@@ -54,13 +55,12 @@ exaFillSpans(DrawablePtr pDrawable, GCPt
 
     pixmaps[0].as_dst = TRUE;
     pixmaps[0].as_src = FALSE;
-    pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
+    pixmaps[0].pPix = pPixmap;
     pixmaps[0].pReg = NULL;
 
     if (pExaScr->swappedOut ||
 	pGC->fillStyle != FillSolid ||
-	pPixmap->drawable.width > pExaScr->info->maxX ||
-	pPixmap->drawable.height > pExaScr->info->maxY)
+	pExaPixmap->accel_blocked)
     {
 	ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
 	return;
@@ -480,6 +480,7 @@ exaCopyNtoN (DrawablePtr    pSrcDrawable
 {
     ExaScreenPriv (pDstDrawable->pScreen);
     PixmapPtr pSrcPixmap, pDstPixmap;
+    ExaPixmapPrivPtr pSrcExaPixmap, pDstExaPixmap;
     int	    src_off_x, src_off_y;
     int	    dst_off_x, dst_off_y;
     ExaMigrationRec pixmaps[2];
@@ -527,14 +528,14 @@ exaCopyNtoN (DrawablePtr    pSrcDrawable
     pixmaps[1].pPix = pSrcPixmap;
     pixmaps[1].pReg = NULL;
 
-    /* Respect maxX/maxY in a trivial way: don't set up drawing when we might
-     * violate the limits.  The proper solution would be a temporary pixmap
-     * adjusted so that the drawing happened within limits.
+    pSrcExaPixmap = ExaGetPixmapPriv (pSrcPixmap);
+    pDstExaPixmap = ExaGetPixmapPriv (pDstPixmap);
+
+    /* Check whether the accelerator can use this pixmap.
+     * FIXME: If it cannot, use temporary pixmaps so that the drawing
+     * happens within limits.
      */
-    if (pSrcPixmap->drawable.width > pExaScr->info->maxX ||
-	pSrcPixmap->drawable.height > pExaScr->info->maxY ||
-	pDstPixmap->drawable.width > pExaScr->info->maxX ||
-	pDstPixmap->drawable.height > pExaScr->info->maxY)
+    if (pSrcExaPixmap->accel_blocked || pDstExaPixmap->accel_blocked)
     {
 	goto fallback;
     } else {
@@ -760,6 +761,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
     ExaScreenPriv (pDrawable->pScreen);
     RegionPtr	    pClip = fbGetCompositeClip(pGC);
     PixmapPtr	    pPixmap = exaGetDrawablePixmap(pDrawable);
+    ExaPixmapPriv (pPixmap);
     register BoxPtr pbox;
     BoxPtr	    pextent;
     int		    extentX1, extentX2, extentY1, extentY2;
@@ -786,9 +788,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
 
     exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
 
-    if (pExaScr->swappedOut ||
-	pPixmap->drawable.width > pExaScr->info->maxX ||
-	pPixmap->drawable.height > pExaScr->info->maxY)
+    if (pExaScr->swappedOut || pExaPixmap->accel_blocked)
     {
 	goto fallback;
     }
@@ -1102,21 +1102,21 @@ exaFillRegionSolid (DrawablePtr	pDrawabl
 		    CARD32	alu)
 {
     ExaScreenPriv(pDrawable->pScreen);
-    PixmapPtr pPixmap;
+    PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
+    ExaPixmapPriv (pPixmap);
     int xoff, yoff;
     ExaMigrationRec pixmaps[1];
 
     pixmaps[0].as_dst = TRUE;
     pixmaps[0].as_src = FALSE;
-    pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
+    pixmaps[0].pPix = pPixmap;
     pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
 					    alu) ? NULL : pRegion;
 
     exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
     REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
 
-    if (pPixmap->drawable.width > pExaScr->info->maxX ||
-	pPixmap->drawable.height > pExaScr->info->maxY)
+    if (pExaPixmap->accel_blocked)
     {
 	goto fallback;
     } else {
@@ -1193,6 +1193,8 @@ exaFillRegionTiled (DrawablePtr	pDrawabl
 {
     ExaScreenPriv(pDrawable->pScreen);
     PixmapPtr pPixmap;
+    ExaPixmapPrivPtr pExaPixmap;
+    ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile);
     int xoff, yoff, tileXoff, tileYoff;
     int tileWidth, tileHeight;
     ExaMigrationRec pixmaps[2];
@@ -1223,10 +1225,9 @@ exaFillRegionTiled (DrawablePtr	pDrawabl
     exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
     REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
 
-    if (pPixmap->drawable.width > pExaScr->info->maxX ||
-	pPixmap->drawable.height > pExaScr->info->maxY ||
-	tileWidth > pExaScr->info->maxX ||
-	tileHeight > pExaScr->info->maxY)
+    pExaPixmap = ExaGetPixmapPriv (pPixmap);
+
+    if (pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked)
     {
 	goto fallback;
     } else {
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 9e4f8bc..a26933d 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -154,6 +154,10 @@ extern int exaPixmapPrivateIndex;
 #define ExaSetPixmapPriv(p,a)	((p)->devPrivates[exaPixmapPrivateIndex].ptr = (pointer) (a))
 #define ExaPixmapPriv(p)	ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
 
+#define EXA_RANGE_PITCH (1 << 0)
+#define EXA_RANGE_WIDTH (1 << 1)
+#define EXA_RANGE_HEIGHT (1 << 2)
+
 typedef struct {
     ExaOffscreenArea *area;
     int		    score;	/**< score for the move-in vs move-out heuristic */
@@ -167,6 +171,17 @@ typedef struct {
     unsigned int    fb_size;	/**< size of pixmap in framebuffer memory */
 
     /**
+     * Holds information about whether this pixmap can be used for
+     * acceleration (== 0) or not (> 0).
+     *
+     * Contains a OR'ed combination of the following values:
+     * EXA_RANGE_PITCH - set if the pixmap's pitch is out of range
+     * EXA_RANGE_WIDTH - set if the pixmap's width is out of range
+     * EXA_RANGE_HEIGHT - set if the pixmap's height is out of range
+     */
+    unsigned int    accel_blocked;
+
+    /**
      * The damage record contains the areas of the pixmap's current location
      * (framebuffer or system) that have been damaged compared to the other
      * location.
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 943a4c8..4c93128 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -336,24 +336,28 @@ exaTryDriverComposite(CARD8		op,
     int nbox;
     int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
     PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
+    ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix;
     struct _Pixmap scratch;
     ExaMigrationRec pixmaps[3];
 
     pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
+    pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
+
     pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
-    if (pMask)
+    pDstExaPix = ExaGetPixmapPriv(pDstPix);
+
+    if (pMask) {
 	pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
+        pMaskExaPix = ExaGetPixmapPriv(pMaskPix);
+    }
 
-    /* Bail if we might exceed coord limits by rendering from/to these.  We
-     * should really be making some scratch pixmaps with offsets and coords
-     * adjusted to deal with this, but it hasn't been done yet.
+    /* Check whether the accelerator can use these pixmaps.
+     * FIXME: If it cannot, use temporary pixmaps so that the drawing
+     * happens within limits.
      */
-    if (pSrcPix->drawable.width > pExaScr->info->maxX ||
-	pSrcPix->drawable.height > pExaScr->info->maxY ||
-	pDstPix->drawable.width > pExaScr->info->maxX ||
-	pDstPix->drawable.height > pExaScr->info->maxY || 
-	(pMask && (pMaskPix->drawable.width > pExaScr->info->maxX ||
-		   pMaskPix->drawable.height > pExaScr->info->maxY)))
+    if (pSrcExaPix->accel_blocked ||
+	pDstExaPix->accel_blocked ||
+	(pMask && (pMaskExaPix->accel_blocked)))
     {
 	return -1;
     }
diff-tree b61461425eb15fcff2a58330d74fe5a5a1f226fc (from 9bd04055a2175ec16756d3bf73ae03b5e163a28a)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Sep 25 09:56:00 2007 -0400

    xace: add hooks + new access codes: XV extension.
    
    May need to revisit this extension in the future, depending on observed use.

diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index a2dac75..f6130df 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -383,7 +383,7 @@ ProcXvQueryAdaptors(ClientPtr client)
   REQUEST(xvQueryAdaptorsReq);
   REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
 
-  rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+  rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
   if (rc != Success)
       return rc;
 
@@ -718,7 +718,7 @@ ProcXvSelectVideoNotify(ClientPtr client
   REQUEST(xvSelectVideoNotifyReq);
   REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
 
-  rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess);
+  rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReceiveAccess);
   if (rc != Success)
     return rc;
 
@@ -835,7 +835,7 @@ ProcXvStopVideo(ClientPtr client)
       return (status);
     }
 
-  rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess);
+  rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
   if (rc != Success)
     return rc;
 
diff-tree 988f446fe00ac2b92c484a4440613dd82191eadd (from 27ad5d74c20f01516a1bff73be283f8982fcf0fe)
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Sep 24 20:23:35 2007 -0700

    [EDID] Ignore reserved bits in deciding monitor vs detailed timing descriptor.
    
    Even though they're defined to zero by the spec, we've seen an EDID block
    where the (empty) ASCII strings were stuffed in a byte early, leading to the
    descriptor being considered a detailed timing instead.

diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 0b6a15a..4487273 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -190,7 +190,14 @@
 
 
 /* EDID Ver. >= 1.2 */
-#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0 && x[2] == 0 && x[4] == 0)
+/**
+ * Returns true if the pointer is the start of a monitor descriptor block
+ * instead of a detailed timing descriptor.
+ *
+ * Checking the reserved pad fields for zeroes fails on some monitors with
+ * broken empty ASCII strings.  Only the first two bytes are reliable.
+ */
+#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0)
 #define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
 #define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
 #define PIXEL_CLOCK _PIXEL_CLOCK(c)
diff-tree 27ad5d74c20f01516a1bff73be283f8982fcf0fe (from 0e800ca4651a947ccef239e6fe7bf64aab92257c)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Sep 23 17:17:03 2007 +0300

    Input: Generate XKB mapping changes for all core-sending devices (bug #12523)
    
    When we change the mapping on a core device, make sure we propagate this
    through to XKB for all extended devices as well.

diff --git a/Xi/exevents.c b/Xi/exevents.c
index fe297ab..377311e 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -73,6 +73,10 @@ SOFTWARE.
 #include "dixgrabs.h"	/* CreateGrab() */
 #include "scrnintstr.h"
 
+#ifdef XKB
+#include "xkbsrv.h"
+#endif
+
 #define WID(w) ((w) ? ((w)->drawable.id) : 0)
 #define AllModifiersMask ( \
 	ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
@@ -942,7 +946,7 @@ SetModifierMapping(ClientPtr client, Dev
 }
 
 void
-SendDeviceMappingNotify(CARD8 request,
+SendDeviceMappingNotify(ClientPtr client, CARD8 request,
 			KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev)
 {
     xEvent event;
@@ -957,6 +961,11 @@ SendDeviceMappingNotify(CARD8 request,
 	ev->count = count;
     }
 
+#ifdef XKB
+    if (request == MappingKeyboard || request == MappingModifier)
+        XkbApplyMappingChange(dev, request, firstKeyCode, count, client);
+#endif
+
     SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) ev, 1);
 }
 
@@ -992,7 +1001,7 @@ ChangeKeyMapping(ClientPtr client,
     keysyms.map = map;
     if (!SetKeySymsMap(&k->curKeySyms, &keysyms))
 	return BadAlloc;
-    SendDeviceMappingNotify(MappingKeyboard, firstKeyCode, keyCodes, dev);
+    SendDeviceMappingNotify(client, MappingKeyboard, firstKeyCode, keyCodes, dev);
     return client->noClientException;
 }
 
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index bdfa513..1f5970d 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -134,7 +134,7 @@ ProcXSetDeviceButtonMapping(ClientPtr cl
     }
 
     if (ret != MappingBusy)
-	SendDeviceMappingNotify(MappingPointer, 0, 0, dev);
+	SendDeviceMappingNotify(client, MappingPointer, 0, 0, dev);
     return Success;
 }
 
diff --git a/Xi/setmmap.c b/Xi/setmmap.c
index 0078499..e30213e 100644
--- a/Xi/setmmap.c
+++ b/Xi/setmmap.c
@@ -122,7 +122,7 @@ ProcXSetDeviceModifierMapping(ClientPtr 
     if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) {
 	rep.success = ret;
 	if (ret == MappingSuccess)
-	    SendDeviceMappingNotify(MappingModifier, 0, 0, dev);
+	    SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev);
 	WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
 			   &rep);
     } else {
diff --git a/dix/devices.c b/dix/devices.c
index 9f3c576..e05444e 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1208,10 +1208,9 @@ SendMappingNotify(unsigned request, unsi
     }
 #ifdef XKB
     if (!noXkbExtension &&
-	((request == MappingKeyboard) || (request == MappingModifier))) {
-	XkbApplyMappingChange(inputInfo.keyboard,request,firstKeyCode,count,
-									client);
-    }
+	((request == MappingKeyboard) || (request == MappingModifier)))
+        XkbApplyMappingChange(inputInfo.keyboard, request, firstKeyCode, count,
+                              client);
 #endif
 
    /* 0 is the server client */
@@ -1359,6 +1358,7 @@ int 
 ProcSetModifierMapping(ClientPtr client)
 {
     xSetModifierMappingReply rep;
+    DeviceIntPtr dev;
     REQUEST(xSetModifierMappingReq);
     
     REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq);
@@ -1374,8 +1374,10 @@ ProcSetModifierMapping(ClientPtr client)
     rep.success = DoSetModifierMapping(client, (KeyCode *)&stuff[1],
                                        stuff->numKeyPerModifier);
 
-    /* FIXME: Send mapping notifies for all the extended devices as well. */
     SendMappingNotify(MappingModifier, 0, 0, client);
+    for (dev = inputInfo.devices; dev; dev = dev->next)
+        if (dev->key && dev->coreEvents)
+            SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev);
     WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep);
     return client->noClientException;
 }
@@ -1438,16 +1440,19 @@ ProcChangeKeyboardMapping(ClientPtr clie
     keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1;
     keysyms.mapWidth = stuff->keySymsPerKeyCode;
     keysyms.map = (KeySym *)&stuff[1];
-    for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-        if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) {
+    for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
+        if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key)
             if (!SetKeySymsMap(&pDev->key->curKeySyms, &keysyms))
                 return BadAlloc;
-        }
-    }
 
-    /* FIXME: Send mapping notifies for all the extended devices as well. */
     SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes,
                       client);
+    for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
+        if (pDev->key && pDev->coreEvents)
+            SendDeviceMappingNotify(client, MappingKeyboard,
+                                    stuff->firstKeyCode, stuff->keyCodes,
+                                    pDev);
+
     return client->noClientException;
 }
 
diff --git a/include/exevents.h b/include/exevents.h
index 69d4abc..cf7d71a 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -129,6 +129,7 @@ extern int SetModifierMapping(
 	KeyClassPtr *          /* k */);
 
 extern void SendDeviceMappingNotify(
+        ClientPtr              /* client, */,
 	CARD8                  /* request, */,
 	KeyCode                /* firstKeyCode */,
 	CARD8                  /* count */,
diff-tree 0e800ca4651a947ccef239e6fe7bf64aab92257c (from e1860f241b7322c54c109cf5727df45b54b73916)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sun Sep 23 12:43:31 2007 +0300

    GetKeyboardEvents: Reject out-of-range keycodes (bug #12528)
    
    We can only deal with keycodes between 8 and 255, so make sure that we never
    accept anything out of this range.

diff --git a/dix/getevents.c b/dix/getevents.c
index 738bd36..a6e246a 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -402,6 +402,7 @@ GetKeyboardValuatorEvents(xEvent *events
     if (!events)
         return 0;
 
+    /* DO NOT WANT */
     if (type != KeyPress && type != KeyRelease)
         return 0;
 
@@ -409,6 +410,9 @@ GetKeyboardValuatorEvents(xEvent *events
         (pDev->coreEvents && !inputInfo.keyboard->key))
         return 0;
 
+    if (key_code < 8 || key_code > 255)
+        return 0;
+
     if (pDev->coreEvents)
         numEvents = 2;
     else
diff-tree e1860f241b7322c54c109cf5727df45b54b73916 (from 19d30c1c771c0f5c9dfc0f4cfb084dd2e528d992)
Author: Alex Deucher <alex at botch2.(none)>
Date:   Sat Sep 22 17:54:51 2007 -0400

    Document xf86_crtc_clip_video_helper better.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index d375da8..064ff16 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2220,7 +2220,10 @@ xf86_covering_crtc(ScrnInfoPtr pScrn,
 
 /*
  * For overlay video, compute the relevant CRTC and
- * clip video to that
+ * clip video to that.
+ *
+ * returning FALSE means there was a memory failure of some kind,
+ * not that the video shouldn't be displayed
  */
 
 _X_EXPORT Bool
diff-tree 19d30c1c771c0f5c9dfc0f4cfb084dd2e528d992 (from 92355314103d2193ca20786915eaf608922a36dc)
Author: Alex Deucher <alex at botch2.(none)>
Date:   Sat Sep 22 17:51:27 2007 -0400

    Revert "Fix possible crash if Xv window is outside of either crtc"
    
    This reverts commit 92355314103d2193ca20786915eaf608922a36dc.
    
    This changes ABI.  False means there was a memory failure of some kind,
    not that the video shouldn't be displayed

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 2fd56a2..d375da8 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2250,9 +2250,7 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr 
 	    REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
 	    crtc_region = &crtc_region_local;
 	    REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
-	} else
-	    return FALSE;
-
+	}
 	*crtc_ret = crtc;
     }
 
diff-tree 92355314103d2193ca20786915eaf608922a36dc (from edd88170836ec985ab1a59179de69d50644b8dff)
Author: Michel Dänzer <daenzer at debian.org>
Date:   Sat Sep 22 14:25:02 2007 -0400

    Fix possible crash if Xv window is outside of either crtc

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index d375da8..2fd56a2 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2250,7 +2250,9 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr 
 	    REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
 	    crtc_region = &crtc_region_local;
 	    REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
-	}
+	} else
+	    return FALSE;
+
 	*crtc_ret = crtc;
     }
 
diff-tree edd88170836ec985ab1a59179de69d50644b8dff (from abe0a51f3f790f8c055289465e130177c4b647cc)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date:   Sat Sep 22 13:02:08 2007 +0200

    EXA: Check ABI compatibility earlier.
    
    If the driver isn't compatible to the server, all bets are off anyway wrt
    the contents of the fields that we're validating, which can lead to bogus
    error messages.

diff --git a/exa/exa.c b/exa/exa.c
index eac2d91..6205027 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -660,6 +660,17 @@ exaDriverInit (ScreenPtr		pScreen,
     if (!pScreenInfo)
 	return FALSE;
 
+    if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
+	pScreenInfo->exa_minor > EXA_VERSION_MINOR)
+    {
+	LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements "
+		   "(%d.%d) are incompatible with EXA version (%d.%d)\n",
+		   pScreen->myNum,
+		   pScreenInfo->exa_major, pScreenInfo->exa_minor,
+		   EXA_VERSION_MAJOR, EXA_VERSION_MINOR);
+	return FALSE;
+    }
+
     if (!pScreenInfo->memoryBase) {
 	LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase must be "
 		   "non-zero\n", pScreen->myNum);
@@ -696,17 +707,6 @@ exaDriverInit (ScreenPtr		pScreen,
 	return FALSE;
     }
 
-    if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
-	pScreenInfo->exa_minor > EXA_VERSION_MINOR)
-    {
-	LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements "
-		   "(%d.%d) are incompatible with EXA version (%d.%d)\n",
-		   pScreen->myNum,
-		   pScreenInfo->exa_major, pScreenInfo->exa_minor,
-		   EXA_VERSION_MAJOR, EXA_VERSION_MINOR);
-	return FALSE;
-    }
-
 #ifdef RENDER
     ps = GetPictureScreenIfSet(pScreen);
 #endif
diff-tree abe0a51f3f790f8c055289465e130177c4b647cc (from eb82b19aa71333b46e927516cc228f25d3e05e4d)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Fri Sep 21 17:07:36 2007 -0700

    So, like, checking return codes of system calls (signal, etc) is good.
    Also, only restore an old signal handler if one was actually set
    (prevents the server from dying on OS X).

diff --git a/os/utils.c b/os/utils.c
index 144098b..36c8dfe 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -285,7 +285,8 @@ OsSignal(sig, handler)
 	sigaddset(&act.sa_mask, sig);
     act.sa_flags = 0;
     act.sa_handler = handler;
-    sigaction(sig, &act, &oact);
+    if (sigaction(sig, &act, &oact))
+      perror("sigaction");
     return oact.sa_handler;
 #endif
 }
@@ -1684,6 +1685,10 @@ System(char *command)
 
 #ifdef SIGCHLD
     csig = signal(SIGCHLD, SIG_DFL);
+    if (csig == SIG_ERR) {
+      perror("signal");
+      return -1;
+    }
 #endif
 
 #ifdef DEBUG
@@ -1708,7 +1713,10 @@ System(char *command)
     }
 
 #ifdef SIGCHLD
-    signal(SIGCHLD, csig);
+    if (signal(SIGCHLD, csig) == SIG_ERR) {
+      perror("signal");
+      return -1;
+    }
 #endif
 
     return p == -1 ? -1 : status;
@@ -1745,13 +1753,18 @@ Popen(char *command, char *type)
 
     /* Ignore the smart scheduler while this is going on */
     old_alarm = signal(SIGALRM, SIG_IGN);
+    if (old_alarm == SIG_ERR) {
+      perror("signal");
+      return NULL;
+    }
 
     switch (pid = fork()) {
     case -1: 	/* error */
 	close(pdes[0]);
 	close(pdes[1]);
 	xfree(cur);
-	signal(SIGALRM, old_alarm);
+	if (signal(SIGALRM, old_alarm) == SIG_ERR)
+	  perror("signal");
 	return NULL;
     case 0:	/* child */
 	if (setgid(getgid()) == -1)
@@ -1927,7 +1940,10 @@ Pclose(pointer iop)
     /* allow EINTR again */
     OsReleaseSignals ();
     
-    signal(SIGALRM, old_alarm);
+    if (old_alarm && signal(SIGALRM, old_alarm) == SIG_ERR) {
+      perror("signal");
+      return -1;
+    }
 
     return pid == -1 ? -1 : pstat;
 }
diff-tree eb82b19aa71333b46e927516cc228f25d3e05e4d (from 5b08932bfbb7e4612733fffd2acc9682c6856d90)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Sep 20 19:55:48 2007 -0700

    XDarwin: build fix for X11.app

diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index 72bee4a..71b9767 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -274,7 +274,7 @@ endif
 install-data-hook: $(XQUARTZ_HOOK) $(XDARWINAPP_HOOK)
 
 xquartz-install-hook::
-	cd apple && xcodebuild install
+	cd apple && xcodebuild install CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
 
 xdarwinapp-install hook:
 	mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
diff-tree 5b08932bfbb7e4612733fffd2acc9682c6856d90 (from 742d5d6adc4d4a1b6fceeb3443d7931e107462f7)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Sep 20 19:27:31 2007 -0700

    XDarwin:  pulling in Indirect GLX fixes from downstream

diff --git a/GL/apple/indirect.c b/GL/apple/indirect.c
index ba54186..2729ab0 100644
--- a/GL/apple/indirect.c
+++ b/GL/apple/indirect.c
@@ -36,15 +36,30 @@
 #endif
 
 #include "dri.h"
-#include "quartz.h"
 
-//#include <CoreGraphics/CoreGraphics.h>
+#define GL_EXT_histogram 1
+#define GL_EXT_polygon_offset 1
+#define GL_SGIS_pixel_texture 1
+#define GL_SGIX_pixel_texture 1
+#define GL_EXT_multisample 1
+#define GL_SGIS_multisample 1
+#define GL_EXT_vertex_array 1
+#define GL_ARB_point_parameters 1
+#define GL_NV_vertex_array_range 1
+#define GL_MESA_resize_buffers 1
+#define GL_ARB_window_pos 1
+#define GL_EXT_cull_vertex 1
+#define GL_NV_vertex_program 1
+#define GL_APPLE_fence 1
+#define GL_IBM_multimode_draw_arrays 1
+#define GL_EXT_fragment_shader 1
+
 #include <OpenGL/OpenGL.h>
 #include <OpenGL/CGLContext.h>
 
 // X11 and X11's glx
 #include <GL/gl.h>
-#include <miscstruct.h>
+#include <GL/glxproto.h>
 #include <windowstr.h>
 #include <resource.h>
 #include <GL/glxint.h>
@@ -62,15 +77,17 @@
 #include "x-list.h"
 
 #include <dispatch.h>
-
+#define GLAPIENTRYP *
+typedef unsigned long long GLuint64EXT;
+typedef long long GLint64EXT;
+#include <Xplugin.h>
 #include "glcontextmodes.h"
 #include <glapi.h>
 #include <glapitable.h>
 
 // ggs: needed to call back to glx with visual configs
 extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, void **configprivs);
-
-#define GLAQUA_DEBUG 1
+__GLXprovider * GlxGetMesaProvider (void);
 
 // Write debugging output, or not
 #ifdef GLAQUA_DEBUG
@@ -80,9 +97,13 @@ extern void GlxSetVisualConfigs(int ncon
 #endif
 
 static void setup_dispatch_table(void);
+GLuint __glFloorLog2(GLuint val);
+void warn_func(void * p1, char *format, ...);
 
 // some prototypes
 static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen);
+static __GLXdrawable * __glXAquaScreenCreateDrawable(__GLXscreen *screen, DrawablePtr pDraw, XID drawId, __GLcontextModes *modes);
+
 static Bool glAquaInitVisuals(VisualPtr *visualp, DepthPtr *depthp,
                               int *nvisualp, int *ndepthp,
                               int *rootDepthp, VisualID *defaultVisp,
@@ -90,16 +111,12 @@ static Bool glAquaInitVisuals(VisualPtr 
 static void glAquaSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
                                    void **privates);
 
-static __GLinterface *glAquaCreateContext(__GLimports *imports,
-                                          __GLcontextModes *mode,
-                                          __GLinterface *shareGC);
 static void glAquaResetExtension(void);
 static void __glXAquaContextDestroy(__GLXcontext *baseContext);
 static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext);
 static int __glXAquaContextLoseCurrent(__GLXcontext *baseContext);
 static int __glXAquaContextForceCurrent(__GLXcontext *baseContext);
 static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, unsigned long mask);
-static __GLXdrawable * __glXAquaContextCreateDrawable(__GLXcontext *context, DrawablePtr pDraw, XID drawId);
 
 static CGLPixelFormatObj makeFormat(__GLcontextModes *mode);
 
@@ -112,7 +129,7 @@ __GLXprovider __glXMesaProvider = {
 __GLXprovider *
 GlxGetMesaProvider (void)
 {
-  ErrorF("GlxGetMesaProvider\n");
+  GLAQUA_DEBUG_MSG("GlxGetMesaProvider\n");
   return &__glXMesaProvider;
 }
 
@@ -167,7 +184,7 @@ __glXAquaScreenCreateContext(__GLXscreen
   context->base.loseCurrent    = __glXAquaContextLoseCurrent;
   context->base.copy           = __glXAquaContextCopy;
   context->base.forceCurrent   = __glXAquaContextForceCurrent;
-  context->base.createDrawable = __glXAquaContextCreateDrawable;
+  //  context->base.createDrawable = __glXAquaContextCreateDrawable;
 
   context->pixelFormat = makeFormat(modes);
   if (!context->pixelFormat) {
@@ -259,7 +276,7 @@ static void surface_notify(void *_arg, v
     case AppleDRISurfaceNotifyDestroyed:
         if (surface_hash != NULL)
             x_hash_table_remove(surface_hash, (void *) arg->id);
-	        draw->base->pDraw = NULL;
+	        draw->base.pDraw = NULL;
 			draw->sid = 0;
         break;
 
@@ -324,6 +341,7 @@ static void attach(__GLXAquaContext *con
     } 
 }
 
+#if 0     // unused
 static void unattach(__GLXAquaContext *context) {
 	x_list *lst;
 	GLAQUA_DEBUG_MSG("unattach\n");
@@ -345,12 +363,12 @@ static void unattach(__GLXAquaContext *c
         context->sid = 0;
     }
 }
+#endif
 
 static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext) {
     CGLError gl_err;
     __GLXAquaContext *context = (__GLXAquaContext *) baseContext;
 	__GLXAquaDrawable *drawPriv = (__GLXAquaDrawable *) context->base.drawPriv;
-    __GLXAquaDrawable *readPriv = (__GLXAquaDrawable *) context->base.readPriv;
 
     GLAQUA_DEBUG_MSG("glAquaMakeCurrent (ctx 0x%p)\n", baseContext);
     
@@ -363,12 +381,6 @@ static int __glXAquaContextMakeCurrent(_
     return gl_err == 0;
 }
 
-static GLboolean glAquaShareContext(__GLcontext *gc, __GLcontext *gcShare)
-{
-  GLAQUA_DEBUG_MSG("glAquaShareContext unimplemented\n");
-  return GL_TRUE;
-}
-
 static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, unsigned long mask)
 {
     CGLError gl_err;
@@ -405,12 +417,7 @@ static GLboolean __glXAquaDrawableResize
     return GL_TRUE;
 }
 
-static void glAquaNotifyDestroy(__GLcontext *gc) {
-    GLAQUA_DEBUG_MSG("unimplemented glAquaNotifyDestroy");
-}
-
 static GLboolean __glXAquaDrawableSwapBuffers(__GLXdrawable *base) {
-    __GLXAquaDrawable *glxPriv = (__GLXAquaDrawable *) base;
     CGLError gl_err;
 	__GLXAquaContext * drawableCtx;
 //    GLAQUA_DEBUG_MSG("glAquaDrawableSwapBuffers(%p)\n",base);
@@ -867,7 +874,7 @@ static Bool init_visuals(int *nvisualp, 
     glAquaScreens[screenInfo.numScreens-1].num_vis = numNewVisuals;
     //    glAquaScreens[screenInfo.numScreens-1].priv = glXVisualPriv;
 
-    /* Set up depth's VisualIDs */
+    /* set up depth's VisualIDs */
     for (i = 0; i < ndepth; i++) {
         int numVids = 0;
         VisualID *pVids = NULL;
@@ -1027,7 +1034,7 @@ static Bool glAquaInitVisuals(VisualPtr 
         glAquaInitVisualConfigs(); /* ensure the visual configs are setup */
 
     /*
-     * Setup the visuals supported by this particular screen.
+     * setup the visuals supported by this particular screen.
      */
     return init_visuals(nvisualp, visualp, defaultVisp,
                         *ndepthp, *depthp, *rootDepthp);
@@ -1109,7 +1116,7 @@ static void init_screen_visuals(__GLXAqu
                 pVis[j].blueMask  == modes->blueMask &&
                 !used[j]) {
 
-                    /* Set the VisualID */
+                    /* set the VisualID */
                     modes->visualID = pVis[j].vid;
 
                     /* Mark this visual used */
@@ -1143,8 +1150,9 @@ static __GLXscreen * __glXAquaScreenProb
 
   __glXScreenInit(&screen->base, pScreen);
 
-  screen->base.destroy       = __glXAquaScreenDestroy;
-  screen->base.createContext = __glXAquaScreenCreateContext;
+  screen->base.destroy        = __glXAquaScreenDestroy;
+  screen->base.createContext  = __glXAquaScreenCreateContext;
+  screen->base.createDrawable = __glXAquaScreenCreateDrawable;
   screen->base.pScreen       = pScreen;
 
   init_screen_visuals(screen);
@@ -1163,20 +1171,20 @@ static void __glXAquaDrawableDestroy(__G
 }
 
 static __GLXdrawable *
-__glXAquaContextCreateDrawable(__GLXcontext *context,
-			       DrawablePtr pDraw,
-			       XID drawId)
-{
+__glXAquaScreenCreateDrawable(__GLXscreen *screen,
+			      DrawablePtr pDraw,
+			      XID drawId,
+			      __GLcontextModes *modes) {
   __GLXAquaDrawable *glxPriv;
-  __GLXscreen *pGlxScreen;
 
-  GLAQUA_DEBUG_MSG("glAquaContextCreateDrawable(%p,%p,%d)\n", context, pDraw, drawId);
-  if (glxPriv == NULL) return NULL;
+  GLAQUA_DEBUG_MSG("glAquaScreenCreateDrawable(%p,%p,%d,%p)\n", context, pDraw, drawId, modes);
+
   glxPriv = xalloc(sizeof *glxPriv);
+  if (glxPriv == NULL) return NULL;
 
   memset(glxPriv, 0, sizeof *glxPriv);
 
-  if (!__glXDrawableInit(&glxPriv->base, context, pDraw, drawId)) {
+  if (!__glXDrawableInit(&glxPriv->base, screen, pDraw, drawId, modes)) {
     xfree(glxPriv);
     return NULL;
   }
@@ -1184,17 +1192,9 @@ __glXAquaContextCreateDrawable(__GLXcont
   glxPriv->base.destroy       = __glXAquaDrawableDestroy;
   glxPriv->base.resize        = __glXAquaDrawableResize;
   glxPriv->base.swapBuffers   = __glXAquaDrawableSwapBuffers;
+  //  glxPriv->base.copySubBuffer = __glXAquaDrawableCopySubBuffer;
 
-  pGlxScreen = __glXActiveScreens[pDraw->pScreen->myNum];
-
-  if (glxPriv->base.type == DRAWABLE_WINDOW) {
-    VisualID vid = wVisual((WindowPtr)pDraw);
-
-    glxPriv->base.modes = _gl_context_modes_find_visual(pGlxScreen->modes, vid);
-  } else 
-    glxPriv->base.modes = glxPriv->base.pGlxPixmap->modes;
-
-    return &glxPriv->base;
+  return &glxPriv->base;
 }
 
 static void glAquaResetExtension(void)
@@ -1216,1238 +1216,723 @@ GLuint __glFloorLog2(GLuint val)
     return c;
 }
 
-static void setup_dispatch_table(void) {
-	struct _glapi_table *disp=_glapi_get_dispatch();
-
- SET_NewList(disp, glNewList);
- SET_EndList(disp, glEndList);
- SET_CallList(disp, glCallList);
- SET_CallLists(disp, glCallLists);
- SET_DeleteLists(disp, glDeleteLists);
- SET_GenLists(disp, glGenLists);
- SET_ListBase(disp, glListBase);
- SET_Begin(disp, glBegin);
- SET_Bitmap(disp, glBitmap);
- SET_Color3b(disp, glColor3b);
- SET_Color3bv(disp, glColor3bv);
- SET_Color3d(disp, glColor3d);
- SET_Color3dv(disp, glColor3dv);
- SET_Color3f(disp, glColor3f);
- SET_Color3fv(disp, glColor3fv);
- SET_Color3i(disp, glColor3i);
- SET_Color3iv(disp, glColor3iv);
- SET_Color3s(disp, glColor3s);
- SET_Color3sv(disp, glColor3sv);
- SET_Color3ub(disp, glColor3ub);
- SET_Color3ubv(disp, glColor3ubv);
- SET_Color3ui(disp, glColor3ui);
- SET_Color3uiv(disp, glColor3uiv);
- SET_Color3us(disp, glColor3us);
- SET_Color3usv(disp, glColor3usv);
- SET_Color4b(disp, glColor4b);
- SET_Color4bv(disp, glColor4bv);
- SET_Color4d(disp, glColor4d);
- SET_Color4dv(disp, glColor4dv);
- SET_Color4f(disp, glColor4f);
- SET_Color4fv(disp, glColor4fv);
- SET_Color4i(disp, glColor4i);
- SET_Color4iv(disp, glColor4iv);
- SET_Color4s(disp, glColor4s);
- SET_Color4sv(disp, glColor4sv);
- SET_Color4ub(disp, glColor4ub);
- SET_Color4ubv(disp, glColor4ubv);
- SET_Color4ui(disp, glColor4ui);
- SET_Color4uiv(disp, glColor4uiv);
- SET_Color4us(disp, glColor4us);
- SET_Color4usv(disp, glColor4usv);
- SET_EdgeFlag(disp, glEdgeFlag);
- SET_EdgeFlagv(disp, glEdgeFlagv);
- SET_End(disp, glEnd);
- SET_Indexd(disp, glIndexd);
- SET_Indexdv(disp, glIndexdv);
- SET_Indexf(disp, glIndexf);
- SET_Indexfv(disp, glIndexfv);
- SET_Indexi(disp, glIndexi);
- SET_Indexiv(disp, glIndexiv);
- SET_Indexs(disp, glIndexs);
- SET_Indexsv(disp, glIndexsv);
- SET_Normal3b(disp, glNormal3b);
- SET_Normal3bv(disp, glNormal3bv);
- SET_Normal3d(disp, glNormal3d);
- SET_Normal3dv(disp, glNormal3dv);
- SET_Normal3f(disp, glNormal3f);
- SET_Normal3fv(disp, glNormal3fv);
- SET_Normal3i(disp, glNormal3i);
- SET_Normal3iv(disp, glNormal3iv);
- SET_Normal3s(disp, glNormal3s);
- SET_Normal3sv(disp, glNormal3sv);
- SET_RasterPos2d(disp, glRasterPos2d);
- SET_RasterPos2dv(disp, glRasterPos2dv);
- SET_RasterPos2f(disp, glRasterPos2f);
- SET_RasterPos2fv(disp, glRasterPos2fv);
- SET_RasterPos2i(disp, glRasterPos2i);
- SET_RasterPos2iv(disp, glRasterPos2iv);
- SET_RasterPos2s(disp, glRasterPos2s);
- SET_RasterPos2sv(disp, glRasterPos2sv);
- SET_RasterPos3d(disp, glRasterPos3d);
- SET_RasterPos3dv(disp, glRasterPos3dv);
- SET_RasterPos3f(disp, glRasterPos3f);
- SET_RasterPos3fv(disp, glRasterPos3fv);
- SET_RasterPos3i(disp, glRasterPos3i);
- SET_RasterPos3iv(disp, glRasterPos3iv);
- SET_RasterPos3s(disp, glRasterPos3s);
- SET_RasterPos3sv(disp, glRasterPos3sv);
- SET_RasterPos4d(disp, glRasterPos4d);
- SET_RasterPos4dv(disp, glRasterPos4dv);
- SET_RasterPos4f(disp, glRasterPos4f);
- SET_RasterPos4fv(disp, glRasterPos4fv);
- SET_RasterPos4i(disp, glRasterPos4i);
- SET_RasterPos4iv(disp, glRasterPos4iv);
- SET_RasterPos4s(disp, glRasterPos4s);
- SET_RasterPos4sv(disp, glRasterPos4sv);
- SET_Rectd(disp, glRectd);
- SET_Rectdv(disp, glRectdv);
- SET_Rectf(disp, glRectf);
- SET_Rectfv(disp, glRectfv);
- SET_Recti(disp, glRecti);
- SET_Rectiv(disp, glRectiv);
- SET_Rects(disp, glRects);
- SET_Rectsv(disp, glRectsv);
- SET_TexCoord1d(disp, glTexCoord1d);
- SET_TexCoord1dv(disp, glTexCoord1dv);
- SET_TexCoord1f(disp, glTexCoord1f);
- SET_TexCoord1fv(disp, glTexCoord1fv);
- SET_TexCoord1i(disp, glTexCoord1i);
- SET_TexCoord1iv(disp, glTexCoord1iv);
- SET_TexCoord1s(disp, glTexCoord1s);
- SET_TexCoord1sv(disp, glTexCoord1sv);
- SET_TexCoord2d(disp, glTexCoord2d);
- SET_TexCoord2dv(disp, glTexCoord2dv);
- SET_TexCoord2f(disp, glTexCoord2f);
- SET_TexCoord2fv(disp, glTexCoord2fv);
- SET_TexCoord2i(disp, glTexCoord2i);
- SET_TexCoord2iv(disp, glTexCoord2iv);
- SET_TexCoord2s(disp, glTexCoord2s);
- SET_TexCoord2sv(disp, glTexCoord2sv);
- SET_TexCoord3d(disp, glTexCoord3d);
- SET_TexCoord3dv(disp, glTexCoord3dv);
- SET_TexCoord3f(disp, glTexCoord3f);
- SET_TexCoord3fv(disp, glTexCoord3fv);
- SET_TexCoord3i(disp, glTexCoord3i);
- SET_TexCoord3iv(disp, glTexCoord3iv);
- SET_TexCoord3s(disp, glTexCoord3s);
- SET_TexCoord3sv(disp, glTexCoord3sv);
- SET_TexCoord4d(disp, glTexCoord4d);
- SET_TexCoord4dv(disp, glTexCoord4dv);
- SET_TexCoord4f(disp, glTexCoord4f);
- SET_TexCoord4fv(disp, glTexCoord4fv);
- SET_TexCoord4i(disp, glTexCoord4i);
- SET_TexCoord4iv(disp, glTexCoord4iv);
- SET_TexCoord4s(disp, glTexCoord4s);
- SET_TexCoord4sv(disp, glTexCoord4sv);
- SET_Vertex2d(disp, glVertex2d);
- SET_Vertex2dv(disp, glVertex2dv);
- SET_Vertex2f(disp, glVertex2f);
- SET_Vertex2fv(disp, glVertex2fv);
- SET_Vertex2i(disp, glVertex2i);
- SET_Vertex2iv(disp, glVertex2iv);
- SET_Vertex2s(disp, glVertex2s);
- SET_Vertex2sv(disp, glVertex2sv);
- SET_Vertex3d(disp, glVertex3d);
- SET_Vertex3dv(disp, glVertex3dv);
- SET_Vertex3f(disp, glVertex3f);
- SET_Vertex3fv(disp, glVertex3fv);
- SET_Vertex3i(disp, glVertex3i);
- SET_Vertex3iv(disp, glVertex3iv);
- SET_Vertex3s(disp, glVertex3s);
- SET_Vertex3sv(disp, glVertex3sv);
- SET_Vertex4d(disp, glVertex4d);
- SET_Vertex4dv(disp, glVertex4dv);
- SET_Vertex4f(disp, glVertex4f);
- SET_Vertex4fv(disp, glVertex4fv);
- SET_Vertex4i(disp, glVertex4i);
- SET_Vertex4iv(disp, glVertex4iv);
- SET_Vertex4s(disp, glVertex4s);
- SET_Vertex4sv(disp, glVertex4sv);
- SET_ClipPlane(disp, glClipPlane);
- SET_ColorMaterial(disp, glColorMaterial);
- SET_CullFace(disp, glCullFace);
- SET_Fogf(disp, glFogf);
- SET_Fogfv(disp, glFogfv);
- SET_Fogi(disp, glFogi);
- SET_Fogiv(disp, glFogiv);
- SET_FrontFace(disp, glFrontFace);
- SET_Hint(disp, glHint);
- SET_Lightf(disp, glLightf);
- SET_Lightfv(disp, glLightfv);
- SET_Lighti(disp, glLighti);
- SET_Lightiv(disp, glLightiv);
- SET_LightModelf(disp, glLightModelf);
- SET_LightModelfv(disp, glLightModelfv);
- SET_LightModeli(disp, glLightModeli);
- SET_LightModeliv(disp, glLightModeliv);
- SET_LineStipple(disp, glLineStipple);
- SET_LineWidth(disp, glLineWidth);
- SET_Materialf(disp, glMaterialf);
- SET_Materialfv(disp, glMaterialfv);
- SET_Materiali(disp, glMateriali);
- SET_Materialiv(disp, glMaterialiv);
- SET_PointSize(disp, glPointSize);
- SET_PolygonMode(disp, glPolygonMode);
- SET_PolygonStipple(disp, glPolygonStipple);
- SET_Scissor(disp, glScissor);
- SET_ShadeModel(disp, glShadeModel);
- SET_TexParameterf(disp, glTexParameterf);
- SET_TexParameterfv(disp, glTexParameterfv);
- SET_TexParameteri(disp, glTexParameteri);
- SET_TexParameteriv(disp, glTexParameteriv);
- SET_TexImage1D(disp, glTexImage1D);
- SET_TexImage2D(disp, glTexImage2D);
- SET_TexEnvf(disp, glTexEnvf);
- SET_TexEnvfv(disp, glTexEnvfv);
- SET_TexEnvi(disp, glTexEnvi);
- SET_TexEnviv(disp, glTexEnviv);
- SET_TexGend(disp, glTexGend);
- SET_TexGendv(disp, glTexGendv);
- SET_TexGenf(disp, glTexGenf);
- SET_TexGenfv(disp, glTexGenfv);
- SET_TexGeni(disp, glTexGeni);
- SET_TexGeniv(disp, glTexGeniv);
- SET_FeedbackBuffer(disp, glFeedbackBuffer);
- SET_SelectBuffer(disp, glSelectBuffer);
- SET_RenderMode(disp, glRenderMode);
- SET_InitNames(disp, glInitNames);
- SET_LoadName(disp, glLoadName);
- SET_PassThrough(disp, glPassThrough);
- SET_PopName(disp, glPopName);
- SET_PushName(disp, glPushName);
- SET_DrawBuffer(disp, glDrawBuffer);
- SET_Clear(disp, glClear);
- SET_ClearAccum(disp, glClearAccum);
- SET_ClearIndex(disp, glClearIndex);
- SET_ClearColor(disp, glClearColor);
- SET_ClearStencil(disp, glClearStencil);
- SET_ClearDepth(disp, glClearDepth);
- SET_StencilMask(disp, glStencilMask);
- SET_ColorMask(disp, glColorMask);
- SET_DepthMask(disp, glDepthMask);
- SET_IndexMask(disp, glIndexMask);
- SET_Accum(disp, glAccum);
- SET_Disable(disp, glDisable);
- SET_Enable(disp, glEnable);
- SET_Finish(disp, glFinish);
- SET_Flush(disp, glFlush);
- SET_PopAttrib(disp, glPopAttrib);
- SET_PushAttrib(disp, glPushAttrib);
- SET_Map1d(disp, glMap1d);
- SET_Map1f(disp, glMap1f);
- SET_Map2d(disp, glMap2d);
- SET_Map2f(disp, glMap2f);
- SET_MapGrid1d(disp, glMapGrid1d);
- SET_MapGrid1f(disp, glMapGrid1f);
- SET_MapGrid2d(disp, glMapGrid2d);
- SET_MapGrid2f(disp, glMapGrid2f);
- SET_EvalCoord1d(disp, glEvalCoord1d);
- SET_EvalCoord1dv(disp, glEvalCoord1dv);
- SET_EvalCoord1f(disp, glEvalCoord1f);
- SET_EvalCoord1fv(disp, glEvalCoord1fv);
- SET_EvalCoord2d(disp, glEvalCoord2d);
- SET_EvalCoord2dv(disp, glEvalCoord2dv);
- SET_EvalCoord2f(disp, glEvalCoord2f);
- SET_EvalCoord2fv(disp, glEvalCoord2fv);
- SET_EvalMesh1(disp, glEvalMesh1);
- SET_EvalPoint1(disp, glEvalPoint1);
- SET_EvalMesh2(disp, glEvalMesh2);
- SET_EvalPoint2(disp, glEvalPoint2);
- SET_AlphaFunc(disp, glAlphaFunc);
- SET_BlendFunc(disp, glBlendFunc);
- SET_LogicOp(disp, glLogicOp);
- SET_StencilFunc(disp, glStencilFunc);
- SET_StencilOp(disp, glStencilOp);
- SET_DepthFunc(disp, glDepthFunc);
- SET_PixelZoom(disp, glPixelZoom);
- SET_PixelTransferf(disp, glPixelTransferf);
- SET_PixelTransferi(disp, glPixelTransferi);
- SET_PixelStoref(disp, glPixelStoref);
- SET_PixelStorei(disp, glPixelStorei);
- SET_PixelMapfv(disp, glPixelMapfv);
- SET_PixelMapuiv(disp, glPixelMapuiv);
- SET_PixelMapusv(disp, glPixelMapusv);
- SET_ReadBuffer(disp, glReadBuffer);
- SET_CopyPixels(disp, glCopyPixels);
- SET_ReadPixels(disp, glReadPixels);
- SET_DrawPixels(disp, glDrawPixels);
- SET_GetBooleanv(disp, glGetBooleanv);
- SET_GetClipPlane(disp, glGetClipPlane);
- SET_GetDoublev(disp, glGetDoublev);
- SET_GetError(disp, glGetError);
- SET_GetFloatv(disp, glGetFloatv);
- SET_GetIntegerv(disp, glGetIntegerv);
- SET_GetLightfv(disp, glGetLightfv);
- SET_GetLightiv(disp, glGetLightiv);
- SET_GetMapdv(disp, glGetMapdv);
- SET_GetMapfv(disp, glGetMapfv);
- SET_GetMapiv(disp, glGetMapiv);
- SET_GetMaterialfv(disp, glGetMaterialfv);
- SET_GetMaterialiv(disp, glGetMaterialiv);
- SET_GetPixelMapfv(disp, glGetPixelMapfv);
- SET_GetPixelMapuiv(disp, glGetPixelMapuiv);
- SET_GetPixelMapusv(disp, glGetPixelMapusv);
- SET_GetPolygonStipple(disp, glGetPolygonStipple);
- SET_GetString(disp, glGetString);
- SET_GetTexEnvfv(disp, glGetTexEnvfv);
- SET_GetTexEnviv(disp, glGetTexEnviv);
- SET_GetTexGendv(disp, glGetTexGendv);
- SET_GetTexGenfv(disp, glGetTexGenfv);
- SET_GetTexGeniv(disp, glGetTexGeniv);
- SET_GetTexImage(disp, glGetTexImage);
- SET_GetTexParameterfv(disp, glGetTexParameterfv);
- SET_GetTexParameteriv(disp, glGetTexParameteriv);
- SET_GetTexLevelParameterfv(disp, glGetTexLevelParameterfv);
- SET_GetTexLevelParameteriv(disp, glGetTexLevelParameteriv);
- SET_IsEnabled(disp, glIsEnabled);
- SET_IsList(disp, glIsList);
- SET_DepthRange(disp, glDepthRange);
- SET_Frustum(disp, glFrustum);
- SET_LoadIdentity(disp, glLoadIdentity);
- SET_LoadMatrixf(disp, glLoadMatrixf);
- SET_LoadMatrixd(disp, glLoadMatrixd);
- SET_MatrixMode(disp, glMatrixMode);
- SET_MultMatrixf(disp, glMultMatrixf);
- SET_MultMatrixd(disp, glMultMatrixd);
- SET_Ortho(disp, glOrtho);
- SET_PopMatrix(disp, glPopMatrix);
- SET_PushMatrix(disp, glPushMatrix);
- SET_Rotated(disp, glRotated);
- SET_Rotatef(disp, glRotatef);
- SET_Scaled(disp, glScaled);
- SET_Scalef(disp, glScalef);
- SET_Translated(disp, glTranslated);
- SET_Translatef(disp, glTranslatef);
- SET_Viewport(disp, glViewport);
- SET_ArrayElement(disp, glArrayElement);
- SET_BindTexture(disp, glBindTexture);
- SET_ColorPointer(disp, glColorPointer);
- SET_DisableClientState(disp, glDisableClientState);
- SET_DrawArrays(disp, glDrawArrays);
- SET_DrawElements(disp, glDrawElements);
- SET_EdgeFlagPointer(disp, glEdgeFlagPointer);
- SET_EnableClientState(disp, glEnableClientState);
- SET_IndexPointer(disp, glIndexPointer);
- SET_Indexub(disp, glIndexub);
- SET_Indexubv(disp, glIndexubv);
- SET_InterleavedArrays(disp, glInterleavedArrays);
- SET_NormalPointer(disp, glNormalPointer);
- SET_PolygonOffset(disp, glPolygonOffset);
- SET_TexCoordPointer(disp, glTexCoordPointer);
- SET_VertexPointer(disp, glVertexPointer);
- SET_AreTexturesResident(disp, glAreTexturesResident); 
- SET_CopyTexImage1D(disp, glCopyTexImage1D);
- SET_CopyTexImage2D(disp, glCopyTexImage2D);
- SET_CopyTexSubImage1D(disp, glCopyTexSubImage1D);
- SET_CopyTexSubImage2D(disp, glCopyTexSubImage2D);
- SET_DeleteTextures(disp, glDeleteTextures);
- SET_GenTextures(disp, glGenTextures);
- SET_GetPointerv(disp, glGetPointerv);
- SET_IsTexture(disp, glIsTexture);
- SET_PrioritizeTextures(disp, glPrioritizeTextures);
- SET_TexSubImage1D(disp, glTexSubImage1D);
- SET_TexSubImage2D(disp, glTexSubImage2D);
- SET_PopClientAttrib(disp, glPopClientAttrib);
- SET_PushClientAttrib(disp, glPushClientAttrib);
- SET_BlendColor(disp, glBlendColor);
- SET_BlendEquation(disp, glBlendEquation);
- SET_DrawRangeElements(disp, glDrawRangeElements);
- SET_ColorTable(disp, glColorTable);
- SET_ColorTableParameterfv(disp, glColorTableParameterfv);
- SET_ColorTableParameteriv(disp, glColorTableParameteriv);
- SET_CopyColorTable(disp, glCopyColorTable);
- SET_GetColorTable(disp, glGetColorTable);
- SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv);
- SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv);
- SET_ColorSubTable(disp, glColorSubTable);
- SET_CopyColorSubTable(disp, glCopyColorSubTable);
- SET_ConvolutionFilter1D(disp, glConvolutionFilter1D);
- SET_ConvolutionFilter2D(disp, glConvolutionFilter2D);
- SET_ConvolutionParameterf(disp, glConvolutionParameterf);
- SET_ConvolutionParameterfv(disp, glConvolutionParameterfv);
- SET_ConvolutionParameteri(disp, glConvolutionParameteri);
- SET_ConvolutionParameteriv(disp, glConvolutionParameteriv);
- SET_CopyConvolutionFilter1D(disp, glCopyConvolutionFilter1D);
- SET_CopyConvolutionFilter2D(disp, glCopyConvolutionFilter2D);
- SET_GetConvolutionFilter(disp, glGetConvolutionFilter);
- SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv);
- SET_GetConvolutionParameteriv(disp, glGetConvolutionParameteriv);
- SET_GetSeparableFilter(disp, glGetSeparableFilter);
- SET_SeparableFilter2D(disp, glSeparableFilter2D);
- SET_GetHistogram(disp, glGetHistogram);
- SET_GetHistogramParameterfv(disp, glGetHistogramParameterfv);
- SET_GetHistogramParameteriv(disp, glGetHistogramParameteriv);
- SET_GetMinmax(disp, glGetMinmax);
- SET_GetMinmaxParameterfv(disp, glGetMinmaxParameterfv);
- SET_GetMinmaxParameteriv(disp, glGetMinmaxParameteriv);
- SET_Histogram(disp, glHistogram);
- SET_Minmax(disp, glMinmax);
- SET_ResetHistogram(disp, glResetHistogram);
- SET_ResetMinmax(disp, glResetMinmax);
- SET_TexImage3D(disp, glTexImage3D);
- SET_TexSubImage3D(disp, glTexSubImage3D);
- SET_CopyTexSubImage3D(disp, glCopyTexSubImage3D);
- SET_ActiveTextureARB(disp, glActiveTextureARB);
- SET_ClientActiveTextureARB(disp, glClientActiveTextureARB);
- SET_MultiTexCoord1dARB(disp, glMultiTexCoord1dARB);
- SET_MultiTexCoord1dvARB(disp, glMultiTexCoord1dvARB);
- SET_MultiTexCoord1fARB(disp, glMultiTexCoord1fARB);
- SET_MultiTexCoord1fvARB(disp, glMultiTexCoord1fvARB);
- SET_MultiTexCoord1iARB(disp, glMultiTexCoord1iARB);
- SET_MultiTexCoord1ivARB(disp, glMultiTexCoord1ivARB);
- SET_MultiTexCoord1sARB(disp, glMultiTexCoord1sARB);
- SET_MultiTexCoord1svARB(disp, glMultiTexCoord1svARB);
- SET_MultiTexCoord2dARB(disp, glMultiTexCoord2dARB);
- SET_MultiTexCoord2dvARB(disp, glMultiTexCoord2dvARB);
- SET_MultiTexCoord2fARB(disp, glMultiTexCoord2fARB);
- SET_MultiTexCoord2fvARB(disp, glMultiTexCoord2fvARB);
- SET_MultiTexCoord2iARB(disp, glMultiTexCoord2iARB);
- SET_MultiTexCoord2ivARB(disp, glMultiTexCoord2ivARB);
- SET_MultiTexCoord2sARB(disp, glMultiTexCoord2sARB);
- SET_MultiTexCoord2svARB(disp, glMultiTexCoord2svARB);
- SET_MultiTexCoord3dARB(disp, glMultiTexCoord3dARB);
- SET_MultiTexCoord3dvARB(disp, glMultiTexCoord3dvARB);
- SET_MultiTexCoord3fARB(disp, glMultiTexCoord3fARB);
- SET_MultiTexCoord3fvARB(disp, glMultiTexCoord3fvARB);
- SET_MultiTexCoord3iARB(disp, glMultiTexCoord3iARB);
- SET_MultiTexCoord3ivARB(disp, glMultiTexCoord3ivARB);
- SET_MultiTexCoord3sARB(disp, glMultiTexCoord3sARB);
- SET_MultiTexCoord3svARB(disp, glMultiTexCoord3svARB);
- SET_MultiTexCoord4dARB(disp, glMultiTexCoord4dARB);
- SET_MultiTexCoord4dvARB(disp, glMultiTexCoord4dvARB);
- SET_MultiTexCoord4fARB(disp, glMultiTexCoord4fARB);
- SET_MultiTexCoord4fvARB(disp, glMultiTexCoord4fvARB);
- SET_MultiTexCoord4iARB(disp, glMultiTexCoord4iARB);
- SET_MultiTexCoord4ivARB(disp, glMultiTexCoord4ivARB);
- SET_MultiTexCoord4sARB(disp, glMultiTexCoord4sARB);
- SET_MultiTexCoord4svARB(disp, glMultiTexCoord4svARB);
- SET_LoadTransposeMatrixfARB(disp, glLoadTransposeMatrixfARB);
- SET_LoadTransposeMatrixdARB(disp, glLoadTransposeMatrixdARB);
- SET_MultTransposeMatrixfARB(disp, glMultTransposeMatrixfARB);
- SET_MultTransposeMatrixdARB(disp, glMultTransposeMatrixdARB);
- SET_SampleCoverageARB(disp, glSampleCoverageARB);
- SET_DrawBuffersARB(disp, glDrawBuffersARB);
-/* SET_PolygonOffsetEXT(disp, glPolygonOffsetEXT);
- SET_GetTexFilterFuncSGIS(disp, glGetTexFilterFuncSGIS);
- SET_TexFilterFuncSGIS(disp, glTexFilterFuncSGIS);
- SET_GetHistogramEXT(disp, glGetHistogramEXT);
- SET_GetHistogramParameterfvEXT(disp, glGetHistogramParameterfvEXT);
- SET_GetHistogramParameterivEXT(disp, glGetHistogramParameterivEXT);
- SET_GetMinmaxEXT(disp, glGetMinmaxEXT);
- SET_GetMinmaxParameterfvEXT(disp, glGetMinmaxParameterfvEXT);
- SET_GetMinmaxParameterivEXT(disp, glGetMinmaxParameterivEXT);
- SET_GetConvolutionFilterEXT(disp, glGetConvolutionFilterEXT);
- SET_GetConvolutionParameterfvEXT(disp, glGetConvolutionParameterfvEXT);
- SET_GetConvolutionParameterivEXT(disp, glGetConvolutionParameterivEXT);
- SET_GetSeparableFilterEXT(disp, glGetSeparableFilterEXT);
- SET_GetColorTableSGI(disp, glGetColorTableSGI);
- SET_GetColorTableParameterfvSGI(disp, glGetColorTableParameterfvSGI);
- SET_GetColorTableParameterivSGI(disp, glGetColorTableParameterivSGI);
- SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX);
- SET_PixelTexGenParameteriSGIS(disp, glPixelTexGenParameteriSGIS);
- SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS);
- SET_PixelTexGenParameterfSGIS(disp, glPixelTexGenParameterfSGIS);
- SET_PixelTexGenParameterfvSGIS(disp, glPixelTexGenParameterfvSGIS);
- SET_GetPixelTexGenParameterivSGIS(disp, glGetPixelTexGenParameterivSGIS);
- SET_GetPixelTexGenParameterfvSGIS(disp, glGetPixelTexGenParameterfvSGIS);
- SET_TexImage4DSGIS(disp, glTexImage4DSGIS);
- SET_TexSubImage4DSGIS(disp, glTexSubImage4DSGIS); */
- SET_AreTexturesResidentEXT(disp, glAreTexturesResident);
- SET_GenTexturesEXT(disp, glGenTextures);
- SET_IsTextureEXT(disp, glIsTexture);
-/* SET_DetailTexFuncSGIS(disp, glDetailTexFuncSGIS);
- SET_GetDetailTexFuncSGIS(disp, glGetDetailTexFuncSGIS);
- SET_SharpenTexFuncSGIS(disp, glSharpenTexFuncSGIS);
- SET_GetSharpenTexFuncSGIS(disp, glGetSharpenTexFuncSGIS);
- SET_SampleMaskSGIS(disp, glSampleMaskSGIS);
- SET_SamplePatternSGIS(disp, glSamplePatternSGIS);
- SET_ColorPointerEXT(disp, glColorPointerEXT);
- SET_EdgeFlagPointerEXT(disp, glEdgeFlagPointerEXT);
- SET_IndexPointerEXT(disp, glIndexPointerEXT);
- SET_NormalPointerEXT(disp, glNormalPointerEXT);
- SET_TexCoordPointerEXT(disp, glTexCoordPointerEXT);
- SET_VertexPointerEXT(disp, glVertexPointerEXT);
- SET_SpriteParameterfSGIX(disp, glSpriteParameterfSGIX);
- SET_SpriteParameterfvSGIX(disp, glSpriteParameterfvSGIX);
- SET_SpriteParameteriSGIX(disp, glSpriteParameteriSGIX);
- SET_SpriteParameterivSGIX(disp, glSpriteParameterivSGIX);
- SET_PointParameterfEXT(disp, glPointParameterfEXT);
- SET_PointParameterfvEXT(disp, glPointParameterfvEXT);
- SET_GetInstrumentsSGIX(disp, glGetInstrumentsSGIX);
- SET_InstrumentsBufferSGIX(disp, glInstrumentsBufferSGIX);
- SET_PollInstrumentsSGIX(disp, glPollInstrumentsSGIX);
- SET_ReadInstrumentsSGIX(disp, glReadInstrumentsSGIX);
- SET_StartInstrumentsSGIX(disp, glStartInstrumentsSGIX);
- SET_StopInstrumentsSGIX(disp, glStopInstrumentsSGIX);
- SET_FrameZoomSGIX(disp, glFrameZoomSGIX);
- SET_TagSampleBufferSGIX(disp, glTagSampleBufferSGIX);
- SET_ReferencePlaneSGIX(disp, glReferencePlaneSGIX);
- SET_FlushRasterSGIX(disp, glFlushRasterSGIX);
- SET_GetListParameterfvSGIX(disp, glGetListParameterfvSGIX);
- SET_GetListParameterivSGIX(disp, glGetListParameterivSGIX);
- SET_ListParameterfSGIX(disp, glListParameterfSGIX);
- SET_ListParameterfvSGIX(disp, glListParameterfvSGIX);
- SET_ListParameteriSGIX(disp, glListParameteriSGIX);
- SET_ListParameterivSGIX(disp, glListParameterivSGIX);
- SET_FragmentColorMaterialSGIX(disp, glFragmentColorMaterialSGIX);
- SET_FragmentLightfSGIX(disp, glFragmentLightfSGIX);
- SET_FragmentLightfvSGIX(disp, glFragmentLightfvSGIX);
- SET_FragmentLightiSGIX(disp, glFragmentLightiSGIX);
- SET_FragmentLightivSGIX(disp, glFragmentLightivSGIX);
- SET_FragmentLightModelfSGIX(disp, glFragmentLightModelfSGIX);
- SET_FragmentLightModelfvSGIX(disp, glFragmentLightModelfvSGIX);
- SET_FragmentLightModeliSGIX(disp, glFragmentLightModeliSGIX);
- SET_FragmentLightModelivSGIX(disp, glFragmentLightModelivSGIX);
- SET_FragmentMaterialfSGIX(disp, glFragmentMaterialfSGIX);
- SET_FragmentMaterialfvSGIX(disp, glFragmentMaterialfvSGIX);
- SET_FragmentMaterialiSGIX(disp, glFragmentMaterialiSGIX);
- SET_FragmentMaterialivSGIX(disp, glFragmentMaterialivSGIX);
- SET_GetFragmentLightfvSGIX(disp, glGetFragmentLightfvSGIX);
- SET_GetFragmentLightivSGIX(disp, glGetFragmentLightivSGIX);
- SET_GetFragmentMaterialfvSGIX(disp, glGetFragmentMaterialfvSGIX);
- SET_GetFragmentMaterialivSGIX(disp, glGetFragmentMaterialivSGIX);
- SET_LightEnviSGIX(disp, glLightEnviSGIX); 
- SET_VertexWeightfEXT(disp, glVertexWeightfEXT);
- SET_VertexWeightfvEXT(disp, glVertexWeightfvEXT);
- SET_VertexWeightPointerEXT(disp, glVertexWeightPointerEXT);
- SET_FlushVertexArrayRangeNV(disp, glFlushVertexArrayRangeNV);
- SET_VertexArrayRangeNV(disp, glVertexArrayRangeNV);
- SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV);
- SET_CombinerParameterfNV(disp, glCombinerParameterfNV);
- SET_CombinerParameterivNV(disp, glCombinerParameterivNV);
- SET_CombinerParameteriNV(disp, glCombinerParameteriNV);
- SET_CombinerInputNV(disp, glCombinerInputNV);
- SET_CombinerOutputNV(disp, glCombinerOutputNV);
- SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV);
- SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV);
- SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV);
- SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV);
- SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV);
- SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV);
- SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV);
- SET_ResizeBuffersMESA(disp, glResizeBuffersMESA);
- SET_WindowPos2dMESA(disp, glWindowPos2dMESA);
- SET_WindowPos2dvMESA(disp, glWindowPos2dvMESA);
- SET_WindowPos2fMESA(disp, glWindowPos2fMESA);
- SET_WindowPos2fvMESA(disp, glWindowPos2fvMESA);
- SET_WindowPos2iMESA(disp, glWindowPos2iMESA);
- SET_WindowPos2ivMESA(disp, glWindowPos2ivMESA);
- SET_WindowPos2sMESA(disp, glWindowPos2sMESA);
- SET_WindowPos2svMESA(disp, glWindowPos2svMESA);
- SET_WindowPos3dMESA(disp, glWindowPos3dMESA);
- SET_WindowPos3dvMESA(disp, glWindowPos3dvMESA);
- SET_WindowPos3fMESA(disp, glWindowPos3fMESA);
- SET_WindowPos3fvMESA(disp, glWindowPos3fvMESA);
- SET_WindowPos3iMESA(disp, glWindowPos3iMESA);
- SET_WindowPos3ivMESA(disp, glWindowPos3ivMESA);
- SET_WindowPos3sMESA(disp, glWindowPos3sMESA);
- SET_WindowPos3svMESA(disp, glWindowPos3svMESA);
- SET_WindowPos4dMESA(disp, glWindowPos4dMESA);
- SET_WindowPos4dvMESA(disp, glWindowPos4dvMESA);
- SET_WindowPos4fMESA(disp, glWindowPos4fMESA);
- SET_WindowPos4fvMESA(disp, glWindowPos4fvMESA);
- SET_WindowPos4iMESA(disp, glWindowPos4iMESA);
- SET_WindowPos4ivMESA(disp, glWindowPos4ivMESA);
- SET_WindowPos4sMESA(disp, glWindowPos4sMESA);
- SET_WindowPos4svMESA(disp, glWindowPos4svMESA);
- SET_BlendFuncSeparateEXT(disp, glBlendFuncSeparateEXT);
- SET_IndexMaterialEXT(disp, glIndexMaterialEXT);
- SET_IndexFuncEXT(disp, glIndexFuncEXT);
- SET_LockArraysEXT(disp, glLockArraysEXT);
- SET_UnlockArraysEXT(disp, glUnlockArraysEXT);
- SET_CullParameterdvEXT(disp, glCullParameterdvEXT);
- SET_CullParameterfvEXT(disp, glCullParameterfvEXT);
- SET_HintPGI(disp, glHintPGI);
- SET_FogCoordfEXT(disp, glFogCoordfEXT);
- SET_FogCoordfvEXT(disp, glFogCoordfvEXT);
- SET_FogCoorddEXT(disp, glFogCoorddEXT);
- SET_FogCoorddvEXT(disp, glFogCoorddvEXT);
- SET_FogCoordPointerEXT(disp, glFogCoordPointerEXT);
- SET_GetColorTableEXT(disp, glGetColorTableEXT);
- SET_GetColorTableParameterivEXT(disp, glGetColorTableParameterivEXT);
- SET_GetColorTableParameterfvEXT(disp, glGetColorTableParameterfvEXT);
- SET_TbufferMask3DFX(disp, glTbufferMask3DFX);
- SET_CompressedTexImage3DARB(disp, glCompressedTexImage3DARB);
- SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB);
- SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB);
- SET_CompressedTexSubImage3DARB(disp, glCompressedTexSubImage3DARB);
- SET_CompressedTexSubImage2DARB(disp, glCompressedTexSubImage2DARB);
- SET_CompressedTexSubImage1DARB(disp, glCompressedTexSubImage1DARB);
- SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB);
- SET_SecondaryColor3bEXT(disp, glSecondaryColor3bEXT);
- SET_SecondaryColor3bvEXT(disp, glSecondaryColor3bvEXT);
- SET_SecondaryColor3dEXT(disp, glSecondaryColor3dEXT);
- SET_SecondaryColor3dvEXT(disp, glSecondaryColor3dvEXT);
- SET_SecondaryColor3fEXT(disp, glSecondaryColor3fEXT);
- SET_SecondaryColor3fvEXT(disp, glSecondaryColor3fvEXT);
- SET_SecondaryColor3iEXT(disp, glSecondaryColor3iEXT);
- SET_SecondaryColor3ivEXT(disp, glSecondaryColor3ivEXT);
- SET_SecondaryColor3sEXT(disp, glSecondaryColor3sEXT);
- SET_SecondaryColor3svEXT(disp, glSecondaryColor3svEXT);
- SET_SecondaryColor3ubEXT(disp, glSecondaryColor3ubEXT);
- SET_SecondaryColor3ubvEXT(disp, glSecondaryColor3ubvEXT);
- SET_SecondaryColor3uiEXT(disp, glSecondaryColor3uiEXT);
- SET_SecondaryColor3uivEXT(disp, glSecondaryColor3uivEXT);
- SET_SecondaryColor3usEXT(disp, glSecondaryColor3usEXT);
- SET_SecondaryColor3usvEXT(disp, glSecondaryColor3usvEXT);
- SET_SecondaryColorPointerEXT(disp, glSecondaryColorPointerEXT);
- SET_AreProgramsResidentNV(disp, glAreProgramsResidentNV);
- SET_BindProgramNV(disp, glBindProgramNV);
- SET_DeleteProgramsNV(disp, glDeleteProgramsNV);
- SET_ExecuteProgramNV(disp, glExecuteProgramNV);
- SET_GenProgramsNV(disp, glGenProgramsNV);
- SET_GetProgramParameterdvNV(disp, glGetProgramParameterdvNV);
- SET_GetProgramParameterfvNV(disp, glGetProgramParameterfvNV);
- SET_GetProgramivNV(disp, glGetProgramivNV);
- SET_GetProgramStringNV(disp, glGetProgramStringNV);
- SET_GetTrackMatrixivNV(disp, glGetTrackMatrixivNV);
- SET_GetVertexAttribdvARB(disp, glGetVertexAttribdvARB);
- SET_GetVertexAttribfvARB(disp, glGetVertexAttribfvARB);
- SET_GetVertexAttribivARB(disp, glGetVertexAttribivARB);
- SET_GetVertexAttribPointervNV(disp, glGetVertexAttribPointervNV);
- SET_IsProgramNV(disp, glIsProgramNV);
- SET_LoadProgramNV(disp, glLoadProgramNV);
- SET_ProgramParameter4dNV(disp, glProgramParameter4dNV);
- SET_ProgramParameter4dvNV(disp, glProgramParameter4dvNV);
- SET_ProgramParameter4fNV(disp, glProgramParameter4fNV);
- SET_ProgramParameter4fvNV(disp, glProgramParameter4fvNV);
- SET_ProgramParameters4dvNV(disp, glProgramParameters4dvNV);
- SET_ProgramParameters4fvNV(disp, glProgramParameters4fvNV);
- SET_RequestResidentProgramsNV(disp, glRequestResidentProgramsNV);
- SET_TrackMatrixNV(disp, glTrackMatrixNV);
- SET_VertexAttribPointerNV(disp, glVertexAttribPointerNV);
- SET_VertexAttrib1dARB(disp, glVertexAttrib1dARB);
- SET_VertexAttrib1dvARB(disp, glVertexAttrib1dvARB);
- SET_VertexAttrib1fARB(disp, glVertexAttrib1fARB);
- SET_VertexAttrib1fvARB(disp, glVertexAttrib1fvARB);
- SET_VertexAttrib1sARB(disp, glVertexAttrib1sARB);
- SET_VertexAttrib1svARB(disp, glVertexAttrib1svARB);
- SET_VertexAttrib2dARB(disp, glVertexAttrib2dARB);
- SET_VertexAttrib2dvARB(disp, glVertexAttrib2dvARB);
- SET_VertexAttrib2fARB(disp, glVertexAttrib2fARB);
- SET_VertexAttrib2fvARB(disp, glVertexAttrib2fvARB);
- SET_VertexAttrib2sARB(disp, glVertexAttrib2sARB);
- SET_VertexAttrib2svARB(disp, glVertexAttrib2svARB);
- SET_VertexAttrib3dARB(disp, glVertexAttrib3dARB);
- SET_VertexAttrib3dvARB(disp, glVertexAttrib3dvARB);
- SET_VertexAttrib3fARB(disp, glVertexAttrib3fARB);
- SET_VertexAttrib3fvARB(disp, glVertexAttrib3fvARB);
- SET_VertexAttrib3sARB(disp, glVertexAttrib3sARB);
- SET_VertexAttrib3svARB(disp, glVertexAttrib3svARB);
- SET_VertexAttrib4dARB(disp, glVertexAttrib4dARB);
- SET_VertexAttrib4dvARB(disp, glVertexAttrib4dvARB);
- SET_VertexAttrib4fARB(disp, glVertexAttrib4fARB);
- SET_VertexAttrib4fvARB(disp, glVertexAttrib4fvARB);
- SET_VertexAttrib4sARB(disp, glVertexAttrib4sARB);
- SET_VertexAttrib4svARB(disp, glVertexAttrib4svARB);
- SET_VertexAttrib4NubARB(disp, glVertexAttrib4NubARB);
- SET_VertexAttrib4NubvARB(disp, glVertexAttrib4NubvARB);
- SET_VertexAttribs1dvNV(disp, glVertexAttribs1dvNV);
- SET_VertexAttribs1fvNV(disp, glVertexAttribs1fvNV);
- SET_VertexAttribs1svNV(disp, glVertexAttribs1svNV);
- SET_VertexAttribs2dvNV(disp, glVertexAttribs2dvNV);
- SET_VertexAttribs2fvNV(disp, glVertexAttribs2fvNV);
- SET_VertexAttribs2svNV(disp, glVertexAttribs2svNV);
- SET_VertexAttribs3dvNV(disp, glVertexAttribs3dvNV);
- SET_VertexAttribs3fvNV(disp, glVertexAttribs3fvNV);
- SET_VertexAttribs3svNV(disp, glVertexAttribs3svNV);
- SET_VertexAttribs4dvNV(disp, glVertexAttribs4dvNV);
- SET_VertexAttribs4fvNV(disp, glVertexAttribs4fvNV);
- SET_VertexAttribs4svNV(disp, glVertexAttribs4svNV);
- SET_VertexAttribs4ubvNV(disp, glVertexAttribs4ubvNV);
- SET_PointParameteriNV(disp, glPointParameteriNV);
- SET_PointParameterivNV(disp, glPointParameterivNV);
- SET_MultiDrawArraysEXT(disp, glMultiDrawArraysEXT);
- SET_MultiDrawElementsEXT(disp, glMultiDrawElementsEXT);
- SET_ActiveStencilFaceEXT(disp, glActiveStencilFaceEXT);
- SET_DeleteFencesNV(disp, glDeleteFencesNV);
- SET_GenFencesNV(disp, glGenFencesNV);
- SET_IsFenceNV(disp, glIsFenceNV);
- SET_TestFenceNV(disp, glTestFenceNV);
- SET_GetFenceivNV(disp, glGetFenceivNV);
- SET_FinishFenceNV(disp, glFinishFenceNV);
- SET_SetFenceNV(disp, glSetFenceNV);
- SET_VertexAttrib4bvARB(disp, glVertexAttrib4bvARB);
- SET_VertexAttrib4ivARB(disp, glVertexAttrib4ivARB);
- SET_VertexAttrib4ubvARB(disp, glVertexAttrib4ubvARB);
- SET_VertexAttrib4usvARB(disp, glVertexAttrib4usvARB);
- SET_VertexAttrib4uivARB(disp, glVertexAttrib4uivARB);
- SET_VertexAttrib4NbvARB(disp, glVertexAttrib4NbvARB);
- SET_VertexAttrib4NsvARB(disp, glVertexAttrib4NsvARB);
- SET_VertexAttrib4NivARB(disp, glVertexAttrib4NivARB);
- SET_VertexAttrib4NusvARB(disp, glVertexAttrib4NusvARB);
- SET_VertexAttrib4NuivARB(disp, glVertexAttrib4NuivARB);
- SET_VertexAttribPointerARB(disp, glVertexAttribPointerARB);
- SET_EnableVertexAttribArrayARB(disp, glEnableVertexAttribArrayARB);
- SET_DisableVertexAttribArrayARB(disp, glDisableVertexAttribArrayARB);
- SET_ProgramStringARB(disp, glProgramStringARB);
- SET_ProgramEnvParameter4dARB(disp, glProgramEnvParameter4dARB);
- SET_ProgramEnvParameter4dvARB(disp, glProgramEnvParameter4dvARB);
- SET_ProgramEnvParameter4fARB(disp, glProgramEnvParameter4fARB);
- SET_ProgramEnvParameter4fvARB(disp, glProgramEnvParameter4fvARB);
- SET_ProgramLocalParameter4dARB(disp, glProgramLocalParameter4dARB);
- SET_ProgramLocalParameter4dvARB(disp, glProgramLocalParameter4dvARB);
- SET_ProgramLocalParameter4fARB(disp, glProgramLocalParameter4fARB);
- SET_ProgramLocalParameter4fvARB(disp, glProgramLocalParameter4fvARB);
- SET_GetProgramEnvParameterdvARB(disp, glGetProgramEnvParameterdvARB);
- SET_GetProgramEnvParameterfvARB(disp, glGetProgramEnvParameterfvARB);
- SET_GetProgramLocalParameterdvARB(disp, glGetProgramLocalParameterdvARB);
- SET_GetProgramLocalParameterfvARB(disp, glGetProgramLocalParameterfvARB);
- SET_GetProgramivARB(disp, glGetProgramivARB);
- SET_GetProgramStringARB(disp, glGetProgramStringARB);
- SET_ProgramNamedParameter4fNV(disp, glProgramNamedParameter4fNV);
- SET_ProgramNamedParameter4dNV(disp, glProgramNamedParameter4dNV);
- SET_ProgramNamedParameter4fvNV(disp, glProgramNamedParameter4fvNV);
- SET_ProgramNamedParameter4dvNV(disp, glProgramNamedParameter4dvNV);
- SET_GetProgramNamedParameterfvNV(disp, glGetProgramNamedParameterfvNV);
- SET_GetProgramNamedParameterdvNV(disp, glGetProgramNamedParameterdvNV);
- SET_BindBufferARB(disp, glBindBufferARB);
- SET_BufferDataARB(disp, glBufferDataARB);
- SET_BufferSubDataARB(disp, glBufferSubDataARB);
- SET_DeleteBuffersARB(disp, glDeleteBuffersARB);
- SET_GenBuffersARB(disp, glGenBuffersARB);
- SET_GetBufferParameterivARB(disp, glGetBufferParameterivARB);
- SET_GetBufferPointervARB(disp, glGetBufferPointervARB);
- SET_GetBufferSubDataARB(disp, glGetBufferSubDataARB);
- SET_IsBufferARB(disp, glIsBufferARB);
- SET_MapBufferARB(disp, glMapBufferARB);
- SET_UnmapBufferARB(disp, glUnmapBufferARB);
- SET_DepthBoundsEXT(disp, glDepthBoundsEXT);
- SET_GenQueriesARB(disp, glGenQueriesARB);
- SET_DeleteQueriesARB(disp, glDeleteQueriesARB);
- SET_IsQueryARB(disp, glIsQueryARB);
- SET_BeginQueryARB(disp, glBeginQueryARB);
- SET_EndQueryARB(disp, glEndQueryARB);
- SET_GetQueryivARB(disp, glGetQueryivARB);
- SET_GetQueryObjectivARB(disp, glGetQueryObjectivARB);
- SET_GetQueryObjectuivARB(disp, glGetQueryObjectuivARB);
- SET_MultiModeDrawArraysIBM(disp, glMultiModeDrawArraysIBM);
- SET_MultiModeDrawElementsIBM(disp, glMultiModeDrawElementsIBM);
- SET_BlendEquationSeparateEXT(disp, glBlendEquationSeparateEXT);
- SET_DeleteObjectARB(disp, glDeleteObjectARB);
- SET_GetHandleARB(disp, glGetHandleARB);
- SET_DetachObjectARB(disp, glDetachObjectARB);
- SET_CreateShaderObjectARB(disp, glCreateShaderObjectARB);
- SET_ShaderSourceARB(disp, glShaderSourceARB);
- SET_CompileShaderARB(disp, glCompileShaderARB);
- SET_CreateProgramObjectARB(disp, glCreateProgramObjectARB);
- SET_AttachObjectARB(disp, glAttachObjectARB);
- SET_LinkProgramARB(disp, glLinkProgramARB);
- SET_UseProgramObjectARB(disp, glUseProgramObjectARB);
- SET_ValidateProgramARB(disp, glValidateProgramARB);
- SET_Uniform1fARB(disp, glUniform1fARB);
- SET_Uniform2fARB(disp, glUniform2fARB);
- SET_Uniform3fARB(disp, glUniform3fARB);
- SET_Uniform4fARB(disp, glUniform4fARB);
- SET_Uniform1iARB(disp, glUniform1iARB);
- SET_Uniform2iARB(disp, glUniform2iARB);
- SET_Uniform3iARB(disp, glUniform3iARB);
- SET_Uniform4iARB(disp, glUniform4iARB);
- SET_Uniform1fvARB(disp, glUniform1fvARB);
- SET_Uniform2fvARB(disp, glUniform2fvARB);
- SET_Uniform3fvARB(disp, glUniform3fvARB);
- SET_Uniform4fvARB(disp, glUniform4fvARB);
- SET_Uniform1ivARB(disp, glUniform1ivARB);
- SET_Uniform2ivARB(disp, glUniform2ivARB);
- SET_Uniform3ivARB(disp, glUniform3ivARB);
- SET_Uniform4ivARB(disp, glUniform4ivARB);
- SET_UniformMatrix2fvARB(disp, glUniformMatrix2fvARB);
- SET_UniformMatrix3fvARB(disp, glUniformMatrix3fvARB);
- SET_UniformMatrix4fvARB(disp, glUniformMatrix4fvARB);
- SET_GetObjectParameterfvARB(disp, glGetObjectParameterfvARB);
- SET_GetObjectParameterivARB(disp, glGetObjectParameterivARB);
- SET_GetInfoLogARB(disp, glGetInfoLogARB);
- SET_GetAttachedObjectsARB(disp, glGetAttachedObjectsARB);
- SET_GetUniformLocationARB(disp, glGetUniformLocationARB);
- SET_GetActiveUniformARB(disp, glGetActiveUniformARB);
- SET_GetUniformfvARB(disp, glGetUniformfvARB);
- SET_GetUniformivARB(disp, glGetUniformivARB);
- SET_GetShaderSourceARB(disp, glGetShaderSourceARB);
- SET_BindAttribLocationARB(disp, glBindAttribLocationARB);
- SET_GetActiveAttribARB(disp, glGetActiveAttribARB);
- SET_GetAttribLocationARB(disp, glGetAttribLocationARB);
- SET_GetVertexAttribdvNV(disp, glGetVertexAttribdvNV);
- SET_GetVertexAttribfvNV(disp, glGetVertexAttribfvNV);
- SET_GetVertexAttribivNV(disp, glGetVertexAttribivNV);
- SET_VertexAttrib1dNV(disp, glVertexAttrib1dNV);
- SET_VertexAttrib1dvNV(disp, glVertexAttrib1dvNV);
- SET_VertexAttrib1fNV(disp, glVertexAttrib1fNV);
- SET_VertexAttrib1fvNV(disp, glVertexAttrib1fvNV);
- SET_VertexAttrib1sNV(disp, glVertexAttrib1sNV);
- SET_VertexAttrib1svNV(disp, glVertexAttrib1svNV);
- SET_VertexAttrib2dNV(disp, glVertexAttrib2dNV);
- SET_VertexAttrib2dvNV(disp, glVertexAttrib2dvNV);
- SET_VertexAttrib2fNV(disp, glVertexAttrib2fNV);
- SET_VertexAttrib2fvNV(disp, glVertexAttrib2fvNV);
- SET_VertexAttrib2sNV(disp, glVertexAttrib2sNV);
- SET_VertexAttrib2svNV(disp, glVertexAttrib2svNV);
- SET_VertexAttrib3dNV(disp, glVertexAttrib3dNV);
- SET_VertexAttrib3dvNV(disp, glVertexAttrib3dvNV);
- SET_VertexAttrib3fNV(disp, glVertexAttrib3fNV);
- SET_VertexAttrib3fvNV(disp, glVertexAttrib3fvNV);
- SET_VertexAttrib3sNV(disp, glVertexAttrib3sNV);
- SET_VertexAttrib3svNV(disp, glVertexAttrib3svNV);
- SET_VertexAttrib4dNV(disp, glVertexAttrib4dNV);
- SET_VertexAttrib4dvNV(disp, glVertexAttrib4dvNV);
- SET_VertexAttrib4fNV(disp, glVertexAttrib4fNV);
- SET_VertexAttrib4fvNV(disp, glVertexAttrib4fvNV);
- SET_VertexAttrib4sNV(disp, glVertexAttrib4sNV);
- SET_VertexAttrib4svNV(disp, glVertexAttrib4svNV);
- SET_VertexAttrib4ubNV(disp, glVertexAttrib4ubNV);
- SET_VertexAttrib4ubvNV(disp, glVertexAttrib4ubvNV);
- SET_GenFragmentShadersATI(disp, glGenFragmentShadersATI);
- SET_BindFragmentShaderATI(disp, glBindFragmentShaderATI);
- SET_DeleteFragmentShaderATI(disp, glDeleteFragmentShaderATI);
- SET_BeginFragmentShaderATI(disp, glBeginFragmentShaderATI);
- SET_EndFragmentShaderATI(disp, glEndFragmentShaderATI);
- SET_PassTexCoordATI(disp, glPassTexCoordATI);
- SET_SampleMapATI(disp, glSampleMapATI);
- SET_ColorFragmentOp1ATI(disp, glColorFragmentOp1ATI);
- SET_ColorFragmentOp2ATI(disp, glColorFragmentOp2ATI);
- SET_ColorFragmentOp3ATI(disp, glColorFragmentOp3ATI);
- SET_AlphaFragmentOp1ATI(disp, glAlphaFragmentOp1ATI);
- SET_AlphaFragmentOp2ATI(disp, glAlphaFragmentOp2ATI);
- SET_AlphaFragmentOp3ATI(disp, glAlphaFragmentOp3ATI);
- SET_SetFragmentShaderConstantATI(disp, glSetFragmentShaderConstantATI);
- SET_IsRenderbufferEXT(disp, glIsRenderbufferEXT);
- SET_BindRenderbufferEXT(disp, glBindRenderbufferEXT);
- SET_DeleteRenderbuffersEXT(disp, glDeleteRenderbuffersEXT);
- SET_GenRenderbuffersEXT(disp, glGenRenderbuffersEXT);
- SET_RenderbufferStorageEXT(disp, glRenderbufferStorageEXT);
- SET_GetRenderbufferParameterivEXT(disp, glGetRenderbufferParameterivEXT);
- SET_IsFramebufferEXT(disp, glIsFramebufferEXT);
- SET_BindFramebufferEXT(disp, glBindFramebufferEXT);
- SET_DeleteFramebuffersEXT(disp, glDeleteFramebuffersEXT);
- SET_GenFramebuffersEXT(disp, glGenFramebuffersEXT);
- SET_CheckFramebufferStatusEXT(disp, glCheckFramebufferStatusEXT);
- SET_FramebufferTexture1DEXT(disp, glFramebufferTexture1DEXT);
- SET_FramebufferTexture2DEXT(disp, glFramebufferTexture2DEXT);
- SET_FramebufferTexture3DEXT(disp, glFramebufferTexture3DEXT);
- SET_FramebufferRenderbufferEXT(disp, glFramebufferRenderbufferEXT);
- SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT);
- SET_GenerateMipmapEXT(disp, glGenerateMipmapEXT);
- SET_StencilFuncSeparate(disp, glStencilFuncSeparate);
- SET_StencilOpSeparate(disp, glStencilOpSeparate);
- SET_StencilMaskSeparate(disp, glStencilMaskSeparate);
- SET_GetQueryObjecti64vEXT(disp, glGetQueryObjecti64vEXT);
- SET_GetQueryObjectui64vEXT(disp, glGetQueryObjectui64vEXT);
- SET_BlitFramebufferEXT(disp, glBlitFramebufferEXT);
- SET_LoadTransposeMatrixfARB(disp, glLoadTransposeMatrixfARB);
- SET_LoadTransposeMatrixdARB(disp, glLoadTransposeMatrixdARB);
- SET_MultTransposeMatrixfARB(disp, glMultTransposeMatrixfARB);
- SET_MultTransposeMatrixdARB(disp, glMultTransposeMatrixdARB);
- SET_SampleCoverageARB(disp, glSampleCoverageARB);
- SET_DrawBuffersARB(disp, glDrawBuffersARB);
- SET_PolygonOffsetEXT(disp, glPolygonOffsetEXT);
- SET_GetTexFilterFuncSGIS(disp, glGetTexFilterFuncSGIS);
- SET_TexFilterFuncSGIS(disp, glTexFilterFuncSGIS);
- SET_GetHistogramEXT(disp, glGetHistogramEXT);
- SET_GetHistogramParameterfvEXT(disp, glGetHistogramParameterfvEXT);
- SET_GetHistogramParameterivEXT(disp, glGetHistogramParameterivEXT);
- SET_GetMinmaxEXT(disp, glGetMinmaxEXT);
- SET_GetMinmaxParameterfvEXT(disp, glGetMinmaxParameterfvEXT);
- SET_GetMinmaxParameterivEXT(disp, glGetMinmaxParameterivEXT);
- SET_GetConvolutionFilterEXT(disp, glGetConvolutionFilterEXT);
- SET_GetConvolutionParameterfvEXT(disp, glGetConvolutionParameterfvEXT);
- SET_GetConvolutionParameterivEXT(disp, glGetConvolutionParameterivEXT);
- SET_GetSeparableFilterEXT(disp, glGetSeparableFilterEXT);
- SET_GetColorTableSGI(disp, glGetColorTableSGI);
- SET_GetColorTableParameterfvSGI(disp, glGetColorTableParameterfvSGI);
- SET_GetColorTableParameterivSGI(disp, glGetColorTableParameterivSGI);
- SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX);
- SET_PixelTexGenParameteriSGIS(disp, glPixelTexGenParameteriSGIS);
- SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS);
- SET_PixelTexGenParameterfSGIS(disp, glPixelTexGenParameterfSGIS);
- SET_PixelTexGenParameterfvSGIS(disp, glPixelTexGenParameterfvSGIS);
- SET_GetPixelTexGenParameterivSGIS(disp, glGetPixelTexGenParameterivSGIS);
- SET_GetPixelTexGenParameterfvSGIS(disp, glGetPixelTexGenParameterfvSGIS);
- SET_TexImage4DSGIS(disp, glTexImage4DSGIS);
- SET_TexSubImage4DSGIS(disp, glTexSubImage4DSGIS);
- SET_AreTexturesResidentEXT(disp, glAreTexturesResidentEXT);
- SET_GenTexturesEXT(disp, glGenTexturesEXT);
- SET_IsTextureEXT(disp, glIsTextureEXT);
- SET_DetailTexFuncSGIS(disp, glDetailTexFuncSGIS);
- SET_GetDetailTexFuncSGIS(disp, glGetDetailTexFuncSGIS);
- SET_SharpenTexFuncSGIS(disp, glSharpenTexFuncSGIS);
- SET_GetSharpenTexFuncSGIS(disp, glGetSharpenTexFuncSGIS);
- SET_SampleMaskSGIS(disp, glSampleMaskSGIS);
- SET_SamplePatternSGIS(disp, glSamplePatternSGIS);
- SET_ColorPointerEXT(disp, glColorPointerEXT);
- SET_EdgeFlagPointerEXT(disp, glEdgeFlagPointerEXT);
- SET_IndexPointerEXT(disp, glIndexPointerEXT);
- SET_NormalPointerEXT(disp, glNormalPointerEXT);
- SET_TexCoordPointerEXT(disp, glTexCoordPointerEXT);
- SET_VertexPointerEXT(disp, glVertexPointerEXT);
- SET_SpriteParameterfSGIX(disp, glSpriteParameterfSGIX);
- SET_SpriteParameterfvSGIX(disp, glSpriteParameterfvSGIX);
- SET_SpriteParameteriSGIX(disp, glSpriteParameteriSGIX);
- SET_SpriteParameterivSGIX(disp, glSpriteParameterivSGIX);
- SET_PointParameterfEXT(disp, glPointParameterfEXT);
- SET_PointParameterfvEXT(disp, glPointParameterfvEXT);
- SET_GetInstrumentsSGIX(disp, glGetInstrumentsSGIX);
- SET_InstrumentsBufferSGIX(disp, glInstrumentsBufferSGIX);
- SET_PollInstrumentsSGIX(disp, glPollInstrumentsSGIX);
- SET_ReadInstrumentsSGIX(disp, glReadInstrumentsSGIX);
- SET_StartInstrumentsSGIX(disp, glStartInstrumentsSGIX);
- SET_StopInstrumentsSGIX(disp, glStopInstrumentsSGIX);
- SET_FrameZoomSGIX(disp, glFrameZoomSGIX);
- SET_TagSampleBufferSGIX(disp, glTagSampleBufferSGIX);
- SET_ReferencePlaneSGIX(disp, glReferencePlaneSGIX);
- SET_FlushRasterSGIX(disp, glFlushRasterSGIX);
- SET_GetListParameterfvSGIX(disp, glGetListParameterfvSGIX);
- SET_GetListParameterivSGIX(disp, glGetListParameterivSGIX);
- SET_ListParameterfSGIX(disp, glListParameterfSGIX);
- SET_ListParameterfvSGIX(disp, glListParameterfvSGIX);
- SET_ListParameteriSGIX(disp, glListParameteriSGIX);
- SET_ListParameterivSGIX(disp, glListParameterivSGIX);
- SET_FragmentColorMaterialSGIX(disp, glFragmentColorMaterialSGIX);
- SET_FragmentLightfSGIX(disp, glFragmentLightfSGIX);
- SET_FragmentLightfvSGIX(disp, glFragmentLightfvSGIX);
- SET_FragmentLightiSGIX(disp, glFragmentLightiSGIX);
- SET_FragmentLightivSGIX(disp, glFragmentLightivSGIX);
- SET_FragmentLightModelfSGIX(disp, glFragmentLightModelfSGIX);
- SET_FragmentLightModelfvSGIX(disp, glFragmentLightModelfvSGIX);
- SET_FragmentLightModeliSGIX(disp, glFragmentLightModeliSGIX);
- SET_FragmentLightModelivSGIX(disp, glFragmentLightModelivSGIX);
- SET_FragmentMaterialfSGIX(disp, glFragmentMaterialfSGIX);
- SET_FragmentMaterialfvSGIX(disp, glFragmentMaterialfvSGIX);
- SET_FragmentMaterialiSGIX(disp, glFragmentMaterialiSGIX);
- SET_FragmentMaterialivSGIX(disp, glFragmentMaterialivSGIX);
- SET_GetFragmentLightfvSGIX(disp, glGetFragmentLightfvSGIX);
- SET_GetFragmentLightivSGIX(disp, glGetFragmentLightivSGIX);
- SET_GetFragmentMaterialfvSGIX(disp, glGetFragmentMaterialfvSGIX);
- SET_GetFragmentMaterialivSGIX(disp, glGetFragmentMaterialivSGIX);
- SET_LightEnviSGIX(disp, glLightEnviSGIX);
- SET_VertexWeightfEXT(disp, glVertexWeightfEXT);
- SET_VertexWeightfvEXT(disp, glVertexWeightfvEXT);
- SET_VertexWeightPointerEXT(disp, glVertexWeightPointerEXT);
- SET_FlushVertexArrayRangeNV(disp, glFlushVertexArrayRangeNV);
- SET_VertexArrayRangeNV(disp, glVertexArrayRangeNV);
- SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV);
- SET_CombinerParameterfNV(disp, glCombinerParameterfNV);
- SET_CombinerParameterivNV(disp, glCombinerParameterivNV);
- SET_CombinerParameteriNV(disp, glCombinerParameteriNV);
- SET_CombinerInputNV(disp, glCombinerInputNV);
- SET_CombinerOutputNV(disp, glCombinerOutputNV);
- SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV);
- SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV);
- SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV);
- SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV);
- SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV);
- SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV);
- SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV);
- SET_ResizeBuffersMESA(disp, glResizeBuffersMESA);
- SET_WindowPos2dMESA(disp, glWindowPos2dMESA);
- SET_WindowPos2dvMESA(disp, glWindowPos2dvMESA);
- SET_WindowPos2fMESA(disp, glWindowPos2fMESA);
- SET_WindowPos2fvMESA(disp, glWindowPos2fvMESA);
- SET_WindowPos2iMESA(disp, glWindowPos2iMESA);
- SET_WindowPos2ivMESA(disp, glWindowPos2ivMESA);
- SET_WindowPos2sMESA(disp, glWindowPos2sMESA);
- SET_WindowPos2svMESA(disp, glWindowPos2svMESA);
- SET_WindowPos3dMESA(disp, glWindowPos3dMESA);
- SET_WindowPos3dvMESA(disp, glWindowPos3dvMESA);
- SET_WindowPos3fMESA(disp, glWindowPos3fMESA);
- SET_WindowPos3fvMESA(disp, glWindowPos3fvMESA);
- SET_WindowPos3iMESA(disp, glWindowPos3iMESA);
- SET_WindowPos3ivMESA(disp, glWindowPos3ivMESA);
- SET_WindowPos3sMESA(disp, glWindowPos3sMESA);
- SET_WindowPos3svMESA(disp, glWindowPos3svMESA);
- SET_WindowPos4dMESA(disp, glWindowPos4dMESA);
- SET_WindowPos4dvMESA(disp, glWindowPos4dvMESA);
- SET_WindowPos4fMESA(disp, glWindowPos4fMESA);
- SET_WindowPos4fvMESA(disp, glWindowPos4fvMESA);
- SET_WindowPos4iMESA(disp, glWindowPos4iMESA);
- SET_WindowPos4ivMESA(disp, glWindowPos4ivMESA);
- SET_WindowPos4sMESA(disp, glWindowPos4sMESA);
- SET_WindowPos4svMESA(disp, glWindowPos4svMESA);
- SET_BlendFuncSeparateEXT(disp, glBlendFuncSeparateEXT);
- SET_IndexMaterialEXT(disp, glIndexMaterialEXT);
- SET_IndexFuncEXT(disp, glIndexFuncEXT);
- SET_LockArraysEXT(disp, glLockArraysEXT);
- SET_UnlockArraysEXT(disp, glUnlockArraysEXT);
- SET_CullParameterdvEXT(disp, glCullParameterdvEXT);
- SET_CullParameterfvEXT(disp, glCullParameterfvEXT);
- SET_HintPGI(disp, glHintPGI);
- SET_FogCoordfEXT(disp, glFogCoordfEXT);
- SET_FogCoordfvEXT(disp, glFogCoordfvEXT);
- SET_FogCoorddEXT(disp, glFogCoorddEXT);
- SET_FogCoorddvEXT(disp, glFogCoorddvEXT);
- SET_FogCoordPointerEXT(disp, glFogCoordPointerEXT);
- SET_GetColorTableEXT(disp, glGetColorTableEXT);
- SET_GetColorTableParameterivEXT(disp, glGetColorTableParameterivEXT);
- SET_GetColorTableParameterfvEXT(disp, glGetColorTableParameterfvEXT);
- SET_TbufferMask3DFX(disp, glTbufferMask3DFX);
- SET_CompressedTexImage3DARB(disp, glCompressedTexImage3DARB);
- SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB);
- SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB);
- SET_CompressedTexSubImage3DARB(disp, glCompressedTexSubImage3DARB);
- SET_CompressedTexSubImage2DARB(disp, glCompressedTexSubImage2DARB);
- SET_CompressedTexSubImage1DARB(disp, glCompressedTexSubImage1DARB);
- SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB);
- SET_SecondaryColor3bEXT(disp, glSecondaryColor3bEXT);
- SET_SecondaryColor3bvEXT(disp, glSecondaryColor3bvEXT);
- SET_SecondaryColor3dEXT(disp, glSecondaryColor3dEXT);
- SET_SecondaryColor3dvEXT(disp, glSecondaryColor3dvEXT);
- SET_SecondaryColor3fEXT(disp, glSecondaryColor3fEXT);
- SET_SecondaryColor3fvEXT(disp, glSecondaryColor3fvEXT);
- SET_SecondaryColor3iEXT(disp, glSecondaryColor3iEXT);
- SET_SecondaryColor3ivEXT(disp, glSecondaryColor3ivEXT);
- SET_SecondaryColor3sEXT(disp, glSecondaryColor3sEXT);
- SET_SecondaryColor3svEXT(disp, glSecondaryColor3svEXT);
- SET_SecondaryColor3ubEXT(disp, glSecondaryColor3ubEXT);
- SET_SecondaryColor3ubvEXT(disp, glSecondaryColor3ubvEXT);
- SET_SecondaryColor3uiEXT(disp, glSecondaryColor3uiEXT);
- SET_SecondaryColor3uivEXT(disp, glSecondaryColor3uivEXT);
- SET_SecondaryColor3usEXT(disp, glSecondaryColor3usEXT);
- SET_SecondaryColor3usvEXT(disp, glSecondaryColor3usvEXT);
- SET_SecondaryColorPointerEXT(disp, glSecondaryColorPointerEXT);
- SET_AreProgramsResidentNV(disp, glAreProgramsResidentNV);
- SET_BindProgramNV(disp, glBindProgramNV);
- SET_DeleteProgramsNV(disp, glDeleteProgramsNV);
- SET_ExecuteProgramNV(disp, glExecuteProgramNV);
- SET_GenProgramsNV(disp, glGenProgramsNV);
- SET_GetProgramParameterdvNV(disp, glGetProgramParameterdvNV);
- SET_GetProgramParameterfvNV(disp, glGetProgramParameterfvNV);
- SET_GetProgramivNV(disp, glGetProgramivNV);
- SET_GetProgramStringNV(disp, glGetProgramStringNV);
- SET_GetTrackMatrixivNV(disp, glGetTrackMatrixivNV);
- SET_GetVertexAttribdvARB(disp, glGetVertexAttribdvARB);
- SET_GetVertexAttribfvARB(disp, glGetVertexAttribfvARB);
- SET_GetVertexAttribivARB(disp, glGetVertexAttribivARB);
- SET_GetVertexAttribPointervNV(disp, glGetVertexAttribPointervNV);
- SET_IsProgramNV(disp, glIsProgramNV);
- SET_LoadProgramNV(disp, glLoadProgramNV);
- SET_ProgramParameter4dNV(disp, glProgramParameter4dNV);
- SET_ProgramParameter4dvNV(disp, glProgramParameter4dvNV);
- SET_ProgramParameter4fNV(disp, glProgramParameter4fNV);
- SET_ProgramParameter4fvNV(disp, glProgramParameter4fvNV);
- SET_ProgramParameters4dvNV(disp, glProgramParameters4dvNV);
- SET_ProgramParameters4fvNV(disp, glProgramParameters4fvNV);
- SET_RequestResidentProgramsNV(disp, glRequestResidentProgramsNV);
- SET_TrackMatrixNV(disp, glTrackMatrixNV);
- SET_VertexAttribPointerNV(disp, glVertexAttribPointerNV);
- SET_VertexAttrib1dARB(disp, glVertexAttrib1dARB);
- SET_VertexAttrib1dvARB(disp, glVertexAttrib1dvARB);
- SET_VertexAttrib1fARB(disp, glVertexAttrib1fARB);
- SET_VertexAttrib1fvARB(disp, glVertexAttrib1fvARB);
- SET_VertexAttrib1sARB(disp, glVertexAttrib1sARB);
- SET_VertexAttrib1svARB(disp, glVertexAttrib1svARB);
- SET_VertexAttrib2dARB(disp, glVertexAttrib2dARB);
- SET_VertexAttrib2dvARB(disp, glVertexAttrib2dvARB);
- SET_VertexAttrib2fARB(disp, glVertexAttrib2fARB);
- SET_VertexAttrib2fvARB(disp, glVertexAttrib2fvARB);
- SET_VertexAttrib2sARB(disp, glVertexAttrib2sARB);
- SET_VertexAttrib2svARB(disp, glVertexAttrib2svARB);
- SET_VertexAttrib3dARB(disp, glVertexAttrib3dARB);
- SET_VertexAttrib3dvARB(disp, glVertexAttrib3dvARB);
- SET_VertexAttrib3fARB(disp, glVertexAttrib3fARB);
- SET_VertexAttrib3fvARB(disp, glVertexAttrib3fvARB);
- SET_VertexAttrib3sARB(disp, glVertexAttrib3sARB);
- SET_VertexAttrib3svARB(disp, glVertexAttrib3svARB);
- SET_VertexAttrib4dARB(disp, glVertexAttrib4dARB);
- SET_VertexAttrib4dvARB(disp, glVertexAttrib4dvARB);
- SET_VertexAttrib4fARB(disp, glVertexAttrib4fARB);
- SET_VertexAttrib4fvARB(disp, glVertexAttrib4fvARB);
- SET_VertexAttrib4sARB(disp, glVertexAttrib4sARB);
- SET_VertexAttrib4svARB(disp, glVertexAttrib4svARB);
- SET_VertexAttrib4NubARB(disp, glVertexAttrib4NubARB);
- SET_VertexAttrib4NubvARB(disp, glVertexAttrib4NubvARB);
- SET_VertexAttribs1dvNV(disp, glVertexAttribs1dvNV);
- SET_VertexAttribs1fvNV(disp, glVertexAttribs1fvNV);
- SET_VertexAttribs1svNV(disp, glVertexAttribs1svNV);
- SET_VertexAttribs2dvNV(disp, glVertexAttribs2dvNV);
- SET_VertexAttribs2fvNV(disp, glVertexAttribs2fvNV);
- SET_VertexAttribs2svNV(disp, glVertexAttribs2svNV);
- SET_VertexAttribs3dvNV(disp, glVertexAttribs3dvNV);
- SET_VertexAttribs3fvNV(disp, glVertexAttribs3fvNV);
- SET_VertexAttribs3svNV(disp, glVertexAttribs3svNV);
- SET_VertexAttribs4dvNV(disp, glVertexAttribs4dvNV);
- SET_VertexAttribs4fvNV(disp, glVertexAttribs4fvNV);
- SET_VertexAttribs4svNV(disp, glVertexAttribs4svNV);
- SET_VertexAttribs4ubvNV(disp, glVertexAttribs4ubvNV);
- SET_PointParameteriNV(disp, glPointParameteriNV);
- SET_PointParameterivNV(disp, glPointParameterivNV);
- SET_MultiDrawArraysEXT(disp, glMultiDrawArraysEXT);
- SET_MultiDrawElementsEXT(disp, glMultiDrawElementsEXT);
- SET_ActiveStencilFaceEXT(disp, glActiveStencilFaceEXT);
- SET_DeleteFencesNV(disp, glDeleteFencesNV);
- SET_GenFencesNV(disp, glGenFencesNV);
- SET_IsFenceNV(disp, glIsFenceNV);
- SET_TestFenceNV(disp, glTestFenceNV);
- SET_GetFenceivNV(disp, glGetFenceivNV);
- SET_FinishFenceNV(disp, glFinishFenceNV);
- SET_SetFenceNV(disp, glSetFenceNV);
- SET_VertexAttrib4bvARB(disp, glVertexAttrib4bvARB);
- SET_VertexAttrib4ivARB(disp, glVertexAttrib4ivARB);
- SET_VertexAttrib4ubvARB(disp, glVertexAttrib4ubvARB);
- SET_VertexAttrib4usvARB(disp, glVertexAttrib4usvARB);
- SET_VertexAttrib4uivARB(disp, glVertexAttrib4uivARB);
- SET_VertexAttrib4NbvARB(disp, glVertexAttrib4NbvARB);
- SET_VertexAttrib4NsvARB(disp, glVertexAttrib4NsvARB);
- SET_VertexAttrib4NivARB(disp, glVertexAttrib4NivARB);
- SET_VertexAttrib4NusvARB(disp, glVertexAttrib4NusvARB);
- SET_VertexAttrib4NuivARB(disp, glVertexAttrib4NuivARB);
- SET_VertexAttribPointerARB(disp, glVertexAttribPointerARB);
- SET_EnableVertexAttribArrayARB(disp, glEnableVertexAttribArrayARB);
- SET_DisableVertexAttribArrayARB(disp, glDisableVertexAttribArrayARB);
- SET_ProgramStringARB(disp, glProgramStringARB);
- SET_ProgramEnvParameter4dARB(disp, glProgramEnvParameter4dARB);
- SET_ProgramEnvParameter4dvARB(disp, glProgramEnvParameter4dvARB);
- SET_ProgramEnvParameter4fARB(disp, glProgramEnvParameter4fARB);
- SET_ProgramEnvParameter4fvARB(disp, glProgramEnvParameter4fvARB);
- SET_ProgramLocalParameter4dARB(disp, glProgramLocalParameter4dARB);
- SET_ProgramLocalParameter4dvARB(disp, glProgramLocalParameter4dvARB);
- SET_ProgramLocalParameter4fARB(disp, glProgramLocalParameter4fARB);
- SET_ProgramLocalParameter4fvARB(disp, glProgramLocalParameter4fvARB);
- SET_GetProgramEnvParameterdvARB(disp, glGetProgramEnvParameterdvARB);
- SET_GetProgramEnvParameterfvARB(disp, glGetProgramEnvParameterfvARB);
- SET_GetProgramLocalParameterdvARB(disp, glGetProgramLocalParameterdvARB);
- SET_GetProgramLocalParameterfvARB(disp, glGetProgramLocalParameterfvARB);
- SET_GetProgramivARB(disp, glGetProgramivARB);
- SET_GetProgramStringARB(disp, glGetProgramStringARB);
- SET_ProgramNamedParameter4fNV(disp, glProgramNamedParameter4fNV);
- SET_ProgramNamedParameter4dNV(disp, glProgramNamedParameter4dNV);
- SET_ProgramNamedParameter4fvNV(disp, glProgramNamedParameter4fvNV);
- SET_ProgramNamedParameter4dvNV(disp, glProgramNamedParameter4dvNV);
- SET_GetProgramNamedParameterfvNV(disp, glGetProgramNamedParameterfvNV);
- SET_GetProgramNamedParameterdvNV(disp, glGetProgramNamedParameterdvNV);
- SET_BindBufferARB(disp, glBindBufferARB);
- SET_BufferDataARB(disp, glBufferDataARB);
- SET_BufferSubDataARB(disp, glBufferSubDataARB);
- SET_DeleteBuffersARB(disp, glDeleteBuffersARB);
- SET_GenBuffersARB(disp, glGenBuffersARB);
- SET_GetBufferParameterivARB(disp, glGetBufferParameterivARB);
- SET_GetBufferPointervARB(disp, glGetBufferPointervARB);
- SET_GetBufferSubDataARB(disp, glGetBufferSubDataARB);
- SET_IsBufferARB(disp, glIsBufferARB);
- SET_MapBufferARB(disp, glMapBufferARB);
- SET_UnmapBufferARB(disp, glUnmapBufferARB);
- SET_DepthBoundsEXT(disp, glDepthBoundsEXT);
- SET_GenQueriesARB(disp, glGenQueriesARB);
- SET_DeleteQueriesARB(disp, glDeleteQueriesARB);
- SET_IsQueryARB(disp, glIsQueryARB);
- SET_BeginQueryARB(disp, glBeginQueryARB);
- SET_EndQueryARB(disp, glEndQueryARB);
- SET_GetQueryivARB(disp, glGetQueryivARB);
- SET_GetQueryObjectivARB(disp, glGetQueryObjectivARB);
- SET_GetQueryObjectuivARB(disp, glGetQueryObjectuivARB);
- SET_MultiModeDrawArraysIBM(disp, glMultiModeDrawArraysIBM);
- SET_MultiModeDrawElementsIBM(disp, glMultiModeDrawElementsIBM);
- SET_BlendEquationSeparateEXT(disp, glBlendEquationSeparateEXT);
- SET_DeleteObjectARB(disp, glDeleteObjectARB);
- SET_GetHandleARB(disp, glGetHandleARB);
- SET_DetachObjectARB(disp, glDetachObjectARB);
- SET_CreateShaderObjectARB(disp, glCreateShaderObjectARB);
- SET_ShaderSourceARB(disp, glShaderSourceARB);
- SET_CompileShaderARB(disp, glCompileShaderARB);
- SET_CreateProgramObjectARB(disp, glCreateProgramObjectARB);
- SET_AttachObjectARB(disp, glAttachObjectARB);
- SET_LinkProgramARB(disp, glLinkProgramARB);
- SET_UseProgramObjectARB(disp, glUseProgramObjectARB);
- SET_ValidateProgramARB(disp, glValidateProgramARB);
- SET_Uniform1fARB(disp, glUniform1fARB);
- SET_Uniform2fARB(disp, glUniform2fARB);
- SET_Uniform3fARB(disp, glUniform3fARB);
- SET_Uniform4fARB(disp, glUniform4fARB);
- SET_Uniform1iARB(disp, glUniform1iARB);
- SET_Uniform2iARB(disp, glUniform2iARB);
- SET_Uniform3iARB(disp, glUniform3iARB);
- SET_Uniform4iARB(disp, glUniform4iARB);
- SET_Uniform1fvARB(disp, glUniform1fvARB);
- SET_Uniform2fvARB(disp, glUniform2fvARB);
- SET_Uniform3fvARB(disp, glUniform3fvARB);
- SET_Uniform4fvARB(disp, glUniform4fvARB);
- SET_Uniform1ivARB(disp, glUniform1ivARB);
- SET_Uniform2ivARB(disp, glUniform2ivARB);
- SET_Uniform3ivARB(disp, glUniform3ivARB);
- SET_Uniform4ivARB(disp, glUniform4ivARB);
- SET_UniformMatrix2fvARB(disp, glUniformMatrix2fvARB);
- SET_UniformMatrix3fvARB(disp, glUniformMatrix3fvARB);
- SET_UniformMatrix4fvARB(disp, glUniformMatrix4fvARB);
- SET_GetObjectParameterfvARB(disp, glGetObjectParameterfvARB);
- SET_GetObjectParameterivARB(disp, glGetObjectParameterivARB);
- SET_GetInfoLogARB(disp, glGetInfoLogARB);
- SET_GetAttachedObjectsARB(disp, glGetAttachedObjectsARB);
- SET_GetUniformLocationARB(disp, glGetUniformLocationARB);
- SET_GetActiveUniformARB(disp, glGetActiveUniformARB);
- SET_GetUniformfvARB(disp, glGetUniformfvARB);
- SET_GetUniformivARB(disp, glGetUniformivARB);
- SET_GetShaderSourceARB(disp, glGetShaderSourceARB);
- SET_BindAttribLocationARB(disp, glBindAttribLocationARB);
- SET_GetActiveAttribARB(disp, glGetActiveAttribARB);
- SET_GetAttribLocationARB(disp, glGetAttribLocationARB);
- SET_GetVertexAttribdvNV(disp, glGetVertexAttribdvNV);
- SET_GetVertexAttribfvNV(disp, glGetVertexAttribfvNV);
- SET_GetVertexAttribivNV(disp, glGetVertexAttribivNV);
- SET_VertexAttrib1dNV(disp, glVertexAttrib1dNV);
- SET_VertexAttrib1dvNV(disp, glVertexAttrib1dvNV);
- SET_VertexAttrib1fNV(disp, glVertexAttrib1fNV);
- SET_VertexAttrib1fvNV(disp, glVertexAttrib1fvNV);
- SET_VertexAttrib1sNV(disp, glVertexAttrib1sNV);
- SET_VertexAttrib1svNV(disp, glVertexAttrib1svNV);
- SET_VertexAttrib2dNV(disp, glVertexAttrib2dNV);
- SET_VertexAttrib2dvNV(disp, glVertexAttrib2dvNV);
- SET_VertexAttrib2fNV(disp, glVertexAttrib2fNV);
- SET_VertexAttrib2fvNV(disp, glVertexAttrib2fvNV);
- SET_VertexAttrib2sNV(disp, glVertexAttrib2sNV);
- SET_VertexAttrib2svNV(disp, glVertexAttrib2svNV);
- SET_VertexAttrib3dNV(disp, glVertexAttrib3dNV);
- SET_VertexAttrib3dvNV(disp, glVertexAttrib3dvNV);
- SET_VertexAttrib3fNV(disp, glVertexAttrib3fNV);
- SET_VertexAttrib3fvNV(disp, glVertexAttrib3fvNV);
- SET_VertexAttrib3sNV(disp, glVertexAttrib3sNV);
- SET_VertexAttrib3svNV(disp, glVertexAttrib3svNV);
- SET_VertexAttrib4dNV(disp, glVertexAttrib4dNV);
- SET_VertexAttrib4dvNV(disp, glVertexAttrib4dvNV);
- SET_VertexAttrib4fNV(disp, glVertexAttrib4fNV);
- SET_VertexAttrib4fvNV(disp, glVertexAttrib4fvNV);
- SET_VertexAttrib4sNV(disp, glVertexAttrib4sNV);
- SET_VertexAttrib4svNV(disp, glVertexAttrib4svNV);
- SET_VertexAttrib4ubNV(disp, glVertexAttrib4ubNV);
- SET_VertexAttrib4ubvNV(disp, glVertexAttrib4ubvNV);
- SET_GenFragmentShadersATI(disp, glGenFragmentShadersATI);
- SET_BindFragmentShaderATI(disp, glBindFragmentShaderATI);
- SET_DeleteFragmentShaderATI(disp, glDeleteFragmentShaderATI);
- SET_BeginFragmentShaderATI(disp, glBeginFragmentShaderATI);
- SET_EndFragmentShaderATI(disp, glEndFragmentShaderATI);
- SET_PassTexCoordATI(disp, glPassTexCoordATI);
- SET_SampleMapATI(disp, glSampleMapATI);
- SET_ColorFragmentOp1ATI(disp, glColorFragmentOp1ATI);
- SET_ColorFragmentOp2ATI(disp, glColorFragmentOp2ATI);
- SET_ColorFragmentOp3ATI(disp, glColorFragmentOp3ATI);
- SET_AlphaFragmentOp1ATI(disp, glAlphaFragmentOp1ATI);
- SET_AlphaFragmentOp2ATI(disp, glAlphaFragmentOp2ATI);
- SET_AlphaFragmentOp3ATI(disp, glAlphaFragmentOp3ATI);
- SET_SetFragmentShaderConstantATI(disp, glSetFragmentShaderConstantATI);
- SET_IsRenderbufferEXT(disp, glIsRenderbufferEXT);
- SET_BindRenderbufferEXT(disp, glBindRenderbufferEXT);
- SET_DeleteRenderbuffersEXT(disp, glDeleteRenderbuffersEXT);
- SET_GenRenderbuffersEXT(disp, glGenRenderbuffersEXT);
- SET_RenderbufferStorageEXT(disp, glRenderbufferStorageEXT);
- SET_GetRenderbufferParameterivEXT(disp, glGetRenderbufferParameterivEXT);
- SET_IsFramebufferEXT(disp, glIsFramebufferEXT);
- SET_BindFramebufferEXT(disp, glBindFramebufferEXT);
- SET_DeleteFramebuffersEXT(disp, glDeleteFramebuffersEXT);
- SET_GenFramebuffersEXT(disp, glGenFramebuffersEXT);
- SET_CheckFramebufferStatusEXT(disp, glCheckFramebufferStatusEXT);
- SET_FramebufferTexture1DEXT(disp, glFramebufferTexture1DEXT);
- SET_FramebufferTexture2DEXT(disp, glFramebufferTexture2DEXT);
- SET_FramebufferTexture3DEXT(disp, glFramebufferTexture3DEXT);
- SET_FramebufferRenderbufferEXT(disp, glFramebufferRenderbufferEXT);
- SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT);
- SET_GenerateMipmapEXT(disp, glGenerateMipmapEXT);
- SET_StencilFuncSeparate(disp, glStencilFuncSeparate);
- SET_StencilOpSeparate(disp, glStencilOpSeparate);
- SET_StencilMaskSeparate(disp, glStencilMaskSeparate);
- SET_GetQueryObjecti64vEXT(disp, glGetQueryObjecti64vEXT);
- SET_GetQueryObjectui64vEXT(disp, glGetQueryObjectui64vEXT);
- SET_BlitFramebufferEXT(disp, glBlitFramebufferEXT); */
+void warn_func(void * p1, char *format, ...) {
+  va_list v;
+  va_start(v, format);
+  vfprintf(stderr, format, v);
+  va_end(v);
+}
 
+static void setup_dispatch_table(void) {
+  struct _glapi_table *disp=_glapi_get_dispatch();
+  _glapi_set_warning_func((_glapi_warning_func)warn_func);
+  _glapi_noop_enable_warnings(TRUE);
+
+  SET_Accum(disp, glAccum);
+  SET_ActiveStencilFaceEXT(disp, glActiveStencilFaceEXT);
+  SET_ActiveTextureARB(disp, glActiveTextureARB);
+//SET_AlphaFragmentOp1ATI(disp, glAlphaFragmentOp1EXT);   // <-- EXT -> ATI
+//SET_AlphaFragmentOp2ATI(disp, glAlphaFragmentOp2EXT);
+//SET_AlphaFragmentOp3ATI(disp, glAlphaFragmentOp3EXT);
+  SET_AlphaFunc(disp, glAlphaFunc);
+//SET_AreProgramsResidentNV(disp, glAreProgramsResidentNV);
+  SET_AreTexturesResident(disp, glAreTexturesResident); 
+  SET_ArrayElement(disp, glArrayElement);
+  SET_AttachObjectARB(disp, glAttachObjectARB);
+  SET_Begin(disp, glBegin);
+//SET_BeginFragmentShaderATI(disp, glBeginFragmentShaderEXT);   // <-- EXT -> ATI
+  SET_BeginQueryARB(disp, glBeginQueryARB);
+  SET_BindAttribLocationARB(disp, glBindAttribLocationARB);
+  SET_BindBufferARB(disp, glBindBufferARB);
+//SET_BindFragmentShaderATI(disp, glBindFragmentShaderEXT);     // <-- EXT -> ATI
+  SET_BindFramebufferEXT(disp, glBindFramebufferEXT);
+//SET_BindProgramNV(disp, glBindProgramNV);
+  SET_BindRenderbufferEXT(disp, glBindRenderbufferEXT);
+  SET_BindTexture(disp, glBindTexture);
+  SET_Bitmap(disp, glBitmap);
+  SET_BlendColor(disp, glBlendColor);
+  SET_BlendEquation(disp, glBlendEquation);
+  SET_BlendEquationSeparateEXT(disp, glBlendEquationSeparateEXT);
+  SET_BlendFunc(disp, glBlendFunc);
+  SET_BlendFuncSeparateEXT(disp, glBlendFuncSeparateEXT);
+  SET_BlitFramebufferEXT(disp, glBlitFramebufferEXT);
+  SET_BufferDataARB(disp, glBufferDataARB);
+  SET_BufferSubDataARB(disp, glBufferSubDataARB);
+  SET_CallList(disp, glCallList);
+  SET_CallLists(disp, glCallLists);
+  SET_CheckFramebufferStatusEXT(disp, glCheckFramebufferStatusEXT);
+  SET_Clear(disp, glClear);
+  SET_ClearAccum(disp, glClearAccum);
+  SET_ClearColor(disp, glClearColor);
+  SET_ClearDepth(disp, glClearDepth);
+  SET_ClearIndex(disp, glClearIndex);
+  SET_ClearStencil(disp, glClearStencil);
+  SET_ClientActiveTextureARB(disp, glClientActiveTextureARB);
+  SET_ClipPlane(disp, glClipPlane);
+  SET_Color3b(disp, glColor3b);
+  SET_Color3bv(disp, glColor3bv);
+  SET_Color3d(disp, glColor3d);
+  SET_Color3dv(disp, glColor3dv);
+  SET_Color3f(disp, glColor3f);
+  SET_Color3fv(disp, glColor3fv);
+  SET_Color3i(disp, glColor3i);
+  SET_Color3iv(disp, glColor3iv);
+  SET_Color3s(disp, glColor3s);
+  SET_Color3sv(disp, glColor3sv);
+  SET_Color3ub(disp, glColor3ub);
+  SET_Color3ubv(disp, glColor3ubv);
+  SET_Color3ui(disp, glColor3ui);
+  SET_Color3uiv(disp, glColor3uiv);
+  SET_Color3us(disp, glColor3us);
+  SET_Color3usv(disp, glColor3usv);
+  SET_Color4b(disp, glColor4b);
+  SET_Color4bv(disp, glColor4bv);
+  SET_Color4d(disp, glColor4d);
+  SET_Color4dv(disp, glColor4dv);
+  SET_Color4f(disp, glColor4f);
+  SET_Color4fv(disp, glColor4fv);
+  SET_Color4i(disp, glColor4i);
+  SET_Color4iv(disp, glColor4iv);
+  SET_Color4s(disp, glColor4s);
+  SET_Color4sv(disp, glColor4sv);
+  SET_Color4ub(disp, glColor4ub);
+  SET_Color4ubv(disp, glColor4ubv);
+  SET_Color4ui(disp, glColor4ui);
+  SET_Color4uiv(disp, glColor4uiv);
+  SET_Color4us(disp, glColor4us);
+  SET_Color4usv(disp, glColor4usv);
+//SET_ColorFragmentOp1ATI(disp, glColorFragmentOp1EXT);    // <-- EXT -> ATI
+//SET_ColorFragmentOp2ATI(disp, glColorFragmentOp2EXT);
+//SET_ColorFragmentOp3ATI(disp, glColorFragmentOp3EXT);
+  SET_ColorMask(disp, glColorMask);
+  SET_ColorMaterial(disp, glColorMaterial);
+  SET_ColorPointer(disp, glColorPointer);
+//SET_ColorPointerEXT(disp, glColorPointerEXT);
+  SET_ColorSubTable(disp, glColorSubTable);
+  SET_ColorTable(disp, glColorTable);
+  SET_ColorTableParameterfv(disp, glColorTableParameterfv);
+  SET_ColorTableParameteriv(disp, glColorTableParameteriv);
+  SET_CombinerInputNV(disp, glCombinerInputNV);
+  SET_CombinerOutputNV(disp, glCombinerOutputNV);
+  SET_CombinerParameterfNV(disp, glCombinerParameterfNV);
+  SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV);
+  SET_CombinerParameteriNV(disp, glCombinerParameteriNV);
+  SET_CombinerParameterivNV(disp, glCombinerParameterivNV);
+  SET_CompileShaderARB(disp, glCompileShaderARB);
+  SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB);
+  SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB);
+  SET_CompressedTexImage3DARB(disp, glCompressedTexImage3DARB);
+  SET_CompressedTexSubImage1DARB(disp, glCompressedTexSubImage1DARB);
+  SET_CompressedTexSubImage2DARB(disp, glCompressedTexSubImage2DARB);
+  SET_CompressedTexSubImage3DARB(disp, glCompressedTexSubImage3DARB);
+  SET_ConvolutionFilter1D(disp, glConvolutionFilter1D);
+  SET_ConvolutionFilter2D(disp, glConvolutionFilter2D);
+  SET_ConvolutionParameterf(disp, glConvolutionParameterf);
+  SET_ConvolutionParameterfv(disp, glConvolutionParameterfv);
+  SET_ConvolutionParameteri(disp, glConvolutionParameteri);
+  SET_ConvolutionParameteriv(disp, glConvolutionParameteriv);
+  SET_CopyColorSubTable(disp, glCopyColorSubTable);
+  SET_CopyColorTable(disp, glCopyColorTable);
+  SET_CopyConvolutionFilter1D(disp, glCopyConvolutionFilter1D);
+  SET_CopyConvolutionFilter2D(disp, glCopyConvolutionFilter2D);
+  SET_CopyPixels(disp, glCopyPixels);
+  SET_CopyTexImage1D(disp, glCopyTexImage1D);
+  SET_CopyTexImage2D(disp, glCopyTexImage2D);
+  SET_CopyTexSubImage1D(disp, glCopyTexSubImage1D);
+  SET_CopyTexSubImage2D(disp, glCopyTexSubImage2D);
+  SET_CopyTexSubImage3D(disp, glCopyTexSubImage3D);
+  SET_CreateProgramObjectARB(disp, glCreateProgramObjectARB);
+  SET_CreateShaderObjectARB(disp, glCreateShaderObjectARB);
+  SET_CullFace(disp, glCullFace);
+//SET_CullParameterdvEXT(disp, glCullParameterdvEXT);
+//SET_CullParameterfvEXT(disp, glCullParameterfvEXT);
+  SET_DeleteBuffersARB(disp, glDeleteBuffersARB);
+  SET_DeleteFencesNV(disp, glDeleteFencesAPPLE);
+//SET_DeleteFragmentShaderATI(disp, glDeleteFragmentShaderEXT);      // <-- EXT -> ATI
+  SET_DeleteFramebuffersEXT(disp, glDeleteFramebuffersEXT);
+  SET_DeleteLists(disp, glDeleteLists);
+  SET_DeleteObjectARB(disp, glDeleteObjectARB);
+//SET_DeleteProgramsNV(disp, glDeleteProgramsNV);
+  SET_DeleteQueriesARB(disp, glDeleteQueriesARB);
+  SET_DeleteRenderbuffersEXT(disp, glDeleteRenderbuffersEXT);
+  SET_DeleteTextures(disp, glDeleteTextures);
+  SET_DepthBoundsEXT(disp, glDepthBoundsEXT);
+  SET_DepthFunc(disp, glDepthFunc);
+  SET_DepthMask(disp, glDepthMask);
+  SET_DepthRange(disp, glDepthRange);
+  SET_DetachObjectARB(disp, glDetachObjectARB);
+  SET_Disable(disp, glDisable);
+  SET_DisableClientState(disp, glDisableClientState);
+  SET_DisableVertexAttribArrayARB(disp, glDisableVertexAttribArrayARB);
+  SET_DrawArrays(disp, glDrawArrays);
+  SET_DrawBuffer(disp, glDrawBuffer);
+  SET_DrawBuffersARB(disp, glDrawBuffersARB);
+  SET_DrawElements(disp, glDrawElements);
+  SET_DrawPixels(disp, glDrawPixels);
+  SET_DrawRangeElements(disp, glDrawRangeElements);
+  SET_EdgeFlag(disp, glEdgeFlag);
+  SET_EdgeFlagPointer(disp, glEdgeFlagPointer);
+//SET_EdgeFlagPointerEXT(disp, glEdgeFlagPointerEXT);
+  SET_EdgeFlagv(disp, glEdgeFlagv);
+  SET_Enable(disp, glEnable);
+  SET_EnableClientState(disp, glEnableClientState);
+  SET_EnableVertexAttribArrayARB(disp, glEnableVertexAttribArrayARB);
+  SET_End(disp, glEnd);
+//SET_EndFragmentShaderATI(disp, glEndFragmentShaderEXT);        // <-- EXT -> ATI
+  SET_EndList(disp, glEndList);
+  SET_EndQueryARB(disp, glEndQueryARB);
+  SET_EvalCoord1d(disp, glEvalCoord1d);
+  SET_EvalCoord1dv(disp, glEvalCoord1dv);
+  SET_EvalCoord1f(disp, glEvalCoord1f);
+  SET_EvalCoord1fv(disp, glEvalCoord1fv);
+  SET_EvalCoord2d(disp, glEvalCoord2d);
+  SET_EvalCoord2dv(disp, glEvalCoord2dv);
+  SET_EvalCoord2f(disp, glEvalCoord2f);
+  SET_EvalCoord2fv(disp, glEvalCoord2fv);
+  SET_EvalMesh1(disp, glEvalMesh1);
+  SET_EvalMesh2(disp, glEvalMesh2);
+  SET_EvalPoint1(disp, glEvalPoint1);
+  SET_EvalPoint2(disp, glEvalPoint2);
+//SET_ExecuteProgramNV(disp, glExecuteProgramNV);
+  SET_FeedbackBuffer(disp, glFeedbackBuffer);
+  SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV);
+  SET_Finish(disp, glFinish);
+  SET_FinishFenceNV(disp, glFinishFenceAPPLE);       // <-- APPLE -> NV
+  SET_Flush(disp, glFlush);
+//SET_FlushVertexArrayRangeNV(disp, glFlushVertexArrayRangeNV);
+  SET_FogCoordPointerEXT(disp, glFogCoordPointerEXT);
+  SET_FogCoorddEXT(disp, glFogCoorddEXT);
+  SET_FogCoorddvEXT(disp, glFogCoorddvEXT);
+  SET_FogCoordfEXT(disp, glFogCoordfEXT);
+  SET_FogCoordfvEXT(disp, glFogCoordfvEXT);
+  SET_Fogf(disp, glFogf);
+  SET_Fogfv(disp, glFogfv);
+  SET_Fogi(disp, glFogi);
+  SET_Fogiv(disp, glFogiv);
+  SET_FramebufferRenderbufferEXT(disp, glFramebufferRenderbufferEXT);
+  SET_FramebufferTexture1DEXT(disp, glFramebufferTexture1DEXT);
+  SET_FramebufferTexture2DEXT(disp, glFramebufferTexture2DEXT);
+  SET_FramebufferTexture3DEXT(disp, glFramebufferTexture3DEXT);
+  SET_FrontFace(disp, glFrontFace);
+  SET_Frustum(disp, glFrustum);
+  SET_GenBuffersARB(disp, glGenBuffersARB);
+  SET_GenFencesNV(disp, glGenFencesAPPLE);            // <-- APPLE -> NV
+//SET_GenFragmentShadersATI(disp, glGenFragmentShadersEXT);         // <-- EXT -> ATI
+  SET_GenFramebuffersEXT(disp, glGenFramebuffersEXT);
+  SET_GenLists(disp, glGenLists);
+//SET_GenProgramsNV(disp, glGenProgramsNV);
+  SET_GenQueriesARB(disp, glGenQueriesARB);
+  SET_GenRenderbuffersEXT(disp, glGenRenderbuffersEXT);
+  SET_GenTextures(disp, glGenTextures);
+  SET_GenerateMipmapEXT(disp, glGenerateMipmapEXT);
+  SET_GetActiveAttribARB(disp, glGetActiveAttribARB);
+  SET_GetActiveUniformARB(disp, glGetActiveUniformARB);
+  SET_GetAttachedObjectsARB(disp, glGetAttachedObjectsARB);
+  SET_GetAttribLocationARB(disp, glGetAttribLocationARB);
+  SET_GetBooleanv(disp, glGetBooleanv);
+  SET_GetBufferParameterivARB(disp, glGetBufferParameterivARB);
+  SET_GetBufferPointervARB(disp, glGetBufferPointervARB);
+  SET_GetBufferSubDataARB(disp, glGetBufferSubDataARB);
+  SET_GetClipPlane(disp, glGetClipPlane);
+  SET_GetColorTable(disp, glGetColorTable);
+  SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv);
+  SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv);
+  SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV);
+  SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV);
+  SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV);
+  SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV);
+  SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB);
+  SET_GetConvolutionFilter(disp, glGetConvolutionFilter);
+  SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv);
+  SET_GetConvolutionParameteriv(disp, glGetConvolutionParameteriv);
+  SET_GetDoublev(disp, glGetDoublev);
+  SET_GetError(disp, glGetError);
+//SET_GetFenceivNV(disp, glGetFenceivNV);
+  SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV);
+  SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV);
+  SET_GetFloatv(disp, glGetFloatv);
+  SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT);
+  SET_GetHandleARB(disp, glGetHandleARB);
+  SET_GetHistogram(disp, glGetHistogram);
+  SET_GetHistogramParameterfv(disp, glGetHistogramParameterfv);
+  SET_GetHistogramParameteriv(disp, glGetHistogramParameteriv);
+  SET_GetInfoLogARB(disp, glGetInfoLogARB);
+  SET_GetIntegerv(disp, glGetIntegerv);
+  SET_GetLightfv(disp, glGetLightfv);
+  SET_GetLightiv(disp, glGetLightiv);
+  SET_GetMapdv(disp, glGetMapdv);
+  SET_GetMapfv(disp, glGetMapfv);
+  SET_GetMapiv(disp, glGetMapiv);
+  SET_GetMaterialfv(disp, glGetMaterialfv);
+  SET_GetMaterialiv(disp, glGetMaterialiv);
+  SET_GetMinmax(disp, glGetMinmax);
+  SET_GetMinmaxParameterfv(disp, glGetMinmaxParameterfv);
+  SET_GetMinmaxParameteriv(disp, glGetMinmaxParameteriv);
+  SET_GetObjectParameterfvARB(disp, glGetObjectParameterfvARB);
+  SET_GetObjectParameterivARB(disp, glGetObjectParameterivARB);
+  SET_GetPixelMapfv(disp, glGetPixelMapfv);
+  SET_GetPixelMapuiv(disp, glGetPixelMapuiv);
+  SET_GetPixelMapusv(disp, glGetPixelMapusv);
+//SET_GetPixelTexGenParameterfvSGIS(disp, glGetPixelTexGenParameterfvSGIS);
+//SET_GetPixelTexGenParameterivSGIS(disp, glGetPixelTexGenParameterivSGIS);
+  SET_GetPointerv(disp, glGetPointerv);
+  SET_GetPolygonStipple(disp, glGetPolygonStipple);
+  SET_GetProgramEnvParameterdvARB(disp, glGetProgramEnvParameterdvARB);
+  SET_GetProgramEnvParameterfvARB(disp, glGetProgramEnvParameterfvARB);
+  SET_GetProgramLocalParameterdvARB(disp, glGetProgramLocalParameterdvARB);
+  SET_GetProgramLocalParameterfvARB(disp, glGetProgramLocalParameterfvARB);
+//SET_GetProgramNamedParameterdvNV(disp, glGetProgramNamedParameterdvNV);
+//SET_GetProgramNamedParameterfvNV(disp, glGetProgramNamedParameterfvNV);
+//SET_GetProgramParameterdvNV(disp, glGetProgramParameterdvNV);
+//SET_GetProgramParameterfvNV(disp, glGetProgramParameterfvNV);
+  SET_GetProgramStringARB(disp, glGetProgramStringARB);
+//SET_GetProgramStringNV(disp, glGetProgramStringNV);
+  SET_GetProgramivARB(disp, glGetProgramivARB);
+//SET_GetProgramivNV(disp, glGetProgramivNV);
+//SET_GetQueryObjecti64vEXT(disp, glGetQueryObjecti64vEXT);
+  SET_GetQueryObjectivARB(disp, glGetQueryObjectivARB);
+//SET_GetQueryObjectui64vEXT(disp, glGetQueryObjectui64vEXT);
+  SET_GetQueryObjectuivARB(disp, glGetQueryObjectuivARB);
+  SET_GetQueryivARB(disp, glGetQueryivARB);
+  SET_GetRenderbufferParameterivEXT(disp, glGetRenderbufferParameterivEXT);
+  SET_GetSeparableFilter(disp, glGetSeparableFilter);
+  SET_GetShaderSourceARB(disp, glGetShaderSourceARB);
+  SET_GetString(disp, glGetString);
+  SET_GetTexEnvfv(disp, glGetTexEnvfv);
+  SET_GetTexEnviv(disp, glGetTexEnviv);
+  SET_GetTexGendv(disp, glGetTexGendv);
+  SET_GetTexGenfv(disp, glGetTexGenfv);
+  SET_GetTexGeniv(disp, glGetTexGeniv);
+  SET_GetTexImage(disp, glGetTexImage);
+  SET_GetTexLevelParameterfv(disp, glGetTexLevelParameterfv);
+  SET_GetTexLevelParameteriv(disp, glGetTexLevelParameteriv);
+  SET_GetTexParameterfv(disp, glGetTexParameterfv);
+  SET_GetTexParameteriv(disp, glGetTexParameteriv);
+//SET_GetTrackMatrixivNV(disp, glGetTrackMatrixivNV);
+  SET_GetUniformLocationARB(disp, glGetUniformLocationARB);
+  SET_GetUniformfvARB(disp, glGetUniformfvARB);
+  SET_GetUniformivARB(disp, glGetUniformivARB);
+//SET_GetVertexAttribPointervNV(disp, glGetVertexAttribPointervNV);
+  SET_GetVertexAttribdvARB(disp, glGetVertexAttribdvARB);
+//SET_GetVertexAttribdvNV(disp, glGetVertexAttribdvNV);
+  SET_GetVertexAttribfvARB(disp, glGetVertexAttribfvARB);
+//SET_GetVertexAttribfvNV(disp, glGetVertexAttribfvNV);
+  SET_GetVertexAttribivARB(disp, glGetVertexAttribivARB);
+//SET_GetVertexAttribivNV(disp, glGetVertexAttribivNV);
+  SET_Hint(disp, glHint);
+  SET_Histogram(disp, glHistogram);
+  SET_IndexMask(disp, glIndexMask);
+  SET_IndexPointer(disp, glIndexPointer);
+//SET_IndexPointerEXT(disp, glIndexPointerEXT);
+  SET_Indexd(disp, glIndexd);
+  SET_Indexdv(disp, glIndexdv);
+  SET_Indexf(disp, glIndexf);
+  SET_Indexfv(disp, glIndexfv);
+  SET_Indexi(disp, glIndexi);
+  SET_Indexiv(disp, glIndexiv);
+  SET_Indexs(disp, glIndexs);
+  SET_Indexsv(disp, glIndexsv);
+  SET_Indexub(disp, glIndexub);
+  SET_Indexubv(disp, glIndexubv);
+  SET_InitNames(disp, glInitNames);
+  SET_InterleavedArrays(disp, glInterleavedArrays);
+  SET_IsBufferARB(disp, glIsBufferARB);
+  SET_IsEnabled(disp, glIsEnabled);
+  SET_IsFenceNV(disp, glIsFenceAPPLE);           // <-- APPLE -> NV
+  SET_IsFramebufferEXT(disp, glIsFramebufferEXT);
+  SET_IsList(disp, glIsList);
+//SET_IsProgramNV(disp, glIsProgramNV);
+  SET_IsQueryARB(disp, glIsQueryARB);
+  SET_IsRenderbufferEXT(disp, glIsRenderbufferEXT);
+  SET_IsTexture(disp, glIsTexture);
+  SET_LightModelf(disp, glLightModelf);
+  SET_LightModelfv(disp, glLightModelfv);
+  SET_LightModeli(disp, glLightModeli);
+  SET_LightModeliv(disp, glLightModeliv);
+  SET_Lightf(disp, glLightf);
+  SET_Lightfv(disp, glLightfv);
+  SET_Lighti(disp, glLighti);
+  SET_Lightiv(disp, glLightiv);
+  SET_LineStipple(disp, glLineStipple);
+  SET_LineWidth(disp, glLineWidth);
+  SET_LinkProgramARB(disp, glLinkProgramARB);
+  SET_ListBase(disp, glListBase);
+  SET_LoadIdentity(disp, glLoadIdentity);
+  SET_LoadMatrixd(disp, glLoadMatrixd);
+  SET_LoadMatrixf(disp, glLoadMatrixf);
+  SET_LoadName(disp, glLoadName);
+//SET_LoadProgramNV(disp, glLoadProgramNV);
+  SET_LoadTransposeMatrixdARB(disp, glLoadTransposeMatrixdARB);
+  SET_LoadTransposeMatrixfARB(disp, glLoadTransposeMatrixfARB);
+  SET_LockArraysEXT(disp, glLockArraysEXT);
+  SET_LogicOp(disp, glLogicOp);
+  SET_Map1d(disp, glMap1d);
+  SET_Map1f(disp, glMap1f);
+  SET_Map2d(disp, glMap2d);
+  SET_Map2f(disp, glMap2f);
+  SET_MapBufferARB(disp, glMapBufferARB);
+  SET_MapGrid1d(disp, glMapGrid1d);
+  SET_MapGrid1f(disp, glMapGrid1f);
+  SET_MapGrid2d(disp, glMapGrid2d);
+  SET_MapGrid2f(disp, glMapGrid2f);
+  SET_Materialf(disp, glMaterialf);
+  SET_Materialfv(disp, glMaterialfv);
+  SET_Materiali(disp, glMateriali);
+  SET_Materialiv(disp, glMaterialiv);
+  SET_MatrixMode(disp, glMatrixMode);
+  SET_Minmax(disp, glMinmax);
+  SET_MultMatrixd(disp, glMultMatrixd);
+  SET_MultMatrixf(disp, glMultMatrixf);
+  SET_MultTransposeMatrixdARB(disp, glMultTransposeMatrixdARB);
+  SET_MultTransposeMatrixfARB(disp, glMultTransposeMatrixfARB);
+  SET_MultiDrawArraysEXT(disp, glMultiDrawArraysEXT);
+  SET_MultiDrawElementsEXT(disp, glMultiDrawElementsEXT);
+//SET_MultiModeDrawArraysIBM(disp, glMultiModeDrawArraysIBM);
+//SET_MultiModeDrawElementsIBM(disp, glMultiModeDrawElementsIBM);
+  SET_MultiTexCoord1dARB(disp, glMultiTexCoord1dARB);
+  SET_MultiTexCoord1dvARB(disp, glMultiTexCoord1dvARB);
+  SET_MultiTexCoord1fARB(disp, glMultiTexCoord1fARB);
+  SET_MultiTexCoord1fvARB(disp, glMultiTexCoord1fvARB);
+  SET_MultiTexCoord1iARB(disp, glMultiTexCoord1iARB);
+  SET_MultiTexCoord1ivARB(disp, glMultiTexCoord1ivARB);
+  SET_MultiTexCoord1sARB(disp, glMultiTexCoord1sARB);
+  SET_MultiTexCoord1svARB(disp, glMultiTexCoord1svARB);
+  SET_MultiTexCoord2dARB(disp, glMultiTexCoord2dARB);
+  SET_MultiTexCoord2dvARB(disp, glMultiTexCoord2dvARB);
+  SET_MultiTexCoord2fARB(disp, glMultiTexCoord2fARB);
+  SET_MultiTexCoord2fvARB(disp, glMultiTexCoord2fvARB);
+  SET_MultiTexCoord2iARB(disp, glMultiTexCoord2iARB);
+  SET_MultiTexCoord2ivARB(disp, glMultiTexCoord2ivARB);
+  SET_MultiTexCoord2sARB(disp, glMultiTexCoord2sARB);
+  SET_MultiTexCoord2svARB(disp, glMultiTexCoord2svARB);
+  SET_MultiTexCoord3dARB(disp, glMultiTexCoord3dARB);
+  SET_MultiTexCoord3dvARB(disp, glMultiTexCoord3dvARB);
+  SET_MultiTexCoord3fARB(disp, glMultiTexCoord3fARB);
+  SET_MultiTexCoord3fvARB(disp, glMultiTexCoord3fvARB);
+  SET_MultiTexCoord3iARB(disp, glMultiTexCoord3iARB);
+  SET_MultiTexCoord3ivARB(disp, glMultiTexCoord3ivARB);
+  SET_MultiTexCoord3sARB(disp, glMultiTexCoord3sARB);
+  SET_MultiTexCoord3svARB(disp, glMultiTexCoord3svARB);
+  SET_MultiTexCoord4dARB(disp, glMultiTexCoord4dARB);
+  SET_MultiTexCoord4dvARB(disp, glMultiTexCoord4dvARB);
+  SET_MultiTexCoord4fARB(disp, glMultiTexCoord4fARB);
+  SET_MultiTexCoord4fvARB(disp, glMultiTexCoord4fvARB);
+  SET_MultiTexCoord4iARB(disp, glMultiTexCoord4iARB);
+  SET_MultiTexCoord4ivARB(disp, glMultiTexCoord4ivARB);
+  SET_MultiTexCoord4sARB(disp, glMultiTexCoord4sARB);
+  SET_MultiTexCoord4svARB(disp, glMultiTexCoord4svARB);
+  SET_NewList(disp, glNewList);
+  SET_Normal3b(disp, glNormal3b);
+  SET_Normal3bv(disp, glNormal3bv);
+  SET_Normal3d(disp, glNormal3d);
+  SET_Normal3dv(disp, glNormal3dv);
+  SET_Normal3f(disp, glNormal3f);
+  SET_Normal3fv(disp, glNormal3fv);
+  SET_Normal3i(disp, glNormal3i);
+  SET_Normal3iv(disp, glNormal3iv);
+  SET_Normal3s(disp, glNormal3s);
+  SET_Normal3sv(disp, glNormal3sv);
+  SET_NormalPointer(disp, glNormalPointer);
+//SET_NormalPointerEXT(disp, glNormalPointerEXT);
+  SET_Ortho(disp, glOrtho);
+//SET_PassTexCoordATI(disp, glPassTexCoordEXT);         // <-- EXT -> ATI
+  SET_PassThrough(disp, glPassThrough);
+  SET_PixelMapfv(disp, glPixelMapfv);
+  SET_PixelMapuiv(disp, glPixelMapuiv);
+  SET_PixelMapusv(disp, glPixelMapusv);
+  SET_PixelStoref(disp, glPixelStoref);
+  SET_PixelStorei(disp, glPixelStorei);
+//SET_PixelTexGenParameterfSGIS(disp, glPixelTexGenParameterfSGIS);
+//SET_PixelTexGenParameterfvSGIS(disp, glPixelTexGenParameterfvSGIS);
+//SET_PixelTexGenParameteriSGIS(disp, glPixelTexGenParameteriSGIS);
+//SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS);
+//  SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX);
+  SET_PixelTransferf(disp, glPixelTransferf);
+  SET_PixelTransferi(disp, glPixelTransferi);
+  SET_PixelZoom(disp, glPixelZoom);
+  SET_PointParameterfEXT(disp, glPointParameterfARB);      // <-- ARB -> EXT
+  SET_PointParameterfvEXT(disp, glPointParameterfvARB);    // <-- ARB -> EXT
+  SET_PointParameteriNV(disp, glPointParameteriNV);
+  SET_PointParameterivNV(disp, glPointParameterivNV);
+  SET_PointSize(disp, glPointSize);
+  SET_PolygonMode(disp, glPolygonMode);
+  SET_PolygonOffset(disp, glPolygonOffset);
+//SET_PolygonOffsetEXT(disp, glPolygonOffsetEXT);
+  SET_PolygonStipple(disp, glPolygonStipple);
+  SET_PopAttrib(disp, glPopAttrib);
+  SET_PopClientAttrib(disp, glPopClientAttrib);
+  SET_PopMatrix(disp, glPopMatrix);
+  SET_PopName(disp, glPopName);
+  SET_PrioritizeTextures(disp, glPrioritizeTextures);
+  SET_ProgramEnvParameter4dARB(disp, glProgramEnvParameter4dARB);
+  SET_ProgramEnvParameter4dvARB(disp, glProgramEnvParameter4dvARB);
+  SET_ProgramEnvParameter4fARB(disp, glProgramEnvParameter4fARB);
+  SET_ProgramEnvParameter4fvARB(disp, glProgramEnvParameter4fvARB);
+  SET_ProgramLocalParameter4dARB(disp, glProgramLocalParameter4dARB);
+  SET_ProgramLocalParameter4dvARB(disp, glProgramLocalParameter4dvARB);
+  SET_ProgramLocalParameter4fARB(disp, glProgramLocalParameter4fARB);
+  SET_ProgramLocalParameter4fvARB(disp, glProgramLocalParameter4fvARB);
+//SET_ProgramNamedParameter4dNV(disp, glProgramNamedParameter4dNV);
+//SET_ProgramNamedParameter4dvNV(disp, glProgramNamedParameter4dvNV);
+//SET_ProgramNamedParameter4fNV(disp, glProgramNamedParameter4fNV);
+//SET_ProgramNamedParameter4fvNV(disp, glProgramNamedParameter4fvNV);
+//SET_ProgramParameter4dNV(disp, glProgramParameter4dNV);
+//SET_ProgramParameter4dvNV(disp, glProgramParameter4dvNV);
+//SET_ProgramParameter4fNV(disp, glProgramParameter4fNV);
+//SET_ProgramParameter4fvNV(disp, glProgramParameter4fvNV);
+//SET_ProgramParameters4dvNV(disp, glProgramParameters4dvNV);
+//SET_ProgramParameters4fvNV(disp, glProgramParameters4fvNV);
+  SET_ProgramStringARB(disp, glProgramStringARB);
+  SET_PushAttrib(disp, glPushAttrib);
+  SET_PushClientAttrib(disp, glPushClientAttrib);
+  SET_PushMatrix(disp, glPushMatrix);
+  SET_PushName(disp, glPushName);
+  SET_RasterPos2d(disp, glRasterPos2d);
+  SET_RasterPos2dv(disp, glRasterPos2dv);
+  SET_RasterPos2f(disp, glRasterPos2f);
+  SET_RasterPos2fv(disp, glRasterPos2fv);
+  SET_RasterPos2i(disp, glRasterPos2i);
+  SET_RasterPos2iv(disp, glRasterPos2iv);
+  SET_RasterPos2s(disp, glRasterPos2s);
+  SET_RasterPos2sv(disp, glRasterPos2sv);
+  SET_RasterPos3d(disp, glRasterPos3d);
+  SET_RasterPos3dv(disp, glRasterPos3dv);
+  SET_RasterPos3f(disp, glRasterPos3f);
+  SET_RasterPos3fv(disp, glRasterPos3fv);
+  SET_RasterPos3i(disp, glRasterPos3i);
+  SET_RasterPos3iv(disp, glRasterPos3iv);
+  SET_RasterPos3s(disp, glRasterPos3s);
+  SET_RasterPos3sv(disp, glRasterPos3sv);
+  SET_RasterPos4d(disp, glRasterPos4d);
+  SET_RasterPos4dv(disp, glRasterPos4dv);
+  SET_RasterPos4f(disp, glRasterPos4f);
+  SET_RasterPos4fv(disp, glRasterPos4fv);
+  SET_RasterPos4i(disp, glRasterPos4i);
+  SET_RasterPos4iv(disp, glRasterPos4iv);
+  SET_RasterPos4s(disp, glRasterPos4s);
+  SET_RasterPos4sv(disp, glRasterPos4sv);
+  SET_ReadBuffer(disp, glReadBuffer);
+  SET_ReadPixels(disp, glReadPixels);
+  SET_Rectd(disp, glRectd);
+  SET_Rectdv(disp, glRectdv);
+  SET_Rectf(disp, glRectf);
+  SET_Rectfv(disp, glRectfv);
+  SET_Recti(disp, glRecti);
+  SET_Rectiv(disp, glRectiv);
+  SET_Rects(disp, glRects);
+  SET_Rectsv(disp, glRectsv);
+  SET_RenderMode(disp, glRenderMode);
+  SET_RenderbufferStorageEXT(disp, glRenderbufferStorageEXT);
+//SET_RequestResidentProgramsNV(disp, glRequestResidentProgramsNV);
+  SET_ResetHistogram(disp, glResetHistogram);
+  SET_ResetMinmax(disp, glResetMinmax);
+//SET_ResizeBuffersMESA(disp, glResizeBuffersMESA);
+  SET_Rotated(disp, glRotated);
+  SET_Rotatef(disp, glRotatef);
+  SET_SampleCoverageARB(disp, glSampleCoverageARB);
+//SET_SampleMapATI(disp, glSampleMapEXT);       // <-- EXT -> ATI
+//SET_SampleMaskSGIS(disp, glSampleMaskSGIS);
+//SET_SamplePatternSGIS(disp, glSamplePatternSGIS);
+  SET_Scaled(disp, glScaled);
+  SET_Scalef(disp, glScalef);
+  SET_Scissor(disp, glScissor);
+  SET_SecondaryColor3bEXT(disp, glSecondaryColor3bEXT);
+  SET_SecondaryColor3bvEXT(disp, glSecondaryColor3bvEXT);
+  SET_SecondaryColor3dEXT(disp, glSecondaryColor3dEXT);
+  SET_SecondaryColor3dvEXT(disp, glSecondaryColor3dvEXT);
+  SET_SecondaryColor3fEXT(disp, glSecondaryColor3fEXT);
+  SET_SecondaryColor3fvEXT(disp, glSecondaryColor3fvEXT);
+  SET_SecondaryColor3iEXT(disp, glSecondaryColor3iEXT);
+  SET_SecondaryColor3ivEXT(disp, glSecondaryColor3ivEXT);
+  SET_SecondaryColor3sEXT(disp, glSecondaryColor3sEXT);
+  SET_SecondaryColor3svEXT(disp, glSecondaryColor3svEXT);
+  SET_SecondaryColor3ubEXT(disp, glSecondaryColor3ubEXT);
+  SET_SecondaryColor3ubvEXT(disp, glSecondaryColor3ubvEXT);
+  SET_SecondaryColor3uiEXT(disp, glSecondaryColor3uiEXT);
+  SET_SecondaryColor3uivEXT(disp, glSecondaryColor3uivEXT);
+  SET_SecondaryColor3usEXT(disp, glSecondaryColor3usEXT);
+  SET_SecondaryColor3usvEXT(disp, glSecondaryColor3usvEXT);
+  SET_SecondaryColorPointerEXT(disp, glSecondaryColorPointerEXT);
+  SET_SelectBuffer(disp, glSelectBuffer);
+  SET_SeparableFilter2D(disp, glSeparableFilter2D);
+  SET_SetFenceNV(disp, glSetFenceAPPLE);  // <-- APPLE -> NV
+//SET_SetFragmentShaderConstantATI(disp, glSetFragmentShaderConstantEXT);   // <-- EXT -> ATI
+  SET_ShadeModel(disp, glShadeModel);
+  SET_ShaderSourceARB(disp, glShaderSourceARB);
+  SET_StencilFunc(disp, glStencilFunc);
+  SET_StencilFuncSeparate(disp, glStencilFuncSeparate);
+  SET_StencilMask(disp, glStencilMask);
+  SET_StencilMaskSeparate(disp, glStencilMaskSeparate);
+  SET_StencilOp(disp, glStencilOp);
+  SET_StencilOpSeparate(disp, glStencilOpSeparate);
+  SET_TestFenceNV(disp, glTestFenceAPPLE); // <-- APPLE -> NV
+  SET_TexCoord1d(disp, glTexCoord1d);
+  SET_TexCoord1dv(disp, glTexCoord1dv);
+  SET_TexCoord1f(disp, glTexCoord1f);
+  SET_TexCoord1fv(disp, glTexCoord1fv);
+  SET_TexCoord1i(disp, glTexCoord1i);
+  SET_TexCoord1iv(disp, glTexCoord1iv);
+  SET_TexCoord1s(disp, glTexCoord1s);
+  SET_TexCoord1sv(disp, glTexCoord1sv);
+  SET_TexCoord2d(disp, glTexCoord2d);
+  SET_TexCoord2dv(disp, glTexCoord2dv);
+  SET_TexCoord2f(disp, glTexCoord2f);
+  SET_TexCoord2fv(disp, glTexCoord2fv);
+  SET_TexCoord2i(disp, glTexCoord2i);
+  SET_TexCoord2iv(disp, glTexCoord2iv);
+  SET_TexCoord2s(disp, glTexCoord2s);
+  SET_TexCoord2sv(disp, glTexCoord2sv);
+  SET_TexCoord3d(disp, glTexCoord3d);
+  SET_TexCoord3dv(disp, glTexCoord3dv);
+  SET_TexCoord3f(disp, glTexCoord3f);
+  SET_TexCoord3fv(disp, glTexCoord3fv);
+  SET_TexCoord3i(disp, glTexCoord3i);
+  SET_TexCoord3iv(disp, glTexCoord3iv);
+  SET_TexCoord3s(disp, glTexCoord3s);
+  SET_TexCoord3sv(disp, glTexCoord3sv);
+  SET_TexCoord4d(disp, glTexCoord4d);
+  SET_TexCoord4dv(disp, glTexCoord4dv);
+  SET_TexCoord4f(disp, glTexCoord4f);
+  SET_TexCoord4fv(disp, glTexCoord4fv);
+  SET_TexCoord4i(disp, glTexCoord4i);
+  SET_TexCoord4iv(disp, glTexCoord4iv);
+  SET_TexCoord4s(disp, glTexCoord4s);
+  SET_TexCoord4sv(disp, glTexCoord4sv);
+  SET_TexCoordPointer(disp, glTexCoordPointer);
+//SET_TexCoordPointerEXT(disp, glTexCoordPointerEXT);
+  SET_TexEnvf(disp, glTexEnvf);
+  SET_TexEnvfv(disp, glTexEnvfv);
+  SET_TexEnvi(disp, glTexEnvi);
+  SET_TexEnviv(disp, glTexEnviv);
+  SET_TexGend(disp, glTexGend);
+  SET_TexGendv(disp, glTexGendv);
+  SET_TexGenf(disp, glTexGenf);
+  SET_TexGenfv(disp, glTexGenfv);
+  SET_TexGeni(disp, glTexGeni);
+  SET_TexGeniv(disp, glTexGeniv);
+  SET_TexImage1D(disp, glTexImage1D);
+  SET_TexImage2D(disp, glTexImage2D);
+  SET_TexImage3D(disp, glTexImage3D);
+  SET_TexParameterf(disp, glTexParameterf);
+  SET_TexParameterfv(disp, glTexParameterfv);
+  SET_TexParameteri(disp, glTexParameteri);
+  SET_TexParameteriv(disp, glTexParameteriv);
+  SET_TexSubImage1D(disp, glTexSubImage1D);
+  SET_TexSubImage2D(disp, glTexSubImage2D);
+  SET_TexSubImage3D(disp, glTexSubImage3D);
+//SET_TrackMatrixNV(disp, glTrackMatrixNV);
+  SET_Translated(disp, glTranslated);
+  SET_Translatef(disp, glTranslatef);
+  SET_Uniform1fARB(disp, glUniform1fARB);
+  SET_Uniform1fvARB(disp, glUniform1fvARB);
+  SET_Uniform1iARB(disp, glUniform1iARB);
+  SET_Uniform1ivARB(disp, glUniform1ivARB);
+  SET_Uniform2fARB(disp, glUniform2fARB);
+  SET_Uniform2fvARB(disp, glUniform2fvARB);
+  SET_Uniform2iARB(disp, glUniform2iARB);
+  SET_Uniform2ivARB(disp, glUniform2ivARB);
+  SET_Uniform3fARB(disp, glUniform3fARB);
+  SET_Uniform3fvARB(disp, glUniform3fvARB);
+  SET_Uniform3iARB(disp, glUniform3iARB);
+  SET_Uniform3ivARB(disp, glUniform3ivARB);
+  SET_Uniform4fARB(disp, glUniform4fARB);
+  SET_Uniform4fvARB(disp, glUniform4fvARB);
+  SET_Uniform4iARB(disp, glUniform4iARB);
+  SET_Uniform4ivARB(disp, glUniform4ivARB);
+  SET_UniformMatrix2fvARB(disp, glUniformMatrix2fvARB);
+  SET_UniformMatrix3fvARB(disp, glUniformMatrix3fvARB);
+  SET_UniformMatrix4fvARB(disp, glUniformMatrix4fvARB);
+  SET_UnlockArraysEXT(disp, glUnlockArraysEXT);
+  SET_UnmapBufferARB(disp, glUnmapBufferARB);
+  SET_UseProgramObjectARB(disp, glUseProgramObjectARB);
+  SET_ValidateProgramARB(disp, glValidateProgramARB);
+  SET_Vertex2d(disp, glVertex2d);
+  SET_Vertex2dv(disp, glVertex2dv);
+  SET_Vertex2f(disp, glVertex2f);
+  SET_Vertex2fv(disp, glVertex2fv);
+  SET_Vertex2i(disp, glVertex2i);
+  SET_Vertex2iv(disp, glVertex2iv);
+  SET_Vertex2s(disp, glVertex2s);
+  SET_Vertex2sv(disp, glVertex2sv);
+  SET_Vertex3d(disp, glVertex3d);
+  SET_Vertex3dv(disp, glVertex3dv);
+  SET_Vertex3f(disp, glVertex3f);
+  SET_Vertex3fv(disp, glVertex3fv);
+  SET_Vertex3i(disp, glVertex3i);
+  SET_Vertex3iv(disp, glVertex3iv);
+  SET_Vertex3s(disp, glVertex3s);
+  SET_Vertex3sv(disp, glVertex3sv);
+  SET_Vertex4d(disp, glVertex4d);
+  SET_Vertex4dv(disp, glVertex4dv);
+  SET_Vertex4f(disp, glVertex4f);
+  SET_Vertex4fv(disp, glVertex4fv);
+  SET_Vertex4i(disp, glVertex4i);
+  SET_Vertex4iv(disp, glVertex4iv);
+  SET_Vertex4s(disp, glVertex4s);
+  SET_Vertex4sv(disp, glVertex4sv);
+//SET_VertexArrayRangeNV(disp, glVertexArrayRangeNV);
+  SET_VertexAttrib1dARB(disp, glVertexAttrib1dARB);
+  SET_VertexAttrib1dvARB(disp, glVertexAttrib1dvARB);
+  SET_VertexAttrib1fARB(disp, glVertexAttrib1fARB);
+  SET_VertexAttrib1fvARB(disp, glVertexAttrib1fvARB);
+  SET_VertexAttrib1sARB(disp, glVertexAttrib1sARB);
+  SET_VertexAttrib1svARB(disp, glVertexAttrib1svARB);
+  SET_VertexAttrib2dARB(disp, glVertexAttrib2dARB);
+  SET_VertexAttrib2dvARB(disp, glVertexAttrib2dvARB);
+  SET_VertexAttrib2fARB(disp, glVertexAttrib2fARB);
+  SET_VertexAttrib2fvARB(disp, glVertexAttrib2fvARB);
+  SET_VertexAttrib2sARB(disp, glVertexAttrib2sARB);
+  SET_VertexAttrib2svARB(disp, glVertexAttrib2svARB);
+  SET_VertexAttrib3dARB(disp, glVertexAttrib3dARB);
+  SET_VertexAttrib3dvARB(disp, glVertexAttrib3dvARB);
+  SET_VertexAttrib3fARB(disp, glVertexAttrib3fARB);
+  SET_VertexAttrib3fvARB(disp, glVertexAttrib3fvARB);
+  SET_VertexAttrib3sARB(disp, glVertexAttrib3sARB);
+  SET_VertexAttrib3svARB(disp, glVertexAttrib3svARB);
+  SET_VertexAttrib4NbvARB(disp, glVertexAttrib4NbvARB);
+  SET_VertexAttrib4NivARB(disp, glVertexAttrib4NivARB);
+  SET_VertexAttrib4NsvARB(disp, glVertexAttrib4NsvARB);
+  SET_VertexAttrib4NubARB(disp, glVertexAttrib4NubARB);
+  SET_VertexAttrib4NubvARB(disp, glVertexAttrib4NubvARB);
+  SET_VertexAttrib4NuivARB(disp, glVertexAttrib4NuivARB);
+  SET_VertexAttrib4NusvARB(disp, glVertexAttrib4NusvARB);
+  SET_VertexAttrib4bvARB(disp, glVertexAttrib4bvARB);
+  SET_VertexAttrib4dARB(disp, glVertexAttrib4dARB);
+  SET_VertexAttrib4dvARB(disp, glVertexAttrib4dvARB);
+  SET_VertexAttrib4fARB(disp, glVertexAttrib4fARB);
+  SET_VertexAttrib4fvARB(disp, glVertexAttrib4fvARB);
+  SET_VertexAttrib4ivARB(disp, glVertexAttrib4ivARB);
+  SET_VertexAttrib4sARB(disp, glVertexAttrib4sARB);
+  SET_VertexAttrib4svARB(disp, glVertexAttrib4svARB);
+  SET_VertexAttrib4ubvARB(disp, glVertexAttrib4ubvARB);
+  SET_VertexAttrib4uivARB(disp, glVertexAttrib4uivARB);
+  SET_VertexAttrib4usvARB(disp, glVertexAttrib4usvARB);
+  SET_VertexAttribPointerARB(disp, glVertexAttribPointerARB);
+  SET_VertexPointer(disp, glVertexPointer);
+//  SET_VertexPointerEXT(disp, glVertexPointerEXT);
+  SET_Viewport(disp, glViewport);
+  SET_WindowPos2dMESA(disp, glWindowPos2dARB);
+  SET_WindowPos2dvMESA(disp, glWindowPos2dvARB);
+  SET_WindowPos2fMESA(disp, glWindowPos2fARB);
+  SET_WindowPos2fvMESA(disp, glWindowPos2fvARB);
+  SET_WindowPos2iMESA(disp, glWindowPos2iARB);
+  SET_WindowPos2ivMESA(disp, glWindowPos2ivARB);
+  SET_WindowPos2sMESA(disp, glWindowPos2sARB);
+  SET_WindowPos2svMESA(disp, glWindowPos2svARB);
+  SET_WindowPos3dMESA(disp, glWindowPos3dARB);
+  SET_WindowPos3dvMESA(disp, glWindowPos3dvARB);
+  SET_WindowPos3fMESA(disp, glWindowPos3fARB);
+  SET_WindowPos3fvMESA(disp, glWindowPos3fvARB);
+  SET_WindowPos3iMESA(disp, glWindowPos3iARB);
+  SET_WindowPos3ivMESA(disp, glWindowPos3ivARB);
+  SET_WindowPos3sMESA(disp, glWindowPos3sARB);
+  SET_WindowPos3svMESA(disp, glWindowPos3svARB);
+//SET_WindowPos4dMESA(disp, glWindowPos4dMESA);
+//SET_WindowPos4dvMESA(disp, glWindowPos4dvMESA);
+//SET_WindowPos4fMESA(disp, glWindowPos4fMESA);
+//SET_WindowPos4fvMESA(disp, glWindowPos4fvMESA);
+//SET_WindowPos4iMESA(disp, glWindowPos4iMESA);
+//SET_WindowPos4ivMESA(disp, glWindowPos4ivMESA);
+//SET_WindowPos4sMESA(disp, glWindowPos4sMESA);
+//SET_WindowPos4svMESA(disp, glWindowPos4svMESA);
 }
diff-tree 742d5d6adc4d4a1b6fceeb3443d7931e107462f7 (from 374bd88d1025835fe36ca0ff6620eb1d3b0a06b0)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Sep 20 18:03:51 2007 -0700

    XDarwin: Fixes to quartzKeyboard.c to prevent a crash using certain non-US keyboards

diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index b498c77..f81ef0a 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -4,7 +4,7 @@
    Code to build a keymap using the Carbon Keyboard Layout API,
    which is supported on Mac OS X 10.2 and newer.
 
-   Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+   Copyright (c) 2003, 2007 Apple Inc.
 
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation files
@@ -214,35 +214,45 @@ Bool
 DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
 {
     KeyboardLayoutRef key_layout;
-    const void *chr_data;
+    const void *chr_data = NULL;
     int num_keycodes = NUM_KEYCODES;
     UInt32 keyboard_type = 0;
     int is_uchr, i, j;
     OSStatus err;
     KeySym *k;
 
-    KLGetCurrentKeyboardLayout (&key_layout);
-    KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
-
+    TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
+    if (currentKeyLayoutRef) 
+      {
+	CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
+	if (currentKeyLayoutDataRef)
+	  chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+      }
+    
     if (chr_data != NULL)
     {
-        is_uchr = 1;
-        keyboard_type = LMGetKbdType ();
-    }
-    else
-    {
-        KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
-
-        if (chr_data == NULL)
-        {
-            ErrorF ( "Couldn't get uchr or kchr resource\n");
-            return FALSE;
-        }
-
-        is_uchr = 0;
-        num_keycodes = 128;
-    }    
+      KLGetCurrentKeyboardLayout (&key_layout);
+      KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
 
+      if (chr_data != NULL)
+	{
+	  is_uchr = 1;
+	  keyboard_type = LMGetKbdType ();
+	}
+      else
+	{
+	  KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
+	  
+	  if (chr_data == NULL)
+	    {
+	      ErrorF ( "Couldn't get uchr or kchr resource\n");
+	      return FALSE;
+	    }
+	  
+	  is_uchr = 0;
+	  num_keycodes = 128;
+	}    
+    }
 
     /* Scan the keycode range for the Unicode character that each
        key produces in the four shift states. Then convert that to
@@ -367,6 +377,8 @@ DarwinModeReadSystemKeymap (darwinKeyboa
         }
     }
 
+    if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
+
     return TRUE;
 }
 
diff-tree 374bd88d1025835fe36ca0ff6620eb1d3b0a06b0 (from 3a965fdadccea7beff09a28c9c0ef4b4975eae38)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Thu Sep 20 16:50:49 2007 -0700

    XDarwin: Merging misc changes from downstream.
    
    The only functional changes in this patch are a removal of use of
    Xtrans internals -- replaced by xcb, which doesn't seem to be used
    elsewhere in the server?  Pity.
    Also, a fix to make all X11 windows pop to the front of the display
    when the X11.app icon is clicked -- currently takes two clicks,
    not sure why.

diff --git a/hw/darwin/apple/Info.plist b/hw/darwin/apple/Info.plist
index ae47e95..66f1f6b 100644
--- a/hw/darwin/apple/Info.plist
+++ b/hw/darwin/apple/Info.plist
@@ -4,42 +4,6 @@
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>English</string>
-	<key>CFBundleDocumentTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>x11app</string>
-			</array>
-			<key>CFBundleTypeIconFile</key>
-			<string>X11.icns</string>
-			<key>CFBundleTypeName</key>
-			<string>X11 Application</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>****</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-			<key>LSIsAppleDefaultForType</key>
-			<true/>
-		</dict>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>tool</string>
-				<string>*</string>
-			</array>
-			<key>CFBundleTypeName</key>
-			<string>UNIX Application</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>****</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-		</dict>
-	</array>
 	<key>CFBundleExecutable</key>
 	<string>X11</string>
 	<key>CFBundleGetInfoString</key>
@@ -57,7 +21,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.0</string>
 	<key>CFBundleSignature</key>
-	<string>????</string>
+	<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
 	<true/>
 	<key>NSHumanReadableCopyright</key>
diff --git a/hw/darwin/apple/X11Application.h b/hw/darwin/apple/X11Application.h
index 6b1d726..eb205a1 100644
--- a/hw/darwin/apple/X11Application.h
+++ b/hw/darwin/apple/X11Application.h
@@ -79,7 +79,7 @@ extern void X11ApplicationMain (int argc
 extern int X11EnableKeyEquivalents;
 extern int quartzHasRoot, quartzEnableRootless;
 
-#define APP_PREFS "com.apple.x11"
+#define APP_PREFS "org.x.x11"
 
 #define PREFS_APPSMENU		"apps_menu"
 #define PREFS_FAKEBUTTONS	"enable_fake_buttons"
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index 2d21321..41cf425 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -41,13 +41,11 @@
 # include "micmap.h"
 #undef BOOL
 
-//#include "xf86Version.h"
-
 #include <mach/mach.h>
 #include <unistd.h>
 #include <pthread.h>
 
-#define DEFAULTS_FILE "/etc/X11/xserver/Xquartz.plist"
+#define DEFAULTS_FILE "/usr/X11/lib/X11xserver/Xquartz.plist"
 
 int X11EnableKeyEquivalents = TRUE;
 int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
@@ -275,9 +273,7 @@ static void message_kit_thread (SEL sele
 	  _appFlags._active = YES;
 	  
 	  [self activateX:YES];
-#ifdef DARWIN_DDX_MISSING
-	  if ([e data2] & 0x10) QuartzMessageServerThread (kXDarwinBringAllToFront, 0);
-#endif
+	  if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
 	}
 	break;
 			
diff --git a/hw/darwin/apple/X11Controller.m b/hw/darwin/apple/X11Controller.m
index 3dc965b..acac313 100644
--- a/hw/darwin/apple/X11Controller.m
+++ b/hw/darwin/apple/X11Controller.m
@@ -38,14 +38,12 @@
 
 /* ouch! */
 #define BOOL X_BOOL
-//# include "Xproto.h"
 #include "opaque.h"
 # include "darwin.h"
 # include "../quartz/quartz.h"
 # define _APPLEWM_SERVER_
 # include "X11/extensions/applewm.h"
 # include "../quartz/applewmExt.h"
-//# include "X.h"
 #undef BOOL
 
 #include <stdio.h>
@@ -301,6 +299,7 @@
   int child1, child2 = 0;
   int status;
 	
+  /*  this old code doesn't work with csh ...
   shell = getenv("SHELL");
   if (shell == NULL) shell = "/bin/bash";
     
@@ -308,8 +307,14 @@
   argv[1] = "-l";
   argv[2] = "-c";
   argv[3] = command;
-  argv[4] = NULL;
-    
+  argv[4] = NULL; 
+  ... but the new code doesn't work with spaces in a command :(
+  */
+  
+  argv[0] = "/usr/bin/login";
+  argv[1] = "-fp";
+  argv[2] = getlogin();
+
   /* Do the fork-twice trick to avoid having to reap zombies */
     
   child1 = fork();
@@ -655,7 +660,7 @@ objectValueForTableColumn:(NSTableColumn
 
 - (IBAction) x11_help:sender
 {
-  AHLookupAnchor (CFSTR ("Mac Help"), CFSTR ("mchlp2276"));
+  AHLookupAnchor ((CFStringRef)NSLocalizedString(@"Mac Help", no comment), CFSTR ("mchlp2276"));
 }
 
 - (BOOL) validateMenuItem:(NSMenuItem *)item
diff --git a/hw/darwin/apple/bundle-main.c b/hw/darwin/apple/bundle-main.c
index ec7820d..452da76 100644
--- a/hw/darwin/apple/bundle-main.c
+++ b/hw/darwin/apple/bundle-main.c
@@ -70,14 +70,16 @@
 
 #include <X11/Xlib.h>
 #include <X11/Xauth.h>
-
+#ifdef USE_XCB
+#include <xcb/xcb.h>
+#endif
 #include <CoreFoundation/CoreFoundation.h>
 #include <SystemConfiguration/SystemConfiguration.h>
 
 #define X_SERVER "/usr/X11/bin/Xquartz"
 #define XTERM_PATH "/usr/X11/bin/xterm"
-#define WM_PATH "/usr/X11/bin/quartz-wm"
-#define DEFAULT_XINITRC "/etc/X11/xinit/xinitrc"
+#define WM_PATH "/usr/bin/quartz-wm"
+#define DEFAULT_XINITRC "/usr/X11/lib/X11/xinit/xinitrc"
 #define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
 
 /* what xinit does */
@@ -595,37 +597,25 @@ static Boolean
 display_exists_p (int number)
 {
     char buf[64];
-    void *conn;
-    char *fullname = NULL;
-    int idisplay, iscreen;
-    char *conn_auth_name, *conn_auth_data;
-    int conn_auth_namelen, conn_auth_datalen;
-#ifdef USE_XTRANS_INTERNALS	
-    extern void *_X11TransConnectDisplay ();
-    extern void _XDisconnectDisplay ();
-#endif	
+#ifdef USE_XCB
+    xcb_connection_t *conn;
+#endif
+
     /* Since connecting to the display waits for a few seconds if the
 	 display doesn't exist, check for trivial non-existence - if the
 	 socket in /tmp exists or not.. (note: if the socket exists, the
 	 server may still not, so we need to try to connect in that case..) */
 	
     sprintf (buf, "/tmp/.X11-unix/X%d", number);
-    if (access (buf, F_OK) != 0)
-		return FALSE;
-#ifdef USE_XTRANS_INTERNALS	
-    /* This is a private function that we shouldn't really be calling,
-	 but it's the best way to see if the server exists (without
-	 needing to hold the necessary authentication to use it) */
-	
+    if (access (buf, F_OK) != 0) return FALSE;
+
+#ifdef USE_XCB
     sprintf (buf, ":%d", number);
-    conn = _X11TransConnectDisplay (buf, &fullname, &idisplay, &iscreen,
-									&conn_auth_name, &conn_auth_namelen,
-									&conn_auth_data, &conn_auth_datalen);
-    if (conn == NULL)
-		return FALSE;
-	
-    _XDisconnectDisplay (conn);
+    conn = xcb_connect(buf, NULL);
+    if (conn == NULL) return FALSE;
+    xcb_disconnect(conn);
 #endif
+
     return TRUE;
 }
 
diff-tree 3a965fdadccea7beff09a28c9c0ef4b4975eae38 (from 50fa8722d35c12e5f0322cebe25faf99c39d4f50)
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Sep 20 16:22:24 2007 -0700

    Don't segfault on shutdown if we never managed to connect to dbus.

diff --git a/config/dbus-core.c b/config/dbus-core.c
index 2888159..eab72a5 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -87,7 +87,8 @@ teardown(void)
         dbus_connection_unref(bus_info.connection);
 
     RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
-    RemoveGeneralSocket(bus_info.fd);
+    if (bus_info.fd != -1)
+        RemoveGeneralSocket(bus_info.fd);
     bus_info.fd = -1;
     bus_info.connection = NULL;
 
diff-tree 50fa8722d35c12e5f0322cebe25faf99c39d4f50 (from c140d20f4ade973496dcbbd06453402ef0c0e85c)
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Sep 20 14:00:33 2007 -0700

    Set noCompositeExtension to TRUE when failing to initialize the extension (e.g. when Xinerama is enabled).

diff --git a/composite/compext.c b/composite/compext.c
index 944f8d8..ece51d0 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -674,6 +674,9 @@ CompositeExtensionInit (void)
     ExtensionEntry  *extEntry;
     int		    s;
 
+    /* Assume initialization is going to fail */
+    noCompositeExtension = TRUE;
+
     for (s = 0; s < screenInfo.numScreens; s++) {
 	ScreenPtr pScreen = screenInfo.screens[s];
 	VisualPtr vis;
@@ -731,4 +734,7 @@ CompositeExtensionInit (void)
 	    return;
     miRegisterRedirectBorderClipProc (compSetRedirectBorderClip,
 				      compGetRedirectBorderClip);
+
+    /* Initialization succeeded */
+    noCompositeExtension = FALSE;
 }
diff-tree c140d20f4ade973496dcbbd06453402ef0c0e85c (from bcb5e3e6276ce9ae7a4dae7434cf2247764da078)
Author: Ben Byer <bbyer at bbyer.local>
Date:   Wed Sep 19 05:58:22 2007 -0700

    XDarwin:  mass change from using xorg-config.h to dix-config.h cuz we're not using the X.org ddx anymore

diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index 0b22141..1c18cd2 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -31,9 +31,7 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
 
 #include <X11/X.h>
 #include <X11/Xproto.h>
diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c
index 9de33c0..0feb8cc 100644
--- a/hw/darwin/iokit/xfIOKit.c
+++ b/hw/darwin/iokit/xfIOKit.c
@@ -34,9 +34,7 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
-#if HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
 
 #include <X11/X.h>
 #include <X11/Xproto.h>
diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c
index 8388513..e9c78c1 100644
--- a/hw/darwin/iokit/xfIOKitCursor.c
+++ b/hw/darwin/iokit/xfIOKitCursor.c
@@ -58,9 +58,8 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
-#if HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
+
 #include "scrnintstr.h"
 #include "cursorstr.h"
 #include "mipointrst.h"
diff --git a/hw/darwin/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c
index 07e8c21..ad8e05b 100644
--- a/hw/darwin/iokit/xfIOKitStartup.c
+++ b/hw/darwin/iokit/xfIOKitStartup.c
@@ -29,10 +29,7 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
-
-#if HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
 
 #include "darwin.h"
 #include "darwinKeyboard.h"
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
index a79454b..6fca3b6 100644
--- a/hw/darwin/quartz/Preferences.m
+++ b/hw/darwin/quartz/Preferences.m
@@ -31,9 +31,9 @@
  * authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #import "quartzCommon.h"
 
 #define BOOL xBOOL
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
index 32bfbf5..14776f8 100644
--- a/hw/darwin/quartz/XServer.m
+++ b/hw/darwin/quartz/XServer.m
@@ -35,10 +35,8 @@
  * authorization.
  */
 /* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.19 2003/11/24 05:39:01 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
 #include "quartzCommon.h"
 
 #define BOOL xBOOL
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index cc11cfa..d3c26ed 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -24,9 +24,9 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF 
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 **************************************************************************/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartzCommon.h"
 
 #define NEED_REPLIES
diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m
index 8bcd1a7..0cea250 100644
--- a/hw/darwin/quartz/cr/XView.m
+++ b/hw/darwin/quartz/cr/XView.m
@@ -30,11 +30,10 @@
  * use or other dealings in this Software without prior written authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-#import "XView.h"
 
+#include <dix-config.h>
+
+#import "XView.h"
 
 @implementation XView
 
diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m
index 0741d4e..a583581 100644
--- a/hw/darwin/quartz/cr/crAppleWM.m
+++ b/hw/darwin/quartz/cr/crAppleWM.m
@@ -27,9 +27,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "quartz/cr/cr.h"
 
diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m
index 2b8e57d..3c1f0bb 100644
--- a/hw/darwin/quartz/cr/crFrame.m
+++ b/hw/darwin/quartz/cr/crFrame.m
@@ -28,10 +28,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 /* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.9 2004/03/19 02:05:29 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "quartz/cr/cr.h"
 
diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m
index 9dd130e..8c09665 100644
--- a/hw/darwin/quartz/cr/crScreen.m
+++ b/hw/darwin/quartz/cr/crScreen.m
@@ -29,9 +29,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "quartz/cr/cr.h"
 
diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c
index 02f6e89..2021ea2 100644
--- a/hw/darwin/quartz/fullscreen/fullscreen.c
+++ b/hw/darwin/quartz/fullscreen/fullscreen.c
@@ -25,9 +25,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "darwin.h"
 #include "quartz/quartz.h"
diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c
index 77fa008..a97a36d 100644
--- a/hw/darwin/quartz/fullscreen/quartzCursor.c
+++ b/hw/darwin/quartz/fullscreen/quartzCursor.c
@@ -29,9 +29,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "quartz/quartzCursor.h"
 #include "darwin.h"
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c
index e65be69..787601b 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/darwin/quartz/pseudoramiX.c
@@ -34,9 +34,9 @@ Equipment Corporation.
 ******************************************************************/
 
 #include "pseudoramiX.h"
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "extnsionst.h"
 #include "dixstruct.h"
 #include "window.h"
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index b309b7b..374f365 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -29,9 +29,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartzCommon.h"
 #include "quartz.h"
 #include "darwin.h"
diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c
index 16b9c2b..8a337da 100644
--- a/hw/darwin/quartz/quartzAudio.c
+++ b/hw/darwin/quartz/quartzAudio.c
@@ -35,9 +35,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartzCommon.h"
 #include "quartzAudio.h"
 
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index 42eabcb..5bc1501 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -35,9 +35,7 @@
  * use or other dealings in this Software without prior written authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
 
 #include "quartzCommon.h"
 
diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c
index 6ed6a76..0fa04e6 100644
--- a/hw/darwin/quartz/quartzCursor.c
+++ b/hw/darwin/quartz/quartzCursor.c
@@ -30,9 +30,8 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
+
 #include "quartzCommon.h"
 #include "quartzCursor.h"
 #include "darwin.h"
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index bdd5416..b498c77 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -32,11 +32,9 @@
    prior written authorization.
 */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-#include "quartzCommon.h"
+#include <dix-config.h>
 
+#include "quartzCommon.h"
 #include <CoreServices/CoreServices.h>
 #include <Carbon/Carbon.h>
 
diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c
index a3536fc..af25fc8 100644
--- a/hw/darwin/quartz/quartzPasteboard.c
+++ b/hw/darwin/quartz/quartzPasteboard.c
@@ -30,11 +30,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-#include "quartzPasteboard.h"
+#include <dix-config.h>
 
+#include "quartzPasteboard.h"
 #include <X11/Xatom.h>
 #include "windowstr.h"
 #include "propertyst.h"
diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c
index ef68c86..70b7400 100644
--- a/hw/darwin/quartz/xpr/appledri.c
+++ b/hw/darwin/quartz/xpr/appledri.c
@@ -35,9 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
  *
  */
 
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+#include <dix-config.h>
+
 #define NEED_REPLIES
 #define NEED_EVENTS
 #include <X11/X.h>
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c
index 08ee382..acc1f45 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/darwin/quartz/xpr/dri.c
@@ -33,9 +33,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
  *   Rickard E. (Rik) Faith <faith at valinux.com>
  *
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
 
 #include <sys/time.h>
 #include <unistd.h>
diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/darwin/quartz/xpr/x-hash.c
index 6bbeacf..d24e05c 100644
--- a/hw/darwin/quartz/xpr/x-hash.c
+++ b/hw/darwin/quartz/xpr/x-hash.c
@@ -26,9 +26,9 @@
    copyright holders shall not be used in advertising or otherwise to
    promote the sale, use or other dealings in this Software without
    prior written authorization. */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "x-hash.h"
 #include "x-list.h"
 #include <stdlib.h>
diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c
index 42915db..92c174e 100644
--- a/hw/darwin/quartz/xpr/x-hook.c
+++ b/hw/darwin/quartz/xpr/x-hook.c
@@ -26,9 +26,9 @@
    copyright holders shall not be used in advertising or otherwise to
    promote the sale, use or other dealings in this Software without
    prior written authorization. */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "x-hook.h"
 #include <stdlib.h>
 #include <assert.h>
diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/darwin/quartz/xpr/x-list.c
index a5f835d..356bb79 100644
--- a/hw/darwin/quartz/xpr/x-list.c
+++ b/hw/darwin/quartz/xpr/x-list.c
@@ -26,9 +26,9 @@
    copyright holders shall not be used in advertising or otherwise to
    promote the sale, use or other dealings in this Software without
    prior written authorization. */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "x-list.h"
 #include <stdlib.h>
 #include <assert.h>
diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c
index fdf404c..1573d21 100644
--- a/hw/darwin/quartz/xpr/xprAppleWM.c
+++ b/hw/darwin/quartz/xpr/xprAppleWM.c
@@ -27,9 +27,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "xpr.h"
 #include "quartz/applewmExt.h"
 #include "rootless.h"
diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c
index e7f23b7..d5a1180 100644
--- a/hw/darwin/quartz/xpr/xprCursor.c
+++ b/hw/darwin/quartz/xpr/xprCursor.c
@@ -30,9 +30,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "xpr.h"
 #include "darwin.h"
diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c
index b71b2a6..76c719e 100644
--- a/hw/darwin/quartz/xpr/xprFrame.c
+++ b/hw/darwin/quartz/xpr/xprFrame.c
@@ -27,9 +27,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "xpr.h"
 #include "rootlessCommon.h"
 #include "Xplugin.h"
diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c
index 034cbac..b0ddece 100644
--- a/hw/darwin/quartz/xpr/xprScreen.c
+++ b/hw/darwin/quartz/xpr/xprScreen.c
@@ -27,9 +27,9 @@
  * holders shall not be used in advertising or otherwise to promote the sale,
  * use or other dealings in this Software without prior written authorization.
  */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
+
+#include <dix-config.h>
+
 #include "quartz/quartzCommon.h"
 #include "quartz/quartz.h"
 #include "xpr.h"
diff-tree bcb5e3e6276ce9ae7a4dae7434cf2247764da078 (from 5e209b21f3d6b3268fa7dab1e8df892d8352cc08)
Author: Ben Byer <bbyer at bbyer.local>
Date:   Wed Sep 19 04:46:10 2007 -0700

    XDARWIN: More fixes to Makefile.am
    
    At least on my system (10.5 with the latest and greatest modules),
    Xquartz now builds out of the box.  It doesn't quite work yet, but
    hey -- you have to start somewhere. ;)

diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index 1a2fa21..72bee4a 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -8,14 +8,20 @@ INCLUDES = @XORG_INCS@ -I../../miext/roo
 DEFS = @DEFS@ -DUSE_NEW_CLUT
 
 if XQUARTZ
-XQUARTZ_SUBDIRS = bundle quartz
+XQUARTZ_SUBDIRS = quartz
 XQUARTZ_PROGS = Xquartz
-HOOK_TARGETS = xquartz-install-hook
+XQUARTZ_HOOK = xquartz-install-hook
+endif
+
+if XDARWINAPP
+XDARWINAPP_SUBDIRS = bundle
+XDARWINAPP_HOOK = xdarwinapp-install-hook
 endif
 
 SUBDIRS = \
 	  iokit \
 	  $(XQUARTZ_SUBDIRS) \
+	  $(XDARWINAPP_SUBDIRS) \
 	  utils \
 	  .
 
@@ -260,17 +266,19 @@ glxAGL_la_DEPENDENCIES = XDarwinApp	
 endif
 endif
 
-man1_MANS = XDarwin.man
+#man1_MANS = XDarwin.man
 
-uninstall-hook:
-	rm -rf $(DESTDIR)$(macosdir)/XDarwin
+#uninstall-hook:
+#	rm -rf $(DESTDIR)$(macosdir)/XDarwin
 
-install-data-hook: $(HOOK_TARGETS)
+install-data-hook: $(XQUARTZ_HOOK) $(XDARWINAPP_HOOK)
 
-xquartz-install-hook:
-	mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
+xquartz-install-hook::
 	cd apple && xcodebuild install
 
+xdarwinapp-install hook:
+	mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
+
 EXTRA_DIST = \
 	darwin.c \
 	darwinClut8.h \
diff-tree 5e209b21f3d6b3268fa7dab1e8df892d8352cc08 (from 378c7ebef444cdc9ae62ebf05c7111088a0c4bc1)
Author: Ben Byer <bbyer at bbyer.local>
Date:   Wed Sep 19 03:44:46 2007 -0700

    XNEST: removed obsolete hack to build under Darwin

diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 5bf0300..4699111 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -129,22 +129,6 @@ void
 DarwinHandleGUI(int argc, char *argv[])
 {
 }
-
-void GlxExtensionInit();
-void GlxWrapInitVisuals(void *procPtr);
-
-void
-DarwinGlxExtensionInit()
-{
-    GlxExtensionInit();
-}
-
-void
-DarwinGlxWrapInitVisuals(
-    void *procPtr)
-{
-    GlxWrapInitVisuals(procPtr);
-}
 #endif
 
 void OsVendorInit()
diff-tree 378c7ebef444cdc9ae62ebf05c7111088a0c4bc1 (from 7813392d1c9a38d01cfff17732278bb7798eee5d)
Author: Ben Byer <bbyer at bbyer.local>
Date:   Wed Sep 19 03:43:40 2007 -0700

    XVFB: Removed obsolete hack to build on Darwin

diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index a2d8661..812326a 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -225,22 +225,6 @@ void
 DarwinHandleGUI(int argc, char *argv[])
 {
 }
-
-void GlxExtensionInit();
-void GlxWrapInitVisuals(void *procPtr);
-
-void
-DarwinGlxExtensionInit()
-{
-    GlxExtensionInit();
-}
-
-void
-DarwinGlxWrapInitVisuals(
-    void *procPtr)
-{
-    GlxWrapInitVisuals(procPtr);
-}
 #endif
 
 void
diff-tree 7813392d1c9a38d01cfff17732278bb7798eee5d (from 170fc77d9e73151f5c1c1f0f04598b3497db4284)
Author: Ben Byer <bbyer at bbyer.local>
Date:   Wed Sep 19 01:52:58 2007 -0700

    XDarwin: changes to Makefile.am to use new conditionals

diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index a6f84ee..1a2fa21 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -9,6 +9,8 @@ DEFS = @DEFS@ -DUSE_NEW_CLUT
 
 if XQUARTZ
 XQUARTZ_SUBDIRS = bundle quartz
+XQUARTZ_PROGS = Xquartz
+HOOK_TARGETS = xquartz-install-hook
 endif
 
 SUBDIRS = \
@@ -17,18 +19,18 @@ SUBDIRS = \
 	  utils \
 	  .
 
-darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
-
 libdarwinShared_a_SOURCES = darwin.c \
 			  darwinEvents.c \
 			  darwinKeyboard.c \
 			  $(darwin_XINPUT_SRCS) 
 
-bin_PROGRAMS = XDarwin Xquartz
-XDarwin_SOURCES = \
-                  $(top_srcdir)/fb/fbcmap_mi.c \
-                  $(top_srcdir)/mi/miinitext.c \
-                  $(top_srcdir)/Xi/stubs.c
+# bin_PROGRAMS = XDarwin Xquartz
+bin_PROGRAMS = $(XQUARTZ_PROGS)
+
+#XDarwin_SOURCES = \
+#                  $(top_srcdir)/fb/fbcmap_mi.c \
+#                  $(top_srcdir)/mi/miinitext.c \
+#                  $(top_srcdir)/Xi/stubs.c
 
 Xquartz_SOURCES = \
                   $(top_srcdir)/fb/fbcmap_mi.c \
@@ -68,22 +70,22 @@ DARWIN_LIBS = \
 	./libdarwinShared.a \
 	$(XSERVER_LIBS)
 
-XDARWIN_LIBS = \
-	$(DARWIN_LIBS) \
-	./iokit/libiokit.a
+#XDARWIN_LIBS = \
+#	$(DARWIN_LIBS) \
+#	./iokit/libiokit.a
 XQUARTZ_LIBS = \
 	$(DARWIN_LIBS)
 
-XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
-XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
+#XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
+#XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
 
 Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
 Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
 
-XDarwin_LDFLAGS =  \
-                 -XCClinker -Objc \
-                 -Wl,-u,_miDCInitialize \
-                 -Wl,-framework,IOKit
+#XDarwin_LDFLAGS =  \
+#                 -XCClinker -Objc \
+#                 -Wl,-u,_miDCInitialize \
+#                 -Wl,-framework,IOKit
 
 Xquartz_LDFLAGS =  \
                  -XCClinker -Objc \
@@ -95,19 +97,23 @@ Xquartz_LDFLAGS =  \
                  -Wl,-framework,CoreAudio \
                  -Wl,-framework,IOKit
 
-XDarwin_CFLAGS = -DINXDARWIN
+#XDarwin_CFLAGS = -DINXDARWIN
 Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API  -DHAVE_XORG_CONFIG_H
 
 if XQUARTZ
-macosdir = $(darwinappdir)/Contents/MacOS
-
 DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
 
-macos_PROGRAMS = XDarwinApp
-macos_SCRIPTS = x11app
+bin_SCRIPTS = x11app
 
 x11app:
 	cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
+endif
+
+if XDARWINAPP
+macosdir = $(darwinappdir)/Contents/MacOS
+
+macos_PROGRAMS = XDarwinApp
+darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
 
 XDarwinApp_SOURCES = \
                 $(top_srcdir)/fb/fbcmap_mi.c \
@@ -134,8 +140,6 @@ XDarwinApp_LDFLAGS =  \
 		 -Wl,-framework,IOKit
 
 XDarwinApp_CFLAGS = -DINXDARWINAPP
-HOOK_TARGETS = xquartz-install-hook
-
 
 crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
 crplugin_LTLIBRARIES = cr.la
@@ -190,7 +194,6 @@ glxMesa_la_LDFLAGS = -shrext '' \
 glxMesa_la_DEPENDENCIES = XDarwinApp	
 endif
 
-endif
 if HAVE_XPLUGIN
 
 xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
@@ -255,6 +258,7 @@ glxAGL_la_DEPENDENCIES = XDarwinApp	
 
 
 endif
+endif
 
 man1_MANS = XDarwin.man
 
diff-tree 170fc77d9e73151f5c1c1f0f04598b3497db4284 (from 9b4f5157179a0d20756c16ea1f5130b171f72bb1)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Wed Sep 19 09:54:09 2007 +0200

    xserver: don't force DTRACE detection by default
    
            this fixes a breakage caused by 7a4ec34e256bf36b041c011a083916ad75a1d8bc.
            When running a non DTRACE aware system that is not darwin*, DTRACE was getting
            required. Now it is not anymore.

diff --git a/configure.ac b/configure.ac
index 4f08d71..de30430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,6 @@ dnl Darwin 9 has dtrace, but it doesn't 
 if test "x$WDTRACE" = xauto; then
 	case $host_os in
 		darwin*) WDTRACE="no" ;;
-		*) WDTRACE="yes" ;;
 	esac
 fi
 if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
diff-tree 9b4f5157179a0d20756c16ea1f5130b171f72bb1 (from 7a4ec34e256bf36b041c011a083916ad75a1d8bc)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Tue Sep 18 21:40:32 2007 -0700

    XDarwin:  We build many many different targets, let's break them out into autoconf conditionals

diff --git a/configure.ac b/configure.ac
index 6e7ed05..4f08d71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -500,7 +500,6 @@ AC_ARG_ENABLE(xres,           AS_HELP_ST
 AC_ARG_ENABLE(xtrap,          AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
 AC_ARG_ENABLE(record,         AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
 AC_ARG_ENABLE(xv,             AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
-AC_ARG_ENABLE(quartz,         AS_HELP_STRING([--enable-quartz], [Build with darwin quartz support (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
 AC_ARG_ENABLE(xvmc,           AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
 AC_ARG_ENABLE(dga,            AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
 AC_ARG_ENABLE(screensaver,    AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
@@ -534,6 +533,9 @@ AC_ARG_ENABLE(dmx,    	      AS_HELP_STR
 AC_ARG_ENABLE(xvfb,    	      AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
 AC_ARG_ENABLE(xnest,   	      AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
 AC_ARG_ENABLE(xdarwin, 	      AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto])
+AC_ARG_ENABLE(xdarwinapp,     AS_HELP_STRING([--enable-xdarwinapp], [Build XDarwin.app server (default: no)]), [XDARWINAPP=$enableval], [XDARWINAPP=no])
+AC_ARG_ENABLE(xquartz,        AS_HELP_STRING([--disable-xquartz], [Build Xquartz server on Darwin (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
+AC_ARG_ENABLE(x11app,         AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app wrapper for Xquartz (default: no)]), [X11APP=$enableval], [X11APP=no])
 AC_ARG_ENABLE(xwin,    	      AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
 AC_ARG_ENABLE(xprint,         AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
 AC_ARG_ENABLE(xgl,            AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
@@ -1774,7 +1776,9 @@ _AM_DEPENDENCIES([OBJC])
 AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
 AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
 AM_CONDITIONAL(XDARWIN, [test "x$XDARWIN" = xyes])
+AM_CONDITIONAL(XDARWINAPP, [test "x$XDARWINAPP" = xyes])
 AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
+
 dnl kdrive DDX
 
 XEPHYR_LIBS=
diff-tree 7a4ec34e256bf36b041c011a083916ad75a1d8bc (from 3c19ec47b434d4ca84db58363cc053cc0b6aa413)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Tue Sep 18 20:37:09 2007 -0700

    XDarwin:  Disable dtrace support on Darwin 9 (since it doesn't work ... yet ...)

diff --git a/configure.ac b/configure.ac
index fc6dd58..6e7ed05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,6 +69,13 @@ dnl Check for dtrace program (needed to 
 AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
 	     [Enable dtrace probes (default: enabled if dtrace found)]),
 	     [WDTRACE=$withval], [WDTRACE=auto])
+dnl Darwin 9 has dtrace, but it doesn't support compilation into ELF...
+if test "x$WDTRACE" = xauto; then
+	case $host_os in
+		darwin*) WDTRACE="no" ;;
+		*) WDTRACE="yes" ;;
+	esac
+fi
 if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
 	AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin])
 	if test "x$DTRACE" = "xnot_found" ; then
diff-tree 3c19ec47b434d4ca84db58363cc053cc0b6aa413 (from 547ad2125ece93bbe01f6d09a3baf176ebd16bb3)
Author: Ben Byer <bbyer at bbyer.apple.com>
Date:   Tue Sep 18 20:15:44 2007 -0700

    XDarwin: changed XF86BigFont support default from yes to auto so XDarwin can disable it

diff --git a/configure.ac b/configure.ac
index 24b12df..fc6dd58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,7 +515,7 @@ AC_ARG_ENABLE(evi,            AS_HELP_ST
 AC_ARG_ENABLE(multibuffer,    AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
 AC_ARG_ENABLE(fontcache,      AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
 AC_ARG_ENABLE(dbe,            AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
-AC_ARG_ENABLE(xf86bigfont,    AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
+AC_ARG_ENABLE(xf86bigfont,    AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=auto])
 AC_ARG_ENABLE(dpms,           AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
 AC_ARG_ENABLE(config-dbus,    AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
 AC_ARG_ENABLE(config-hal,     AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
@@ -1744,6 +1744,10 @@ return 0;}
                        AC_MSG_NOTICE([Disabling XF86VidMode extension])
                        XF86VIDMODE=no
                fi
+               if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then
+                       AC_MSG_NOTICE([Disabling XF86BigFont extension])
+                       XF86BIGFONT=no
+               fi
                if test "x$DGA" = xyes || test "x$DGA" = xauto; then
                        AC_MSG_NOTICE([Disabling DGA extension])
                        DGA=no


More information about the xorg-commit mailing list