xserver: Branch 'server-1.12-branch' - 12 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Sun Aug 19 09:06:52 PDT 2012


 Xext/sync.c                                |   24 
 Xi/extinit.c                               |   38 -
 Xi/xiproperty.c                            |  251 +++----
 config/wscons.c                            |    6 
 dix/gc.c                                   |   10 
 dix/getevents.c                            |    2 
 dix/tables.c                               |  955 +++++++++++++++++------------
 fb/fbseg.c                                 |   18 
 hw/kdrive/ephyr/ephyr.c                    |   80 +-
 hw/kdrive/ephyr/hostx.c                    |   36 -
 hw/kdrive/ephyr/hostx.h                    |   10 
 hw/kdrive/src/kdrive.c                     |   20 
 hw/kdrive/src/kinput.c                     |    2 
 hw/xfree86/loader/loader.c                 |   13 
 hw/xfree86/modes/xf86Crtc.c                |    8 
 hw/xfree86/modes/xf86DisplayIDModes.c      |  171 ++---
 hw/xfree86/modes/xf86EdidModes.c           |  122 +--
 hw/xfree86/os-support/bsd/bsd_apm.c        |   26 
 hw/xfree86/os-support/bsd/bsd_kqueue_apm.c |   26 
 hw/xfree86/os-support/bus/Sbus.c           |   20 
 hw/xfree86/os-support/linux/lnx_apm.c      |   31 
 hw/xfree86/os-support/solaris/sun_apm.c    |   26 
 hw/xquartz/console_redirect.c              |   28 
 render/filter.c                            |    5 
 24 files changed, 1080 insertions(+), 848 deletions(-)

New commits:
commit 0754f74a538ca59e45a39fefa2d90b9d3bc822dd
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Thu Aug 16 19:42:54 2012 -0700

    XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()
    
    We forgot to multiply by sizeof(), so it wasn't fully zeroed out.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 7c3d2e4828deb4e8ec38e8ef88d6f92b2d931033)

diff --git a/hw/xquartz/console_redirect.c b/hw/xquartz/console_redirect.c
index 30e397a..8fdce46 100644
--- a/hw/xquartz/console_redirect.c
+++ b/hw/xquartz/console_redirect.c
@@ -365,8 +365,8 @@ xq_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd)
                               BLOCK_DONE;
                           }
                           redirect_fds = new_array;
-                          memset(redirect_fds + n_redirect_fds, 0, new_n -
-                                 n_redirect_fds);
+                          memset(redirect_fds + n_redirect_fds, 0, (new_n -
+                                 n_redirect_fds) * sizeof(*redirect_fds));
                           n_redirect_fds = new_n;
                       }
 
commit 2141f21d51b0787c8d287bb50d01a6a81e61a634
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Thu Aug 16 15:43:34 2012 -0700

    XQuartz: console_redirect: Set the correct location for reading into the buffer
    
    Prior to this change, it was possible that a large message would have some
    of its data prepended to subsequent messages due to our not incorrectly
    setting the location to write into the buffer.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit a32e01802ff1c938c0afe0cc007a273b9ada8610)

diff --git a/hw/xquartz/console_redirect.c b/hw/xquartz/console_redirect.c
index 91d693b..30e397a 100644
--- a/hw/xquartz/console_redirect.c
+++ b/hw/xquartz/console_redirect.c
@@ -110,27 +110,33 @@ _read_redirect(int fd, int flush)
         /* Increment our returned number read */
         total_read += nbytes;
 
-        nbytes += (aslr->w - aslr->buf);
-        aslr->buf[nbytes] = '\0';
+        /* Increment our write location */
+        aslr->w += nbytes;
+        aslr->w[0] = '\0';
 
         /* One line at a time */
-        for (p = aslr->buf; *p && (p - aslr->buf) < nbytes; p = s + 1) {
+        for (p = aslr->buf; p < aslr->w; p = s + 1) {
             // Find null or \n
             for (s = p; *s && *s != '\n'; s++) ;
             if (*s == '\n') {
                 *s = '\0';
+            }
+
+            if (s < aslr->w || aslr->buf == p) {
+                /* Either the first of multiple messages or one message which is larger than our buffer */
                 asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
             }
-            else if (aslr->buf != p) {
+            else {
+                /* We reached the end of the buffer, move this chunk to the start. */
                 memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf));
                 aslr->w = aslr->buf + (s - p);
                 break;
             }
-            else if (nbytes == BUF_SIZE - 1) {
-                asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
-                aslr->w = aslr->buf;
-                break;
-            }
+        }
+
+        if (p == aslr->w) {
+            /* Start writing at the beginning in the case where we flushed */
+            aslr->w = aslr->buf;
         }
     }
 
commit 73d62f1aaea4a862cc512048cb6ca59586f4cdb6
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Aug 7 17:49:46 2012 -0700

    Only free Render filter names on last screen close
    
    Hotplugging screens causes the render filter names to get freed while
    still in use; wait for the last core screen to be closed before
    freeing them. That only happens at server reset, when we want them to
    be freed.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Dave Airlie <airlied at redhat.com>
    (cherry picked from commit 19772670e3041fe1c7f5bbf32fa039a6d8245ccb)

diff --git a/render/filter.c b/render/filter.c
index 8c401ee..019ea7f 100644
--- a/render/filter.c
+++ b/render/filter.c
@@ -273,7 +273,10 @@ PictureResetFilters(ScreenPtr pScreen)
 
     free(ps->filters);
     free(ps->filterAliases);
-    PictureFreeFilterIds();
+
+    /* Free the filters when the last screen is closed */
+    if (pScreen->myNum == 0)
+        PictureFreeFilterIds();
 }
 
 int
commit 3e62f48edf47a59d923ac58b6d4262b02456a556
Author: Simon Schubert <2 at 0x2c.org>
Date:   Sun Aug 12 09:40:16 2012 -0700

    fb: reorder Bresenham error correction to avoid overshoot.
    
    When fbBresSolid draws a line, it can happen that after the last
    pixel, the Bresenham error term overflows, and fbBresSolid paints
    another pixel before adjusting the error term.
    
    However, if this happens on the last pixel (len=0), this extra pixel
    might overshoot the boundary, and, in rare cases, lead to a segfault.
    
    Fix this issue by adjusting for the Bresenham error term before
    drawing the main pixel, not after.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24274
    Signed-off-by: Simon Schubert <2 at 0x2c.or>
    Tested-by: Mitch Davis <mjd+freedesktop.org at afork.com>
    Signed-off-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 863d528a9f76d0e8f122aebf19f8564a4c67a938)

diff --git a/fb/fbseg.c b/fb/fbseg.c
index 0e4e0a9..1848387 100644
--- a/fb/fbseg.c
+++ b/fb/fbseg.c
@@ -65,6 +65,12 @@ fbBresSolid(DrawablePtr pDrawable,
     if (axis == X_AXIS) {
         bits = 0;
         while (len--) {
+            if (e >= 0) {
+                WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
+                bits = 0;
+                dst += dstStride;
+                e += e3;
+            }
             bits |= mask;
             mask = fbBresShiftMask(mask, signdx, dstBpp);
             if (!mask) {
@@ -74,21 +80,12 @@ fbBresSolid(DrawablePtr pDrawable,
                 mask = mask0;
             }
             e += e1;
-            if (e >= 0) {
-                WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
-                bits = 0;
-                dst += dstStride;
-                e += e3;
-            }
         }
         if (bits)
             WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
     }
     else {
         while (len--) {
-            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
-            dst += dstStride;
-            e += e1;
             if (e >= 0) {
                 e += e3;
                 mask = fbBresShiftMask(mask, signdx, dstBpp);
@@ -97,6 +94,9 @@ fbBresSolid(DrawablePtr pDrawable,
                     mask = mask0;
                 }
             }
+            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
+            dst += dstStride;
+            e += e1;
         }
     }
 
commit f0823a057e4c80dbb18c16f066ad36e6459fcc85
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Jul 31 16:09:38 2012 +1000

    dix: make sure the mask is set for emulated scroll events (#52508)
    
    If a device has smooth scrolling axes, but submits scroll button events, we
    convert those to motion events and update the valuators. For legacy button
    events, the valuator mask is likely unset though, causing
    add_to_scroll_valuator() to return early, leaving us with an empty mask.
    That again skipped the rest of the code and no events were generated.
    
    Fix it by making sure that the scroll valuator in the mask is at least
    initialized to 0.
    
    Broke evdev wheel emulation, introduced by
    54476b5e4461ff523e935961affabcf0de12c556.
    
    X.Org Bug 52508 <http://bugs.freedesktop.org/show_bug.cgi?id=52508>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
    (cherry picked from commit cb306a8f174bec9ded95191b91797f59250e6808)

diff --git a/dix/getevents.c b/dix/getevents.c
index b78d5ce..fade40c 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1601,6 +1601,8 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
 
         if (adj != 0.0 && axis != -1) {
             adj *= pDev->valuator->axes[axis].scroll.increment;
+            if (!valuator_mask_isset(&mask, axis))
+                valuator_mask_set(&mask, axis, 0);
             add_to_scroll_valuator(pDev, &mask, axis, adj);
             type = MotionNotify;
             buttons = 0;
commit 1f8a958a12c1c7c684051e5679420fe3a02ce307
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Jul 23 16:34:28 2012 -0400

    sync: Fix logic error from b55bf248581dc66321b24b29f199f6dc8d02db1b
    
    That commit adds two hunks, and I _think_ they're backwards.  It adds
    code to modify bracket_greater on NegativeTransition triggers, and
    bracket_less on PositiveTransition triggers.  That breaks symmetry with
    the surrounding code; the code as of this commit could probably be
    simplified further.
    
    I can't keep the sync trigger rules in my head for more than about five
    minutes at a time, so I'm sending this on for more eyes.  RHEL 6.3's
    xserver is shipping with b55bf248 reverted:
    
        https://bugzilla.redhat.com/show_bug.cgi?id=748704#c33
    
    And there appear to be some upstream reports of the same issue:
    
        https://bugzilla.gnome.org/show_bug.cgi?id=658955
    
    So I'd like to get this sorted out.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 4a6f42dda00ba3b5616f8a86f0d4c9a652c7d9d4)

diff --git a/Xext/sync.c b/Xext/sync.c
index 532cb64..c9162ee 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -1033,15 +1033,15 @@ SyncComputeBracketValues(SyncCounter * pCounter)
                 pnewltval = &psci->bracket_less;
             }
             else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
-                     XSyncValueLessThan(pTrigger->test_value,
-                                        psci->bracket_greater)) {
+                     XSyncValueGreaterThan(pTrigger->test_value,
+                                           psci->bracket_less)) {
                 /*
                  * The value is exactly equal to our threshold.  We want one
-                 * more event in the positive direction to ensure we pick up
-                 * when the value *exceeds* this threshold.
+                 * more event in the negative direction to ensure we pick up
+                 * when the value is less than this threshold.
                  */
-                psci->bracket_greater = pTrigger->test_value;
-                pnewgtval = &psci->bracket_greater;
+                psci->bracket_less = pTrigger->test_value;
+                pnewltval = &psci->bracket_less;
             }
         }
         else if (pTrigger->test_type == XSyncPositiveTransition &&
@@ -1053,15 +1053,15 @@ SyncComputeBracketValues(SyncCounter * pCounter)
                 pnewgtval = &psci->bracket_greater;
             }
             else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
-                     XSyncValueGreaterThan(pTrigger->test_value,
-                                           psci->bracket_less)) {
+                     XSyncValueLessThan(pTrigger->test_value,
+                                        psci->bracket_greater)) {
                 /*
                  * The value is exactly equal to our threshold.  We want one
-                 * more event in the negative direction to ensure we pick up
-                 * when the value is less than this threshold.
+                 * more event in the positive direction to ensure we pick up
+                 * when the value *exceeds* this threshold.
                  */
-                psci->bracket_less = pTrigger->test_value;
-                pnewltval = &psci->bracket_less;
+                psci->bracket_greater = pTrigger->test_value;
+                pnewgtval = &psci->bracket_greater;
             }
         }
     }                           /* end for each trigger */
