aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-29 01:36:31 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-04 16:36:59 +0200
commit286d83260216e8e53db701eed5c785aae1c716bf (patch)
tree3b27e6dd17a7d4d00266819545ae97defa11cf81 /nx-X11/programs/Xserver/Xi
parentd1d859dfdec4b4665e06401383ab71926e4e731c (diff)
downloadnx-libs-286d83260216e8e53db701eed5c785aae1c716bf.tar.gz
nx-libs-286d83260216e8e53db701eed5c785aae1c716bf.tar.bz2
nx-libs-286d83260216e8e53db701eed5c785aae1c716bf.zip
Use internal temp variable for swap macros. Make swaps/swapl type safe (introducing wrong_size check at build time).
While working on this changeset, various spots got discovered where swapl or swaps was used on a wrong type, where byte swapping calls had been forgotten or done on the wrong variable. This backport at least includes changes from the following X.org commits, listed in non-chronological order: commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 Author: Matt Turner <mattst88@gmail.com> Date: Thu Aug 4 15:35:41 2011 -0400 Use internal temp variable for swap macros Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01 Author: Matt Turner <mattst88@gmail.com> Date: Wed Sep 21 17:14:16 2011 -0400 Use correct swap{l,s} (or none at all for CARD8) Swapping the wrong size was never caught because swap{l,s} are macros. It's clear in the case of Xext/xres.c, that the author believed client_major/minor to be CARD16 from looking at the code in the first hunk. v2: dmx.c fixes from Keith. Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit dab064fa5e0b1f5c67222562ad5367005832cba1 Author: Andrea Canciani <ranma42@gmail.com> Date: Tue Nov 2 20:10:32 2010 +0100 render: Fix byteswapping of gradient stops The function swapStops repeatedly swaps the color components as CARD16, but incorrectly steps over them as if they were CARD32. This causes half of the stops not to be swapped at all and some unrelated data be swapped instead. Signed-off-by: Andrea Canciani <ranma42@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 54770c980cd2b91a8377f975a58ed69def5cfa42 Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 16:59:07 2011 -0400 Cast char* buffers to swap functions Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 6844bd2e63490870bab3c469eec6030354ef2865 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 9 19:52:00 2008 -0800 More Xv extension byte swapping fixes commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jan 16 14:24:22 2008 +0100 Yet another Xv extension byte swapping fix.
Diffstat (limited to 'nx-X11/programs/Xserver/Xi')
-rw-r--r--nx-X11/programs/Xserver/Xi/allowev.c6
-rw-r--r--nx-X11/programs/Xserver/Xi/chgdctl.c12
-rw-r--r--nx-X11/programs/Xserver/Xi/chgfctl.c52
-rw-r--r--nx-X11/programs/Xserver/Xi/chgkbd.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/chgkmap.c3
-rw-r--r--nx-X11/programs/Xserver/Xi/chgprop.c8
-rw-r--r--nx-X11/programs/Xserver/Xi/chgptr.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/closedev.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/devbell.c4
-rw-r--r--nx-X11/programs/Xserver/Xi/extinit.c42
-rw-r--r--nx-X11/programs/Xserver/Xi/getbmap.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/getdctl.c21
-rw-r--r--nx-X11/programs/Xserver/Xi/getfctl.c64
-rw-r--r--nx-X11/programs/Xserver/Xi/getfocus.c14
-rw-r--r--nx-X11/programs/Xserver/Xi/getkmap.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/getmmap.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/getprop.c14
-rw-r--r--nx-X11/programs/Xserver/Xi/getselev.c16
-rw-r--r--nx-X11/programs/Xserver/Xi/getvers.c16
-rw-r--r--nx-X11/programs/Xserver/Xi/grabdev.c16
-rw-r--r--nx-X11/programs/Xserver/Xi/grabdevb.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/grabdevk.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/gtmotion.c20
-rw-r--r--nx-X11/programs/Xserver/Xi/listdev.c28
-rw-r--r--nx-X11/programs/Xserver/Xi/opendev.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/queryst.c13
-rw-r--r--nx-X11/programs/Xserver/Xi/selectev.c8
-rw-r--r--nx-X11/programs/Xserver/Xi/sendexev.c9
-rw-r--r--nx-X11/programs/Xserver/Xi/setbmap.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/setdval.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/setfocus.c8
-rw-r--r--nx-X11/programs/Xserver/Xi/setmmap.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/setmode.c10
-rw-r--r--nx-X11/programs/Xserver/Xi/ungrdev.c6
-rw-r--r--nx-X11/programs/Xserver/Xi/ungrdevb.c8
-rw-r--r--nx-X11/programs/Xserver/Xi/ungrdevk.c8
36 files changed, 189 insertions, 331 deletions
diff --git a/nx-X11/programs/Xserver/Xi/allowev.c b/nx-X11/programs/Xserver/Xi/allowev.c
index 8073649f1..06a402b6d 100644
--- a/nx-X11/programs/Xserver/Xi/allowev.c
+++ b/nx-X11/programs/Xserver/Xi/allowev.c
@@ -82,12 +82,10 @@ int
SProcXAllowDeviceEvents(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xAllowDeviceEventsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
- swapl(&stuff->time, n);
+ swapl(&stuff->time);
return(ProcXAllowDeviceEvents(client));
}
diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.c b/nx-X11/programs/Xserver/Xi/chgdctl.c
index c4fa46ba7..c2412df67 100644
--- a/nx-X11/programs/Xserver/Xi/chgdctl.c
+++ b/nx-X11/programs/Xserver/Xi/chgdctl.c
@@ -83,12 +83,10 @@ int
SProcXChangeDeviceControl(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xChangeDeviceControlReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
- swaps(&stuff->control, n);
+ swaps(&stuff->control);
return(ProcXChangeDeviceControl(client));
}
@@ -210,10 +208,8 @@ SRepXChangeDeviceControl (client, size, rep)
int size;
xChangeDeviceControlReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/chgfctl.c b/nx-X11/programs/Xserver/Xi/chgfctl.c
index d78b32a17..9483cd295 100644
--- a/nx-X11/programs/Xserver/Xi/chgfctl.c
+++ b/nx-X11/programs/Xserver/Xi/chgfctl.c
@@ -84,12 +84,10 @@ int
SProcXChangeFeedbackControl(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xChangeFeedbackControlReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
- swapl(&stuff->mask, n);
+ swapl(&stuff->mask);
return(ProcXChangeFeedbackControl(client));
}
@@ -156,13 +154,12 @@ ProcXChangeFeedbackControl(client)
break;
case StringFeedbackClass:
{
- register char n;
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]);
if (client->swapped)
{
if (len < (sizeof(xStringFeedbackCtl) + 3) >> 2)
return BadLength;
- swaps(&f->num_keysyms,n);
+ swaps(&f->num_keysyms);
}
if (len != ((sizeof(xStringFeedbackCtl)>>2) + f->num_keysyms))
{
@@ -242,18 +239,17 @@ ChangeKbdFeedback (client, dev, mask, k, f)
KbdFeedbackPtr k;
xKbdFeedbackCtl *f;
{
- register char n;
KeybdCtrl kctrl;
int t;
int key = DO_ALL;
if (client->swapped)
{
- swaps(&f->length,n);
- swaps(&f->pitch,n);
- swaps(&f->duration,n);
- swapl(&f->led_mask,n);
- swapl(&f->led_values,n);
+ swaps(&f->length);
+ swaps(&f->pitch);
+ swaps(&f->duration);
+ swapl(&f->led_mask);
+ swapl(&f->led_values);
}
kctrl = k->ctrl;
@@ -398,15 +394,14 @@ ChangePtrFeedback (client, dev, mask, p, f)
PtrFeedbackPtr p;
xPtrFeedbackCtl *f;
{
- register char n;
PtrCtrl pctrl; /* might get BadValue part way through */
if (client->swapped)
{
- swaps(&f->length,n);
- swaps(&f->num,n);
- swaps(&f->denom,n);
- swaps(&f->thresh,n);
+ swaps(&f->length);
+ swaps(&f->num);
+ swaps(&f->denom);
+ swaps(&f->thresh);
}
pctrl = p->ctrl;
@@ -480,12 +475,10 @@ ChangeIntegerFeedback (client, dev, mask, i, f)
IntegerFeedbackPtr i;
xIntegerFeedbackCtl *f;
{
- register char n;
-
if (client->swapped)
{
- swaps(&f->length,n);
- swapl(&f->int_to_display,n);
+ swaps(&f->length);
+ swapl(&f->int_to_display);
}
i->ctrl.integer_displayed = f->int_to_display;
@@ -507,14 +500,13 @@ ChangeStringFeedback (client, dev, mask, s, f)
StringFeedbackPtr s;
xStringFeedbackCtl *f;
{
- register char n;
int i, j;
KeySym *syms, *sup_syms;
syms = (KeySym *) (f+1);
if (client->swapped)
{
- swaps(&f->length,n); /* swapped num_keysyms in calling proc */
+ swaps(&f->length); /* swapped num_keysyms in calling proc */
SwapLongs((CARD32 *) syms, f->num_keysyms);
}
@@ -559,15 +551,14 @@ ChangeBellFeedback (client, dev, mask, b, f)
BellFeedbackPtr b;
xBellFeedbackCtl *f;
{
- register char n;
int t;
BellCtrl bctrl; /* might get BadValue part way through */
if (client->swapped)
{
- swaps(&f->length,n);
- swaps(&f->pitch,n);
- swaps(&f->duration,n);
+ swaps(&f->length);
+ swaps(&f->pitch);
+ swaps(&f->duration);
}
bctrl = b->ctrl;
@@ -634,14 +625,13 @@ ChangeLedFeedback (client, dev, mask, l, f)
LedFeedbackPtr l;
xLedFeedbackCtl *f;
{
- register char n;
LedCtrl lctrl; /* might get BadValue part way through */
if (client->swapped)
{
- swaps(&f->length,n);
- swapl(&f->led_values,n);
- swapl(&f->led_mask,n);
+ swaps(&f->length);
+ swapl(&f->led_values);
+ swapl(&f->led_mask);
}
f->led_mask &= l->ctrl.led_mask; /* set only supported leds */
diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c
index 0cf8a1c87..f29c86e0d 100644
--- a/nx-X11/programs/Xserver/Xi/chgkbd.c
+++ b/nx-X11/programs/Xserver/Xi/chgkbd.c
@@ -85,10 +85,8 @@ int
SProcXChangeKeyboardDevice(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xChangeKeyboardDeviceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
return(ProcXChangeKeyboardDevice(client));
}
@@ -208,9 +206,7 @@ SRepXChangeKeyboardDevice (client, size, rep)
int size;
xChangeKeyboardDeviceReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c
index 88afd9df7..52fd9f5eb 100644
--- a/nx-X11/programs/Xserver/Xi/chgkmap.c
+++ b/nx-X11/programs/Xserver/Xi/chgkmap.c
@@ -82,11 +82,10 @@ int
SProcXChangeDeviceKeyMapping(client)
register ClientPtr client;
{
- register char n;
unsigned int count;
REQUEST(xChangeDeviceKeyMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
count = stuff->keyCodes * stuff->keySymsPerKeyCode;
REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c
index 47db87293..fead6327c 100644
--- a/nx-X11/programs/Xserver/Xi/chgprop.c
+++ b/nx-X11/programs/Xserver/Xi/chgprop.c
@@ -84,13 +84,11 @@ int
SProcXChangeDeviceDontPropagateList(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xChangeDeviceDontPropagateListReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
- swapl(&stuff->window, n);
- swaps(&stuff->count, n);
+ swapl(&stuff->window);
+ swaps(&stuff->count);
REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq,
stuff->count * sizeof(CARD32));
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c
index 2bbd7bc37..6d87df415 100644
--- a/nx-X11/programs/Xserver/Xi/chgptr.c
+++ b/nx-X11/programs/Xserver/Xi/chgptr.c
@@ -88,10 +88,8 @@ int
SProcXChangePointerDevice(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xChangePointerDeviceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
return(ProcXChangePointerDevice(client));
}
@@ -254,9 +252,7 @@ SRepXChangePointerDevice (client, size, rep)
int size;
xChangePointerDeviceReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c
index 5f90b57a4..9452b220b 100644
--- a/nx-X11/programs/Xserver/Xi/closedev.c
+++ b/nx-X11/programs/Xserver/Xi/closedev.c
@@ -83,10 +83,8 @@ int
SProcXCloseDevice(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xCloseDeviceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCloseDeviceReq);
return(ProcXCloseDevice(client));
}
diff --git a/nx-X11/programs/Xserver/Xi/devbell.c b/nx-X11/programs/Xserver/Xi/devbell.c
index 12c444137..c7de6cf10 100644
--- a/nx-X11/programs/Xserver/Xi/devbell.c
+++ b/nx-X11/programs/Xserver/Xi/devbell.c
@@ -81,10 +81,8 @@ int
SProcXDeviceBell(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xDeviceBellReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXDeviceBell(client));
}
diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c
index d74ac5dc7..b3cd029f4 100644
--- a/nx-X11/programs/Xserver/Xi/extinit.c
+++ b/nx-X11/programs/Xserver/Xi/extinit.c
@@ -586,17 +586,16 @@ SEventDeviceValuator (from, to)
deviceValuator *from;
deviceValuator *to;
{
- register char n;
register int i;
INT32 *ip B32;
*to = *from;
- swaps(&to->sequenceNumber,n);
- swaps(&to->device_state,n);
+ swaps(&to->sequenceNumber);
+ swaps(&to->device_state);
ip = &to->valuator0;
for (i=0; i<6; i++)
{
- swapl((ip+i),n); /* macro - braces are required */
+ swapl((ip+i)); /* macro - braces are required */
}
}
@@ -605,12 +604,10 @@ SEventFocus (from, to)
deviceFocus *from;
deviceFocus *to;
{
- register char n;
-
*to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
- swapl(&to->window, n);
+ swaps(&to->sequenceNumber);
+ swapl(&to->time);
+ swapl(&to->window);
}
void
@@ -619,16 +616,15 @@ SDeviceStateNotifyEvent (from, to)
deviceStateNotify *to;
{
register int i;
- register char n;
INT32 *ip B32;
*to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
+ swaps(&to->sequenceNumber);
+ swapl(&to->time);
ip = &to->valuator0;
for (i=0; i<3; i++)
{
- swapl((ip+i),n); /* macro - braces are required */
+ swapl((ip+i)); /* macro - braces are required */
}
}
@@ -637,10 +633,8 @@ SDeviceKeyStateNotifyEvent (from, to)
deviceKeyStateNotify *from;
deviceKeyStateNotify *to;
{
- register char n;
-
*to = *from;
- swaps(&to->sequenceNumber,n);
+ swaps(&to->sequenceNumber);
}
void
@@ -648,10 +642,8 @@ SDeviceButtonStateNotifyEvent (from, to)
deviceButtonStateNotify *from;
deviceButtonStateNotify *to;
{
- register char n;
-
*to = *from;
- swaps(&to->sequenceNumber,n);
+ swaps(&to->sequenceNumber);
}
void
@@ -659,11 +651,9 @@ SChangeDeviceNotifyEvent (from, to)
changeDeviceNotify *from;
changeDeviceNotify *to;
{
- register char n;
-
*to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
+ swaps(&to->sequenceNumber);
+ swapl(&to->time);
}
void
@@ -671,11 +661,9 @@ SDeviceMappingNotifyEvent (from, to)
deviceMappingNotify *from;
deviceMappingNotify *to;
{
- register char n;
-
*to = *from;
- swaps(&to->sequenceNumber,n);
- swapl(&to->time, n);
+ swaps(&to->sequenceNumber);
+ swapl(&to->time);
}
/************************************************************************
diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c
index ac2b69749..e571bc7dd 100644
--- a/nx-X11/programs/Xserver/Xi/getbmap.c
+++ b/nx-X11/programs/Xserver/Xi/getbmap.c
@@ -80,10 +80,8 @@ int
SProcXGetDeviceButtonMapping(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceButtonMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXGetDeviceButtonMapping(client));
}
@@ -146,9 +144,7 @@ SRepXGetDeviceButtonMapping (client, size, rep)
int size;
xGetDeviceButtonMappingReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c
index 1161e5aef..2af8db5ea 100644
--- a/nx-X11/programs/Xserver/Xi/getdctl.c
+++ b/nx-X11/programs/Xserver/Xi/getdctl.c
@@ -81,12 +81,10 @@ int
SProcXGetDeviceControl(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceControlReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
- swaps(&stuff->control, n);
+ swaps(&stuff->control);
return(ProcXGetDeviceControl(client));
}
@@ -178,7 +176,6 @@ CopySwapDeviceResolution (client, v, buf, length)
char *buf;
int length;
{
- register char n;
AxisInfoPtr a;
xDeviceResolutionState *r;
int i, *iptr;
@@ -197,13 +194,13 @@ CopySwapDeviceResolution (client, v, buf, length)
*iptr++ = a->max_resolution;
if (client->swapped)
{
- swaps (&r->control,n);
- swaps (&r->length,n);
- swapl (&r->num_valuators,n);
+ swaps (&r->control);
+ swaps (&r->length);
+ swapl (&r->num_valuators);
iptr = (int *) buf;
for (i=0; i < (3 * v->numAxes); i++,iptr++)
{
- swapl (iptr,n);
+ swapl (iptr);
}
}
}
@@ -221,10 +218,8 @@ SRepXGetDeviceControl (client, size, rep)
int size;
xGetDeviceControlReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c
index bc92784d3..d5fd88b0a 100644
--- a/nx-X11/programs/Xserver/Xi/getfctl.c
+++ b/nx-X11/programs/Xserver/Xi/getfctl.c
@@ -81,10 +81,8 @@ int
SProcXGetFeedbackControl(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetFeedbackControlReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXGetFeedbackControl(client));
}
@@ -207,7 +205,6 @@ CopySwapKbdFeedback (client, k, buf)
char **buf;
{
int i;
- register char n;
xKbdFeedbackState *k2;
k2 = (xKbdFeedbackState *) *buf;
@@ -224,11 +221,11 @@ CopySwapKbdFeedback (client, k, buf)
k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
if (client->swapped)
{
- swaps(&k2->length,n);
- swaps(&k2->pitch,n);
- swaps(&k2->duration,n);
- swapl(&k2->led_mask,n);
- swapl(&k2->led_values,n);
+ swaps(&k2->length);
+ swaps(&k2->pitch);
+ swaps(&k2->duration);
+ swapl(&k2->led_mask);
+ swapl(&k2->led_values);
}
*buf += sizeof (xKbdFeedbackState);
}
@@ -245,7 +242,6 @@ CopySwapPtrFeedback (client, p, buf)
PtrFeedbackPtr p;
char **buf;
{
- register char n;
xPtrFeedbackState *p2;
p2 = (xPtrFeedbackState *) *buf;
@@ -257,10 +253,10 @@ CopySwapPtrFeedback (client, p, buf)
p2->threshold = p->ctrl.threshold;
if (client->swapped)
{
- swaps(&p2->length,n);
- swaps(&p2->accelNum,n);
- swaps(&p2->accelDenom,n);
- swaps(&p2->threshold,n);
+ swaps(&p2->length);
+ swaps(&p2->accelNum);
+ swaps(&p2->accelDenom);
+ swaps(&p2->threshold);
}
*buf += sizeof (xPtrFeedbackState);
}
@@ -277,7 +273,6 @@ CopySwapIntegerFeedback (client, i, buf)
IntegerFeedbackPtr i;
char **buf;
{
- register char n;
xIntegerFeedbackState *i2;
i2 = (xIntegerFeedbackState *) *buf;
@@ -289,10 +284,10 @@ CopySwapIntegerFeedback (client, i, buf)
i2->max_value = i->ctrl.max_value;
if (client->swapped)
{
- swaps(&i2->length,n);
- swapl(&i2->resolution,n);
- swapl(&i2->min_value,n);
- swapl(&i2->max_value,n);
+ swaps(&i2->length);
+ swapl(&i2->resolution);
+ swapl(&i2->min_value);
+ swapl(&i2->max_value);
}
*buf += sizeof (xIntegerFeedbackState);
}
@@ -310,7 +305,6 @@ CopySwapStringFeedback (client, s, buf)
char **buf;
{
int i;
- register char n;
xStringFeedbackState *s2;
KeySym *kptr;
@@ -327,13 +321,13 @@ CopySwapStringFeedback (client, s, buf)
*kptr++ = *(s->ctrl.symbols_supported+i);
if (client->swapped)
{
- swaps(&s2->length,n);
- swaps(&s2->max_symbols,n);
- swaps(&s2->num_syms_supported,n);
+ swaps(&s2->length);
+ swaps(&s2->max_symbols);
+ swaps(&s2->num_syms_supported);
kptr = (KeySym *) (*buf);
for (i=0; i<s->ctrl.num_symbols_supported; i++,kptr++)
{
- swapl(kptr,n);
+ swapl(kptr);
}
}
*buf += (s->ctrl.num_symbols_supported * sizeof (KeySym));
@@ -351,7 +345,6 @@ CopySwapLedFeedback (client, l, buf)
LedFeedbackPtr l;
char **buf;
{
- register char n;
xLedFeedbackState *l2;
l2 = (xLedFeedbackState *) *buf;
@@ -362,9 +355,9 @@ CopySwapLedFeedback (client, l, buf)
l2->led_mask = l->ctrl.led_mask;
if (client->swapped)
{
- swaps(&l2->length,n);
- swapl(&l2->led_values,n);
- swapl(&l2->led_mask,n);
+ swaps(&l2->length);
+ swapl(&l2->led_values);
+ swapl(&l2->led_mask);
}
*buf += sizeof (xLedFeedbackState);
}
@@ -381,7 +374,6 @@ CopySwapBellFeedback (client, b, buf)
BellFeedbackPtr b;
char **buf;
{
- register char n;
xBellFeedbackState *b2;
b2 = (xBellFeedbackState *) *buf;
@@ -393,9 +385,9 @@ CopySwapBellFeedback (client, b, buf)
b2->duration = b->ctrl.duration;
if (client->swapped)
{
- swaps(&b2->length,n);
- swaps(&b2->pitch,n);
- swaps(&b2->duration,n);
+ swaps(&b2->length);
+ swaps(&b2->pitch);
+ swaps(&b2->duration);
}
*buf += sizeof (xBellFeedbackState);
}
@@ -413,10 +405,8 @@ SRepXGetFeedbackControl (client, size, rep)
int size;
xGetFeedbackControlReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swaps(&rep->num_feedbacks, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->num_feedbacks);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getfocus.c b/nx-X11/programs/Xserver/Xi/getfocus.c
index 61a98f1bf..6e2136d65 100644
--- a/nx-X11/programs/Xserver/Xi/getfocus.c
+++ b/nx-X11/programs/Xserver/Xi/getfocus.c
@@ -81,10 +81,8 @@ int
SProcXGetDeviceFocus(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceFocusReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXGetDeviceFocus(client));
}
@@ -147,11 +145,9 @@ SRepXGetDeviceFocus (client, size, rep)
int size;
xGetDeviceFocusReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swapl(&rep->focus, n);
- swapl(&rep->time, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swapl(&rep->focus);
+ swapl(&rep->time);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c
index fe8fd9b22..29d4eb677 100644
--- a/nx-X11/programs/Xserver/Xi/getkmap.c
+++ b/nx-X11/programs/Xserver/Xi/getkmap.c
@@ -82,10 +82,8 @@ int
SProcXGetDeviceKeyMapping(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceKeyMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXGetDeviceKeyMapping(client));
}
@@ -169,10 +167,8 @@ SRepXGetDeviceKeyMapping (client, size, rep)
int size;
xGetDeviceKeyMappingReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getmmap.c b/nx-X11/programs/Xserver/Xi/getmmap.c
index 203799103..773a65614 100644
--- a/nx-X11/programs/Xserver/Xi/getmmap.c
+++ b/nx-X11/programs/Xserver/Xi/getmmap.c
@@ -81,10 +81,8 @@ int
SProcXGetDeviceModifierMapping(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceModifierMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXGetDeviceModifierMapping(client));
}
@@ -150,9 +148,7 @@ SRepXGetDeviceModifierMapping (client, size, rep)
int size;
xGetDeviceModifierMappingReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c
index 42403b0e5..824fae921 100644
--- a/nx-X11/programs/Xserver/Xi/getprop.c
+++ b/nx-X11/programs/Xserver/Xi/getprop.c
@@ -85,12 +85,10 @@ int
SProcXGetDeviceDontPropagateList(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceDontPropagateListReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
- swapl(&stuff->window, n);
+ swapl(&stuff->window);
return(ProcXGetDeviceDontPropagateList(client));
}
@@ -206,10 +204,8 @@ SRepXGetDeviceDontPropagateList (client, size, rep)
int size;
xGetDeviceDontPropagateListReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swaps(&rep->count, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->count);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c
index 8abea78d4..4fafef982 100644
--- a/nx-X11/programs/Xserver/Xi/getselev.c
+++ b/nx-X11/programs/Xserver/Xi/getselev.c
@@ -83,12 +83,10 @@ int
SProcXGetSelectedExtensionEvents(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetSelectedExtensionEventsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
- swapl(&stuff->window, n);
+ swapl(&stuff->window);
return(ProcXGetSelectedExtensionEvents(client));
}
@@ -186,11 +184,9 @@ SRepXGetSelectedExtensionEvents (client, size, rep)
int size;
xGetSelectedExtensionEventsReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swaps(&rep->this_client_count, n);
- swaps(&rep->all_clients_count, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->this_client_count);
+ swaps(&rep->all_clients_count);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c
index 7743e797f..34f4b0948 100644
--- a/nx-X11/programs/Xserver/Xi/getvers.c
+++ b/nx-X11/programs/Xserver/Xi/getvers.c
@@ -82,12 +82,10 @@ int
SProcXGetExtensionVersion(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetExtensionVersionReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
- swaps(&stuff->nbytes, n);
+ swaps(&stuff->nbytes);
return(ProcXGetExtensionVersion(client));
}
@@ -148,11 +146,9 @@ SRepXGetExtensionVersion (client, size, rep)
int size;
xGetExtensionVersionReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swaps(&rep->major_version, n);
- swaps(&rep->minor_version, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->major_version);
+ swaps(&rep->minor_version);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/grabdev.c b/nx-X11/programs/Xserver/Xi/grabdev.c
index 865263688..bd085a660 100644
--- a/nx-X11/programs/Xserver/Xi/grabdev.c
+++ b/nx-X11/programs/Xserver/Xi/grabdev.c
@@ -86,14 +86,12 @@ int
SProcXGrabDevice(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGrabDeviceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
- swapl(&stuff->grabWindow, n);
- swapl(&stuff->time, n);
- swaps(&stuff->event_count, n);
+ swapl(&stuff->grabWindow);
+ swapl(&stuff->time);
+ swaps(&stuff->event_count);
if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count)
return BadLength;
@@ -221,9 +219,7 @@ SRepXGrabDevice (client, size, rep)
int size;
xGrabDeviceReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/grabdevb.c b/nx-X11/programs/Xserver/Xi/grabdevb.c
index 9a20345be..c74c65fc4 100644
--- a/nx-X11/programs/Xserver/Xi/grabdevb.c
+++ b/nx-X11/programs/Xserver/Xi/grabdevb.c
@@ -83,14 +83,12 @@ int
SProcXGrabDeviceButton(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGrabDeviceButtonReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
- swaps(&stuff->event_count, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
+ swaps(&stuff->event_count);
REQUEST_FIXED_SIZE(xGrabDeviceButtonReq,
stuff->event_count * sizeof(CARD32));
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
diff --git a/nx-X11/programs/Xserver/Xi/grabdevk.c b/nx-X11/programs/Xserver/Xi/grabdevk.c
index 73b8690b9..1dff73f40 100644
--- a/nx-X11/programs/Xserver/Xi/grabdevk.c
+++ b/nx-X11/programs/Xserver/Xi/grabdevk.c
@@ -83,14 +83,12 @@ int
SProcXGrabDeviceKey(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGrabDeviceKeyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
- swaps(&stuff->event_count, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
+ swaps(&stuff->event_count);
REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32));
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
return(ProcXGrabDeviceKey(client));
diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c
index ec26ae407..9f1ce2fc0 100644
--- a/nx-X11/programs/Xserver/Xi/gtmotion.c
+++ b/nx-X11/programs/Xserver/Xi/gtmotion.c
@@ -81,13 +81,11 @@ int
SProcXGetDeviceMotionEvents(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xGetDeviceMotionEventsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
- swapl(&stuff->start, n);
- swapl(&stuff->stop, n);
+ swapl(&stuff->start);
+ swapl(&stuff->stop);
return(ProcXGetDeviceMotionEvents(client));
}
@@ -175,12 +173,10 @@ ProcXGetDeviceMotionEvents(client)
{
if (client->swapped)
{
- register char n;
-
bufptr = coords;
for (i=0; i<nEvents * (axes+1); i++)
{
- swapl(bufptr, n);
+ swapl(bufptr);
bufptr++;
}
}
@@ -204,10 +200,8 @@ SRepXGetDeviceMotionEvents (client, size, rep)
int size;
xGetDeviceMotionEventsReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swapl(&rep->nEvents, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swapl(&rep->nEvents);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c
index 7f3b49e89..ad11652b9 100644
--- a/nx-X11/programs/Xserver/Xi/listdev.c
+++ b/nx-X11/programs/Xserver/Xi/listdev.c
@@ -83,10 +83,8 @@ int
SProcXListInputDevices(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xListInputDevicesReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXListInputDevices(client));
}
@@ -254,7 +252,6 @@ CopySwapDevice (client, d, num_classes, buf)
int num_classes;
char **buf;
{
- register char n;
xDeviceInfoPtr dev;
dev = (xDeviceInfoPtr) *buf;
@@ -270,7 +267,7 @@ CopySwapDevice (client, d, num_classes, buf)
dev->use = IsXExtensionDevice;
if (client->swapped)
{
- swapl(&dev->type, n); /* macro - braces are required */
+ swapl(&dev->type); /* macro - braces are required */
}
*buf += sizeof (xDeviceInfo);
}
@@ -287,7 +284,6 @@ CopySwapKeyClass (client, k, buf)
KeyClassPtr k;
char **buf;
{
- register char n;
xKeyInfoPtr k2;
k2 = (xKeyInfoPtr) *buf;
@@ -298,7 +294,7 @@ CopySwapKeyClass (client, k, buf)
k2->num_keys = k2->max_keycode - k2->min_keycode + 1;
if (client->swapped)
{
- swaps(&k2->num_keys,n);
+ swaps(&k2->num_keys);
}
*buf += sizeof (xKeyInfo);
}
@@ -315,7 +311,6 @@ CopySwapButtonClass (client, b, buf)
ButtonClassPtr b;
char **buf;
{
- register char n;
xButtonInfoPtr b2;
b2 = (xButtonInfoPtr) *buf;
@@ -324,7 +319,7 @@ CopySwapButtonClass (client, b, buf)
b2->num_buttons = b->numButtons;
if (client->swapped)
{
- swaps(&b2->num_buttons,n); /* macro - braces are required */
+ swaps(&b2->num_buttons); /* macro - braces are required */
}
*buf += sizeof (xButtonInfo);
}
@@ -348,7 +343,6 @@ CopySwapValuatorClass (client, v, buf)
char **buf;
{
int i, j, axes, t_axes;
- register char n;
xValuatorInfoPtr v2;
AxisInfo *a;
xAxisInfoPtr a2;
@@ -365,7 +359,7 @@ CopySwapValuatorClass (client, v, buf)
v2->motion_buffer_size = v->numMotionEvents;
if (client->swapped)
{
- swapl(&v2->motion_buffer_size,n);
+ swapl(&v2->motion_buffer_size);
}
*buf += sizeof (xValuatorInfo);
a = v->axes + (VPC * i);
@@ -375,9 +369,9 @@ CopySwapValuatorClass (client, v, buf)
a2->max_value = a->max_value;
a2->resolution = a->resolution;
if (client->swapped) {
- swapl(&a2->min_value,n);
- swapl(&a2->max_value,n);
- swapl(&a2->resolution,n);
+ swapl(&a2->min_value);
+ swapl(&a2->max_value);
+ swapl(&a2->resolution);
}
a2++;
a++;
@@ -400,9 +394,7 @@ SRepXListInputDevices (client, size, rep)
int size;
xListInputDevicesReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/opendev.c b/nx-X11/programs/Xserver/Xi/opendev.c
index 054dae159..73eba526c 100644
--- a/nx-X11/programs/Xserver/Xi/opendev.c
+++ b/nx-X11/programs/Xserver/Xi/opendev.c
@@ -85,10 +85,8 @@ int
SProcXOpenDevice(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xOpenDeviceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXOpenDevice(client));
}
@@ -198,9 +196,7 @@ SRepXOpenDevice (client, size, rep)
int size;
xOpenDeviceReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/queryst.c b/nx-X11/programs/Xserver/Xi/queryst.c
index a590aa0e1..237c263dc 100644
--- a/nx-X11/programs/Xserver/Xi/queryst.c
+++ b/nx-X11/programs/Xserver/Xi/queryst.c
@@ -63,10 +63,8 @@ int
SProcXQueryDeviceState(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xQueryDeviceStateReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXQueryDeviceState(client));
}
@@ -80,7 +78,6 @@ int
ProcXQueryDeviceState(client)
register ClientPtr client;
{
- register char n;
int i;
int num_classes = 0;
int total_length = 0;
@@ -179,7 +176,7 @@ ProcXQueryDeviceState(client)
*((int *) buf) = *values++;
if (client->swapped)
{
- swapl ((int *) buf, n);/* macro - braces needed */
+ swapl ((int *) buf);/* macro - braces needed */
}
buf += sizeof(int);
}
@@ -207,9 +204,7 @@ SRepXQueryDeviceState (client, size, rep)
int size;
xQueryDeviceStateReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/selectev.c b/nx-X11/programs/Xserver/Xi/selectev.c
index de29fcf59..1a1000f61 100644
--- a/nx-X11/programs/Xserver/Xi/selectev.c
+++ b/nx-X11/programs/Xserver/Xi/selectev.c
@@ -87,13 +87,11 @@ int
SProcXSelectExtensionEvent (client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xSelectExtensionEventReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
- swapl(&stuff->window, n);
- swaps(&stuff->count, n);
+ swapl(&stuff->window);
+ swaps(&stuff->count);
REQUEST_FIXED_SIZE(xSelectExtensionEventReq,
stuff->count * sizeof(CARD32));
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
diff --git a/nx-X11/programs/Xserver/Xi/sendexev.c b/nx-X11/programs/Xserver/Xi/sendexev.c
index 9decfadab..64191001f 100644
--- a/nx-X11/programs/Xserver/Xi/sendexev.c
+++ b/nx-X11/programs/Xserver/Xi/sendexev.c
@@ -86,7 +86,6 @@ int
SProcXSendExtensionEvent(client)
register ClientPtr client;
{
- register char n;
CARD32 *p;
register int i;
xEvent eventT;
@@ -94,10 +93,10 @@ SProcXSendExtensionEvent(client)
EventSwapPtr proc;
REQUEST(xSendExtensionEventReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
- swapl(&stuff->destination, n);
- swaps(&stuff->count, n);
+ swapl(&stuff->destination);
+ swaps(&stuff->count);
if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count +
(stuff->num_events * (sizeof(xEvent) >> 2)))
@@ -154,6 +153,8 @@ ProcXSendExtensionEvent (client)
return Success;
}
+ // FIXME: ret is not initialized and should not be returned...
+
if (stuff->num_events == 0)
return ret;
diff --git a/nx-X11/programs/Xserver/Xi/setbmap.c b/nx-X11/programs/Xserver/Xi/setbmap.c
index 74b8e3c05..2919f48f1 100644
--- a/nx-X11/programs/Xserver/Xi/setbmap.c
+++ b/nx-X11/programs/Xserver/Xi/setbmap.c
@@ -84,10 +84,8 @@ int
SProcXSetDeviceButtonMapping(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xSetDeviceButtonMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXSetDeviceButtonMapping(client));
}
@@ -162,9 +160,7 @@ SRepXSetDeviceButtonMapping (client, size, rep)
int size;
xSetDeviceButtonMappingReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/setdval.c b/nx-X11/programs/Xserver/Xi/setdval.c
index 04f55d4fc..c4613dd37 100644
--- a/nx-X11/programs/Xserver/Xi/setdval.c
+++ b/nx-X11/programs/Xserver/Xi/setdval.c
@@ -81,10 +81,8 @@ int
SProcXSetDeviceValuators(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xSetDeviceValuatorsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXSetDeviceValuators(client));
}
@@ -166,9 +164,7 @@ SRepXSetDeviceValuators (client, size, rep)
int size;
xSetDeviceValuatorsReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/setfocus.c b/nx-X11/programs/Xserver/Xi/setfocus.c
index b9a495612..180fb835e 100644
--- a/nx-X11/programs/Xserver/Xi/setfocus.c
+++ b/nx-X11/programs/Xserver/Xi/setfocus.c
@@ -84,13 +84,11 @@ int
SProcXSetDeviceFocus(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xSetDeviceFocusReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
- swapl(&stuff->focus, n);
- swapl(&stuff->time, n);
+ swapl(&stuff->focus);
+ swapl(&stuff->time);
return(ProcXSetDeviceFocus(client));
}
diff --git a/nx-X11/programs/Xserver/Xi/setmmap.c b/nx-X11/programs/Xserver/Xi/setmmap.c
index 9fd8e7244..c2e7beb4a 100644
--- a/nx-X11/programs/Xserver/Xi/setmmap.c
+++ b/nx-X11/programs/Xserver/Xi/setmmap.c
@@ -82,10 +82,8 @@ int
SProcXSetDeviceModifierMapping(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xSetDeviceModifierMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXSetDeviceModifierMapping(client));
}
@@ -155,10 +153,8 @@ SRepXSetDeviceModifierMapping (client, size, rep)
int size;
xSetDeviceModifierMappingReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/setmode.c b/nx-X11/programs/Xserver/Xi/setmode.c
index 17c46515d..4314d6465 100644
--- a/nx-X11/programs/Xserver/Xi/setmode.c
+++ b/nx-X11/programs/Xserver/Xi/setmode.c
@@ -81,10 +81,8 @@ int
SProcXSetDeviceMode(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xSetDeviceModeReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(ProcXSetDeviceMode(client));
}
@@ -150,9 +148,7 @@ SRepXSetDeviceMode (client, size, rep)
int size;
xSetDeviceModeReply *rep;
{
- register char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
WriteToClient(client, size, (char *)rep);
}
diff --git a/nx-X11/programs/Xserver/Xi/ungrdev.c b/nx-X11/programs/Xserver/Xi/ungrdev.c
index b318fa044..a0611d53b 100644
--- a/nx-X11/programs/Xserver/Xi/ungrdev.c
+++ b/nx-X11/programs/Xserver/Xi/ungrdev.c
@@ -80,12 +80,10 @@ int
SProcXUngrabDevice(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xUngrabDeviceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
- swapl(&stuff->time, n);
+ swapl(&stuff->time);
return(ProcXUngrabDevice(client));
}
diff --git a/nx-X11/programs/Xserver/Xi/ungrdevb.c b/nx-X11/programs/Xserver/Xi/ungrdevb.c
index a76f9692c..dd770064d 100644
--- a/nx-X11/programs/Xserver/Xi/ungrdevb.c
+++ b/nx-X11/programs/Xserver/Xi/ungrdevb.c
@@ -86,13 +86,11 @@ int
SProcXUngrabDeviceButton(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xUngrabDeviceButtonReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
return(ProcXUngrabDeviceButton(client));
}
diff --git a/nx-X11/programs/Xserver/Xi/ungrdevk.c b/nx-X11/programs/Xserver/Xi/ungrdevk.c
index 928b602f1..fcb470eaa 100644
--- a/nx-X11/programs/Xserver/Xi/ungrdevk.c
+++ b/nx-X11/programs/Xserver/Xi/ungrdevk.c
@@ -86,13 +86,11 @@ int
SProcXUngrabDeviceKey(client)
register ClientPtr client;
{
- register char n;
-
REQUEST(xUngrabDeviceKeyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
return(ProcXUngrabDeviceKey(client));
}