From dbbbf14a83a08025e38c2d6eeaef057b648e4441 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 4 Dec 2025 16:11:24 +0100 Subject: [PATCH] Xi: consistenly name reply structs "reply" instead of "rep" Preparation for future use of generic reply assembly macros. Signed-off-by: Enrico Weigelt, metux IT consult --- Xi/getfctl.c | 18 +++++++-------- Xi/getfocus.c | 16 ++++++------- Xi/getkmap.c | 4 ++-- Xi/getprop.c | 10 ++++----- Xi/getselev.c | 16 ++++++------- Xi/getvers.c | 8 +++---- Xi/grabdev.c | 6 ++--- Xi/gtmotion.c | 10 ++++----- Xi/setbmap.c | 4 ++-- Xi/setdval.c | 12 +++++----- Xi/setmmap.c | 4 ++-- Xi/setmode.c | 18 +++++++-------- Xi/xigetclientpointer.c | 6 ++--- Xi/xigrabdev.c | 4 ++-- Xi/xipassivegrab.c | 8 +++---- Xi/xiproperty.c | 40 ++++++++++++++++----------------- Xi/xiquerydevice.c | 12 +++++----- Xi/xiquerypointer.c | 50 ++++++++++++++++++++--------------------- Xi/xiqueryversion.c | 8 +++---- Xi/xiselectev.c | 8 +++---- Xi/xisetdevfocus.c | 14 ++++++------ 21 files changed, 138 insertions(+), 138 deletions(-) diff --git a/Xi/getfctl.c b/Xi/getfctl.c index f9ea253e6d..d2902946e1 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -263,33 +263,33 @@ ProcXGetFeedbackControl(ClientPtr client) if (rc != Success) return rc; - xGetFeedbackControlReply rep = { + xGetFeedbackControlReply reply = { .RepType = X_GetFeedbackControl, }; for (k = dev->kbdfeed; k; k = k->next) { - rep.num_feedbacks++; + reply.num_feedbacks++; total_length += sizeof(xKbdFeedbackState); } for (p = dev->ptrfeed; p; p = p->next) { - rep.num_feedbacks++; + reply.num_feedbacks++; total_length += sizeof(xPtrFeedbackState); } for (s = dev->stringfeed; s; s = s->next) { - rep.num_feedbacks++; + reply.num_feedbacks++; total_length += sizeof(xStringFeedbackState) + (s->ctrl.num_symbols_supported * sizeof(KeySym)); } for (i = dev->intfeed; i; i = i->next) { - rep.num_feedbacks++; + reply.num_feedbacks++; total_length += sizeof(xIntegerFeedbackState); } for (l = dev->leds; l; l = l->next) { - rep.num_feedbacks++; + reply.num_feedbacks++; total_length += sizeof(xLedFeedbackState); } for (b = dev->bell; b; b = b->next) { - rep.num_feedbacks++; + reply.num_feedbacks++; total_length += sizeof(xBellFeedbackState); } @@ -313,7 +313,7 @@ ProcXGetFeedbackControl(ClientPtr client) CopySwapBellFeedback(client, b, &buf); if (client->swapped) { - swaps(&rep.num_feedbacks); + swaps(&reply.num_feedbacks); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } diff --git a/Xi/getfocus.c b/Xi/getfocus.c index d6ed22a2aa..041730727b 100644 --- a/Xi/getfocus.c +++ b/Xi/getfocus.c @@ -87,25 +87,25 @@ ProcXGetDeviceFocus(ClientPtr client) focus = dev->focus; - xGetDeviceFocusReply rep = { + xGetDeviceFocusReply reply = { .RepType = X_GetDeviceFocus, .time = focus->time.milliseconds, .revertTo = focus->revert, }; if (focus->win == NoneWin) - rep.focus = None; + reply.focus = None; else if (focus->win == PointerRootWin) - rep.focus = PointerRoot; + reply.focus = PointerRoot; else if (focus->win == FollowKeyboardWin) - rep.focus = FollowKeyboard; + reply.focus = FollowKeyboard; else - rep.focus = focus->win->drawable.id; + reply.focus = focus->win->drawable.id; if (client->swapped) { - swapl(&rep.focus); - swapl(&rep.time); + swapl(&reply.focus); + swapl(&reply.time); } - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/getkmap.c b/Xi/getkmap.c index 04d8cbeafd..32cfd9c316 100644 --- a/Xi/getkmap.c +++ b/Xi/getkmap.c @@ -117,10 +117,10 @@ ProcXGetDeviceKeyMapping(ClientPtr client) free(syms->map); free(syms); - xGetDeviceKeyMappingReply rep = { + xGetDeviceKeyMappingReply reply = { .RepType = X_GetDeviceKeyMapping, .keySymsPerKeyCode = mapWidth, }; - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } diff --git a/Xi/getprop.c b/Xi/getprop.c index 75eee3773e..1fadf0fa96 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -90,7 +90,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) WindowPtr pWin; OtherInputMasks *others; - xGetDeviceDontPropagateListReply rep = { + xGetDeviceDontPropagateListReply reply = { .RepType = X_GetDeviceDontPropagateList, }; @@ -104,8 +104,8 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) for (i = 0; i < EMASKSIZE; i++) ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); if (count) { - rep.count = count; - buf = calloc(rep.count, sizeof(XEventClass)); + reply.count = count; + buf = calloc(count, sizeof(XEventClass)); if (!buf) return BadAlloc; @@ -120,10 +120,10 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) } if (client->swapped) { - swaps(&rep.count); + swaps(&reply.count); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } /*********************************************************************** diff --git a/Xi/getselev.c b/Xi/getselev.c index 8fa0c8b8ac..6a9a034417 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -91,7 +91,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) OtherInputMasks *pOthers; InputClientsPtr others; - xGetSelectedExtensionEventsReply rep = { + xGetSelectedExtensionEventsReply reply = { .RepType = X_GetSelectedExtensionEvents, }; @@ -105,24 +105,24 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) for (others = pOthers->inputClients; others; others = others->next) for (i = 0; i < EMASKSIZE; i++) ClassFromMask(NULL, others->mask[i], i, - &rep.all_clients_count, COUNT); + &reply.all_clients_count, COUNT); for (others = pOthers->inputClients; others; others = others->next) if (SameClient(others, client)) { for (i = 0; i < EMASKSIZE; i++) ClassFromMask(NULL, others->mask[i], i, - &rep.this_client_count, COUNT); + &reply.this_client_count, COUNT); break; } - size_t total_count = rep.all_clients_count + rep.this_client_count; + size_t total_count = reply.all_clients_count + reply.this_client_count; size_t total_length = total_count * sizeof(XEventClass); buf = calloc(1, total_length); if (!buf) /* rpcbuf still empty */ return BadAlloc; tclient = buf; - aclient = buf + rep.this_client_count; + aclient = buf + reply.this_client_count; if (others) for (i = 0; i < EMASKSIZE; i++) tclient = @@ -138,9 +138,9 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) } if (client->swapped) { - swaps(&rep.this_client_count); - swaps(&rep.all_clients_count); + swaps(&reply.this_client_count); + swaps(&reply.all_clients_count); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } diff --git a/Xi/getvers.c b/Xi/getvers.c index 8bb153d7fa..95210fddb3 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -83,7 +83,7 @@ ProcXGetExtensionVersion(ClientPtr client) stuff->nbytes)) return BadLength; - xGetExtensionVersionReply rep = { + xGetExtensionVersionReply reply = { .RepType = X_GetExtensionVersion, .major_version = XIVersion.major_version, .minor_version = XIVersion.minor_version, @@ -91,9 +91,9 @@ ProcXGetExtensionVersion(ClientPtr client) }; if (client->swapped) { - swaps(&rep.major_version); - swaps(&rep.minor_version); + swaps(&reply.major_version); + swaps(&reply.minor_version); } - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 0e56d1d0b7..ba2e134989 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -97,7 +97,7 @@ ProcXGrabDevice(ClientPtr client) GrabMask mask; struct tmask tmp[EMASKSIZE]; - xGrabDeviceReply rep = { + xGrabDeviceReply reply = { .RepType = X_GrabDevice, }; @@ -115,12 +115,12 @@ ProcXGrabDevice(ClientPtr client) rc = GrabDevice(client, dev, stuff->other_devices_mode, stuff->this_device_mode, stuff->grabWindow, stuff->ownerEvents, stuff->time, - &mask, XI, None, None, &rep.status); + &mask, XI, None, None, &reply.status); if (rc != Success) return rc; - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } /*********************************************************************** diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index f876ae4008..116c17e3fe 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -92,7 +92,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) if (dev->valuator->motionHintWindow) MaybeStopDeviceHint(dev, client); - xGetDeviceMotionEventsReply rep = { + xGetDeviceMotionEventsReply reply = { .RepType = X_GetDeviceMotionEvents, .axes = v->numAxes, .mode = Absolute /* XXX we don't do relative at the moment */ @@ -110,17 +110,17 @@ ProcXGetDeviceMotionEvents(ClientPtr client) if (v->numMotionEvents) { const int size = sizeof(Time) + (v->numAxes * sizeof(INT32)); INT32 *coords = NULL; - rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords, /* XXX */ + reply.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords, /* XXX */ start.milliseconds, stop.milliseconds, (ScreenPtr) NULL, FALSE); - x_rpcbuf_write_INT32s(&rpcbuf, coords, bytes_to_int32(rep.nEvents * size)); + x_rpcbuf_write_INT32s(&rpcbuf, coords, bytes_to_int32(reply.nEvents * size)); free(coords); } } if (client->swapped) { - swapl(&rep.nEvents); + swapl(&reply.nEvents); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } diff --git a/Xi/setbmap.c b/Xi/setbmap.c index 8d9c3cb011..05b275db91 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -95,10 +95,10 @@ ProcXSetDeviceButtonMapping(ClientPtr client) if ((ret != Success) && (ret != MappingBusy)) return ret; - xSetDeviceButtonMappingReply rep = { + xSetDeviceButtonMappingReply reply = { .RepType = X_SetDeviceButtonMapping, .status = (ret == Success ? MappingSuccess : MappingBusy), }; - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/setdval.c b/Xi/setdval.c index 97f57604d9..2787a88ed8 100644 --- a/Xi/setdval.c +++ b/Xi/setdval.c @@ -79,7 +79,7 @@ ProcXSetDeviceValuators(ClientPtr client) REQUEST(xSetDeviceValuatorsReq); REQUEST_AT_LEAST_SIZE(xSetDeviceValuatorsReq); - xSetDeviceValuatorsReply rep = { + xSetDeviceValuatorsReply reply = { .RepType = X_SetDeviceValuators, .status = Success }; @@ -101,14 +101,14 @@ ProcXSetDeviceValuators(ClientPtr client) return BadValue; if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) - rep.status = AlreadyGrabbed; + reply.status = AlreadyGrabbed; else - rep.status = SetDeviceValuators(client, dev, (int *) &stuff[1], + reply.status = SetDeviceValuators(client, dev, (int *) &stuff[1], stuff->first_valuator, stuff->num_valuators); - if (rep.status != Success && rep.status != AlreadyGrabbed) - return rep.status; + if (reply.status != Success && reply.status != AlreadyGrabbed) + return reply.status; - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/setmmap.c b/Xi/setmmap.c index 917e901741..1d6e0dab73 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -95,10 +95,10 @@ ProcXSetDeviceModifierMapping(ClientPtr client) if (ret != MappingSuccess && ret != MappingBusy && ret != MappingFailed) return ret; - xSetDeviceModifierMappingReply rep = { + xSetDeviceModifierMappingReply reply = { .RepType = X_SetDeviceModifierMapping, .success = ret, }; - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/setmode.c b/Xi/setmode.c index 78142efe58..6f097a01e5 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -80,7 +80,7 @@ ProcXSetDeviceMode(ClientPtr client) REQUEST(xSetDeviceModeReq); REQUEST_SIZE_MATCH(xSetDeviceModeReq); - xSetDeviceModeReply rep = { + xSetDeviceModeReply reply = { .RepType = X_SetDeviceMode, }; @@ -94,23 +94,23 @@ ProcXSetDeviceMode(ClientPtr client) return BadMatch; if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) - rep.status = AlreadyGrabbed; + reply.status = AlreadyGrabbed; else - rep.status = SetDeviceMode(client, dev, stuff->mode); + reply.status = SetDeviceMode(client, dev, stuff->mode); - if (rep.status == Success) + if (reply.status == Success) valuator_set_mode(dev, VALUATOR_MODE_ALL_AXES, stuff->mode); - else if (rep.status != AlreadyGrabbed) { - switch (rep.status) { + else if (reply.status != AlreadyGrabbed) { + switch (reply.status) { case BadMatch: case BadImplementation: case BadAlloc: break; default: - rep.status = BadMode; + reply.status = BadMode; } - return rep.status; + return reply.status; } - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c index 393c0efdac..01265ae65e 100644 --- a/Xi/xigetclientpointer.c +++ b/Xi/xigetclientpointer.c @@ -67,15 +67,15 @@ ProcXIGetClientPointer(ClientPtr client) else winclient = client; - xXIGetClientPointerReply rep = { + xXIGetClientPointerReply reply = { .RepType = X_XIGetClientPointer, .set = (winclient->clientPtr != NULL), .deviceid = (winclient->clientPtr) ? winclient->clientPtr->id : 0 }; if (client->swapped) { - swaps(&rep.deviceid); + swaps(&reply.deviceid); } - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c index aa83236693..4fdabeccd3 100644 --- a/Xi/xigrabdev.c +++ b/Xi/xigrabdev.c @@ -114,12 +114,12 @@ ProcXIGrabDevice(ClientPtr client) if (ret != Success) return ret; - xXIGrabDeviceReply rep = { + xXIGrabDeviceReply reply = { .RepType = X_XIGrabDevice, .status = status }; - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } int diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c index 782f44cacf..b726bdf7b3 100644 --- a/Xi/xipassivegrab.c +++ b/Xi/xipassivegrab.c @@ -74,7 +74,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) } DeviceIntPtr dev, mod_dev; - xXIPassiveGrabDeviceReply rep = { + xXIPassiveGrabDeviceReply reply = { .repType = X_Reply, .RepType = X_XIPassiveGrabDevice, .sequenceNumber = client->sequence, @@ -226,17 +226,17 @@ ProcXIPassiveGrabDevice(ClientPtr client) x_rpcbuf_write_CARD8(&rpcbuf, 0); /* pad0 */ x_rpcbuf_write_CARD16(&rpcbuf, 0); /* pad1 */ - rep.num_modifiers++; + reply.num_modifiers++; } } xi2mask_free(&mask.xi2mask); if (client->swapped) { - swaps(&rep.num_modifiers); + swaps(&reply.num_modifiers); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); out: xi2mask_free(&mask.xi2mask); diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index bb092b2248..3eea4a2591 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -852,16 +852,16 @@ ProcXListDeviceProperties(ClientPtr client) if (rc != Success) return rc; - xListDevicePropertiesReply rep = { + xListDevicePropertiesReply reply = { .RepType = X_ListDeviceProperties, .nAtoms = natoms }; if (client->swapped) { - swaps(&rep.nAtoms); + swaps(&reply.nAtoms); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } int @@ -963,7 +963,7 @@ ProcXGetDeviceProperty(ClientPtr client) if (rc != Success) return rc; - xGetDevicePropertyReply rep = { + xGetDevicePropertyReply reply = { .RepType = X_GetDeviceProperty, .propertyType = type, .bytesAfter = bytes_after, @@ -972,13 +972,13 @@ ProcXGetDeviceProperty(ClientPtr client) .deviceid = dev->id }; - if (stuff->delete && (rep.bytesAfter == 0)) + if (stuff->delete && (reply.bytesAfter == 0)) send_property_event(dev, stuff->property, XIPropertyDeleted); if (client->swapped) { - swapl(&rep.propertyType); - swapl(&rep.bytesAfter); - swapl(&rep.nItems); + swapl(&reply.propertyType); + swapl(&reply.bytesAfter); + swapl(&reply.nItems); } x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE }; @@ -998,7 +998,7 @@ ProcXGetDeviceProperty(ClientPtr client) } /* delete the Property */ - if (stuff->delete && (rep.bytesAfter == 0)) { + if (stuff->delete && (reply.bytesAfter == 0)) { XIPropertyPtr prop, *prev; for (prev = &dev->properties.properties; (prop = *prev); @@ -1011,7 +1011,7 @@ ProcXGetDeviceProperty(ClientPtr client) } } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } /* XI2 Request/reply handling */ @@ -1031,16 +1031,16 @@ ProcXIListProperties(ClientPtr client) if (rc != Success) return rc; - xXIListPropertiesReply rep = { + xXIListPropertiesReply reply = { .RepType = X_XIListProperties, .num_properties = natoms }; if (client->swapped) { - swaps(&rep.num_properties); + swaps(&reply.num_properties); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } int @@ -1146,7 +1146,7 @@ ProcXIGetProperty(ClientPtr client) if (rc != Success) return rc; - xXIGetPropertyReply rep = { + xXIGetPropertyReply reply = { .RepType = X_XIGetProperty, .type = type, .bytes_after = bytes_after, @@ -1154,13 +1154,13 @@ ProcXIGetProperty(ClientPtr client) .format = format }; - if (length && stuff->delete && (rep.bytes_after == 0)) + if (length && stuff->delete && (reply.bytes_after == 0)) send_property_event(dev, stuff->property, XIPropertyDeleted); if (client->swapped) { - swapl(&rep.type); - swapl(&rep.bytes_after); - swapl(&rep.num_items); + swapl(&reply.type); + swapl(&reply.bytes_after); + swapl(&reply.num_items); } x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE }; @@ -1179,12 +1179,12 @@ ProcXIGetProperty(ClientPtr client) } } - rc = X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + rc = X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); if (rc != Success) return rc; /* delete the Property */ - if (stuff->delete && (rep.bytes_after == 0)) { + if (stuff->delete && (reply.bytes_after == 0)) { XIPropertyPtr prop, *prev; for (prev = &dev->properties.properties; (prop = *prev); diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c index 1293c753fa..c36062a211 100644 --- a/Xi/xiquerydevice.c +++ b/Xi/xiquerydevice.c @@ -108,7 +108,7 @@ ProcXIQueryDevice(ClientPtr client) return BadAlloc; } - xXIQueryDeviceReply rep = { + xXIQueryDeviceReply reply = { .RepType = X_XIQueryDevice, }; @@ -117,7 +117,7 @@ ProcXIQueryDevice(ClientPtr client) if (client->swapped) SwapDeviceInfo(dev, (xXIDeviceInfo *) info); info += len; - rep.num_devices = 1; + reply.num_devices = 1; } else { i = 0; @@ -127,7 +127,7 @@ ProcXIQueryDevice(ClientPtr client) if (client->swapped) SwapDeviceInfo(dev, (xXIDeviceInfo *) info); info += len; - rep.num_devices++; + reply.num_devices++; } } @@ -137,7 +137,7 @@ ProcXIQueryDevice(ClientPtr client) if (client->swapped) SwapDeviceInfo(dev, (xXIDeviceInfo *) info); info += len; - rep.num_devices++; + reply.num_devices++; } } } @@ -145,10 +145,10 @@ ProcXIQueryDevice(ClientPtr client) free(skip); if (client->swapped) { - swaps(&rep.num_devices); + swaps(&reply.num_devices); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } /** diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c index f84b82265d..17d5fc05ad 100644 --- a/Xi/xiquerypointer.c +++ b/Xi/xiquerypointer.c @@ -118,7 +118,7 @@ ProcXIQueryPointer(ClientPtr client) pSprite = pDev->spriteInfo->sprite; - xXIQueryPointerReply rep = { + xXIQueryPointerReply reply = { .RepType = X_XIQueryPointer, .root = (InputDevCurrentRootWindow(pDev))->drawable.id, .root_x = double_to_fp1616(pSprite->hot.x), @@ -127,13 +127,13 @@ ProcXIQueryPointer(ClientPtr client) if (kbd) { state = &kbd->key->xkbInfo->state; - rep.mods.base_mods = state->base_mods; - rep.mods.latched_mods = state->latched_mods; - rep.mods.locked_mods = state->locked_mods; + reply.mods.base_mods = state->base_mods; + reply.mods.latched_mods = state->latched_mods; + reply.mods.locked_mods = state->locked_mods; - rep.group.base_group = state->base_group; - rep.group.latched_group = state->latched_group; - rep.group.locked_group = state->locked_group; + reply.group.base_group = state->base_group; + reply.group.latched_group = state->latched_group; + reply.group.locked_group = state->locked_group; } x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE }; @@ -142,7 +142,7 @@ ProcXIQueryPointer(ClientPtr client) int i; const int buttons_size = bits_to_bytes(256); /* button map up to 255 */ - rep.buttons_len = bytes_to_int32(buttons_size); + reply.buttons_len = bytes_to_int32(buttons_size); char *buttons = x_rpcbuf_reserve(&rpcbuf, buttons_size); if (!buttons) return BadAlloc; @@ -156,12 +156,12 @@ ProcXIQueryPointer(ClientPtr client) } if (pSprite->hot.pScreen == pWin->drawable.pScreen) { - rep.same_screen = xTrue; - rep.win_x = double_to_fp1616(pSprite->hot.x - pWin->drawable.x); - rep.win_y = double_to_fp1616(pSprite->hot.y - pWin->drawable.y); + reply.same_screen = xTrue; + reply.win_x = double_to_fp1616(pSprite->hot.x - pWin->drawable.x); + reply.win_y = double_to_fp1616(pSprite->hot.y - pWin->drawable.y); for (t = pSprite->win; t; t = t->parent) if (t->parent == pWin) { - rep.child = t->drawable.id; + reply.child = t->drawable.id; break; } } @@ -169,24 +169,24 @@ ProcXIQueryPointer(ClientPtr client) #ifdef XINERAMA if (!noPanoramiXExtension) { ScreenPtr masterScreen = dixGetMasterScreen(); - rep.root_x += double_to_fp1616(masterScreen->x); - rep.root_y += double_to_fp1616(masterScreen->y); - if (stuff->win == rep.root) { - rep.win_x += double_to_fp1616(masterScreen->x); - rep.win_y += double_to_fp1616(masterScreen->y); + reply.root_x += double_to_fp1616(masterScreen->x); + reply.root_y += double_to_fp1616(masterScreen->y); + if (stuff->win == reply.root) { + reply.win_x += double_to_fp1616(masterScreen->x); + reply.win_y += double_to_fp1616(masterScreen->y); } } #endif /* XINERAMA */ if (client->swapped) { - swapl(&rep.root); - swapl(&rep.child); - swapl(&rep.root_x); - swapl(&rep.root_y); - swapl(&rep.win_x); - swapl(&rep.win_y); - swaps(&rep.buttons_len); + swapl(&reply.root); + swapl(&reply.child); + swapl(&reply.root_x); + swapl(&reply.root_y); + swapl(&reply.win_x); + swapl(&reply.win_y); + swaps(&reply.buttons_len); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c index c3ded6b144..99a2d26f9e 100644 --- a/Xi/xiqueryversion.c +++ b/Xi/xiqueryversion.c @@ -118,16 +118,16 @@ ProcXIQueryVersion(ClientPtr client) pXIClient->minor_version = minor; } - xXIQueryVersionReply rep = { + xXIQueryVersionReply reply = { .RepType = X_XIQueryVersion, .major_version = major, .minor_version = minor }; if (client->swapped) { - swaps(&rep.major_version); - swaps(&rep.minor_version); + swaps(&reply.major_version); + swaps(&reply.minor_version); } - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); } diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 9f40e9d5e0..081d53ae5c 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -337,7 +337,7 @@ ProcXIGetSelectedEvents(ClientPtr client) if (rc != Success) return rc; - xXIGetSelectedEventsReply rep = { + xXIGetSelectedEventsReply reply = { .RepType = X_XIGetSelectedEvents, }; @@ -381,7 +381,7 @@ ProcXIGetSelectedEvents(ClientPtr client) CARD8 zero[8] = { 0 }; x_rpcbuf_write_CARD8s(&rpcbuf, zero, (mask_len*4) - (j+1)); - rep.num_masks++; + reply.num_masks++; /* found out the mask size and written it, so break out here */ break; @@ -392,8 +392,8 @@ ProcXIGetSelectedEvents(ClientPtr client) finish: ; if (client->swapped) { - swaps(&rep.num_masks); + swaps(&reply.num_masks); } - return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf); + return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); } diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c index 51698eb8cc..2d9fabbc64 100644 --- a/Xi/xisetdevfocus.c +++ b/Xi/xisetdevfocus.c @@ -84,22 +84,22 @@ ProcXIGetFocus(ClientPtr client) if (!dev->focus) return BadDevice; - xXIGetFocusReply rep = { + xXIGetFocusReply reply = { .RepType = X_XIGetFocus, }; if (dev->focus->win == NoneWin) - rep.focus = None; + reply.focus = None; else if (dev->focus->win == PointerRootWin) - rep.focus = PointerRoot; + reply.focus = PointerRoot; else if (dev->focus->win == FollowKeyboardWin) - rep.focus = FollowKeyboard; + reply.focus = FollowKeyboard; else - rep.focus = dev->focus->win->drawable.id; + reply.focus = dev->focus->win->drawable.id; if (client->swapped) { - swapl(&rep.focus); + swapl(&reply.focus); } - return X_SEND_REPLY_SIMPLE(client, rep); + return X_SEND_REPLY_SIMPLE(client, reply); }