commit 83cba78a0c858df4d5405783f3a1fb4bab128129
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Mon Jul 16 21:12:06 2012 -0700

    Make indentation of dix/tables.c much more consistent and readable
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Acked-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit c37c65052f674cd58894ad0b9ec22928a62c624e)

diff --git a/dix/tables.c b/dix/tables.c
index 705ef0d..686cddd 100644
--- a/dix/tables.c
+++ b/dix/tables.c
@@ -58,364 +58,529 @@ SOFTWARE.
 #include "swaprep.h"
 #include "swapreq.h"
 
-int (*InitialVector[3]) (ClientPtr      /* client */
-    ) = {
-0, ProcInitialConnection, ProcEstablishConnection};
+int (*InitialVector[3]) (ClientPtr /* client */) = {
+    0,
+    ProcInitialConnection,
+    ProcEstablishConnection
+};
 
-int (*ProcVector[256]) (ClientPtr       /* client */
-    ) = {
-    ProcBadRequest, ProcCreateWindow, ProcChangeWindowAttributes, ProcGetWindowAttributes, ProcDestroyWindow, ProcDestroySubwindows,    /* 5 */
-        ProcChangeSaveSet, ProcReparentWindow, ProcMapWindow, ProcMapSubwindows, ProcUnmapWindow,       /* 10 */
-        ProcUnmapSubwindows, ProcConfigureWindow, ProcCirculateWindow, ProcGetGeometry, ProcQueryTree,  /* 15 */
-        ProcInternAtom, ProcGetAtomName, ProcChangeProperty, ProcDeleteProperty, ProcGetProperty,       /* 20 */
-        ProcListProperties, ProcSetSelectionOwner, ProcGetSelectionOwner, ProcConvertSelection, ProcSendEvent,  /* 25 */
-        ProcGrabPointer, ProcUngrabPointer, ProcGrabButton, ProcUngrabButton, ProcChangeActivePointerGrab,      /* 30 */
-        ProcGrabKeyboard, ProcUngrabKeyboard, ProcGrabKey, ProcUngrabKey, ProcAllowEvents,      /* 35 */
-        ProcGrabServer, ProcUngrabServer, ProcQueryPointer, ProcGetMotionEvents, ProcTranslateCoords,   /* 40 */
-        ProcWarpPointer, ProcSetInputFocus, ProcGetInputFocus, ProcQueryKeymap, ProcOpenFont,   /* 45 */
-        ProcCloseFont, ProcQueryFont, ProcQueryTextExtents, ProcListFonts, ProcListFontsWithInfo,       /* 50 */
-        ProcSetFontPath, ProcGetFontPath, ProcCreatePixmap, ProcFreePixmap, ProcCreateGC,       /* 55 */
-        ProcChangeGC, ProcCopyGC, ProcSetDashes, ProcSetClipRectangles, ProcFreeGC,     /* 60 */
-        ProcClearToBackground, ProcCopyArea, ProcCopyPlane, ProcPolyPoint, ProcPolyLine,        /* 65 */
-        ProcPolySegment, ProcPolyRectangle, ProcPolyArc, ProcFillPoly, ProcPolyFillRectangle,   /* 70 */
-        ProcPolyFillArc, ProcPutImage, ProcGetImage, ProcPolyText, ProcPolyText,        /* 75 */
-        ProcImageText8, ProcImageText16, ProcCreateColormap, ProcFreeColormap, ProcCopyColormapAndFree, /* 80 */
-        ProcInstallColormap, ProcUninstallColormap, ProcListInstalledColormaps, ProcAllocColor, ProcAllocNamedColor,    /* 85 */
-        ProcAllocColorCells, ProcAllocColorPlanes, ProcFreeColors, ProcStoreColors, ProcStoreNamedColor,        /* 90 */
-        ProcQueryColors, ProcLookupColor, ProcCreateCursor, ProcCreateGlyphCursor, ProcFreeCursor,      /* 95 */
-        ProcRecolorCursor, ProcQueryBestSize, ProcQueryExtension, ProcListExtensions, ProcChangeKeyboardMapping,        /* 100 */
-        ProcGetKeyboardMapping, ProcChangeKeyboardControl, ProcGetKeyboardControl, ProcBell, ProcChangePointerControl,  /* 105 */
-        ProcGetPointerControl, ProcSetScreenSaver, ProcGetScreenSaver, ProcChangeHosts, ProcListHosts,  /* 110 */
-        ProcChangeAccessControl, ProcChangeCloseDownMode, ProcKillClient, ProcRotateProperties, ProcForceScreenSaver,   /* 115 */
-        ProcSetPointerMapping, ProcGetPointerMapping, ProcSetModifierMapping, ProcGetModifierMapping, ProcBadRequest,   /* 120 */
-        ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */
-ProcBadRequest,
-        ProcNoOperation,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest};
+int (*ProcVector[256]) (ClientPtr /* client */) = {
+    ProcBadRequest,
+    ProcCreateWindow,
+    ProcChangeWindowAttributes,
+    ProcGetWindowAttributes,
+    ProcDestroyWindow,
+    ProcDestroySubwindows,              /* 5 */
+    ProcChangeSaveSet,
+    ProcReparentWindow,
+    ProcMapWindow,
+    ProcMapSubwindows,
+    ProcUnmapWindow,                    /* 10 */
+    ProcUnmapSubwindows,
+    ProcConfigureWindow,
+    ProcCirculateWindow,
+    ProcGetGeometry,
+    ProcQueryTree,                      /* 15 */
+    ProcInternAtom,
+    ProcGetAtomName,
+    ProcChangeProperty,
+    ProcDeleteProperty,
+    ProcGetProperty,                    /* 20 */
+    ProcListProperties,
+    ProcSetSelectionOwner,
+    ProcGetSelectionOwner,
+    ProcConvertSelection,
+    ProcSendEvent,                      /* 25 */
+    ProcGrabPointer,
+    ProcUngrabPointer,
+    ProcGrabButton,
+    ProcUngrabButton,
+    ProcChangeActivePointerGrab,        /* 30 */
+    ProcGrabKeyboard,
+    ProcUngrabKeyboard,
+    ProcGrabKey,
+    ProcUngrabKey,
+    ProcAllowEvents,                    /* 35 */
+    ProcGrabServer,
+    ProcUngrabServer,
+    ProcQueryPointer,
+    ProcGetMotionEvents,
+    ProcTranslateCoords,                /* 40 */
+    ProcWarpPointer,
+    ProcSetInputFocus,
+    ProcGetInputFocus,
+    ProcQueryKeymap,
+    ProcOpenFont,                       /* 45 */
+    ProcCloseFont,
+    ProcQueryFont,
+    ProcQueryTextExtents,
+    ProcListFonts,
+    ProcListFontsWithInfo,              /* 50 */
+    ProcSetFontPath,
+    ProcGetFontPath,
+    ProcCreatePixmap,
+    ProcFreePixmap,
+    ProcCreateGC,                       /* 55 */
+    ProcChangeGC,
+    ProcCopyGC,
+    ProcSetDashes,
+    ProcSetClipRectangles,
+    ProcFreeGC,                         /* 60 */
+    ProcClearToBackground,
+    ProcCopyArea,
+    ProcCopyPlane,
+    ProcPolyPoint,
+    ProcPolyLine,                       /* 65 */
+    ProcPolySegment,
+    ProcPolyRectangle,
+    ProcPolyArc,
+    ProcFillPoly,
+    ProcPolyFillRectangle,              /* 70 */
+    ProcPolyFillArc,
+    ProcPutImage,
+    ProcGetImage,
+    ProcPolyText,
+    ProcPolyText,                       /* 75 */
+    ProcImageText8,
+    ProcImageText16,
+    ProcCreateColormap,
+    ProcFreeColormap,
+    ProcCopyColormapAndFree,            /* 80 */
+    ProcInstallColormap,
+    ProcUninstallColormap,
+    ProcListInstalledColormaps,
+    ProcAllocColor,
+    ProcAllocNamedColor,                /* 85 */
+    ProcAllocColorCells,
+    ProcAllocColorPlanes,
+    ProcFreeColors,
+    ProcStoreColors,
+    ProcStoreNamedColor,                /* 90 */
+    ProcQueryColors,
+    ProcLookupColor,
+    ProcCreateCursor,
+    ProcCreateGlyphCursor,
+    ProcFreeCursor,                     /* 95 */
+    ProcRecolorCursor,
+    ProcQueryBestSize,
+    ProcQueryExtension,
+    ProcListExtensions,
+    ProcChangeKeyboardMapping,          /* 100 */
+    ProcGetKeyboardMapping,
+    ProcChangeKeyboardControl,
+    ProcGetKeyboardControl,
+    ProcBell,
+    ProcChangePointerControl,           /* 105 */
+    ProcGetPointerControl,
+    ProcSetScreenSaver,
+    ProcGetScreenSaver,
+    ProcChangeHosts,
+    ProcListHosts,                      /* 110 */
+    ProcChangeAccessControl,
+    ProcChangeCloseDownMode,
+    ProcKillClient,
+    ProcRotateProperties,
+    ProcForceScreenSaver,               /* 115 */
+    ProcSetPointerMapping,
+    ProcGetPointerMapping,
+    ProcSetModifierMapping,
+    ProcGetModifierMapping,
+    ProcBadRequest,                     /* 120 */
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,                     /* 125 */
+    ProcBadRequest,
+    ProcNoOperation,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest
+};
 
