diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2012-11-05 23:50:58 -0600 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2012-12-05 18:09:48 -0600 |
commit | ea1d76d1b68c7cbcedcaa1f967c5027e0cc1c7a2 (patch) | |
tree | 1884a50874290647041b4d045cfb9eb1e4d8aee7 /xkb | |
parent | b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 (diff) |
Fix formatting of address operators
The formatter confused address operators preceded by casts with
bitwise-and expressions, placing spaces on either side of both.
That syntax isn't used by ordinary address operators, however,
so fix them for consistency.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkb.c | 36 | ||||
-rw-r--r-- | xkb/xkbout.c | 2 |
2 files changed, 19 insertions, 19 deletions
@@ -1650,8 +1650,8 @@ CheckKeyTypes(ClientPtr client, xkbKTSetMapEntryWireDesc *mapWire; xkbModsWireDesc *preWire; - mapWire = (xkbKTSetMapEntryWireDesc *) & wire[1]; - preWire = (xkbModsWireDesc *) & mapWire[wire->nMapEntries]; + mapWire = (xkbKTSetMapEntryWireDesc *) &wire[1]; + preWire = (xkbModsWireDesc *) &mapWire[wire->nMapEntries]; for (n = 0; n < wire->nMapEntries; n++) { if (client->swapped) { swaps(&mapWire[n].virtualMods); @@ -1761,8 +1761,8 @@ CheckKeySyms(ClientPtr client, *errorRtrn = _XkbErrCode3(0x17, i + req->firstKeySym, wire->nSyms); return 0; } - pSyms = (KeySym *) & wire[1]; - wire = (xkbSymMapWireDesc *) & pSyms[wire->nSyms]; + pSyms = (KeySym *) &wire[1]; + wire = (xkbSymMapWireDesc *) &pSyms[wire->nSyms]; } map = &xkb->map->key_sym_map[i]; @@ -2039,7 +2039,7 @@ SetKeyTypes(XkbDescPtr xkb, unsigned tmp; mapWire = (xkbKTSetMapEntryWireDesc *) map; - preWire = (xkbModsWireDesc *) & mapWire[wire->nMapEntries]; + preWire = (xkbModsWireDesc *) &mapWire[wire->nMapEntries]; for (n = 0; n < wire->nMapEntries; n++) { pOld->map[n].active = 1; pOld->map[n].mods.mask = mapWire[n].realMods; @@ -2098,7 +2098,7 @@ SetKeySyms(ClientPtr client, oldMap = &xkb->map->key_sym_map[req->firstKeySym]; for (i = 0; i < req->nKeySyms; i++, oldMap++) { - pSyms = (KeySym *) & wire[1]; + pSyms = (KeySym *) &wire[1]; if (wire->nSyms > 0) { newSyms = XkbResizeKeySyms(xkb, i + req->firstKeySym, wire->nSyms); for (s = 0; s < wire->nSyms; s++) { @@ -2116,7 +2116,7 @@ SetKeySyms(ClientPtr client, oldMap->kt_index[3] = wire->ktIndex[3]; oldMap->group_info = wire->groupInfo; oldMap->width = wire->width; - wire = (xkbSymMapWireDesc *) & pSyms[wire->nSyms]; + wire = (xkbSymMapWireDesc *) &pSyms[wire->nSyms]; } first = req->firstKeySym; last = first + req->nKeySyms - 1; @@ -2408,7 +2408,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, } if ((req->present & XkbKeyTypesMask) && - (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) & values, + (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values, &nTypes, mapWidths))) { client->errorValue = nTypes; return BadValue; @@ -2433,7 +2433,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, if ((req->present & XkbKeySymsMask) && (!CheckKeySyms(client, xkb, req, nTypes, mapWidths, symsPerKey, - (xkbSymMapWireDesc **) & values, &error))) { + (xkbSymMapWireDesc **) &values, &error))) { client->errorValue = error; return BadValue; } @@ -2447,7 +2447,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, if ((req->present & XkbKeyBehaviorsMask) && (!CheckKeyBehaviors - (xkb, req, (xkbBehaviorWireDesc **) & values, &error))) { + (xkb, req, (xkbBehaviorWireDesc **) &values, &error))) { client->errorValue = error; return BadValue; } @@ -2469,7 +2469,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, } if ((req->present & XkbVirtualModMapMask) && (!CheckVirtualModMap - (xkb, req, (xkbVModMapWireDesc **) & values, &error))) { + (xkb, req, (xkbVModMapWireDesc **) &values, &error))) { client->errorValue = error; return BadValue; } @@ -5097,7 +5097,7 @@ _CheckSetOverlay(char **wire_inout, } CHK_ATOM_ONLY(olWire->name); ol = XkbAddGeomOverlay(section, olWire->name, olWire->nRows); - rWire = (xkbOverlayRowWireDesc *) & olWire[1]; + rWire = (xkbOverlayRowWireDesc *) &olWire[1]; for (r = 0; r < olWire->nRows; r++) { register int k; xkbOverlayKeyWireDesc *kWire; @@ -5109,7 +5109,7 @@ _CheckSetOverlay(char **wire_inout, return BadMatch; } row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys); - kWire = (xkbOverlayKeyWireDesc *) & rWire[1]; + kWire = (xkbOverlayKeyWireDesc *) &rWire[1]; for (k = 0; k < rWire->nKeys; k++, kWire++) { if (XkbAddGeomOverlayKey(ol, row, (char *) kWire->over, @@ -5163,7 +5163,7 @@ _CheckSetSections(XkbGeometryPtr geom, section->width = sWire->width; section->height = sWire->height; section->angle = sWire->angle; - rWire = (xkbRowWireDesc *) & sWire[1]; + rWire = (xkbRowWireDesc *) &sWire[1]; for (r = 0; r < sWire->nRows; r++) { register int k; XkbRowPtr row; @@ -5179,7 +5179,7 @@ _CheckSetSections(XkbGeometryPtr geom, row->top = rWire->top; row->left = rWire->left; row->vertical = rWire->vertical; - kWire = (xkbKeyWireDesc *) & rWire[1]; + kWire = (xkbKeyWireDesc *) &rWire[1]; for (k = 0; k < rWire->nKeys; k++) { XkbKeyPtr key; @@ -5201,7 +5201,7 @@ _CheckSetSections(XkbGeometryPtr geom, return BadMatch; } } - rWire = (xkbRowWireDesc *) & kWire[rWire->nKeys]; + rWire = (xkbRowWireDesc *) &kWire[rWire->nKeys]; } wire = (char *) rWire; if (sWire->nDoodads > 0) { @@ -5265,7 +5265,7 @@ _CheckSetShapes(XkbGeometryPtr geom, if (!ol) return BadAlloc; ol->corner_radius = olWire->cornerRadius; - ptWire = (xkbPointWireDesc *) & olWire[1]; + ptWire = (xkbPointWireDesc *) &olWire[1]; for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++) { pt->x = ptWire[p].x; pt->y = ptWire[p].y; @@ -6348,7 +6348,7 @@ ProcXkbGetDeviceInfo(ClientPtr client) xkbActionWireDesc *awire; sz = rep.nBtnsRtrn * SIZEOF(xkbActionWireDesc); - awire = (xkbActionWireDesc *) & dev->button->xkb_acts[rep.firstBtnRtrn]; + awire = (xkbActionWireDesc *) &dev->button->xkb_acts[rep.firstBtnRtrn]; WriteToClient(client, sz, awire); length -= sz; } diff --git a/xkb/xkbout.c b/xkb/xkbout.c index cd1ae0b4e..7bb6ceafe 100644 --- a/xkb/xkbout.c +++ b/xkb/xkbout.c @@ -522,7 +522,7 @@ XkbWriteXKBSymbols(FILE * file, for (s = 0; s < XkbKeyGroupWidth(xkb, i, g); s++) { if (s != 0) fprintf(file, ", "); - WriteXKBAction(file, xkb, (XkbAnyAction *) & acts[s]); + WriteXKBAction(file, xkb, (XkbAnyAction *) &acts[s]); } fprintf(file, " ]"); acts += XkbKeyGroupsWidth(xkb, i); |