[PATCH 1/2] xserver: delete pervasively use of DISPATCH_PROC

Vignatti Tiago (Nokia-MS/Helsinki) tiago.vignatti at nokia.com
Mon Sep 13 13:24:00 PDT 2010


ping?

On Tue, Sep 07, 2010 at 02:48:56PM +0200, Vignatti Tiago (Nokia-MS/Helsinki) wrote:
> Some functions had to be moved around due some missing static definitions.
> Another minor clean up like inexistent function declarations and etc were made
> also.
> 
> Part of this patch was cooked using:
> sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files`
> 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
>  Xext/bigreq.c                          |   18 ++--
>  Xext/saver.c                           |   88 +++++--------
>  Xext/shape.c                           |   54 +++------
>  Xext/shm.c                             |  114 ++++++++----------
>  Xext/sync.c                            |   30 -----
>  Xext/xcmisc.c                          |   26 ++---
>  Xext/xf86bigfont.c                     |    6 -
>  Xext/xtest.c                           |   29 ++---
>  dix/dispatch.h                         |  211 ++++++++++++++++----------------
>  hw/dmx/dmx.c                           |   32 -----
>  hw/kdrive/ephyr/ephyrdriext.c          |   16 ---
>  hw/xfree86/dixmods/extmod/Makefile.am  |    2 +-
>  hw/xfree86/dixmods/extmod/xf86dga2.c   |   86 ++++---------
>  hw/xfree86/dixmods/extmod/xf86dgaext.h |   10 --
>  hw/xfree86/dixmods/extmod/xf86vmode.c  |   42 -------
>  hw/xfree86/dri/xf86dri.c               |   18 +---
>  hw/xquartz/applewm.c                   |    2 -
>  hw/xquartz/xpr/appledri.c              |    2 -
>  hw/xwin/InitInput.c                    |    6 +-
>  hw/xwin/winclipboardinit.c             |    2 +-
>  hw/xwin/winclipboardwrappers.c         |    6 +-
>  hw/xwin/winwindowswm.c                 |    2 -
>  include/dixstruct.h                    |    4 -
>  23 files changed, 267 insertions(+), 539 deletions(-)
>  delete mode 100644 hw/xfree86/dixmods/extmod/xf86dgaext.h
> 
> diff --git a/Xext/bigreq.c b/Xext/bigreq.c
> index ce3734e..a540bcb 100644
> --- a/Xext/bigreq.c
> +++ b/Xext/bigreq.c
> @@ -40,18 +40,8 @@ from The Open Group.
>  #include "opaque.h"
>  #include "modinit.h"
> 
> -static DISPATCH_PROC(ProcBigReqDispatch);
> -
>  void BigReqExtensionInit(INITARGS);
> 
> -void
> -BigReqExtensionInit(INITARGS)
> -{
> -    AddExtension(XBigReqExtensionName, 0, 0,
> -                ProcBigReqDispatch, ProcBigReqDispatch,
> -                NULL, StandardMinorOpcode);
> -}
> -
>  static int
>  ProcBigReqDispatch (ClientPtr client)
>  {
> @@ -78,3 +68,11 @@ ProcBigReqDispatch (ClientPtr client)
>      WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
>      return Success;
>  }
> +
> +void
> +BigReqExtensionInit(INITARGS)
> +{
> +    AddExtension(XBigReqExtensionName, 0, 0,
> +                ProcBigReqDispatch, ProcBigReqDispatch,
> +                NULL, StandardMinorOpcode);
> +}
> diff --git a/Xext/saver.c b/Xext/saver.c
> index 6d91ddf..1888603 100644
> --- a/Xext/saver.c
> +++ b/Xext/saver.c
> @@ -62,20 +62,6 @@ in this Software without prior written authorization from the X Consortium.
> 
>  static int ScreenSaverEventBase = 0;
> 
> -static DISPATCH_PROC(ProcScreenSaverQueryInfo);
> -static DISPATCH_PROC(ProcScreenSaverDispatch);
> -static DISPATCH_PROC(ProcScreenSaverQueryVersion);
> -static DISPATCH_PROC(ProcScreenSaverSelectInput);
> -static DISPATCH_PROC(ProcScreenSaverSetAttributes);
> -static DISPATCH_PROC(ProcScreenSaverUnsetAttributes);
> -static DISPATCH_PROC(ProcScreenSaverSuspend);
> -static DISPATCH_PROC(SProcScreenSaverDispatch);
> -static DISPATCH_PROC(SProcScreenSaverQueryInfo);
> -static DISPATCH_PROC(SProcScreenSaverQueryVersion);
> -static DISPATCH_PROC(SProcScreenSaverSelectInput);
> -static DISPATCH_PROC(SProcScreenSaverSetAttributes);
> -static DISPATCH_PROC(SProcScreenSaverUnsetAttributes);
> -static DISPATCH_PROC(SProcScreenSaverSuspend);
> 
>  static Bool ScreenSaverHandle (
>         ScreenPtr /* pScreen */,
> @@ -237,45 +223,6 @@ static DevPrivateKeyRec ScreenPrivateKeyRec;
> 
>  #define New(t) (malloc(sizeof (t)))
> 
> -/****************
> - * ScreenSaverExtensionInit
> - *
> - * Called from InitExtensions in main() or from QueryExtension() if the
> - * extension is dynamically loaded.
> - *
> - ****************/
> -
> -void
> -ScreenSaverExtensionInit(INITARGS)
> -{
> -    ExtensionEntry *extEntry;
> -    int                    i;
> -    ScreenPtr      pScreen;
> -
> -    if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
> -       return;
> -
> -    AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr");
> -    SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents,
> -                                          "SaverEvent");
> -    SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend,
> -                                       "SaverSuspend");
> -
> -    for (i = 0; i < screenInfo.numScreens; i++)
> -    {
> -       pScreen = screenInfo.screens[i];
> -       SetScreenPrivate (pScreen, NULL);
> -    }
> -    if (AttrType && SaverEventType && SuspendType &&
> -       (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0,
> -                                ProcScreenSaverDispatch, SProcScreenSaverDispatch,
> -                                NULL, StandardMinorOpcode)))
> -    {
> -       ScreenSaverEventBase = extEntry->eventBase;
> -       EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
> -    }
> -}
> -
>  static void
>  CheckScreenPrivate (ScreenPtr pScreen)
>  {
> @@ -1412,7 +1359,7 @@ ProcScreenSaverSuspend (ClientPtr client)
>      return Success;
>  }
> 
> -static DISPATCH_PROC((*NormalVector[])) = {
> +static int (*NormalVector[]) (ClientPtr /* client */) = {
>      ProcScreenSaverQueryVersion,
>      ProcScreenSaverQueryInfo,
>      ProcScreenSaverSelectInput,
> @@ -1513,7 +1460,7 @@ SProcScreenSaverSuspend (ClientPtr client)
>      return ProcScreenSaverSuspend (client);
>  }
> 
> -static DISPATCH_PROC((*SwappedVector[])) = {
> +static int (*SwappedVector[]) (ClientPtr /* client */) = {
>      SProcScreenSaverQueryVersion,
>      SProcScreenSaverQueryInfo,
>      SProcScreenSaverSelectInput,
> @@ -1531,3 +1478,34 @@ SProcScreenSaverDispatch (ClientPtr client)
>         return (*SwappedVector[stuff->data])(client);
>      return BadRequest;
>  }
> +
> +void
> +ScreenSaverExtensionInit(INITARGS)
> +{
> +    ExtensionEntry *extEntry;
> +    int                    i;
> +    ScreenPtr      pScreen;
> +
> +    if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
> +       return;
> +
> +    AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr");
> +    SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents,
> +                                          "SaverEvent");
> +    SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend,
> +                                       "SaverSuspend");
> +
> +    for (i = 0; i < screenInfo.numScreens; i++)
> +    {
> +       pScreen = screenInfo.screens[i];
> +       SetScreenPrivate (pScreen, NULL);
> +    }
> +    if (AttrType && SaverEventType && SuspendType &&
> +       (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0,
> +                                ProcScreenSaverDispatch, SProcScreenSaverDispatch,
> +                                NULL, StandardMinorOpcode)))
> +    {
> +       ScreenSaverEventBase = extEntry->eventBase;
> +       EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
> +    }
> +}
> diff --git a/Xext/shape.c b/Xext/shape.c
> index ac95328..115fc07 100644
> --- a/Xext/shape.c
> +++ b/Xext/shape.c
> @@ -68,26 +68,6 @@ static void SShapeNotifyEvent(
>   * externally by the Xfixes extension and are now defined in window.h
>   */
> 
> -static DISPATCH_PROC(ProcShapeCombine);
> -static DISPATCH_PROC(ProcShapeDispatch);
> -static DISPATCH_PROC(ProcShapeGetRectangles);
> -static DISPATCH_PROC(ProcShapeInputSelected);
> -static DISPATCH_PROC(ProcShapeMask);
> -static DISPATCH_PROC(ProcShapeOffset);
> -static DISPATCH_PROC(ProcShapeQueryExtents);
> -static DISPATCH_PROC(ProcShapeQueryVersion);
> -static DISPATCH_PROC(ProcShapeRectangles);
> -static DISPATCH_PROC(ProcShapeSelectInput);
> -static DISPATCH_PROC(SProcShapeCombine);
> -static DISPATCH_PROC(SProcShapeDispatch);
> -static DISPATCH_PROC(SProcShapeGetRectangles);
> -static DISPATCH_PROC(SProcShapeInputSelected);
> -static DISPATCH_PROC(SProcShapeMask);
> -static DISPATCH_PROC(SProcShapeOffset);
> -static DISPATCH_PROC(SProcShapeQueryExtents);
> -static DISPATCH_PROC(SProcShapeQueryVersion);
> -static DISPATCH_PROC(SProcShapeRectangles);
> -static DISPATCH_PROC(SProcShapeSelectInput);
> 
>  #ifdef PANORAMIX
>  #include "panoramiX.h"
> @@ -122,23 +102,6 @@ typedef struct _ShapeEvent {
>   *
>   ****************/
> 
> -void
> -ShapeExtensionInit(void)
> -{
> -    ExtensionEntry *extEntry;
> -
> -    ClientType = CreateNewResourceType(ShapeFreeClient, "ShapeClient");
> -    ShapeEventType = CreateNewResourceType(ShapeFreeEvents, "ShapeEvent");
> -    if (ClientType && ShapeEventType &&
> -       (extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0,
> -                                ProcShapeDispatch, SProcShapeDispatch,
> -                                NULL, StandardMinorOpcode)))
> -    {
> -       ShapeEventBase = extEntry->eventBase;
> -       EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent;
> -    }
> -}
> -
>  static int
>  RegionOperate (
>         ClientPtr client,
> @@ -1278,3 +1241,20 @@ SProcShapeDispatch (ClientPtr client)
>         return BadRequest;
>      }
>  }
> +
> +void
> +ShapeExtensionInit(void)
> +{
> +    ExtensionEntry *extEntry;
> +
> +    ClientType = CreateNewResourceType(ShapeFreeClient, "ShapeClient");
> +    ShapeEventType = CreateNewResourceType(ShapeFreeEvents, "ShapeEvent");
> +    if (ClientType && ShapeEventType &&
> +       (extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0,
> +                                ProcShapeDispatch, SProcShapeDispatch,
> +                                NULL, StandardMinorOpcode)))
> +    {
> +       ShapeEventBase = extEntry->eventBase;
> +       EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent;
> +    }
> +}
> diff --git a/Xext/shm.c b/Xext/shm.c
> index 3230d83..74cdcf6 100644
> --- a/Xext/shm.c
> +++ b/Xext/shm.c
> @@ -120,20 +120,6 @@ static void SShmCompletionEvent(
> 
>  static Bool ShmDestroyPixmap (PixmapPtr pPixmap);
> 
> -static DISPATCH_PROC(ProcShmAttach);
> -static DISPATCH_PROC(ProcShmCreatePixmap);
> -static DISPATCH_PROC(ProcShmDetach);
> -static DISPATCH_PROC(ProcShmDispatch);
> -static DISPATCH_PROC(ProcShmGetImage);
> -static DISPATCH_PROC(ProcShmPutImage);
> -static DISPATCH_PROC(ProcShmQueryVersion);
> -static DISPATCH_PROC(SProcShmAttach);
> -static DISPATCH_PROC(SProcShmCreatePixmap);
> -static DISPATCH_PROC(SProcShmDetach);
> -static DISPATCH_PROC(SProcShmDispatch);
> -static DISPATCH_PROC(SProcShmGetImage);
> -static DISPATCH_PROC(SProcShmPutImage);
> -static DISPATCH_PROC(SProcShmQueryVersion);
> 
>  static unsigned char ShmReqCode;
>  int ShmCompletionCode;
> @@ -254,56 +240,6 @@ ShmRegisterPrivates(void)
>      return TRUE;
>  }
> 
> -void
> -ShmExtensionInit(INITARGS)
> -{
> -    ExtensionEntry *extEntry;
> -    int i;
> -
> -#ifdef MUST_CHECK_FOR_SHM_SYSCALL
> -    if (!CheckForShmSyscall())
> -    {
> -       ErrorF("MIT-SHM extension disabled due to lack of kernel support\n");
> -       return;
> -    }
> -#endif
> -
> -    if (!ShmRegisterPrivates())
> -       return;
> -
> -    sharedPixmaps = xFalse;
> -    {
> -      sharedPixmaps = xTrue;
> -      for (i = 0; i < screenInfo.numScreens; i++)
> -      {
> -       ShmScrPrivateRec *screen_priv = ShmInitScreenPriv(screenInfo.screens[i]);
> -       if (!screen_priv->shmFuncs)
> -           screen_priv->shmFuncs = &miFuncs;
> -       if (!screen_priv->shmFuncs->CreatePixmap)
> -           sharedPixmaps = xFalse;
> -      }
> -      if (sharedPixmaps)
> -       for (i = 0; i < screenInfo.numScreens; i++)
> -       {
> -           ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(screenInfo.screens[i]);
> -           screen_priv->destroyPixmap = screenInfo.screens[i]->DestroyPixmap;
> -           screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
> -       }
> -    }
> -    ShmSegType = CreateNewResourceType(ShmDetachSegment, "ShmSeg");
> -    if (ShmSegType &&
> -       (extEntry = AddExtension(SHMNAME, ShmNumberEvents, ShmNumberErrors,
> -                                ProcShmDispatch, SProcShmDispatch,
> -                                ShmResetProc, StandardMinorOpcode)))
> -    {
> -       ShmReqCode = (unsigned char)extEntry->base;
> -       ShmCompletionCode = extEntry->eventBase;
> -       BadShmSegCode = extEntry->errorBase;
> -       SetResourceTypeErrorValue(ShmSegType, BadShmSegCode);
> -       EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent;
> -    }
> -}
> -
>  /*ARGSUSED*/
>  static void
>  ShmResetProc(ExtensionEntry *extEntry)
> @@ -1342,3 +1278,53 @@ SProcShmDispatch (ClientPtr client)
>         return BadRequest;
>      }
>  }
> +
> +void
> +ShmExtensionInit(INITARGS)
> +{
> +    ExtensionEntry *extEntry;
> +    int i;
> +
> +#ifdef MUST_CHECK_FOR_SHM_SYSCALL
> +    if (!CheckForShmSyscall())
> +    {
> +       ErrorF("MIT-SHM extension disabled due to lack of kernel support\n");
> +       return;
> +    }
> +#endif
> +
> +    if (!ShmRegisterPrivates())
> +       return;
> +
> +    sharedPixmaps = xFalse;
> +    {
> +      sharedPixmaps = xTrue;
> +      for (i = 0; i < screenInfo.numScreens; i++)
> +      {
> +       ShmScrPrivateRec *screen_priv = ShmInitScreenPriv(screenInfo.screens[i]);
> +       if (!screen_priv->shmFuncs)
> +           screen_priv->shmFuncs = &miFuncs;
> +       if (!screen_priv->shmFuncs->CreatePixmap)
> +           sharedPixmaps = xFalse;
> +      }
> +      if (sharedPixmaps)
> +       for (i = 0; i < screenInfo.numScreens; i++)
> +       {
> +           ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(screenInfo.screens[i]);
> +           screen_priv->destroyPixmap = screenInfo.screens[i]->DestroyPixmap;
> +           screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
> +       }
> +    }
> +    ShmSegType = CreateNewResourceType(ShmDetachSegment, "ShmSeg");
> +    if (ShmSegType &&
> +       (extEntry = AddExtension(SHMNAME, ShmNumberEvents, ShmNumberErrors,
> +                                ProcShmDispatch, SProcShmDispatch,
> +                                ShmResetProc, StandardMinorOpcode)))
> +    {
> +       ShmReqCode = (unsigned char)extEntry->base;
> +       ShmCompletionCode = extEntry->eventBase;
> +       BadShmSegCode = extEntry->errorBase;
> +       SetResourceTypeErrorValue(ShmSegType, BadShmSegCode);
> +       EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent;
> +    }
> +}
> diff --git a/Xext/sync.c b/Xext/sync.c
> index a51262a..f23df6c 100644
> --- a/Xext/sync.c
> +++ b/Xext/sync.c
> @@ -100,36 +100,6 @@ static void SyncInitServerTime(void);
> 
>  static void SyncInitIdleTime(void);
> 
> -static DISPATCH_PROC(ProcSyncAwait);
> -static DISPATCH_PROC(ProcSyncChangeAlarm);
> -static DISPATCH_PROC(ProcSyncChangeCounter);
> -static DISPATCH_PROC(ProcSyncCreateAlarm);
> -static DISPATCH_PROC(ProcSyncCreateCounter);
> -static DISPATCH_PROC(ProcSyncDestroyAlarm);
> -static DISPATCH_PROC(ProcSyncDestroyCounter);
> -static DISPATCH_PROC(ProcSyncDispatch);
> -static DISPATCH_PROC(ProcSyncGetPriority);
> -static DISPATCH_PROC(ProcSyncInitialize);
> -static DISPATCH_PROC(ProcSyncListSystemCounters);
> -static DISPATCH_PROC(ProcSyncQueryAlarm);
> -static DISPATCH_PROC(ProcSyncQueryCounter);
> -static DISPATCH_PROC(ProcSyncSetCounter);
> -static DISPATCH_PROC(ProcSyncSetPriority);
> -static DISPATCH_PROC(SProcSyncAwait);
> -static DISPATCH_PROC(SProcSyncChangeAlarm);
> -static DISPATCH_PROC(SProcSyncChangeCounter);
> -static DISPATCH_PROC(SProcSyncCreateAlarm);
> -static DISPATCH_PROC(SProcSyncCreateCounter);
> -static DISPATCH_PROC(SProcSyncDestroyAlarm);
> -static DISPATCH_PROC(SProcSyncDestroyCounter);
> -static DISPATCH_PROC(SProcSyncDispatch);
> -static DISPATCH_PROC(SProcSyncGetPriority);
> -static DISPATCH_PROC(SProcSyncInitialize);
> -static DISPATCH_PROC(SProcSyncListSystemCounters);
> -static DISPATCH_PROC(SProcSyncQueryAlarm);
> -static DISPATCH_PROC(SProcSyncQueryCounter);
> -static DISPATCH_PROC(SProcSyncSetCounter);
> -static DISPATCH_PROC(SProcSyncSetPriority);
> 
>  /*  Each counter maintains a simple linked list of triggers that are
>   *  interested in the counter.  The two functions below are used to
> diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
> index 986c870..378afcc 100644
> --- a/Xext/xcmisc.c
> +++ b/Xext/xcmisc.c
> @@ -46,24 +46,6 @@ from The Open Group.
>  #define UINT32_MAX 0xffffffffU
>  #endif
> 
> -static DISPATCH_PROC(ProcXCMiscDispatch);
> -static DISPATCH_PROC(ProcXCMiscGetVersion);
> -static DISPATCH_PROC(ProcXCMiscGetXIDList);
> -static DISPATCH_PROC(ProcXCMiscGetXIDRange);
> -static DISPATCH_PROC(SProcXCMiscDispatch);
> -static DISPATCH_PROC(SProcXCMiscGetVersion);
> -static DISPATCH_PROC(SProcXCMiscGetXIDList);
> -static DISPATCH_PROC(SProcXCMiscGetXIDRange);
> -
> -void XCMiscExtensionInit(INITARGS);
> -
> -void
> -XCMiscExtensionInit(INITARGS)
> -{
> -    AddExtension(XCMiscExtensionName, 0, 0,
> -                ProcXCMiscDispatch, SProcXCMiscDispatch,
> -                NULL, StandardMinorOpcode);
> -}
> 
>  static int
>  ProcXCMiscGetVersion(ClientPtr client)
> @@ -215,3 +197,11 @@ SProcXCMiscDispatch (ClientPtr client)
>         return BadRequest;
>      }
>  }
> +
> +void
> +XCMiscExtensionInit(INITARGS)
> +{
> +    AddExtension(XCMiscExtensionName, 0, 0,
> +                ProcXCMiscDispatch, SProcXCMiscDispatch,
> +                NULL, StandardMinorOpcode);
> +}
> diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
> index 8f0ddd9..f7dde6e 100644
> --- a/Xext/xf86bigfont.c
> +++ b/Xext/xf86bigfont.c
> @@ -80,12 +80,6 @@ static void XF86BigfontResetProc(
>      ExtensionEntry *   /* extEntry */
>      );
> 
> -static DISPATCH_PROC(ProcXF86BigfontDispatch);
> -static DISPATCH_PROC(ProcXF86BigfontQueryVersion);
> -static DISPATCH_PROC(ProcXF86BigfontQueryFont);
> -static DISPATCH_PROC(SProcXF86BigfontDispatch);
> -static DISPATCH_PROC(SProcXF86BigfontQueryVersion);
> -static DISPATCH_PROC(SProcXF86BigfontQueryFont);
> 
>  #ifdef HAS_SHM
> 
> diff --git a/Xext/xtest.c b/Xext/xtest.c
> index 7268768..d7d254c 100644
> --- a/Xext/xtest.c
> +++ b/Xext/xtest.c
> @@ -84,26 +84,6 @@ static int XTestSwapFakeInput(
>          xReq * /* req */
>          );
> 
> -static DISPATCH_PROC(ProcXTestCompareCursor);
> -static DISPATCH_PROC(ProcXTestDispatch);
> -static DISPATCH_PROC(ProcXTestFakeInput);
> -static DISPATCH_PROC(ProcXTestGetVersion);
> -static DISPATCH_PROC(ProcXTestGrabControl);
> -static DISPATCH_PROC(SProcXTestCompareCursor);
> -static DISPATCH_PROC(SProcXTestDispatch);
> -static DISPATCH_PROC(SProcXTestFakeInput);
> -static DISPATCH_PROC(SProcXTestGetVersion);
> -static DISPATCH_PROC(SProcXTestGrabControl);
> -
> -void
> -XTestExtensionInit(INITARGS)
> -{
> -    AddExtension(XTestExtensionName, 0, 0,
> -            ProcXTestDispatch, SProcXTestDispatch,
> -            NULL, StandardMinorOpcode);
> -
> -    xtest_evlist = InitEventList(GetMaximumEventsNum());
> -}
> 
>  static int
>  ProcXTestGetVersion(ClientPtr client)
> @@ -699,3 +679,12 @@ GetXTestDevice(DeviceIntPtr master)
>      return NULL;
>  }
> 
> +void
> +XTestExtensionInit(INITARGS)
> +{
> +    AddExtension(XTestExtensionName, 0, 0,
> +            ProcXTestDispatch, SProcXTestDispatch,
> +            NULL, StandardMinorOpcode);
> +
> +    xtest_evlist = InitEventList(GetMaximumEventsNum());
> +}
> diff --git a/dix/dispatch.h b/dix/dispatch.h
> index dd07096..758b83d 100644
> --- a/dix/dispatch.h
> +++ b/dix/dispatch.h
> @@ -36,111 +36,110 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #ifndef DISPATCH_H
>  #define DISPATCH_H 1
> 
> -DISPATCH_PROC(InitClientPrivates);
> -DISPATCH_PROC(ProcAllocColor);
> -DISPATCH_PROC(ProcAllocColorCells);
> -DISPATCH_PROC(ProcAllocColorPlanes);
> -DISPATCH_PROC(ProcAllocNamedColor);
> -DISPATCH_PROC(ProcBell);
> -DISPATCH_PROC(ProcChangeAccessControl);
> -DISPATCH_PROC(ProcChangeCloseDownMode);
> -DISPATCH_PROC(ProcChangeGC);
> -DISPATCH_PROC(ProcChangeHosts);
> -DISPATCH_PROC(ProcChangeKeyboardControl);
> -DISPATCH_PROC(ProcChangeKeyboardMapping);
> -DISPATCH_PROC(ProcChangePointerControl);
> -DISPATCH_PROC(ProcChangeProperty);
> -DISPATCH_PROC(ProcChangeSaveSet);
> -DISPATCH_PROC(ProcChangeWindowAttributes);
> -DISPATCH_PROC(ProcCirculateWindow);
> -DISPATCH_PROC(ProcClearToBackground);
> -DISPATCH_PROC(ProcCloseFont);
> -DISPATCH_PROC(ProcConfigureWindow);
> -DISPATCH_PROC(ProcConvertSelection);
> -DISPATCH_PROC(ProcCopyArea);
> -DISPATCH_PROC(ProcCopyColormapAndFree);
> -DISPATCH_PROC(ProcCopyGC);
> -DISPATCH_PROC(ProcCopyPlane);
> -DISPATCH_PROC(ProcCreateColormap);
> -DISPATCH_PROC(ProcCreateCursor);
> -DISPATCH_PROC(ProcCreateGC);
> -DISPATCH_PROC(ProcCreateGlyphCursor);
> -DISPATCH_PROC(ProcCreatePixmap);
> -DISPATCH_PROC(ProcCreateWindow);
> -DISPATCH_PROC(ProcDeleteProperty);
> -DISPATCH_PROC(ProcDestroySubwindows);
> -DISPATCH_PROC(ProcDestroyWindow);
> -DISPATCH_PROC(ProcEstablishConnection);
> -DISPATCH_PROC(ProcFillPoly);
> -DISPATCH_PROC(ProcForceScreenSaver);
> -DISPATCH_PROC(ProcFreeColormap);
> -DISPATCH_PROC(ProcFreeColors);
> -DISPATCH_PROC(ProcFreeCursor);
> -DISPATCH_PROC(ProcFreeGC);
> -DISPATCH_PROC(ProcFreePixmap);
> -DISPATCH_PROC(ProcGetAtomName);
> -DISPATCH_PROC(ProcGetFontPath);
> -DISPATCH_PROC(ProcGetGeometry);
> -DISPATCH_PROC(ProcGetImage);
> -DISPATCH_PROC(ProcGetKeyboardControl);
> -DISPATCH_PROC(ProcGetKeyboardMapping);
> -DISPATCH_PROC(ProcGetModifierMapping);
> -DISPATCH_PROC(ProcGetMotionEvents);
> -DISPATCH_PROC(ProcGetPointerControl);
> -DISPATCH_PROC(ProcGetPointerMapping);
> -DISPATCH_PROC(ProcGetProperty);
> -DISPATCH_PROC(ProcGetScreenSaver);
> -DISPATCH_PROC(ProcGetSelectionOwner);
> -DISPATCH_PROC(ProcGetWindowAttributes);
> -DISPATCH_PROC(ProcGrabServer);
> -DISPATCH_PROC(ProcImageText16);
> -DISPATCH_PROC(ProcImageText8);
> -DISPATCH_PROC(ProcInitialConnection);
> -DISPATCH_PROC(ProcInstallColormap);
> -DISPATCH_PROC(ProcInternAtom);
> -DISPATCH_PROC(ProcKillClient);
> -DISPATCH_PROC(ProcListExtensions);
> -DISPATCH_PROC(ProcListFonts);
> -DISPATCH_PROC(ProcListFontsWithInfo);
> -DISPATCH_PROC(ProcListHosts);
> -DISPATCH_PROC(ProcListInstalledColormaps);
> -DISPATCH_PROC(ProcListProperties);
> -DISPATCH_PROC(ProcLookupColor);
> -DISPATCH_PROC(ProcMapSubwindows);
> -DISPATCH_PROC(ProcMapWindow);
> -DISPATCH_PROC(ProcNoOperation);
> -DISPATCH_PROC(ProcOpenFont);
> -DISPATCH_PROC(ProcPolyArc);
> -DISPATCH_PROC(ProcPolyFillArc);
> -DISPATCH_PROC(ProcPolyFillRectangle);
> -DISPATCH_PROC(ProcPolyLine);
> -DISPATCH_PROC(ProcPolyPoint);
> -DISPATCH_PROC(ProcPolyRectangle);
> -DISPATCH_PROC(ProcPolySegment);
> -DISPATCH_PROC(ProcPolyText);
> -DISPATCH_PROC(ProcPutImage);
> -DISPATCH_PROC(ProcQueryBestSize);
> -DISPATCH_PROC(ProcQueryColors);
> -DISPATCH_PROC(ProcQueryExtension);
> -DISPATCH_PROC(ProcQueryFont);
> -DISPATCH_PROC(ProcQueryKeymap);
> -DISPATCH_PROC(ProcQueryTextExtents);
> -DISPATCH_PROC(ProcQueryTree);
> -DISPATCH_PROC(ProcReparentWindow);
> -DISPATCH_PROC(ProcRotateProperties);
> -DISPATCH_PROC(ProcSetClipRectangles);
> -DISPATCH_PROC(ProcSetDashes);
> -DISPATCH_PROC(ProcSetFontPath);
> -DISPATCH_PROC(ProcSetModifierMapping);
> -DISPATCH_PROC(ProcSetPointerMapping);
> -DISPATCH_PROC(ProcSetScreenSaver);
> -DISPATCH_PROC(ProcSetSelectionOwner);
> -DISPATCH_PROC(ProcStoreColors);
> -DISPATCH_PROC(ProcStoreNamedColor);
> -DISPATCH_PROC(ProcTranslateCoords);
> -DISPATCH_PROC(ProcUngrabServer);
> -DISPATCH_PROC(ProcUninstallColormap);
> -DISPATCH_PROC(ProcUnmapSubwindows);
> -DISPATCH_PROC(ProcUnmapWindow);
> +int ProcAllocColor(ClientPtr /* client */);
> +int ProcAllocColorCells(ClientPtr /* client */);
> +int ProcAllocColorPlanes(ClientPtr /* client */);
> +int ProcAllocNamedColor(ClientPtr /* client */);
> +int ProcBell(ClientPtr /* client */);
> +int ProcChangeAccessControl(ClientPtr /* client */);
> +int ProcChangeCloseDownMode(ClientPtr /* client */);
> +int ProcChangeGC(ClientPtr /* client */);
> +int ProcChangeHosts(ClientPtr /* client */);
> +int ProcChangeKeyboardControl(ClientPtr /* client */);
> +int ProcChangeKeyboardMapping(ClientPtr /* client */);
> +int ProcChangePointerControl(ClientPtr /* client */);
> +int ProcChangeProperty(ClientPtr /* client */);
> +int ProcChangeSaveSet(ClientPtr /* client */);
> +int ProcChangeWindowAttributes(ClientPtr /* client */);
> +int ProcCirculateWindow(ClientPtr /* client */);
> +int ProcClearToBackground(ClientPtr /* client */);
> +int ProcCloseFont(ClientPtr /* client */);
> +int ProcConfigureWindow(ClientPtr /* client */);
> +int ProcConvertSelection(ClientPtr /* client */);
> +int ProcCopyArea(ClientPtr /* client */);
> +int ProcCopyColormapAndFree(ClientPtr /* client */);
> +int ProcCopyGC(ClientPtr /* client */);
> +int ProcCopyPlane(ClientPtr /* client */);
> +int ProcCreateColormap(ClientPtr /* client */);
> +int ProcCreateCursor(ClientPtr /* client */);
> +int ProcCreateGC(ClientPtr /* client */);
> +int ProcCreateGlyphCursor(ClientPtr /* client */);
> +int ProcCreatePixmap(ClientPtr /* client */);
> +int ProcCreateWindow(ClientPtr /* client */);
> +int ProcDeleteProperty(ClientPtr /* client */);
> +int ProcDestroySubwindows(ClientPtr /* client */);
> +int ProcDestroyWindow(ClientPtr /* client */);
> +int ProcEstablishConnection(ClientPtr /* client */);
> +int ProcFillPoly(ClientPtr /* client */);
> +int ProcForceScreenSaver(ClientPtr /* client */);
> +int ProcFreeColormap(ClientPtr /* client */);
> +int ProcFreeColors(ClientPtr /* client */);
> +int ProcFreeCursor(ClientPtr /* client */);
> +int ProcFreeGC(ClientPtr /* client */);
> +int ProcFreePixmap(ClientPtr /* client */);
> +int ProcGetAtomName(ClientPtr /* client */);
> +int ProcGetFontPath(ClientPtr /* client */);
> +int ProcGetGeometry(ClientPtr /* client */);
> +int ProcGetImage(ClientPtr /* client */);
> +int ProcGetKeyboardControl(ClientPtr /* client */);
> +int ProcGetKeyboardMapping(ClientPtr /* client */);
> +int ProcGetModifierMapping(ClientPtr /* client */);
> +int ProcGetMotionEvents(ClientPtr /* client */);
> +int ProcGetPointerControl(ClientPtr /* client */);
> +int ProcGetPointerMapping(ClientPtr /* client */);
> +int ProcGetProperty(ClientPtr /* client */);
> +int ProcGetScreenSaver(ClientPtr /* client */);
> +int ProcGetSelectionOwner(ClientPtr /* client */);
> +int ProcGetWindowAttributes(ClientPtr /* client */);
> +int ProcGrabServer(ClientPtr /* client */);
> +int ProcImageText16(ClientPtr /* client */);
> +int ProcImageText8(ClientPtr /* client */);
> +int ProcInitialConnection(ClientPtr /* client */);
> +int ProcInstallColormap(ClientPtr /* client */);
> +int ProcInternAtom(ClientPtr /* client */);
> +int ProcKillClient(ClientPtr /* client */);
> +int ProcListExtensions(ClientPtr /* client */);
> +int ProcListFonts(ClientPtr /* client */);
> +int ProcListFontsWithInfo(ClientPtr /* client */);
> +int ProcListHosts(ClientPtr /* client */);
> +int ProcListInstalledColormaps(ClientPtr /* client */);
> +int ProcListProperties(ClientPtr /* client */);
> +int ProcLookupColor(ClientPtr /* client */);
> +int ProcMapSubwindows(ClientPtr /* client */);
> +int ProcMapWindow(ClientPtr /* client */);
> +int ProcNoOperation(ClientPtr /* client */);
> +int ProcOpenFont(ClientPtr /* client */);
> +int ProcPolyArc(ClientPtr /* client */);
> +int ProcPolyFillArc(ClientPtr /* client */);
> +int ProcPolyFillRectangle(ClientPtr /* client */);
> +int ProcPolyLine(ClientPtr /* client */);
> +int ProcPolyPoint(ClientPtr /* client */);
> +int ProcPolyRectangle(ClientPtr /* client */);
> +int ProcPolySegment(ClientPtr /* client */);
> +int ProcPolyText(ClientPtr /* client */);
> +int ProcPutImage(ClientPtr /* client */);
> +int ProcQueryBestSize(ClientPtr /* client */);
> +int ProcQueryColors(ClientPtr /* client */);
> +int ProcQueryExtension(ClientPtr /* client */);
> +int ProcQueryFont(ClientPtr /* client */);
> +int ProcQueryKeymap(ClientPtr /* client */);
> +int ProcQueryTextExtents(ClientPtr /* client */);
> +int ProcQueryTree(ClientPtr /* client */);
> +int ProcReparentWindow(ClientPtr /* client */);
> +int ProcRotateProperties(ClientPtr /* client */);
> +int ProcSetClipRectangles(ClientPtr /* client */);
> +int ProcSetDashes(ClientPtr /* client */);
> +int ProcSetFontPath(ClientPtr /* client */);
> +int ProcSetModifierMapping(ClientPtr /* client */);
> +int ProcSetPointerMapping(ClientPtr /* client */);
> +int ProcSetScreenSaver(ClientPtr /* client */);
> +int ProcSetSelectionOwner(ClientPtr /* client */);
> +int ProcStoreColors(ClientPtr /* client */);
> +int ProcStoreNamedColor(ClientPtr /* client */);
> +int ProcTranslateCoords(ClientPtr /* client */);
> +int ProcUngrabServer(ClientPtr /* client */);
> +int ProcUninstallColormap(ClientPtr /* client */);
> +int ProcUnmapSubwindows(ClientPtr /* client */);
> +int ProcUnmapWindow(ClientPtr /* client */);
> 
>  #endif /* DISPATCH_H */
> diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
> index 5718b6a..6fc05c7 100644
> --- a/hw/dmx/dmx.c
> +++ b/hw/dmx/dmx.c
> @@ -69,39 +69,7 @@ extern void DMXExtensionInit(void);
> 
>  static unsigned char DMXCode;
> 
> -static DISPATCH_PROC(ProcDMXDispatch);
> -static DISPATCH_PROC(ProcDMXQueryVersion);
> -static DISPATCH_PROC(ProcDMXSync);
> -static DISPATCH_PROC(ProcDMXForceWindowCreation);
> -static DISPATCH_PROC(ProcDMXGetScreenCount);
> -static DISPATCH_PROC(ProcDMXGetScreenAttributes);
> -static DISPATCH_PROC(ProcDMXChangeScreensAttributes);
> -static DISPATCH_PROC(ProcDMXAddScreen);
> -static DISPATCH_PROC(ProcDMXRemoveScreen);
> -static DISPATCH_PROC(ProcDMXGetWindowAttributes);
> -static DISPATCH_PROC(ProcDMXGetDesktopAttributes);
> -static DISPATCH_PROC(ProcDMXChangeDesktopAttributes);
> -static DISPATCH_PROC(ProcDMXGetInputCount);
> -static DISPATCH_PROC(ProcDMXGetInputAttributes);
> -static DISPATCH_PROC(ProcDMXAddInput);
> -static DISPATCH_PROC(ProcDMXRemoveInput);
> -
> -static DISPATCH_PROC(SProcDMXDispatch);
> -static DISPATCH_PROC(SProcDMXQueryVersion);
> -static DISPATCH_PROC(SProcDMXSync);
> -static DISPATCH_PROC(SProcDMXForceWindowCreation);
> -static DISPATCH_PROC(SProcDMXGetScreenCount);
> -static DISPATCH_PROC(SProcDMXGetScreenAttributes);
> -static DISPATCH_PROC(SProcDMXChangeScreensAttributes);
> -static DISPATCH_PROC(SProcDMXAddScreen);
> -static DISPATCH_PROC(SProcDMXRemoveScreen);
> -static DISPATCH_PROC(SProcDMXGetWindowAttributes);
> -static DISPATCH_PROC(SProcDMXGetDesktopAttributes);
> -static DISPATCH_PROC(SProcDMXChangeDesktopAttributes);
> -static DISPATCH_PROC(SProcDMXGetInputCount);
> -static DISPATCH_PROC(SProcDMXGetInputAttributes);
> -static DISPATCH_PROC(SProcDMXAddInput);
> -static DISPATCH_PROC(SProcDMXRemoveInput);
> +
> 
>  static int _DMXXineramaActive(void)
>  {
> diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
> index ce584b0..798d4d6 100644
> --- a/hw/kdrive/ephyr/ephyrdriext.c
> +++ b/hw/kdrive/ephyr/ephyrdriext.c
> @@ -72,23 +72,7 @@ typedef EphyrDRIScreenPrivRec* EphyrDRIScreenPrivPtr;
> 
>  static int DRIErrorBase;
> 
> -static DISPATCH_PROC(ProcXF86DRIQueryVersion);
> -static DISPATCH_PROC(ProcXF86DRIQueryDirectRenderingCapable);
> -static DISPATCH_PROC(ProcXF86DRIOpenConnection);
> -static DISPATCH_PROC(ProcXF86DRICloseConnection);
> -static DISPATCH_PROC(ProcXF86DRIGetClientDriverName);
> -static DISPATCH_PROC(ProcXF86DRICreateContext);
> -static DISPATCH_PROC(ProcXF86DRIDestroyContext);
> -static DISPATCH_PROC(ProcXF86DRICreateDrawable);
> -static DISPATCH_PROC(ProcXF86DRIDestroyDrawable);
> -static DISPATCH_PROC(ProcXF86DRIGetDrawableInfo);
> -static DISPATCH_PROC(ProcXF86DRIGetDeviceInfo);
> -static DISPATCH_PROC(ProcXF86DRIDispatch);
> -static DISPATCH_PROC(ProcXF86DRIAuthConnection);
> -
> -static DISPATCH_PROC(SProcXF86DRIQueryVersion);
> -static DISPATCH_PROC(SProcXF86DRIQueryDirectRenderingCapable);
> -static DISPATCH_PROC(SProcXF86DRIDispatch);
> +
> 
>  static Bool ephyrDRIScreenInit (ScreenPtr a_screen) ;
>  static Bool ephyrDRICreateWindow (WindowPtr a_win) ;
> diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am
> index d93e63a..cce19f7 100644
> --- a/hw/xfree86/dixmods/extmod/Makefile.am
> +++ b/hw/xfree86/dixmods/extmod/Makefile.am
> @@ -4,7 +4,7 @@ extsmoduledir = $(moduledir)/extensions
>  extsmodule_LTLIBRARIES = libextmod.la
> 
>  if DGA
> -DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h
> +DGA_SRCS = xf86dga2.c dgaproc.h
>  endif
> 
>  if XV
> diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
> index e522b5c..ca5d519 100644
> --- a/hw/xfree86/dixmods/extmod/xf86dga2.c
> +++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
> @@ -25,7 +25,6 @@
>  #include <X11/extensions/xf86dgaproto.h>
>  #include "swaprep.h"
>  #include "dgaproc.h"
> -#include "xf86dgaext.h"
>  #include "protocol-versions.h"
> 
>  #include <string.h>
> @@ -34,24 +33,6 @@
> 
>  #define DGA_PROTOCOL_OLD_SUPPORT 1
> 
> -static DISPATCH_PROC(ProcXDGADispatch);
> -static DISPATCH_PROC(SProcXDGADispatch);
> -static DISPATCH_PROC(ProcXDGAQueryVersion);
> -static DISPATCH_PROC(ProcXDGAQueryModes);
> -static DISPATCH_PROC(ProcXDGASetMode);
> -static DISPATCH_PROC(ProcXDGAOpenFramebuffer);
> -static DISPATCH_PROC(ProcXDGACloseFramebuffer);
> -static DISPATCH_PROC(ProcXDGASetViewport);
> -static DISPATCH_PROC(ProcXDGAInstallColormap);
> -static DISPATCH_PROC(ProcXDGASelectInput);
> -static DISPATCH_PROC(ProcXDGAFillRectangle);
> -static DISPATCH_PROC(ProcXDGACopyArea);
> -static DISPATCH_PROC(ProcXDGACopyTransparentArea);
> -static DISPATCH_PROC(ProcXDGAGetViewportStatus);
> -static DISPATCH_PROC(ProcXDGASync);
> -static DISPATCH_PROC(ProcXDGASetClientVersion);
> -static DISPATCH_PROC(ProcXDGAChangePixmapMode);
> -static DISPATCH_PROC(ProcXDGACreateColormap);
> 
>  static void XDGAResetProc(ExtensionEntry *extEntry);
> 
> @@ -85,36 +66,6 @@ typedef struct {
>      dixSetPrivate(&(c)->devPrivates, DGAClientPrivateKey, p)
> 
> 
> -void
> -XFree86DGAExtensionInit(INITARGS)
> -{
> -    ExtensionEntry* extEntry;
> -
> -    if (!dixRegisterPrivateKey(&DGAClientPrivateKeyRec, PRIVATE_CLIENT, 0))
> -       return;
> -
> -    if (!dixRegisterPrivateKey(&DGAScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
> -       return;
> -
> -    if ((extEntry = AddExtension(XF86DGANAME,
> -                               XF86DGANumberEvents,
> -                               XF86DGANumberErrors,
> -                               ProcXDGADispatch,
> -                               SProcXDGADispatch,
> -                               XDGAResetProc,
> -                               StandardMinorOpcode))) {
> -       int i;
> -
> -       DGAReqCode = (unsigned char)extEntry->base;
> -       DGAErrorBase = extEntry->errorBase;
> -       DGAEventBase = extEntry->eventBase;
> -       for (i = KeyPress; i <= MotionNotify; i++)
> -           SetCriticalEvent (DGAEventBase + i);
> -    }
> -}
> -
> -
> -
>  static void
>  XDGAResetProc (ExtensionEntry *extEntry)
>  {
> @@ -663,15 +614,6 @@ ProcXDGACreateColormap(ClientPtr client)
> 
>  #ifdef DGA_PROTOCOL_OLD_SUPPORT
> 
> -static DISPATCH_PROC(ProcXF86DGADirectVideo);
> -static DISPATCH_PROC(ProcXF86DGAGetVidPage);
> -static DISPATCH_PROC(ProcXF86DGAGetVideoLL);
> -static DISPATCH_PROC(ProcXF86DGAGetViewPortSize);
> -static DISPATCH_PROC(ProcXF86DGASetVidPage);
> -static DISPATCH_PROC(ProcXF86DGASetViewPort);
> -static DISPATCH_PROC(ProcXF86DGAInstallColormap);
> -static DISPATCH_PROC(ProcXF86DGAQueryDirectVideo);
> -static DISPATCH_PROC(ProcXF86DGAViewPortChanged);
> 
> 
>  static int
> @@ -1063,3 +1005,31 @@ XFree86DGARegister(INITARGS)
>  {
>    XDGAEventBase = &DGAEventBase;
>  }
> +
> +void
> +XFree86DGAExtensionInit(INITARGS)
> +{
> +    ExtensionEntry* extEntry;
> +
> +    if (!dixRegisterPrivateKey(&DGAClientPrivateKeyRec, PRIVATE_CLIENT, 0))
> +       return;
> +
> +    if (!dixRegisterPrivateKey(&DGAScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
> +       return;
> +
> +    if ((extEntry = AddExtension(XF86DGANAME,
> +                               XF86DGANumberEvents,
> +                               XF86DGANumberErrors,
> +                               ProcXDGADispatch,
> +                               SProcXDGADispatch,
> +                               XDGAResetProc,
> +                               StandardMinorOpcode))) {
> +       int i;
> +
> +       DGAReqCode = (unsigned char)extEntry->base;
> +       DGAErrorBase = extEntry->errorBase;
> +       DGAEventBase = extEntry->eventBase;
> +       for (i = KeyPress; i <= MotionNotify; i++)
> +           SetCriticalEvent (DGAEventBase + i);
> +    }
> +}
> diff --git a/hw/xfree86/dixmods/extmod/xf86dgaext.h b/hw/xfree86/dixmods/extmod/xf86dgaext.h
> deleted file mode 100644
> index 2b17373..0000000
> --- a/hw/xfree86/dixmods/extmod/xf86dgaext.h
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -#ifdef HAVE_DIX_CONFIG_H
> -#include <dix-config.h>
> -#endif
> -
> -#ifndef _XF86DGAEXT_H_
> -#define _XF86DGAEXT_H_
> -
> -extern DISPATCH_PROC(ProcXF86DGADispatch);
> -
> -#endif /* _XF86DGAEXT_H_ */
> diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
> index 0001c9e..d93c570 100644
> --- a/hw/xfree86/dixmods/extmod/xf86vmode.c
> +++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
> @@ -65,48 +65,6 @@ typedef struct {
>  #define VM_SETPRIV(c,p) \
>      dixSetPrivate(&(c)->devPrivates, VidModeClientPrivateKey, p)
> 
> -static DISPATCH_PROC(ProcXF86VidModeDispatch);
> -static DISPATCH_PROC(ProcXF86VidModeGetAllModeLines);
> -static DISPATCH_PROC(ProcXF86VidModeGetModeLine);
> -static DISPATCH_PROC(ProcXF86VidModeGetMonitor);
> -static DISPATCH_PROC(ProcXF86VidModeLockModeSwitch);
> -static DISPATCH_PROC(ProcXF86VidModeAddModeLine);
> -static DISPATCH_PROC(ProcXF86VidModeDeleteModeLine);
> -static DISPATCH_PROC(ProcXF86VidModeModModeLine);
> -static DISPATCH_PROC(ProcXF86VidModeValidateModeLine);
> -static DISPATCH_PROC(ProcXF86VidModeQueryVersion);
> -static DISPATCH_PROC(ProcXF86VidModeSwitchMode);
> -static DISPATCH_PROC(ProcXF86VidModeSwitchToMode);
> -static DISPATCH_PROC(ProcXF86VidModeGetViewPort);
> -static DISPATCH_PROC(ProcXF86VidModeSetViewPort);
> -static DISPATCH_PROC(ProcXF86VidModeGetDotClocks);
> -static DISPATCH_PROC(ProcXF86VidModeSetGamma);
> -static DISPATCH_PROC(ProcXF86VidModeGetGamma);
> -static DISPATCH_PROC(ProcXF86VidModeSetClientVersion);
> -static DISPATCH_PROC(ProcXF86VidModeGetGammaRamp);
> -static DISPATCH_PROC(ProcXF86VidModeSetGammaRamp);
> -static DISPATCH_PROC(ProcXF86VidModeGetGammaRampSize);
> -static DISPATCH_PROC(SProcXF86VidModeDispatch);
> -static DISPATCH_PROC(SProcXF86VidModeGetAllModeLines);
> -static DISPATCH_PROC(SProcXF86VidModeGetModeLine);
> -static DISPATCH_PROC(SProcXF86VidModeGetMonitor);
> -static DISPATCH_PROC(SProcXF86VidModeLockModeSwitch);
> -static DISPATCH_PROC(SProcXF86VidModeAddModeLine);
> -static DISPATCH_PROC(SProcXF86VidModeDeleteModeLine);
> -static DISPATCH_PROC(SProcXF86VidModeModModeLine);
> -static DISPATCH_PROC(SProcXF86VidModeValidateModeLine);
> -static DISPATCH_PROC(SProcXF86VidModeQueryVersion);
> -static DISPATCH_PROC(SProcXF86VidModeSwitchMode);
> -static DISPATCH_PROC(SProcXF86VidModeSwitchToMode);
> -static DISPATCH_PROC(SProcXF86VidModeGetViewPort);
> -static DISPATCH_PROC(SProcXF86VidModeSetViewPort);
> -static DISPATCH_PROC(SProcXF86VidModeGetDotClocks);
> -static DISPATCH_PROC(SProcXF86VidModeSetGamma);
> -static DISPATCH_PROC(SProcXF86VidModeGetGamma);
> -static DISPATCH_PROC(SProcXF86VidModeSetClientVersion);
> -static DISPATCH_PROC(SProcXF86VidModeGetGammaRamp);
> -static DISPATCH_PROC(SProcXF86VidModeSetGammaRamp);
> -static DISPATCH_PROC(SProcXF86VidModeGetGammaRampSize);
> 
>  #if 0
>  static unsigned char XF86VidModeReqCode = 0;
> diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
> index f32565d..7c33b11 100644
> --- a/hw/xfree86/dri/xf86dri.c
> +++ b/hw/xfree86/dri/xf86dri.c
> @@ -64,23 +64,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> 
>  static int DRIErrorBase;
> 
> -static DISPATCH_PROC(ProcXF86DRIQueryVersion);
> -static DISPATCH_PROC(ProcXF86DRIQueryDirectRenderingCapable);
> -static DISPATCH_PROC(ProcXF86DRIOpenConnection);
> -static DISPATCH_PROC(ProcXF86DRICloseConnection);
> -static DISPATCH_PROC(ProcXF86DRIGetClientDriverName);
> -static DISPATCH_PROC(ProcXF86DRICreateContext);
> -static DISPATCH_PROC(ProcXF86DRIDestroyContext);
> -static DISPATCH_PROC(ProcXF86DRICreateDrawable);
> -static DISPATCH_PROC(ProcXF86DRIDestroyDrawable);
> -static DISPATCH_PROC(ProcXF86DRIGetDrawableInfo);
> -static DISPATCH_PROC(ProcXF86DRIGetDeviceInfo);
> -static DISPATCH_PROC(ProcXF86DRIDispatch);
> -static DISPATCH_PROC(ProcXF86DRIAuthConnection);
> -
> -static DISPATCH_PROC(SProcXF86DRIQueryVersion);
> -static DISPATCH_PROC(SProcXF86DRIQueryDirectRenderingCapable);
> -static DISPATCH_PROC(SProcXF86DRIDispatch);
> +
> 
>  static void XF86DRIResetProc(ExtensionEntry* extEntry);
> 
> diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
> index 1c77ad9..cd2bdf0 100644
> --- a/hw/xquartz/applewm.c
> +++ b/hw/xquartz/applewm.c
> @@ -70,8 +70,6 @@ static AppleWMProcsPtr appleWMProcs;
> 
>  static int WMErrorBase;
> 
> -static DISPATCH_PROC(ProcAppleWMDispatch);
> -static DISPATCH_PROC(SProcAppleWMDispatch);
> 
>  static unsigned char WMReqCode = 0;
>  static int WMEventBase = 0;
> diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
> index 3afe244..ebd4a43 100644
> --- a/hw/xquartz/xpr/appledri.c
> +++ b/hw/xquartz/xpr/appledri.c
> @@ -59,8 +59,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> 
>  static int DRIErrorBase = 0;
> 
> -static DISPATCH_PROC(ProcAppleDRIDispatch);
> -static DISPATCH_PROC(SProcAppleDRIDispatch);
> 
>  static void AppleDRIResetProc(ExtensionEntry* extEntry);
>  static int ProcAppleDRICreatePixmap(ClientPtr client);
> diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c
> index 705e618..0ffa940 100644
> --- a/hw/xwin/InitInput.c
> +++ b/hw/xwin/InitInput.c
> @@ -39,9 +39,9 @@
>   */
> 
>  #ifdef XWIN_CLIPBOARD
> -DISPATCH_PROC(winProcEstablishConnection);
> -DISPATCH_PROC(winProcQueryTree);
> -DISPATCH_PROC(winProcSetSelectionOwner);
> +int winProcEstablishConnection(ClientPtr /* client */);
> +int winProcQueryTree(ClientPtr /* client */);
> +int winProcSetSelectionOwner(ClientPtr /* client */);
>  #endif
> 
> 
> diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c
> index bec63ac..d74cd03 100644
> --- a/hw/xwin/winclipboardinit.c
> +++ b/hw/xwin/winclipboardinit.c
> @@ -41,7 +41,7 @@
> 
>  typedef int (*winDispatchProcPtr) (ClientPtr);
> 
> -DISPATCH_PROC(winProcSetSelectionOwner);
> +int winProcSetSelectionOwner(ClientPtr /* client */);
> 
> 
>  /*
> diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c
> index 658d050..bdacefb 100755
> --- a/hw/xwin/winclipboardwrappers.c
> +++ b/hw/xwin/winclipboardwrappers.c
> @@ -52,9 +52,9 @@
>   * Local function prototypes
>   */
> 
> -DISPATCH_PROC(winProcEstablishConnection);
> -DISPATCH_PROC(winProcQueryTree);
> -DISPATCH_PROC(winProcSetSelectionOwner);
> +int winProcEstablishConnection(ClientPtr /* client */);
> +int winProcQueryTree(ClientPtr /* client */);
> +int winProcSetSelectionOwner(ClientPtr /* client */);
> 
> 
>  /*
> diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
> index 34d7f4b..ca3dbc3 100755
> --- a/hw/xwin/winwindowswm.c
> +++ b/hw/xwin/winwindowswm.c
> @@ -45,8 +45,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> 
>  static int WMErrorBase;
> 
> -static DISPATCH_PROC(ProcWindowsWMDispatch);
> -static DISPATCH_PROC(SProcWindowsWMDispatch);
> 
>  static unsigned char WMReqCode = 0;
>  static int WMEventBase = 0;
> diff --git a/include/dixstruct.h b/include/dixstruct.h
> index efa2577..5abf0f9 100644
> --- a/include/dixstruct.h
> +++ b/include/dixstruct.h
> @@ -138,10 +138,6 @@ extern _X_EXPORT void SmartScheduleStopTimer(void);
> 
>  extern _X_EXPORT Bool SmartScheduleInit(void);
> 
> -
> -/* This prototype is used pervasively in Xext, dix */
> -#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
> -
>  typedef struct _WorkQueue {
>      struct _WorkQueue *next;
>      Bool        (*function) (
> --
> 1.7.1.226.g770c5
             Tiago


More information about the xorg-devel mailing list