-int (*SwappedProcVector[256]) (ClientPtr        /* client */
-    ) = {
-    ProcBadRequest, SProcCreateWindow, SProcChangeWindowAttributes, SProcResourceReq,   /* GetWindowAttributes */
-        SProcResourceReq,       /* DestroyWindow */
-        SProcResourceReq,       /* 5 DestroySubwindows */
-        SProcResourceReq,       /* SProcChangeSaveSet, */
-        SProcReparentWindow, SProcResourceReq,  /* MapWindow */
-        SProcResourceReq,       /* MapSubwindows */
-        SProcResourceReq,       /* 10 UnmapWindow */
-        SProcResourceReq,       /* UnmapSubwindows */
-        SProcConfigureWindow, SProcResourceReq, /* SProcCirculateWindow, */
-        SProcResourceReq,       /* GetGeometry */
-        SProcResourceReq,       /* 15 QueryTree */
-        SProcInternAtom, SProcResourceReq,      /* SProcGetAtomName, */
-        SProcChangeProperty, SProcDeleteProperty, SProcGetProperty,     /* 20 */
-        SProcResourceReq,       /* SProcListProperties, */
-        SProcSetSelectionOwner, SProcResourceReq,       /* SProcGetSelectionOwner, */
-        SProcConvertSelection, SProcSendEvent,  /* 25 */
-        SProcGrabPointer, SProcResourceReq,     /* SProcUngrabPointer, */
-        SProcGrabButton, SProcUngrabButton, SProcChangeActivePointerGrab,       /* 30 */
-        SProcGrabKeyboard, SProcResourceReq,    /* SProcUngrabKeyboard, */
-        SProcGrabKey, SProcUngrabKey, SProcResourceReq, /* 35 SProcAllowEvents, */
-        SProcSimpleReq,         /* SProcGrabServer, */
-        SProcSimpleReq,         /* SProcUngrabServer, */
-        SProcResourceReq,       /* SProcQueryPointer, */
-        SProcGetMotionEvents, SProcTranslateCoords,     /*40 */
-        SProcWarpPointer, SProcSetInputFocus, SProcSimpleReq,   /* SProcGetInputFocus, */
-        SProcSimpleReq,         /* QueryKeymap, */
-        SProcOpenFont,          /* 45 */
-        SProcResourceReq,       /* SProcCloseFont, */
-        SProcResourceReq,       /* SProcQueryFont, */
-        SProcResourceReq,       /* SProcQueryTextExtents,  */
-        SProcListFonts, SProcListFontsWithInfo, /* 50 */
-        SProcSetFontPath, SProcSimpleReq,       /* GetFontPath, */
-        SProcCreatePixmap, SProcResourceReq,    /* SProcFreePixmap, */
-        SProcCreateGC,          /* 55 */
-        SProcChangeGC, SProcCopyGC, SProcSetDashes, SProcSetClipRectangles, SProcResourceReq,   /* 60 SProcFreeGC, */
-        SProcClearToBackground, SProcCopyArea, SProcCopyPlane, SProcPoly,       /* PolyPoint, */
-        SProcPoly,              /* 65 PolyLine */
-        SProcPoly,              /* PolySegment, */
-        SProcPoly,              /* PolyRectangle, */
-        SProcPoly,              /* PolyArc, */
-        SProcFillPoly, SProcPoly,       /* 70 PolyFillRectangle */
-        SProcPoly,              /* PolyFillArc, */
-        SProcPutImage, SProcGetImage, SProcPolyText, SProcPolyText,     /* 75 */
-        SProcImageText, SProcImageText, SProcCreateColormap, SProcResourceReq,  /* SProcFreeColormap, */
-        SProcCopyColormapAndFree,       /* 80 */
-        SProcResourceReq,       /* SProcInstallColormap, */
-        SProcResourceReq,       /* SProcUninstallColormap, */
-        SProcResourceReq,       /* SProcListInstalledColormaps, */
-        SProcAllocColor, SProcAllocNamedColor,  /* 85 */
-        SProcAllocColorCells, SProcAllocColorPlanes, SProcFreeColors, SProcStoreColors, SProcStoreNamedColor,   /* 90 */
-        SProcQueryColors, SProcLookupColor, SProcCreateCursor, SProcCreateGlyphCursor, SProcResourceReq,        /* 95 SProcFreeCursor, */
-        SProcRecolorCursor, SProcQueryBestSize, SProcQueryExtension, SProcSimpleReq,    /* ListExtensions, */
-        SProcChangeKeyboardMapping,     /* 100 */
-        SProcSimpleReq,         /* GetKeyboardMapping, */
-        SProcChangeKeyboardControl, SProcSimpleReq,     /* GetKeyboardControl, */
-        SProcSimpleReq,         /* Bell, */
-        SProcChangePointerControl,      /* 105 */
-        SProcSimpleReq,         /* GetPointerControl, */
-        SProcSetScreenSaver, SProcSimpleReq,    /* GetScreenSaver, */
-        SProcChangeHosts, SProcSimpleReq,       /* 110 ListHosts, */
-        SProcSimpleReq,         /* SProcChangeAccessControl, */
-        SProcSimpleReq,         /* SProcChangeCloseDownMode, */
-        SProcResourceReq,       /* SProcKillClient, */
-        SProcRotateProperties, SProcSimpleReq,  /* 115 ForceScreenSaver */
-        SProcSimpleReq,         /* SetPointerMapping, */
-        SProcSimpleReq,         /* GetPointerMapping, */
-        SProcSimpleReq,         /* SetModifierMapping, */
-        SProcSimpleReq,         /* GetModifierMapping, */
-        ProcBadRequest,         /* 120 */
-        ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */
-ProcBadRequest,
-        SProcNoOperation,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest,
-        ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest};
+int (*SwappedProcVector[256]) (ClientPtr /* client */) = {
+    ProcBadRequest,
+    SProcCreateWindow,
+    SProcChangeWindowAttributes,
+    SProcResourceReq,                   /* GetWindowAttributes */
+    SProcResourceReq,                   /* DestroyWindow */
+    SProcResourceReq,                   /* 5 DestroySubwindows */
+    SProcResourceReq,                   /* SProcChangeSaveSet, */
+    SProcReparentWindow,
+    SProcResourceReq,                   /* MapWindow */
+    SProcResourceReq,                   /* MapSubwindows */
+    SProcResourceReq,                   /* 10 UnmapWindow */
+    SProcResourceReq,                   /* UnmapSubwindows */
+    SProcConfigureWindow,
+    SProcResourceReq,                   /* SProcCirculateWindow, */
+    SProcResourceReq,                   /* GetGeometry */
+    SProcResourceReq,                   /* 15 QueryTree */
+    SProcInternAtom,
+    SProcResourceReq,                   /* SProcGetAtomName, */
+    SProcChangeProperty,
+    SProcDeleteProperty,
+    SProcGetProperty,                   /* 20 */
+    SProcResourceReq,                   /* SProcListProperties, */
+    SProcSetSelectionOwner,
+    SProcResourceReq,                   /* SProcGetSelectionOwner, */
+    SProcConvertSelection,
+    SProcSendEvent,                     /* 25 */
+    SProcGrabPointer,
+    SProcResourceReq,                   /* SProcUngrabPointer, */
+    SProcGrabButton,
+    SProcUngrabButton,
+    SProcChangeActivePointerGrab,       /* 30 */
+    SProcGrabKeyboard,
+    SProcResourceReq,                   /* SProcUngrabKeyboard, */
+    SProcGrabKey,
+    SProcUngrabKey,
+    SProcResourceReq,                   /* 35 SProcAllowEvents, */
+    SProcSimpleReq,                     /* SProcGrabServer, */
+    SProcSimpleReq,                     /* SProcUngrabServer, */
+    SProcResourceReq,                   /* SProcQueryPointer, */
+    SProcGetMotionEvents,
+    SProcTranslateCoords,               /*40 */
+    SProcWarpPointer,
+    SProcSetInputFocus,
+    SProcSimpleReq,                     /* SProcGetInputFocus, */
+    SProcSimpleReq,                     /* QueryKeymap, */
+    SProcOpenFont,                      /* 45 */
+    SProcResourceReq,                   /* SProcCloseFont, */
+    SProcResourceReq,                   /* SProcQueryFont, */
+    SProcResourceReq,                   /* SProcQueryTextExtents,  */
+    SProcListFonts,
+    SProcListFontsWithInfo,             /* 50 */
+    SProcSetFontPath,
+    SProcSimpleReq,                     /* GetFontPath, */
+    SProcCreatePixmap,
+    SProcResourceReq,                   /* SProcFreePixmap, */
+    SProcCreateGC,                      /* 55 */
+    SProcChangeGC,
+    SProcCopyGC,
+    SProcSetDashes,
+    SProcSetClipRectangles,
+    SProcResourceReq,                   /* 60 SProcFreeGC, */
+    SProcClearToBackground,
+    SProcCopyArea,
+    SProcCopyPlane,
+    SProcPoly,                          /* PolyPoint, */
+    SProcPoly,                          /* 65 PolyLine */
+    SProcPoly,                          /* PolySegment, */
+    SProcPoly,                          /* PolyRectangle, */
+    SProcPoly,                          /* PolyArc, */
+    SProcFillPoly,
+    SProcPoly,                          /* 70 PolyFillRectangle */
+    SProcPoly,                          /* PolyFillArc, */
+    SProcPutImage,
+    SProcGetImage,
+    SProcPolyText,
+    SProcPolyText,                      /* 75 */
+    SProcImageText,
+    SProcImageText,
+    SProcCreateColormap,
+    SProcResourceReq,                   /* SProcFreeColormap, */
+    SProcCopyColormapAndFree,           /* 80 */
+    SProcResourceReq,                   /* SProcInstallColormap, */
+    SProcResourceReq,                   /* SProcUninstallColormap, */
+    SProcResourceReq,                   /* SProcListInstalledColormaps, */
+    SProcAllocColor,
+    SProcAllocNamedColor,               /* 85 */
+    SProcAllocColorCells,
+    SProcAllocColorPlanes,
+    SProcFreeColors,
+    SProcStoreColors,
+    SProcStoreNamedColor,               /* 90 */
+    SProcQueryColors,
+    SProcLookupColor,
+    SProcCreateCursor,
+    SProcCreateGlyphCursor,
+    SProcResourceReq,                   /* 95 SProcFreeCursor, */
+    SProcRecolorCursor,
+    SProcQueryBestSize,
+    SProcQueryExtension,
+    SProcSimpleReq,                     /* ListExtensions, */
+    SProcChangeKeyboardMapping,         /* 100 */
+    SProcSimpleReq,                     /* GetKeyboardMapping, */
+    SProcChangeKeyboardControl,
+    SProcSimpleReq,                     /* GetKeyboardControl, */
+    SProcSimpleReq,                     /* Bell, */
+    SProcChangePointerControl,          /* 105 */
+    SProcSimpleReq,                     /* GetPointerControl, */
+    SProcSetScreenSaver,
+    SProcSimpleReq,                     /* GetScreenSaver, */
+    SProcChangeHosts,
+    SProcSimpleReq,                     /* 110 ListHosts, */
+    SProcSimpleReq,                     /* SProcChangeAccessControl, */
+    SProcSimpleReq,                     /* SProcChangeCloseDownMode, */
+    SProcResourceReq,                   /* SProcKillClient, */
+    SProcRotateProperties,
+    SProcSimpleReq,                     /* 115 ForceScreenSaver */
+    SProcSimpleReq,                     /* SetPointerMapping, */
+    SProcSimpleReq,                     /* GetPointerMapping, */
+    SProcSimpleReq,                     /* SetModifierMapping, */
+    SProcSimpleReq,                     /* GetModifierMapping, */
+    ProcBadRequest,                     /* 120 */
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,                     /* 125 */
+    ProcBadRequest,
+    SProcNoOperation,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest
+};
 
 EventSwapPtr EventSwapVector[MAXEVENTS] = {
     (EventSwapPtr) SErrorEvent,
@@ -423,32 +588,32 @@ EventSwapPtr EventSwapVector[MAXEVENTS] = {
     SKeyButtonPtrEvent,
     SKeyButtonPtrEvent,
     SKeyButtonPtrEvent,
-    SKeyButtonPtrEvent,         /* 5 */
+    SKeyButtonPtrEvent,                         /* 5 */
     SKeyButtonPtrEvent,
     SEnterLeaveEvent,
     SEnterLeaveEvent,
     SFocusEvent,
-    SFocusEvent,                /* 10 */
+    SFocusEvent,                                /* 10 */
     SKeymapNotifyEvent,
     SExposeEvent,
     SGraphicsExposureEvent,
     SNoExposureEvent,
-    SVisibilityEvent,           /* 15 */
+    SVisibilityEvent,                           /* 15 */
     SCreateNotifyEvent,
     SDestroyNotifyEvent,
     SUnmapNotifyEvent,
     SMapNotifyEvent,
-    SMapRequestEvent,           /* 20 */
+    SMapRequestEvent,                           /* 20 */
     SReparentEvent,
     SConfigureNotifyEvent,
     SConfigureRequestEvent,
     SGravityEvent,
-    SResizeRequestEvent,        /* 25 */
+    SResizeRequestEvent,                        /* 25 */
     SCirculateEvent,
     SCirculateEvent,
     SPropertyEvent,
     SSelectionClearEvent,
-    SSelectionRequestEvent,     /* 30 */
+    SSelectionRequestEvent,                     /* 30 */
     SSelectionNotifyEvent,
     SColormapEvent,
     SClientMessageEvent,
@@ -554,37 +719,37 @@ ReplySwapPtr ReplySwapVector[256] = {
     ReplyNotSwappd,
     (ReplySwapPtr) SGetWindowAttributesReply,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 5 */
+    ReplyNotSwappd,                             /* 5 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 10 */
+    ReplyNotSwappd,                             /* 10 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     (ReplySwapPtr) SGetGeometryReply,
-    (ReplySwapPtr) SQueryTreeReply,     /* 15 */
+    (ReplySwapPtr) SQueryTreeReply,             /* 15 */
     (ReplySwapPtr) SInternAtomReply,
     (ReplySwapPtr) SGetAtomNameReply,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    (ReplySwapPtr) SGetPropertyReply,   /* 20 */
+    (ReplySwapPtr) SGetPropertyReply,           /* 20 */
     (ReplySwapPtr) SListPropertiesReply,
     ReplyNotSwappd,
     (ReplySwapPtr) SGetSelectionOwnerReply,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 25 */
-    (ReplySwapPtr) SGenericReply,       /* SGrabPointerReply, */
+    ReplyNotSwappd,                             /* 25 */
+    (ReplySwapPtr) SGenericReply,               /* SGrabPointerReply, */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 30 */
-    (ReplySwapPtr) SGenericReply,       /* SGrabKeyboardReply, */
+    ReplyNotSwappd,                             /* 30 */
+    (ReplySwapPtr) SGenericReply,               /* SGrabKeyboardReply, */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 35 */
+    ReplyNotSwappd,                             /* 35 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     (ReplySwapPtr) SQueryPointerReply,
@@ -594,7 +759,7 @@ ReplySwapPtr ReplySwapVector[256] = {
     ReplyNotSwappd,
     (ReplySwapPtr) SGetInputFocusReply,
     (ReplySwapPtr) SQueryKeymapReply,
-    ReplyNotSwappd,             /* 45 */
+    ReplyNotSwappd,                             /* 45 */
     ReplyNotSwappd,
     (ReplySwapPtr) SQueryFontReply,
     (ReplySwapPtr) SQueryTextExtentsReply,
@@ -604,32 +769,32 @@ ReplySwapPtr ReplySwapVector[256] = {
     (ReplySwapPtr) SGetFontPathReply,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 55 */
+    ReplyNotSwappd,                             /* 55 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 60 */
+    ReplyNotSwappd,                             /* 60 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 65 */
+    ReplyNotSwappd,                             /* 65 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 70 */
+    ReplyNotSwappd,                             /* 70 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     (ReplySwapPtr) SGetImageReply,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 75 */
+    ReplyNotSwappd,                             /* 75 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 80 */
+    ReplyNotSwappd,                             /* 80 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     (ReplySwapPtr) SListInstalledColormapsReply,
@@ -639,44 +804,44 @@ ReplySwapPtr ReplySwapVector[256] = {
     (ReplySwapPtr) SAllocColorPlanesReply,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 90 */
+    ReplyNotSwappd,                             /* 90 */
     (ReplySwapPtr) SQueryColorsReply,
     (ReplySwapPtr) SLookupColorReply,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 95 */
+    ReplyNotSwappd,                             /* 95 */
     ReplyNotSwappd,
     (ReplySwapPtr) SQueryBestSizeReply,
-    (ReplySwapPtr) SGenericReply,       /* SQueryExtensionReply, */
+    (ReplySwapPtr) SGenericReply,               /* SQueryExtensionReply, */
     (ReplySwapPtr) SListExtensionsReply,
-    ReplyNotSwappd,             /* 100 */
+    ReplyNotSwappd,                             /* 100 */
     (ReplySwapPtr) SGetKeyboardMappingReply,
     ReplyNotSwappd,
     (ReplySwapPtr) SGetKeyboardControlReply,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 105 */
+    ReplyNotSwappd,                             /* 105 */
     (ReplySwapPtr) SGetPointerControlReply,
     ReplyNotSwappd,
     (ReplySwapPtr) SGetScreenSaverReply,
     ReplyNotSwappd,
-    (ReplySwapPtr) SListHostsReply,     /* 110 */
+    (ReplySwapPtr) SListHostsReply,             /* 110 */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
-    ReplyNotSwappd,             /* 115 */
-    (ReplySwapPtr) SGenericReply,       /* SetPointerMapping */
+    ReplyNotSwappd,                             /* 115 */
+    (ReplySwapPtr) SGenericReply,               /* SetPointerMapping */
     (ReplySwapPtr) SGetPointerMappingReply,
-    (ReplySwapPtr) SGenericReply,       /* SetModifierMapping */
+    (ReplySwapPtr) SGenericReply,               /* SetModifierMapping */
     (ReplySwapPtr) SGetModifierMappingReply,    /* 119 */
-    ReplyNotSwappd,             /* 120 */
-    ReplyNotSwappd,             /* 121 */
-    ReplyNotSwappd,             /* 122 */
-    ReplyNotSwappd,             /* 123 */
-    ReplyNotSwappd,             /* 124 */
-    ReplyNotSwappd,             /* 125 */
-    ReplyNotSwappd,             /* 126 */
-    ReplyNotSwappd,             /* NoOperation */
+    ReplyNotSwappd,                             /* 120 */
+    ReplyNotSwappd,                             /* 121 */
+    ReplyNotSwappd,                             /* 122 */
+    ReplyNotSwappd,                             /* 123 */
+    ReplyNotSwappd,                             /* 124 */
+    ReplyNotSwappd,                             /* 125 */
+    ReplyNotSwappd,                             /* 126 */
+    ReplyNotSwappd,                             /* NoOperation */
     ReplyNotSwappd,
     ReplyNotSwappd,
     ReplyNotSwappd,
commit b6be94d89cab650ed73c5f3ca65f3a08bb79ebae
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Mon Jul 16 20:53:00 2012 -0700

    Fix up formatting of initializers for arrays of structs
    
    The indenter seems to have gotten confused by initializing arrays of
    structs with the struct defined inline - for predefined structs it did
    a better job, so match that.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    (cherry picked from commit 9f7ef7f7f0566f6319d8328ce0a1e6d0fa866720)

diff --git a/Xi/extinit.c b/Xi/extinit.c
index 2637f08..d6320b8 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -162,25 +162,25 @@ static struct dev_type {
     Atom type;
     const char *name;
 } dev_type[] = {
-    {
-    0, XI_KEYBOARD}, {
-    0, XI_MOUSE}, {
-    0, XI_TABLET}, {
-    0, XI_TOUCHSCREEN}, {
-    0, XI_TOUCHPAD}, {
-    0, XI_BARCODE}, {
-    0, XI_BUTTONBOX}, {
-    0, XI_KNOB_BOX}, {
-    0, XI_ONE_KNOB}, {
-    0, XI_NINE_KNOB}, {
-    0, XI_TRACKBALL}, {
-    0, XI_QUADRATURE}, {
-    0, XI_ID_MODULE}, {
-    0, XI_SPACEBALL}, {
-    0, XI_DATAGLOVE}, {
-    0, XI_EYETRACKER}, {
-    0, XI_CURSORKEYS}, {
-0, XI_FOOTMOUSE}};
+    {0, XI_KEYBOARD},
+    {0, XI_MOUSE},
+    {0, XI_TABLET},
+    {0, XI_TOUCHSCREEN},
+    {0, XI_TOUCHPAD},
+    {0, XI_BARCODE},
+    {0, XI_BUTTONBOX},
+    {0, XI_KNOB_BOX},
+    {0, XI_ONE_KNOB},
+    {0, XI_NINE_KNOB},
+    {0, XI_TRACKBALL},
+    {0, XI_QUADRATURE},
+    {0, XI_ID_MODULE},
+    {0, XI_SPACEBALL},
+    {0, XI_DATAGLOVE},
+    {0, XI_EYETRACKER},
+    {0, XI_CURSORKEYS},
+    {0, XI_FOOTMOUSE}
+};
 
 CARD8 event_base[numInputClasses];
 XExtEventInfo EventInfo[32];
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index e17efe4..e51aadb 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -49,132 +49,131 @@ static struct dev_properties {
     Atom type;
     const char *name;
 } dev_properties[] = {
-    {
-    0, XI_PROP_ENABLED}, {
-    0, XI_PROP_XTEST_DEVICE}, {
-    0, XATOM_FLOAT}, {
-    0, ACCEL_PROP_PROFILE_NUMBER}, {
-    0, ACCEL_PROP_CONSTANT_DECELERATION}, {
-    0, ACCEL_PROP_ADAPTIVE_DECELERATION}, {
-    0, ACCEL_PROP_VELOCITY_SCALING}, {
-    0, AXIS_LABEL_PROP}, {
-    0, AXIS_LABEL_PROP_REL_X}, {
-    0, AXIS_LABEL_PROP_REL_Y}, {
-    0, AXIS_LABEL_PROP_REL_Z}, {
-    0, AXIS_LABEL_PROP_REL_RX}, {
-    0, AXIS_LABEL_PROP_REL_RY}, {
-    0, AXIS_LABEL_PROP_REL_RZ}, {
-    0, AXIS_LABEL_PROP_REL_HWHEEL}, {
-    0, AXIS_LABEL_PROP_REL_DIAL}, {
-    0, AXIS_LABEL_PROP_REL_WHEEL}, {
-    0, AXIS_LABEL_PROP_REL_MISC}, {
-    0, AXIS_LABEL_PROP_REL_VSCROLL}, {
-    0, AXIS_LABEL_PROP_REL_HSCROLL}, {
-    0, AXIS_LABEL_PROP_ABS_X}, {
-    0, AXIS_LABEL_PROP_ABS_Y}, {
-    0, AXIS_LABEL_PROP_ABS_Z}, {
-    0, AXIS_LABEL_PROP_ABS_RX}, {
-    0, AXIS_LABEL_PROP_ABS_RY}, {
-    0, AXIS_LABEL_PROP_ABS_RZ}, {
-    0, AXIS_LABEL_PROP_ABS_THROTTLE}, {
-    0, AXIS_LABEL_PROP_ABS_RUDDER}, {
-    0, AXIS_LABEL_PROP_ABS_WHEEL}, {
-    0, AXIS_LABEL_PROP_ABS_GAS}, {
-    0, AXIS_LABEL_PROP_ABS_BRAKE}, {
-    0, AXIS_LABEL_PROP_ABS_HAT0X}, {
-    0, AXIS_LABEL_PROP_ABS_HAT0Y}, {
-    0, AXIS_LABEL_PROP_ABS_HAT1X}, {
-    0, AXIS_LABEL_PROP_ABS_HAT1Y}, {
-    0, AXIS_LABEL_PROP_ABS_HAT2X}, {
-    0, AXIS_LABEL_PROP_ABS_HAT2Y}, {
-    0, AXIS_LABEL_PROP_ABS_HAT3X}, {
-    0, AXIS_LABEL_PROP_ABS_HAT3Y}, {
-    0, AXIS_LABEL_PROP_ABS_PRESSURE}, {
-    0, AXIS_LABEL_PROP_ABS_DISTANCE}, {
-    0, AXIS_LABEL_PROP_ABS_TILT_X}, {
-    0, AXIS_LABEL_PROP_ABS_TILT_Y}, {
-    0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH}, {
-    0, AXIS_LABEL_PROP_ABS_VOLUME}, {
-    0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR}, {
-    0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR}, {
-    0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR}, {
-    0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR}, {
-    0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION}, {
-    0, AXIS_LABEL_PROP_ABS_MT_POSITION_X}, {
-    0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y}, {
-    0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE}, {
-    0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID}, {
-    0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID}, {
-    0, AXIS_LABEL_PROP_ABS_MT_PRESSURE}, {
-    0, AXIS_LABEL_PROP_ABS_MISC}, {
-    0, BTN_LABEL_PROP}, {
-    0, BTN_LABEL_PROP_BTN_UNKNOWN}, {
-    0, BTN_LABEL_PROP_BTN_WHEEL_UP}, {
-    0, BTN_LABEL_PROP_BTN_WHEEL_DOWN}, {
-    0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT}, {
-    0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT}, {
-    0, BTN_LABEL_PROP_BTN_0}, {
-    0, BTN_LABEL_PROP_BTN_1}, {
-    0, BTN_LABEL_PROP_BTN_2}, {
-    0, BTN_LABEL_PROP_BTN_3}, {
-    0, BTN_LABEL_PROP_BTN_4}, {
-    0, BTN_LABEL_PROP_BTN_5}, {
-    0, BTN_LABEL_PROP_BTN_6}, {
-    0, BTN_LABEL_PROP_BTN_7}, {
-    0, BTN_LABEL_PROP_BTN_8}, {
-    0, BTN_LABEL_PROP_BTN_9}, {
-    0, BTN_LABEL_PROP_BTN_LEFT}, {
-    0, BTN_LABEL_PROP_BTN_RIGHT}, {
-    0, BTN_LABEL_PROP_BTN_MIDDLE}, {
-    0, BTN_LABEL_PROP_BTN_SIDE}, {
-    0, BTN_LABEL_PROP_BTN_EXTRA}, {
-    0, BTN_LABEL_PROP_BTN_FORWARD}, {
-    0, BTN_LABEL_PROP_BTN_BACK}, {
-    0, BTN_LABEL_PROP_BTN_TASK}, {
-    0, BTN_LABEL_PROP_BTN_TRIGGER}, {
-    0, BTN_LABEL_PROP_BTN_THUMB}, {
-    0, BTN_LABEL_PROP_BTN_THUMB2}, {
-    0, BTN_LABEL_PROP_BTN_TOP}, {
-    0, BTN_LABEL_PROP_BTN_TOP2}, {
-    0, BTN_LABEL_PROP_BTN_PINKIE}, {
-    0, BTN_LABEL_PROP_BTN_BASE}, {
-    0, BTN_LABEL_PROP_BTN_BASE2}, {
-    0, BTN_LABEL_PROP_BTN_BASE3}, {
-    0, BTN_LABEL_PROP_BTN_BASE4}, {
-    0, BTN_LABEL_PROP_BTN_BASE5}, {
-    0, BTN_LABEL_PROP_BTN_BASE6}, {
-    0, BTN_LABEL_PROP_BTN_DEAD}, {
-    0, BTN_LABEL_PROP_BTN_A}, {
-    0, BTN_LABEL_PROP_BTN_B}, {
-    0, BTN_LABEL_PROP_BTN_C}, {
-    0, BTN_LABEL_PROP_BTN_X}, {
-    0, BTN_LABEL_PROP_BTN_Y}, {
-    0, BTN_LABEL_PROP_BTN_Z}, {
-    0, BTN_LABEL_PROP_BTN_TL}, {
-    0, BTN_LABEL_PROP_BTN_TR}, {
-    0, BTN_LABEL_PROP_BTN_TL2}, {
-    0, BTN_LABEL_PROP_BTN_TR2}, {
-    0, BTN_LABEL_PROP_BTN_SELECT}, {
-    0, BTN_LABEL_PROP_BTN_START}, {
-    0, BTN_LABEL_PROP_BTN_MODE}, {
-    0, BTN_LABEL_PROP_BTN_THUMBL}, {
-    0, BTN_LABEL_PROP_BTN_THUMBR}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_PEN}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_RUBBER}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_BRUSH}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_PENCIL}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_FINGER}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_MOUSE}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_LENS}, {
-    0, BTN_LABEL_PROP_BTN_TOUCH}, {
-    0, BTN_LABEL_PROP_BTN_STYLUS}, {
-    0, BTN_LABEL_PROP_BTN_STYLUS2}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP}, {
-    0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, {
-    0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, {
-    0, BTN_LABEL_PROP_BTN_GEAR_UP}, {
-    0, XI_PROP_TRANSFORM}
+    {0, XI_PROP_ENABLED},
+    {0, XI_PROP_XTEST_DEVICE},
+    {0, XATOM_FLOAT},
+    {0, ACCEL_PROP_PROFILE_NUMBER},
+    {0, ACCEL_PROP_CONSTANT_DECELERATION},
+    {0, ACCEL_PROP_ADAPTIVE_DECELERATION},
+    {0, ACCEL_PROP_VELOCITY_SCALING},
+    {0, AXIS_LABEL_PROP},
+    {0, AXIS_LABEL_PROP_REL_X},
+    {0, AXIS_LABEL_PROP_REL_Y},
+    {0, AXIS_LABEL_PROP_REL_Z},
+    {0, AXIS_LABEL_PROP_REL_RX},
+    {0, AXIS_LABEL_PROP_REL_RY},
+    {0, AXIS_LABEL_PROP_REL_RZ},
+    {0, AXIS_LABEL_PROP_REL_HWHEEL},
+    {0, AXIS_LABEL_PROP_REL_DIAL},
+    {0, AXIS_LABEL_PROP_REL_WHEEL},
+    {0, AXIS_LABEL_PROP_REL_MISC},
+    {0, AXIS_LABEL_PROP_REL_VSCROLL},
+    {0, AXIS_LABEL_PROP_REL_HSCROLL},
+    {0, AXIS_LABEL_PROP_ABS_X},
+    {0, AXIS_LABEL_PROP_ABS_Y},
+    {0, AXIS_LABEL_PROP_ABS_Z},
+    {0, AXIS_LABEL_PROP_ABS_RX},
+    {0, AXIS_LABEL_PROP_ABS_RY},
+    {0, AXIS_LABEL_PROP_ABS_RZ},
+    {0, AXIS_LABEL_PROP_ABS_THROTTLE},
+    {0, AXIS_LABEL_PROP_ABS_RUDDER},
+    {0, AXIS_LABEL_PROP_ABS_WHEEL},
+    {0, AXIS_LABEL_PROP_ABS_GAS},
+    {0, AXIS_LABEL_PROP_ABS_BRAKE},
+    {0, AXIS_LABEL_PROP_ABS_HAT0X},
+    {0, AXIS_LABEL_PROP_ABS_HAT0Y},
+    {0, AXIS_LABEL_PROP_ABS_HAT1X},
+    {0, AXIS_LABEL_PROP_ABS_HAT1Y},
+    {0, AXIS_LABEL_PROP_ABS_HAT2X},
+    {0, AXIS_LABEL_PROP_ABS_HAT2Y},
+    {0, AXIS_LABEL_PROP_ABS_HAT3X},
+    {0, AXIS_LABEL_PROP_ABS_HAT3Y},
+    {0, AXIS_LABEL_PROP_ABS_PRESSURE},
+    {0, AXIS_LABEL_PROP_ABS_DISTANCE},
+    {0, AXIS_LABEL_PROP_ABS_TILT_X},
+    {0, AXIS_LABEL_PROP_ABS_TILT_Y},
+    {0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH},
+    {0, AXIS_LABEL_PROP_ABS_VOLUME},
+    {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR},
+    {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR},
+    {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR},
+    {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR},
+    {0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION},
+    {0, AXIS_LABEL_PROP_ABS_MT_POSITION_X},
+    {0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y},
+    {0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE},
+    {0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID},
+    {0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID},
+    {0, AXIS_LABEL_PROP_ABS_MT_PRESSURE},
+    {0, AXIS_LABEL_PROP_ABS_MISC},
+    {0, BTN_LABEL_PROP},
+    {0, BTN_LABEL_PROP_BTN_UNKNOWN},
+    {0, BTN_LABEL_PROP_BTN_WHEEL_UP},
+    {0, BTN_LABEL_PROP_BTN_WHEEL_DOWN},
+    {0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT},
+    {0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT},
+    {0, BTN_LABEL_PROP_BTN_0},
+    {0, BTN_LABEL_PROP_BTN_1},
+    {0, BTN_LABEL_PROP_BTN_2},
+    {0, BTN_LABEL_PROP_BTN_3},
+    {0, BTN_LABEL_PROP_BTN_4},
+    {0, BTN_LABEL_PROP_BTN_5},
+    {0, BTN_LABEL_PROP_BTN_6},
+    {0, BTN_LABEL_PROP_BTN_7},
+    {0, BTN_LABEL_PROP_BTN_8},
+    {0, BTN_LABEL_PROP_BTN_9},
+    {0, BTN_LABEL_PROP_BTN_LEFT},
+    {0, BTN_LABEL_PROP_BTN_RIGHT},
+    {0, BTN_LABEL_PROP_BTN_MIDDLE},
+    {0, BTN_LABEL_PROP_BTN_SIDE},
+    {0, BTN_LABEL_PROP_BTN_EXTRA},
+    {0, BTN_LABEL_PROP_BTN_FORWARD},
+    {0, BTN_LABEL_PROP_BTN_BACK},
+    {0, BTN_LABEL_PROP_BTN_TASK},
+    {0, BTN_LABEL_PROP_BTN_TRIGGER},
+    {0, BTN_LABEL_PROP_BTN_THUMB},
+    {0, BTN_LABEL_PROP_BTN_THUMB2},
+    {0, BTN_LABEL_PROP_BTN_TOP},
+    {0, BTN_LABEL_PROP_BTN_TOP2},
+    {0, BTN_LABEL_PROP_BTN_PINKIE},
+    {0, BTN_LABEL_PROP_BTN_BASE},
+    {0, BTN_LABEL_PROP_BTN_BASE2},
+    {0, BTN_LABEL_PROP_BTN_BASE3},
+    {0, BTN_LABEL_PROP_BTN_BASE4},
+    {0, BTN_LABEL_PROP_BTN_BASE5},
+    {0, BTN_LABEL_PROP_BTN_BASE6},
+    {0, BTN_LABEL_PROP_BTN_DEAD},
+    {0, BTN_LABEL_PROP_BTN_A},
+    {0, BTN_LABEL_PROP_BTN_B},
+    {0, BTN_LABEL_PROP_BTN_C},
+    {0, BTN_LABEL_PROP_BTN_X},
+    {0, BTN_LABEL_PROP_BTN_Y},
+    {0, BTN_LABEL_PROP_BTN_Z},
+    {0, BTN_LABEL_PROP_BTN_TL},
+    {0, BTN_LABEL_PROP_BTN_TR},
+    {0, BTN_LABEL_PROP_BTN_TL2},
+    {0, BTN_LABEL_PROP_BTN_TR2},
+    {0, BTN_LABEL_PROP_BTN_SELECT},
+    {0, BTN_LABEL_PROP_BTN_START},
+    {0, BTN_LABEL_PROP_BTN_MODE},
+    {0, BTN_LABEL_PROP_BTN_THUMBL},
+    {0, BTN_LABEL_PROP_BTN_THUMBR},
+    {0, BTN_LABEL_PROP_BTN_TOOL_PEN},
+    {0, BTN_LABEL_PROP_BTN_TOOL_RUBBER},
+    {0, BTN_LABEL_PROP_BTN_TOOL_BRUSH},
+    {0, BTN_LABEL_PROP_BTN_TOOL_PENCIL},
+    {0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH},
+    {0, BTN_LABEL_PROP_BTN_TOOL_FINGER},
+    {0, BTN_LABEL_PROP_BTN_TOOL_MOUSE},
+    {0, BTN_LABEL_PROP_BTN_TOOL_LENS},
+    {0, BTN_LABEL_PROP_BTN_TOUCH},
+    {0, BTN_LABEL_PROP_BTN_STYLUS},
+    {0, BTN_LABEL_PROP_BTN_STYLUS2},
+    {0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP},
+    {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP},
+    {0, BTN_LABEL_PROP_BTN_GEAR_DOWN},
+    {0, BTN_LABEL_PROP_BTN_GEAR_UP},
+    {0, XI_PROP_TRANSFORM}
 };
 
 static long XIPropHandlerID = 1;
diff --git a/config/wscons.c b/config/wscons.c
index 7a5e8cc..fb114bd 100644
--- a/config/wscons.c
+++ b/config/wscons.c
@@ -53,8 +53,10 @@ struct nameint {
     int val;
     char *name;
 } kbdenc[] = {
-    KB_OVRENC, KB_ENCTAB, {
-0}};
+    KB_OVRENC,
+    KB_ENCTAB,
+    {0}
+};
 
 struct nameint kbdvar[] = {
     {KB_NODEAD | KB_SG, "de_nodeadkeys"},
diff --git a/dix/gc.c b/dix/gc.c
index 7be0502..42fca8a 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -419,11 +419,11 @@ static const struct {
     RESTYPE type;
     Mask access_mode;
 } xidfields[] = {
-    {
-    GCTile, RT_PIXMAP, DixReadAccess}, {
-    GCStipple, RT_PIXMAP, DixReadAccess}, {
-    GCFont, RT_FONT, DixUseAccess}, {
-GCClipMask, RT_PIXMAP, DixReadAccess},};
+    {GCTile, RT_PIXMAP, DixReadAccess},
+    {GCStipple, RT_PIXMAP, DixReadAccess},
+    {GCFont, RT_FONT, DixUseAccess},
+    {GCClipMask, RT_PIXMAP, DixReadAccess},
+};
 
 int
 ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32)
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index abc668e..33bf408 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -419,23 +419,22 @@ ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations)
     struct {
         int width, height;
     } sizes[] = {
-        {
-        1600, 1200}, {
-        1400, 1050}, {
-        1280, 960}, {
-        1280, 1024}, {
-        1152, 864}, {
-        1024, 768}, {
-        832, 624}, {
-        800, 600}, {
-        720, 400}, {
-        480, 640}, {
-        640, 480}, {
-        640, 400}, {
-        320, 240}, {
-        240, 320}, {
-        160, 160}, {
-        0, 0}
+        {1600, 1200},
+        {1400, 1050},
+        {1280, 960},
+        {1280, 1024},
+        {1152, 864},
+        {1024, 768},
+        {832, 624},
+        {800, 600},
+        {720, 400},
+        {480, 640},
+        {640, 480},
+        {640, 400},
+        {320, 240},
+        {240, 320},
+        {160, 160},
+        {0, 0}
     };
 
     EPHYR_LOG("mark");
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index f65ab96..716f18e 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -730,22 +730,22 @@ KdSetSubpixelOrder(ScreenPtr pScreen, Rotation randr)
         int subpixel_order;
         Rotation direction;
     } orders[] = {
-        {
-        SubPixelHorizontalRGB, RR_Rotate_0}, {
-        SubPixelHorizontalBGR, RR_Rotate_180}, {
-        SubPixelVerticalRGB, RR_Rotate_270}, {
-    SubPixelVerticalBGR, RR_Rotate_90},};
+        {SubPixelHorizontalRGB, RR_Rotate_0},
+        {SubPixelHorizontalBGR, RR_Rotate_180},
+        {SubPixelVerticalRGB, RR_Rotate_270},
+        {SubPixelVerticalBGR, RR_Rotate_90},
+    };
 
     static struct {
         int bit;
         int normal;
         int reflect;
     } reflects[] = {
-        {
-        RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR}, {
-        RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB}, {
-        RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR}, {
-    RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB},};
+        {RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR},
+        {RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB},
+        {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR},
+        {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB},
+    };
 
     /* map subpixel to direction */
     for (i = 0; i < 4; i++)
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 4836964..dc289c5 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -195,13 +195,12 @@ LoaderGetABIVersion(const char *abiclass)
         const char *name;
         int version;
     } classes[] = {
-        {
-        ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, {
-        ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, {
-        ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, {
-        ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, {
-        ABI_CLASS_FONT, LoaderVersionInfo.fontVersion}, {
-        NULL, 0}
+        {ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion},
+        {ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion},
+        {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion},
+        {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion},
+        {ABI_CLASS_FONT, LoaderVersionInfo.fontVersion},
+        {NULL, 0}
     };
     int i;
 
diff --git a/hw/xfree86/modes/xf86DisplayIDModes.c b/hw/xfree86/modes/xf86DisplayIDModes.c
index 781c806..bead126 100644
--- a/hw/xfree86/modes/xf86DisplayIDModes.c
+++ b/hw/xfree86/modes/xf86DisplayIDModes.c
@@ -184,105 +184,96 @@ static const struct did_dmt {
     short w, h, r, f;
 } did_dmt[] = {
     /* byte 3 */
-    {
-    640, 350, 85, 0}, {
-    640, 400, 85, 0}, {
-    720, 400, 85, 0}, {
-    640, 480, 60, 0}, {
-    640, 480, 72, 0}, {
-    640, 480, 75, 0}, {
-    640, 480, 85, 0}, {
-    800, 600, 56, 0},
+    {640, 350, 85, 0},
+    {640, 400, 85, 0},
+    {720, 400, 85, 0},
+    {640, 480, 60, 0},
+    {640, 480, 72, 0},
+    {640, 480, 75, 0},
+    {640, 480, 85, 0},
+    {800, 600, 56, 0},
         /* byte 4 */
-    {
-    800, 600, 60, 0}, {
-    800, 600, 72, 0}, {
-    800, 600, 75, 0}, {
-    800, 600, 85, 0}, {
-    800, 600, 120, RB}, {
-    848, 480, 60, 0}, {
-    1024, 768, 43, INT}, {
-    1024, 768, 60, 0},
+    {800, 600, 60, 0},
+    {800, 600, 72, 0},
+    {800, 600, 75, 0},
+    {800, 600, 85, 0},
+    {800, 600, 120, RB},
+    {848, 480, 60, 0},
+    {1024, 768, 43, INT},
+    {1024, 768, 60, 0},
         /* byte 5 */
-    {
-    1024, 768, 70, 0}, {
-    1024, 768, 75, 0}, {
-    1024, 768, 85, 0}, {
-    1024, 768, 120, RB}, {
-    1152, 864, 75, 0}, {
-    1280, 768, 60, RB}, {
-    1280, 768, 60, 0}, {
-    1280, 768, 75, 0},
+    {1024, 768, 70, 0},
+    {1024, 768, 75, 0},
+    {1024, 768, 85, 0},
+    {1024, 768, 120, RB},
+    {1152, 864, 75, 0},
+    {1280, 768, 60, RB},
+    {1280, 768, 60, 0},
+    {1280, 768, 75, 0},
         /* byte 6 */
-    {
-    1280, 768, 85, 0}, {
-    1280, 768, 120, RB}, {
-    1280, 800, 60, RB}, {
-    1280, 800, 60, 0}, {
-    1280, 800, 75, 0}, {
-    1280, 800, 85, 0}, {
-    1280, 800, 120, RB}, {
-    1280, 960, 60, 0},
+    {1280, 768, 85, 0},
+    {1280, 768, 120, RB},
+    {1280, 800, 60, RB},
+    {1280, 800, 60, 0},
+    {1280, 800, 75, 0},
+    {1280, 800, 85, 0},
+    {1280, 800, 120, RB},
+    {1280, 960, 60, 0},
         /* byte 7 */
-    {
-    1280, 960, 85, 0}, {
-    1280, 960, 120, RB}, {
-    1280, 1024, 60, 0}, {
-    1280, 1024, 75, 0}, {
-    1280, 1024, 85, 0}, {
-    1280, 1024, 120, RB}, {
-    1360, 768, 60, 0}, {
-    1360, 768, 120, RB},
+    {1280, 960, 85, 0},
+    {1280, 960, 120, RB},
+    {1280, 1024, 60, 0},
+    {1280, 1024, 75, 0},
+    {1280, 1024, 85, 0},
+    {1280, 1024, 120, RB},
+    {1360, 768, 60, 0},
+    {1360, 768, 120, RB},
         /* byte 8 */
-    {
-    1400, 1050, 60, RB}, {
-    1400, 1050, 60, 0}, {
-    1400, 1050, 75, 0}, {
-    1400, 1050, 85, 0}, {
-    1400, 1050, 120, RB}, {
-    1440, 900, 60, RB}, {
-    1440, 900, 60, 0}, {
-    1440, 900, 75, 0},
+    {1400, 1050, 60, RB},
+    {1400, 1050, 60, 0},
+    {1400, 1050, 75, 0},
+    {1400, 1050, 85, 0},
+    {1400, 1050, 120, RB},
+    {1440, 900, 60, RB},
+    {1440, 900, 60, 0},
+    {1440, 900, 75, 0},
         /* byte 9 */
-    {
-    1440, 900, 85, 0}, {
-    1440, 900, 120, RB}, {
-    1600, 1200, 60, 0}, {
-    1600, 1200, 65, 0}, {
-    1600, 1200, 70, 0}, {
-    1600, 1200, 75, 0}, {
-    1600, 1200, 85, 0}, {
-    1600, 1200, 120, RB},
+    {1440, 900, 85, 0},
+    {1440, 900, 120, RB},
+    {1600, 1200, 60, 0},
+    {1600, 1200, 65, 0},
+    {1600, 1200, 70, 0},
+    {1600, 1200, 75, 0},
+    {1600, 1200, 85, 0},
+    {1600, 1200, 120, RB},
         /* byte a */
-    {
-    1680, 1050, 60, RB}, {
-    1680, 1050, 60, 0}, {
-    1680, 1050, 75, 0}, {
-    1680, 1050, 85, 0}, {
-    1680, 1050, 120, RB}, {
-    1792, 1344, 60, 0}, {
-    1792, 1344, 75, 0}, {
-    1792, 1344, 120, RB},
+    {1680, 1050, 60, RB},
+    {1680, 1050, 60, 0},
+    {1680, 1050, 75, 0},
+    {1680, 1050, 85, 0},
+    {1680, 1050, 120, RB},
+    {1792, 1344, 60, 0},
+    {1792, 1344, 75, 0},
+    {1792, 1344, 120, RB},
         /* byte b */
-    {
-    1856, 1392, 60, 0}, {
-    1856, 1392, 75, 0}, {
-    1856, 1392, 120, RB}, {
-    1920, 1200, 60, RB}, {
-    1920, 1200, 60, 0}, {
-    1920, 1200, 75, 0}, {
-    1920, 1200, 85, 0}, {
-    1920, 1200, 120, RB},
+    {1856, 1392, 60, 0},
+    {1856, 1392, 75, 0},
+    {1856, 1392, 120, RB},
+    {1920, 1200, 60, RB},
+    {1920, 1200, 60, 0},
+    {1920, 1200, 75, 0},
+    {1920, 1200, 85, 0},
+    {1920, 1200, 120, RB},
         /* byte c */
-    {
-    1920, 1440, 60, 0}, {
-    1920, 1440, 75, 0}, {
-    1920, 1440, 120, RB}, {
-    2560, 1600, 60, RB}, {
-    2560, 1600, 60, 0}, {
-    2560, 1600, 75, 0}, {
-    2560, 1600, 85, 0}, {
-2560, 1600, 120, RB},};
+    {1920, 1440, 60, 0},
+    {1920, 1440, 75, 0},
+    {1920, 1440, 120, RB},
+    {2560, 1600, 60, RB},
+    {2560, 1600, 60, 0},
+    {2560, 1600, 75, 0},
+    {2560, 1600, 85, 0},
+    {2560, 1600, 120, RB},
+};
 
 static void
 didVesaTiming(int scrn, unsigned char *x, MonPtr mon)
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 258ada5..4ee862d 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -513,14 +513,14 @@ DDCModeDoInterlaceQuirks(DisplayModePtr mode)
     static const struct {
         int w, h;
     } cea_interlaced[] = {
-        {
-        1920, 1080}, {
-        720, 480}, {
-        1440, 480}, {
-        2880, 480}, {
-        720, 576}, {
-        1440, 576}, {
-    2880, 576},};
+        {1920, 1080},
+        {720, 480},
+        {1440, 480},
+        {2880, 480},
+        {720, 576},
+        {1440, 576},
+        {2880, 576},
+    };
     static const int n_modes =
         sizeof(cea_interlaced) / sizeof(cea_interlaced[0]);
     int i;
@@ -668,68 +668,62 @@ static const struct {
     short r;
     short rb;
 } EstIIIModes[] = {
-    /* byte 6 */
-    {
-    640, 350, 85, 0}, {
-    640, 400, 85, 0}, {
-    720, 400, 85, 0}, {
-    640, 480, 85, 0}, {
-    848, 480, 60, 0}, {
-    800, 600, 85, 0}, {
-    1024, 768, 85, 0}, {
-    1152, 864, 75, 0},
+        /* byte 6 */
+    {640, 350, 85, 0},
+    {640, 400, 85, 0},
+    {720, 400, 85, 0},
+    {640, 480, 85, 0},
+    {848, 480, 60, 0},
+    {800, 600, 85, 0},
+    {1024, 768, 85, 0},
+    {1152, 864, 75, 0},
         /* byte 7 */
-    {
-    1280, 768, 60, 1}, {
-    1280, 768, 60, 0}, {
-    1280, 768, 75, 0}, {
-    1280, 768, 85, 0}, {
-    1280, 960, 60, 0}, {
-    1280, 960, 85, 0}, {
-    1280, 1024, 60, 0}, {
-    1280, 1024, 85, 0},
+    {1280, 768, 60, 1},
+    {1280, 768, 60, 0},
+    {1280, 768, 75, 0},
+    {1280, 768, 85, 0},
+    {1280, 960, 60, 0},
+    {1280, 960, 85, 0},
+    {1280, 1024, 60, 0},
+    {1280, 1024, 85, 0},
         /* byte 8 */
-    {
-    1360, 768, 60, 0}, {
-    1440, 900, 60, 1}, {
-    1440, 900, 60, 0}, {
-    1440, 900, 75, 0}, {
-    1440, 900, 85, 0}, {
-    1400, 1050, 60, 1}, {
-    1400, 1050, 60, 0}, {
-    1400, 1050, 75, 0},
+    {1360, 768, 60, 0},
+    {1440, 900, 60, 1},
+    {1440, 900, 60, 0},
+    {1440, 900, 75, 0},
+    {1440, 900, 85, 0},
+    {1400, 1050, 60, 1},
+    {1400, 1050, 60, 0},
+    {1400, 1050, 75, 0},
         /* byte 9 */
-    {
-    1400, 1050, 85, 0}, {
-    1680, 1050, 60, 1}, {
-    1680, 1050, 60, 0}, {
-    1680, 1050, 75, 0}, {
-    1680, 1050, 85, 0}, {
-    1600, 1200, 60, 0}, {
-    1600, 1200, 65, 0}, {
-    1600, 1200, 70, 0},
+    {1400, 1050, 85, 0},
+    {1680, 1050, 60, 1},
+    {1680, 1050, 60, 0},
+    {1680, 1050, 75, 0},
+    {1680, 1050, 85, 0},
+    {1600, 1200, 60, 0},
+    {1600, 1200, 65, 0},
+    {1600, 1200, 70, 0},
         /* byte 10 */
-    {
-    1600, 1200, 75, 0}, {
-    1600, 1200, 85, 0}, {
-    1792, 1344, 60, 0}, {
-    1792, 1344, 85, 0}, {
-    1856, 1392, 60, 0}, {
-    1856, 1392, 75, 0}, {
-    1920, 1200, 60, 1}, {
-    1920, 1200, 60, 0},
+    {1600, 1200, 75, 0},
+    {1600, 1200, 85, 0},
+    {1792, 1344, 60, 0},
+    {1792, 1344, 85, 0},
+    {1856, 1392, 60, 0},
+    {1856, 1392, 75, 0},
+    {1920, 1200, 60, 1},
+    {1920, 1200, 60, 0},
         /* byte 11 */
-    {
-    1920, 1200, 75, 0}, {
-    1920, 1200, 85, 0}, {
-    1920, 1440, 60, 0}, {
-    1920, 1440, 75, 0},
+    {1920, 1200, 75, 0},
+    {1920, 1200, 85, 0},
+    {1920, 1440, 60, 0},
+    {1920, 1440, 75, 0},
         /* fill up last byte */
-    {
-    0,0,0,0}, {
-    0,0,0,0}, {
-    0,0,0,0}, {
-    0,0,0,0}, };
+    {0,0,0,0},
+    {0,0,0,0},
+    {0,0,0,0},
+    {0,0,0,0},
+};
 
 static DisplayModePtr
 DDCModesFromEstIII(unsigned char *est)
diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c
index a8a4164..b1938cf 100644
--- a/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -21,21 +21,19 @@ static struct {
     u_int apmBsd;
     pmEvent xf86;
 } bsdToXF86Array[] = {
-    {
-    APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
-    APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
-    APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
-    APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
-    APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
-    APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
-    APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
-    APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
-    APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
-    APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
-    APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+    {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+    {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+    {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+    {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+    {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+    {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+    {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+    {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+    {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+    {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+    {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
 #ifdef APM_CAPABILITY_CHANGE
-    {
-    APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+    {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
 #endif
 };
 
diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 10251f3..2294385 100644
--- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -54,21 +54,19 @@ static struct {
     u_int apmBsd;
     pmEvent xf86;
 } bsdToXF86Array[] = {
-    {
-    APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
-    APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
-    APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
-    APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
-    APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
-    APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
-    APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
-    APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
-    APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
-    APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
-    APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+    {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+    {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+    {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+    {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+    {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+    {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+    {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+    {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+    {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+    {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+    {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
 #ifdef APM_CAPABILITY_CHANGE
-    {
-    APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+    {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
 #endif
 };
 
diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c
index b75308a..8260007 100644
--- a/hw/xfree86/os-support/bus/Sbus.c
+++ b/hw/xfree86/os-support/bus/Sbus.c
@@ -403,16 +403,16 @@ sparcPromAssignNodes(void)
             int devId;
             char *prefix;
         } procFbPrefixes[] = {
-            {
-            SBUS_DEVICE_BW2, "BWtwo"}, {
-            SBUS_DEVICE_CG14, "CGfourteen"}, {
-            SBUS_DEVICE_CG6, "CGsix"}, {
-            SBUS_DEVICE_CG3, "CGthree"}, {
-            SBUS_DEVICE_FFB, "Creator"}, {
-            SBUS_DEVICE_FFB, "Elite 3D"}, {
-            SBUS_DEVICE_LEO, "Leo"}, {
-            SBUS_DEVICE_TCX, "TCX"}, {
-        0, NULL},};
+            {SBUS_DEVICE_BW2, "BWtwo"},
+            {SBUS_DEVICE_CG14, "CGfourteen"},
+            {SBUS_DEVICE_CG6, "CGsix"},
+            {SBUS_DEVICE_CG3, "CGthree"},
+            {SBUS_DEVICE_FFB, "Creator"},
+            {SBUS_DEVICE_FFB, "Elite 3D"},
+            {SBUS_DEVICE_LEO, "Leo"},
+            {SBUS_DEVICE_TCX, "TCX"},
+            {0, NULL},
+        };
 
         while (fscanf(f, "%d %63s\n", &fbNum, buffer) == 2) {
             for (i = 0; procFbPrefixes[i].devId; i++)
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index a37331e..3879340 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -42,26 +42,23 @@ static struct {
     apm_event_t apmLinux;
     pmEvent xf86;
 } LinuxToXF86[] = {
-    {
-    APM_SYS_STANDBY, XF86_APM_SYS_STANDBY}, {
-    APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND}, {
-    APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
-    APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME}, {
-    APM_LOW_BATTERY, XF86_APM_LOW_BATTERY}, {
-    APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
-    APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
-    APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND}, {
-    APM_USER_STANDBY, XF86_APM_USER_STANDBY}, {
-    APM_USER_SUSPEND, XF86_APM_USER_SUSPEND}, {
-    APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+    {APM_SYS_STANDBY, XF86_APM_SYS_STANDBY},
+    {APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND},
+    {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+    {APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME},
+    {APM_LOW_BATTERY, XF86_APM_LOW_BATTERY},
+    {APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+    {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+    {APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND},
+    {APM_USER_STANDBY, XF86_APM_USER_STANDBY},
+    {APM_USER_SUSPEND, XF86_APM_USER_SUSPEND},
+    {APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
 #if defined(APM_CAPABILITY_CHANGED)
-    {
-    APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED},
+    {APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED},
 #endif
 #if 0
-    {
-    APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED}, {
-    APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED}
+    {APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED},
+    {APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED}
 #endif
 };
 
diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c
index 4ff6464..b6a1432 100644
--- a/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/hw/xfree86/os-support/solaris/sun_apm.c
@@ -97,21 +97,19 @@ static struct {
     u_int apmBsd;
     pmEvent xf86;
 } sunToXF86Array[] = {
-    {
-    APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {
-    APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {
-    APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {
-    APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {
-    APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {
-    APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {
-    APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {
-    APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {
-    APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {
-    APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {
-    APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
+    {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY},
+    {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND},
+    {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME},
+    {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME},
+    {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY},
+    {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE},
+    {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME},
+    {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND},
+    {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY},
+    {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND},
+    {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME},
 #ifdef APM_CAPABILITY_CHANGE
-    {
-    APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
+    {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED},
 #endif
 };
 
commit afe8ef9043a0bc3b9322448c004b3f4ce203160a
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Jul 30 14:32:11 2012 -0400

    randr: Fix up yet another corner case in preferred mode selection
    
    Let's say - purely for the sake of argument, mind you - that you had a
    server GPU with anemic memory bandwidth, and you walked up to it and
    plugged in a monitor that was 1920x1080 because that's what happened to
    be on the crash cart.  Say the memory bandwidth is such that anything
    larger than 1280x1024 gets filtered away.  Now you're in trouble,
    because the established timings section includes a 720x400 mode because
    that's what DOS 80x25 is, and that happens to just about match the
    physical aspect ratio.
    
    Instead let's reuse the logic from the existing aspect-match path: pick
    the larger mode of either the physical aspect ratio or 4:3.
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit ff56f88616aa63797384c2c484b2bd0f194df96a)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6d5e92f..803de88 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2054,12 +2054,13 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
 
     /*
      * If there's no preferred mode, but only one monitor, pick the
-     * biggest mode for its aspect ratio, assuming one exists.
+     * biggest mode for its aspect ratio or 4:3, assuming one exists.
      */
     if (!ret)
         do {
             int i = 0;
             float aspect = 0.0;
+            DisplayModePtr a = NULL, b = NULL;
 
             /* count the number of enabled outputs */
             for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++);
@@ -2073,8 +2074,11 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
                 aspect = (float) config->output[p]->mm_width /
                     (float) config->output[p]->mm_height;
 
+            a = bestModeForAspect(config, enabled, 4.0/3.0);
             if (aspect)
-                preferred_match[p] = bestModeForAspect(config, enabled, aspect);
+                b = bestModeForAspect(config, enabled, aspect);
+
+            preferred_match[p] = biggestMode(a, b);
 
             if (preferred_match[p])
                 ret = TRUE;
commit af8ffefc070be8cb449812100b86501db17e8fd8
Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Jul 30 14:32:10 2012 -0400

    kinput: allocate enough space for null character.
    
    This code wasn't allocating enough space and was assigning the NULL
    one past the end.
    
    Pointed out by coverity.
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 531785dd746d64ef7f473a83ca73bb20e74b6fca)

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 692e511..eabee6d 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1055,7 +1055,7 @@ KdGetOptions(InputOption **options, char *string)
 
     if (strchr(string, '=')) {
         tam_key = (strchr(string, '=') - string);
-        key = strndup(string, tam_key);
+        key = strndup(string, tam_key + 1);
         if (!key)
             goto out;
 
commit 3a2b67577cdf0d4e3aae28883e65cf782673198a
Author: Vic Lee <llyzs at 163.com>
Date:   Mon Jul 30 14:32:09 2012 -0400

    ephyr: Resize screen automatically when parent window is resized
    
    Bugzilla: https://bugs.freedesktop.org/25804
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Vic Lee <llyzs at 163.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 8843aed82e7d69422e7763a35832a2be8f26723f)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 8eda539..abc668e 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -562,6 +562,8 @@ ephyrRandRSetConfig(ScreenPtr pScreen,
     if (wasEnabled)
         KdEnableScreen(pScreen);
 
+    RRScreenSizeNotify(pScreen);
+
     return TRUE;
 
  bail4:
@@ -594,6 +596,43 @@ ephyrRandRInit(ScreenPtr pScreen)
     pScrPriv->rrSetConfig = ephyrRandRSetConfig;
     return TRUE;
 }
+
+static Bool
+ephyrResizeScreen (ScreenPtr           pScreen,
+                  int                  newwidth,
+                  int                  newheight)
+{
+    KdScreenPriv(pScreen);
+    KdScreenInfo *screen = pScreenPriv->screen;
+    RRScreenSize size = {0};
+    Bool ret;
+    int t;
+
+    if (screen->randr & (RR_Rotate_90|RR_Rotate_270)) {
+        t = newwidth;
+        newwidth = newheight;
+        newheight = t;
+    }
+
+    if (newwidth == screen->width && newheight == screen->height) {
+        return FALSE;
+    }
+
+    size.width = newwidth;
+    size.height = newheight;
+
+    ret = ephyrRandRSetConfig (pScreen, screen->randr, 0, &size);
+    if (ret) {
+        RROutputPtr output;
+
+        output = RRFirstOutput(pScreen);
+        if (!output)
+            return FALSE;
+        RROutputSetModes(output, NULL, 0, 0);
+    }
+
+    return ret;
+}
 #endif
 
 Bool
@@ -963,6 +1002,14 @@ ephyrPoll(void)
             break;
 #endif                          /* XF86DRI */
 
+#ifdef RANDR
+        case EPHYR_EV_CONFIGURE:
+            ephyrResizeScreen(screenInfo.screens[ev.data.configure.screen],
+                              ev.data.configure.width,
+                              ev.data.configure.height);
+            break;
+#endif /* RANDR */
+
         default:
             break;
         }
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index e13910b..02729d6 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -348,7 +348,8 @@ hostx_init(void)
         | PointerMotionMask
         | KeyPressMask
         | KeyReleaseMask
-        | ExposureMask;
+        | ExposureMask
+        | StructureNotifyMask;
 
     EPHYR_DBG("mark");
 
@@ -696,12 +697,14 @@ hostx_screen_init(EphyrScreenInfo screen,
     XResizeWindow(HostX.dpy, host_screen->win, width, height);
 
     /* Ask the WM to keep our size static */
-    size_hints = XAllocSizeHints();
-    size_hints->max_width = size_hints->min_width = width;
-    size_hints->max_height = size_hints->min_height = height;
-    size_hints->flags = PMinSize | PMaxSize;
-    XSetWMNormalHints(HostX.dpy, host_screen->win, size_hints);
-    XFree(size_hints);
+    if (host_screen->win_pre_existing == None) {
+        size_hints = XAllocSizeHints();
+        size_hints->max_width = size_hints->min_width = width;
+        size_hints->max_height = size_hints->min_height = height;
+        size_hints->flags = PMinSize | PMaxSize;
+        XSetWMNormalHints(HostX.dpy, host_screen->win, size_hints);
+        XFree(size_hints);
+    }
 
     XMapWindow(HostX.dpy, host_screen->win);
 
@@ -1004,6 +1007,22 @@ hostx_get_event(EphyrHostXEvent * ev)
             ev->data.key_up.scancode = xev.xkey.keycode;
             return 1;
 
+        case ConfigureNotify:
+        {
+            struct EphyrHostScreen *host_screen =
+                host_screen_from_window(xev.xconfigure.window);
+
+            if (host_screen && host_screen->win_pre_existing != None) {
+                ev->type = EPHYR_EV_CONFIGURE;
+                ev->data.configure.width = xev.xconfigure.width;
+                ev->data.configure.height = xev.xconfigure.height;
+                ev->data.configure.window = xev.xconfigure.window;
+                ev->data.configure.screen = host_screen->mynum;
+                return 1;
+            }
+
+            return 0;
+        }
         default:
             break;
 
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index d621711..31c4053 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -47,7 +47,8 @@ typedef enum EphyrHostXEventType {
     EPHYR_EV_MOUSE_RELEASE,
     EPHYR_EV_KEY_PRESS,
     EPHYR_EV_KEY_RELEASE,
-    EPHYR_EV_EXPOSE
+    EPHYR_EV_EXPOSE,
+    EPHYR_EV_CONFIGURE,
 } EphyrHostXEventType;
 
 /* I can't believe it's not a KeySymsRec. */
@@ -89,6 +90,13 @@ struct EphyrHostXEvent {
             int window;
         } expose;
 
+        struct configure {
+            int width;
+            int height;
+            int screen;
+            int window;
+        } configure;
+
     } data;
 
     int key_state;
commit 7749c58134022bc6718150c3bb81f18b07687674
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Jul 30 14:32:08 2012 -0400

    ephyr: Fix up some bizarre formatting
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit b46bbafae6d0a8b3f2f7853d5c1475fc223b1ed6)

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 6988f16..e13910b 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -345,7 +345,10 @@ hostx_init(void)
     attr.event_mask =
         ButtonPressMask
         | ButtonReleaseMask
-        | PointerMotionMask | KeyPressMask | KeyReleaseMask | ExposureMask;
+        | PointerMotionMask
+        | KeyPressMask
+        | KeyReleaseMask
+        | ExposureMask;
 
     EPHYR_DBG("mark");
 


More information about the xorg-commit mailing list