Commit ab3a815a authored by Daniel Stone's avatar Daniel Stone Committed by Keith Packard

Indentation: Change '& stuff' to '&stuff'

If the typedef wasn't perfect, indent would get confused and change:
    foo = (SomePointlessTypedef *) &stuff[1];
to:
    foo = (SomePointlessTypedef *) & stuff[1];

Fix this up with a really naïve sed script, plus some hand-editing to
change some false positives in XKB back.
Signed-off-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
parent 58b1f739
......@@ -1349,7 +1349,7 @@ PanoramiXPolyPoint(ClientPtr client)
int y_off = screenInfo.screens[j]->y;
if (x_off || y_off) {
xPoint *pnts = (xPoint *) & stuff[1];
xPoint *pnts = (xPoint *) &stuff[1];
int i =
(stuff->coordMode == CoordModePrevious) ? 1 : npoint;
......@@ -1414,7 +1414,7 @@ PanoramiXPolyLine(ClientPtr client)
int y_off = screenInfo.screens[j]->y;
if (x_off || y_off) {
xPoint *pnts = (xPoint *) & stuff[1];
xPoint *pnts = (xPoint *) &stuff[1];
int i =
(stuff->coordMode == CoordModePrevious) ? 1 : npoint;
......@@ -1483,7 +1483,7 @@ PanoramiXPolySegment(ClientPtr client)
int y_off = screenInfo.screens[j]->y;
if (x_off || y_off) {
xSegment *segs = (xSegment *) & stuff[1];
xSegment *segs = (xSegment *) &stuff[1];
for (i = nsegs; i--; segs++) {
segs->x1 -= x_off;
......@@ -1618,7 +1618,7 @@ PanoramiXPolyArc(ClientPtr client)
int y_off = screenInfo.screens[j]->y;
if (x_off || y_off) {
xArc *arcs = (xArc *) & stuff[1];
xArc *arcs = (xArc *) &stuff[1];
for (i = narcs; i--; arcs++) {
arcs->x -= x_off;
......@@ -1681,7 +1681,7 @@ PanoramiXFillPoly(ClientPtr client)
int y_off = screenInfo.screens[j]->y;
if (x_off || y_off) {
DDXPointPtr pnts = (DDXPointPtr) & stuff[1];
DDXPointPtr pnts = (DDXPointPtr) &stuff[1];
int i = (stuff->coordMode == CoordModePrevious) ? 1 : count;
while (i--) {
......@@ -1816,7 +1816,7 @@ PanoramiXPolyFillArc(ClientPtr client)
int y_off = screenInfo.screens[j]->y;
if (x_off || y_off) {
xArc *arcs = (xArc *) & stuff[1];
xArc *arcs = (xArc *) &stuff[1];
for (i = narcs; i--; arcs++) {
arcs->x -= x_off;
......
......@@ -1557,7 +1557,7 @@ ProcSyncAwait(ClientPtr client)
/* don't need to do any more memory allocation for this request! */
pProtocolWaitConds = (xSyncWaitCondition *) & stuff[1];
pProtocolWaitConds = (xSyncWaitCondition *) &stuff[1];
pAwait = &(pAwaitUnion + 1)->await; /* skip over header */
for (i = 0; i < items; i++, pProtocolWaitConds++, pAwait++) {
......
......@@ -80,7 +80,7 @@ SProcXChangeDeviceControl(ClientPtr client)
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
swaps(&stuff->control);
ctl = (xDeviceCtl *) & stuff[1];
ctl = (xDeviceCtl *) &stuff[1];
swaps(&ctl->control);
swaps(&ctl->length);
switch (stuff->control) {
......@@ -130,7 +130,7 @@ ProcXChangeDeviceControl(ClientPtr client)
switch (stuff->control) {
case DEVICE_RESOLUTION:
r = (xDeviceResolutionCtl *) & stuff[1];
r = (xDeviceResolutionCtl *) &stuff[1];
if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) ||
(len !=
bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) {
......@@ -183,7 +183,7 @@ ProcXChangeDeviceControl(ClientPtr client)
ret = BadMatch;
break;
case DEVICE_ENABLE:
e = (xDeviceEnableCtl *) & stuff[1];
e = (xDeviceEnableCtl *) &stuff[1];
status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
......
......@@ -449,22 +449,22 @@ ProcXChangeFeedbackControl(ClientPtr client)
return BadLength;
for (k = dev->kbdfeed; k; k = k->next)
if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id)
if (k->ctrl.id == ((xKbdFeedbackCtl *) &stuff[1])->id)
return ChangeKbdFeedback(client, dev, stuff->mask, k,
(xKbdFeedbackCtl *) & stuff[1]);
(xKbdFeedbackCtl *) &stuff[1]);
break;
case PtrFeedbackClass:
if (len != bytes_to_int32(sizeof(xPtrFeedbackCtl)))
return BadLength;
for (p = dev->ptrfeed; p; p = p->next)
if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id)
if (p->ctrl.id == ((xPtrFeedbackCtl *) &stuff[1])->id)
return ChangePtrFeedback(client, dev, stuff->mask, p,
(xPtrFeedbackCtl *) & stuff[1]);
(xPtrFeedbackCtl *) &stuff[1]);
break;
case StringFeedbackClass:
{
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]);
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]);
if (client->swapped) {
swaps(&f->num_keysyms);
......@@ -474,9 +474,9 @@ ProcXChangeFeedbackControl(ClientPtr client)
return BadLength;
for (s = dev->stringfeed; s; s = s->next)
if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id)
if (s->ctrl.id == ((xStringFeedbackCtl *) &stuff[1])->id)
return ChangeStringFeedback(client, dev, stuff->mask, s,
(xStringFeedbackCtl *) & stuff[1]);
(xStringFeedbackCtl *) &stuff[1]);
break;
}
case IntegerFeedbackClass:
......@@ -484,7 +484,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
return BadLength;
for (i = dev->intfeed; i; i = i->next)
if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id)
if (i->ctrl.id == ((xIntegerFeedbackCtl *) &stuff[1])->id)
return ChangeIntegerFeedback(client, dev, stuff->mask, i,
(xIntegerFeedbackCtl *) &
stuff[1]);
......@@ -494,18 +494,18 @@ ProcXChangeFeedbackControl(ClientPtr client)
return BadLength;
for (l = dev->leds; l; l = l->next)
if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id)
if (l->ctrl.id == ((xLedFeedbackCtl *) &stuff[1])->id)
return ChangeLedFeedback(client, dev, stuff->mask, l,
(xLedFeedbackCtl *) & stuff[1]);
(xLedFeedbackCtl *) &stuff[1]);
break;
case BellFeedbackClass:
if (len != bytes_to_int32(sizeof(xBellFeedbackCtl)))
return BadLength;
for (b = dev->bell; b; b = b->next)
if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id)
if (b->ctrl.id == ((xBellFeedbackCtl *) &stuff[1])->id)
return ChangeBellFeedback(client, dev, stuff->mask, b,
(xBellFeedbackCtl *) & stuff[1]);
(xBellFeedbackCtl *) &stuff[1]);
break;
default:
break;
......
......@@ -110,7 +110,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
stuff->firstKeyCode, stuff->keyCodes,
stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]);
stuff->keySymsPerKeyCode, (KeySym *) &stuff[1]);
return ret;
}
......@@ -116,7 +116,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
return BadMode;
}
if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1],
stuff->count, tmp, NULL,
X_ChangeDeviceDontPropagateList)) != Success)
return rc;
......
......@@ -122,7 +122,7 @@ ProcXGrabDevice(ClientPtr client)
if (rc != Success)
return rc;
if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1],
stuff->event_count, tmp, dev,
X_GrabDevice)) != Success)
return rc;
......
......@@ -158,11 +158,11 @@ ProcXSelectExtensionEvent(ClientPtr client)
if (ret != Success)
return ret;
if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1],
if (HandleDevicePresenceMask(client, pWin, (XEventClass *) &stuff[1],
&stuff->count) != Success)
return BadAlloc;
if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1],
if ((ret = CreateMaskFromList(client, (XEventClass *) &stuff[1],
stuff->count, tmp, NULL,
X_SelectExtensionEvent)) != Success)
return ret;
......
......@@ -417,7 +417,7 @@ ProcXIChangeHierarchy(ClientPtr client)
if (!stuff->num_changes)
return rc;
any = (xXIAnyHierarchyChangeInfo *) & stuff[1];
any = (xXIAnyHierarchyChangeInfo *) &stuff[1];
while (stuff->num_changes--) {
SWAPIF(swaps(&any->type));
SWAPIF(swaps(&any->length));
......
......@@ -63,7 +63,7 @@ SProcXIPassiveGrabDevice(ClientPtr client)
swaps(&stuff->mask_len);
swaps(&stuff->num_modifiers);
mods = (xXIModifierInfo *) & stuff[1];
mods = (xXIModifierInfo *) &stuff[1];
for (i = 0; i < stuff->num_modifiers; i++, mods++) {
swapl(&mods->base_mods);
......@@ -177,7 +177,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
if (ret != Success)
goto out;
modifiers = (uint32_t *) & stuff[1] + stuff->mask_len;
modifiers = (uint32_t *) &stuff[1] + stuff->mask_len;
modifiers_failed =
calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo));
if (!modifiers_failed) {
......@@ -257,7 +257,7 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
swapl(&stuff->detail);
swaps(&stuff->num_modifiers);
modifiers = (uint32_t *) & stuff[1];
modifiers = (uint32_t *) &stuff[1];
for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
swapl(modifiers);
......@@ -334,7 +334,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
tempGrab->detail.exact = stuff->detail;
tempGrab->detail.pMask = NULL;
modifiers = (uint32_t *) & stuff[1];
modifiers = (uint32_t *) &stuff[1];
for (i = 0; i < stuff->num_modifiers; i++, modifiers++) {
tempGrab->modifiersDetail.exact = *modifiers;
......
......@@ -71,7 +71,7 @@ SProcXISelectEvents(ClientPtr client)
swapl(&stuff->win);
swaps(&stuff->num_masks);
evmask = (xXIEventMask *) & stuff[1];
evmask = (xXIEventMask *) &stuff[1];
for (i = 0; i < stuff->num_masks; i++) {
swaps(&evmask->deviceid);
swaps(&evmask->mask_len);
......@@ -106,7 +106,7 @@ ProcXISelectEvents(ClientPtr client)
len = sz_xXISelectEventsReq;
/* check request validity */
evmask = (xXIEventMask *) & stuff[1];
evmask = (xXIEventMask *) &stuff[1];
num_masks = stuff->num_masks;
while (num_masks--) {
len += sizeof(xXIEventMask) + evmask->mask_len * 4;
......@@ -205,7 +205,7 @@ ProcXISelectEvents(ClientPtr client)
return BadLength;
/* Set masks on window */
evmask = (xXIEventMask *) & stuff[1];
evmask = (xXIEventMask *) &stuff[1];
num_masks = stuff->num_masks;
while (num_masks--) {
if (evmask->deviceid == XIAllDevices ||
......
......@@ -467,7 +467,7 @@ ProcDbeSwapBuffers(ClientPtr client)
return BadAlloc;
/* Get to the swap info appended to the end of the request. */
dbeSwapInfo = (xDbeSwapInfo *) & stuff[1];
dbeSwapInfo = (xDbeSwapInfo *) &stuff[1];
/* Allocate array to record swap information. */
swapInfo = (DbeSwapInfoPtr) malloc(nStuff * sizeof(DbeSwapInfoRec));
......
......@@ -1718,7 +1718,7 @@ ProcChangeKeyboardMapping(ClientPtr client)
keysyms.minKeyCode = stuff->firstKeyCode;
keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1;
keysyms.mapWidth = stuff->keySymsPerKeyCode;
keysyms.map = (KeySym *) & stuff[1];
keysyms.map = (KeySym *) &stuff[1];
rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess);
if (rc != Success)
......@@ -1763,7 +1763,7 @@ ProcSetPointerMapping(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.success = MappingSuccess;
map = (BYTE *) & stuff[1];
map = (BYTE *) &stuff[1];
/* So we're bounded here by the number of core buttons. This check
* probably wants disabling through XFixes. */
......
......@@ -1696,7 +1696,7 @@ ProcPolyPoint(ClientPtr client)
npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq));
if (npoint)
(*pGC->ops->PolyPoint) (pDraw, pGC, stuff->coordMode, npoint,
(xPoint *) & stuff[1]);
(xPoint *) &stuff[1]);
return Success;
}
......@@ -1719,7 +1719,7 @@ ProcPolyLine(ClientPtr client)
npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq));
if (npoint > 1)
(*pGC->ops->Polylines) (pDraw, pGC, stuff->coordMode, npoint,
(DDXPointPtr) & stuff[1]);
(DDXPointPtr) &stuff[1]);
return Success;
}
......@@ -1739,7 +1739,7 @@ ProcPolySegment(ClientPtr client)
return BadLength;
nsegs >>= 3;
if (nsegs)
(*pGC->ops->PolySegment) (pDraw, pGC, nsegs, (xSegment *) & stuff[1]);
(*pGC->ops->PolySegment) (pDraw, pGC, nsegs, (xSegment *) &stuff[1]);
return Success;
}
......@@ -1780,7 +1780,7 @@ ProcPolyArc(ClientPtr client)
return BadLength;
narcs /= sizeof(xArc);
if (narcs)
(*pGC->ops->PolyArc) (pDraw, pGC, narcs, (xArc *) & stuff[1]);
(*pGC->ops->PolyArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]);
return Success;
}
......@@ -1810,7 +1810,7 @@ ProcFillPoly(ClientPtr client)
if (things)
(*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape,
stuff->coordMode, things,
(DDXPointPtr) & stuff[1]);
(DDXPointPtr) &stuff[1]);
return Success;
}
......@@ -1852,7 +1852,7 @@ ProcPolyFillArc(ClientPtr client)
return BadLength;
narcs /= sizeof(xArc);
if (narcs)
(*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) & stuff[1]);
(*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]);
return Success;
}
......@@ -2680,7 +2680,7 @@ ProcFreeColors(ClientPtr client)
return BadAccess;
count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq));
return FreeColors(pcmp, client->index, count,
(Pixel *) & stuff[1], (Pixel) stuff->planeMask);
(Pixel *) &stuff[1], (Pixel) stuff->planeMask);
}
else {
client->errorValue = stuff->cmap;
......@@ -2706,7 +2706,7 @@ ProcStoreColors(ClientPtr client)
if (count % sizeof(xColorItem))
return BadLength;
count /= sizeof(xColorItem);
return StoreColors(pcmp, count, (xColorItem *) & stuff[1], client);
return StoreColors(pcmp, count, (xColorItem *) &stuff[1], client);
}
else {
client->errorValue = stuff->cmap;
......@@ -2764,7 +2764,7 @@ ProcQueryColors(ClientPtr client)
if (!prgbs && count)
return BadAlloc;
if ((rc =
QueryColors(pcmp, count, (Pixel *) & stuff[1], prgbs, client))) {
QueryColors(pcmp, count, (Pixel *) &stuff[1], prgbs, client))) {
free(prgbs);
return rc;
}
......
......@@ -807,7 +807,7 @@ SProcStoreColors(ClientPtr client)
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
swapl(&stuff->cmap);
pItem = (xColorItem *) & stuff[1];
pItem = (xColorItem *) &stuff[1];
for (count = LengthRestB(stuff) / sizeof(xColorItem); --count >= 0;)
SwapColorItem(pItem++);
return ((*ProcVector[X_StoreColors]) (client));
......
......@@ -757,7 +757,7 @@ ProcRenderTrapezoids(ClientPtr client)
if (ntraps)
CompositeTrapezoids(stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
ntraps, (xTrapezoid *) & stuff[1]);
ntraps, (xTrapezoid *) &stuff[1]);
return Success;
}
......@@ -796,7 +796,7 @@ ProcRenderTriangles(ClientPtr client)
if (ntris)
CompositeTriangles(stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
ntris, (xTriangle *) & stuff[1]);
ntris, (xTriangle *) &stuff[1]);
return Success;
}
......@@ -835,7 +835,7 @@ ProcRenderTriStrip(ClientPtr client)
if (npoints >= 3)
CompositeTriStrip(stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
npoints, (xPointFixed *) & stuff[1]);
npoints, (xPointFixed *) &stuff[1]);
return Success;
}
......@@ -874,7 +874,7 @@ ProcRenderTriFan(ClientPtr client)
if (npoints >= 3)
CompositeTriFan(stuff->op, pSrc, pDst, pFormat,
stuff->xSrc, stuff->ySrc,
npoints, (xPointFixed *) & stuff[1]);
npoints, (xPointFixed *) &stuff[1]);
return Success;
}
......@@ -1652,7 +1652,7 @@ ProcRenderSetPictureTransform(ClientPtr client)
REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
return SetPictureTransform(pPicture, (PictTransform *) & stuff->transform);
return SetPictureTransform(pPicture, (PictTransform *) &stuff->transform);
}
static int
......@@ -1836,7 +1836,7 @@ ProcRenderAddTraps(ClientPtr client)
ntraps /= sizeof(xTrap);
if (ntraps)
AddTraps(pPicture,
stuff->xOff, stuff->yOff, ntraps, (xTrap *) & stuff[1]);
stuff->xOff, stuff->yOff, ntraps, (xTrap *) &stuff[1]);
return Success;
}
......
......@@ -3230,7 +3230,7 @@ ProcXkbSetIndicatorMap(ClientPtr client)
return BadLength;
}
from = (xkbIndicatorMapWireDesc *) & stuff[1];
from = (xkbIndicatorMapWireDesc *) &stuff[1];
for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) {
if (stuff->which & bit) {
if (client->swapped) {
......@@ -3243,7 +3243,7 @@ ProcXkbSetIndicatorMap(ClientPtr client)
}
}
from = (xkbIndicatorMapWireDesc *) & stuff[1];
from = (xkbIndicatorMapWireDesc *) &stuff[1];
rc = _XkbSetIndicatorMap(client, dev, stuff->which, from);
if (rc != Success)
return rc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment