diff options
| author | Mihai Moldovan <ionic@ionic.de> | 2017-12-15 12:55:17 +0100 |
|---|---|---|
| committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-15 12:55:17 +0100 |
| commit | 1dad092caf01d733990648e6df64cbf964df5143 (patch) | |
| tree | 39de0e643e76754a3e23ca9dd0350b8ba4f76250 /nx-X11/programs/Xserver/Xi | |
| parent | 6d70b9e3c47f27a166f4aacb522c5c1e49092dd9 (diff) | |
| parent | 2b9025f797ee322e21077e100c2ee27c2e7fa0e0 (diff) | |
| download | nx-libs-1dad092caf01d733990648e6df64cbf964df5143.tar.gz nx-libs-1dad092caf01d733990648e6df64cbf964df5143.tar.bz2 nx-libs-1dad092caf01d733990648e6df64cbf964df5143.zip | |
Merge branch '3.6.x'
Diffstat (limited to 'nx-X11/programs/Xserver/Xi')
75 files changed, 431 insertions, 747 deletions
diff --git a/nx-X11/programs/Xserver/Xi/Imakefile b/nx-X11/programs/Xserver/Xi/Imakefile index 27e1f5df0..746e57eaa 100644 --- a/nx-X11/programs/Xserver/Xi/Imakefile +++ b/nx-X11/programs/Xserver/Xi/Imakefile @@ -1,10 +1,3 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/programs/Xserver/Xi/Imakefile,v 3.2 1999/04/17 09:08:22 dawes Exp $ - #include <Server.tmpl> SRCS = allowev.c \ @@ -83,9 +76,15 @@ XCOMM $XFree86: xc/programs/Xserver/Xi/Imakefile,v 3.2 1999/04/17 09:08:22 dawes ungrdev.o \ ungrdevb.o \ ungrdevk.o - INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) + INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln +#if defined(NXAgentServer) && NXAgentServer + NX_DEFINES = -DNXAGENT_SERVER +#endif + + DEFINES = $(NX_DEFINES) + NormalLibraryTarget(xinput,$(OBJS)) NormalLibraryObjectRule() LintLibraryTarget(xinput,$(SRCS)) diff --git a/nx-X11/programs/Xserver/Xi/allowev.c b/nx-X11/programs/Xserver/Xi/allowev.c index c1df7eb73..a814e3c3d 100644 --- a/nx-X11/programs/Xserver/Xi/allowev.c +++ b/nx-X11/programs/Xserver/Xi/allowev.c @@ -1,4 +1,3 @@ -/* $Xorg: allowev.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/allowev.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -82,12 +78,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/allowev.h b/nx-X11/programs/Xserver/Xi/allowev.h index 2d1132d3a..5315667df 100644 --- a/nx-X11/programs/Xserver/Xi/allowev.h +++ b/nx-X11/programs/Xserver/Xi/allowev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/allowev.h,v 3.1 1996/04/15 11:18:23 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.c b/nx-X11/programs/Xserver/Xi/chgdctl.c index 63a3c9c69..b07885f9c 100644 --- a/nx-X11/programs/Xserver/Xi/chgdctl.c +++ b/nx-X11/programs/Xserver/Xi/chgdctl.c @@ -1,4 +1,3 @@ -/* $Xorg: chgdctl.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgdctl.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> /* control constants */ +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> /* control constants */ #include "XIstubs.h" #include "extnsionst.h" @@ -83,12 +79,10 @@ int SProcXChangeDeviceControl(client) register ClientPtr client; { - register char n; - REQUEST(xChangeDeviceControlReq); - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); - swaps(&stuff->control, n); + swaps(&stuff->length); + REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl)); + swaps(&stuff->control); return(ProcXChangeDeviceControl(client)); } @@ -111,7 +105,7 @@ ProcXChangeDeviceControl(client) CARD32 *resolution; REQUEST(xChangeDeviceControlReq); - REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); + REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl)); len = stuff->length - (sizeof(xChangeDeviceControlReq) >>2); dev = LookupDeviceIntRec (stuff->deviceid); @@ -210,10 +204,8 @@ SRepXChangeDeviceControl (client, size, rep) int size; xChangeDeviceControlReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.h b/nx-X11/programs/Xserver/Xi/chgdctl.h index a6a530f37..1d1a6214d 100644 --- a/nx-X11/programs/Xserver/Xi/chgdctl.h +++ b/nx-X11/programs/Xserver/Xi/chgdctl.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/chgdctl.h,v 3.1 1996/04/15 11:18:25 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/chgfctl.c b/nx-X11/programs/Xserver/Xi/chgfctl.c index fe8bd1fac..a5ad73d11 100644 --- a/nx-X11/programs/Xserver/Xi/chgfctl.c +++ b/nx-X11/programs/Xserver/Xi/chgfctl.c @@ -1,4 +1,3 @@ -/* $Xorg: chgfctl.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgfctl.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> /* control constants */ +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> /* control constants */ #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -84,12 +80,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,11 +150,12 @@ ProcXChangeFeedbackControl(client) break; case StringFeedbackClass: { - register char n; xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]); if (client->swapped) { - swaps(&f->num_keysyms,n); + if (len < (sizeof(xStringFeedbackCtl) + 3) >> 2) + return BadLength; + swaps(&f->num_keysyms); } if (len != ((sizeof(xStringFeedbackCtl)>>2) + f->num_keysyms)) { @@ -240,18 +235,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; @@ -364,9 +358,9 @@ ChangeKbdFeedback (client, dev, mask, k, f) kctrl.autoRepeat = defaultKeyboardControl.autoRepeat; else kctrl.autoRepeats[inx] &= ~kmask; - kctrl.autoRepeats[inx] = - (kctrl.autoRepeats[inx] & ~kmask) | - (defaultKeyboardControl.autoRepeats[inx] & kmask); + kctrl.autoRepeats[inx] = + (kctrl.autoRepeats[inx] & ~kmask) | + (defaultKeyboardControl.autoRepeats[inx] & kmask); } else { @@ -396,15 +390,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; @@ -478,12 +471,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; @@ -505,14 +496,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); } @@ -557,15 +547,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; @@ -632,14 +621,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/chgfctl.h b/nx-X11/programs/Xserver/Xi/chgfctl.h index 94dab2814..ffcb3be8a 100644 --- a/nx-X11/programs/Xserver/Xi/chgfctl.h +++ b/nx-X11/programs/Xserver/Xi/chgfctl.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/chgfctl.h,v 3.1 1996/04/15 11:18:26 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c index a8a6024d8..1d45023cf 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.c +++ b/nx-X11/programs/Xserver/Xi/chgkbd.c @@ -1,4 +1,3 @@ -/* $Xorg: chgkbd.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgkbd.c,v 3.5 2001/08/23 14:56:19 alanh Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "globals.h" #include "extnsionst.h" @@ -85,10 +81,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)); } @@ -168,7 +162,7 @@ ProcXChangeKeyboardDevice (client) if (df->traceSize != xf->traceSize) { Must_have_memory = TRUE; /* XXX */ - df->trace = (WindowPtr *) xrealloc(df->trace, + df->trace = (WindowPtr *) realloc(df->trace, xf->traceSize * sizeof(WindowPtr)); Must_have_memory = FALSE; /* XXX */ } @@ -208,9 +202,7 @@ SRepXChangeKeyboardDevice (client, size, rep) int size; xChangeKeyboardDeviceReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.h b/nx-X11/programs/Xserver/Xi/chgkbd.h index ddb17e3c4..b7ed198f7 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.h +++ b/nx-X11/programs/Xserver/Xi/chgkbd.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/chgkbd.h,v 3.1 1996/04/15 11:18:27 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c index 3df376d9a..8d5199848 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.c +++ b/nx-X11/programs/Xserver/Xi/chgkmap.c @@ -1,4 +1,3 @@ -/* $Xorg: chgkmap.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgkmap.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" @@ -82,11 +78,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/chgkmap.h b/nx-X11/programs/Xserver/Xi/chgkmap.h index 5e65a5b36..22cab11ba 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.h +++ b/nx-X11/programs/Xserver/Xi/chgkmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/chgkmap.h,v 3.1 1996/04/15 11:18:28 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c index 6e345d554..80b8aea5f 100644 --- a/nx-X11/programs/Xserver/Xi/chgprop.c +++ b/nx-X11/programs/Xserver/Xi/chgprop.c @@ -1,4 +1,3 @@ -/* $Xorg: chgprop.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgprop.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -84,13 +80,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/chgprop.h b/nx-X11/programs/Xserver/Xi/chgprop.h index 7395bc25c..19d091c10 100644 --- a/nx-X11/programs/Xserver/Xi/chgprop.h +++ b/nx-X11/programs/Xserver/Xi/chgprop.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/chgprop.h,v 3.1 1996/04/15 11:18:29 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c index bf2abd6b6..7fef2a104 100644 --- a/nx-X11/programs/Xserver/Xi/chgptr.c +++ b/nx-X11/programs/Xserver/Xi/chgptr.c @@ -1,4 +1,3 @@ -/* $Xorg: chgptr.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgptr.c,v 3.6 2001/08/23 14:56:19 alanh Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ @@ -88,10 +84,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)); } @@ -185,8 +179,8 @@ void DeleteFocusClassDeviceStruct(dev) DeviceIntPtr dev; { - xfree(dev->focus->trace); - xfree(dev->focus); + free(dev->focus->trace); + free(dev->focus); dev->focus = NULL; } @@ -208,7 +202,7 @@ SendEventToAllWindows (dev, mask, ev, count) for (i=0; i<screenInfo.numScreens; i++) { - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; (void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id); p1 = pWin->firstChild; FindInterestedChildren (dev, p1, mask, ev, count); @@ -254,9 +248,7 @@ SRepXChangePointerDevice (client, size, rep) int size; xChangePointerDeviceReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/chgptr.h b/nx-X11/programs/Xserver/Xi/chgptr.h index 5b85da13f..f63d96876 100644 --- a/nx-X11/programs/Xserver/Xi/chgptr.h +++ b/nx-X11/programs/Xserver/Xi/chgptr.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/chgptr.h,v 3.1 1996/04/15 11:18:31 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index 8a57aeeee..2ba90d0d1 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -1,4 +1,3 @@ -/* $Xorg: closedev.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/closedev.c,v 3.3 2001/08/23 14:56:19 alanh Exp $ */ /*********************************************************************** * @@ -53,19 +51,17 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -83,10 +79,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)); } @@ -124,7 +118,7 @@ ProcXCloseDevice(client) for (i=0; i<screenInfo.numScreens; i++) { - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; DeleteDeviceEvents (d, pWin, client); p1 = pWin->firstChild; DeleteEventsFromChildren (d, p1, client); diff --git a/nx-X11/programs/Xserver/Xi/closedev.h b/nx-X11/programs/Xserver/Xi/closedev.h index e4869c96c..61e42e2f0 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.h +++ b/nx-X11/programs/Xserver/Xi/closedev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/closedev.h,v 3.1 1996/04/15 11:18:32 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/devbell.c b/nx-X11/programs/Xserver/Xi/devbell.c index bdc941c1c..7fac4f972 100644 --- a/nx-X11/programs/Xserver/Xi/devbell.c +++ b/nx-X11/programs/Xserver/Xi/devbell.c @@ -1,4 +1,3 @@ -/* $Xorg: devbell.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/devbell.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -81,10 +77,8 @@ int SProcXDeviceBell(client) register ClientPtr client; { - register char n; - REQUEST(xDeviceBellReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXDeviceBell(client)); } @@ -104,7 +98,7 @@ ProcXDeviceBell (client) int base; int newpercent; CARD8 class; - pointer ctrl; + void * ctrl; BellProcPtr proc; REQUEST(xDeviceBellReq); @@ -137,7 +131,7 @@ ProcXDeviceBell (client) } base = k->ctrl.bell; proc = k->BellProc; - ctrl = (pointer) &(k->ctrl); + ctrl = (void *) &(k->ctrl); class = KbdFeedbackClass; } else if (stuff->feedbackclass == BellFeedbackClass) @@ -153,7 +147,7 @@ ProcXDeviceBell (client) } base = b->ctrl.percent; proc = b->BellProc; - ctrl = (pointer) &(b->ctrl); + ctrl = (void *) &(b->ctrl); class = BellFeedbackClass; } else diff --git a/nx-X11/programs/Xserver/Xi/devbell.h b/nx-X11/programs/Xserver/Xi/devbell.h index 17cac6f7f..d1289bedf 100644 --- a/nx-X11/programs/Xserver/Xi/devbell.h +++ b/nx-X11/programs/Xserver/Xi/devbell.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/devbell.h,v 3.1 1996/04/15 11:18:32 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/exevents.c b/nx-X11/programs/Xserver/Xi/exevents.c index 99fbb129a..3b5a070b6 100644 --- a/nx-X11/programs/Xserver/Xi/exevents.c +++ b/nx-X11/programs/Xserver/Xi/exevents.c @@ -1,4 +1,3 @@ -/* $Xorg: exevents.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -44,7 +43,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.10 2001/12/14 19:58:55 dawes Exp $ */ /******************************************************************** * @@ -54,15 +52,14 @@ SOFTWARE. * */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> -#include <X11/Xproto.h> -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/X.h> +#include <nx-X11/Xproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "inputstr.h" #include "windowstr.h" #include "miscstruct.h" @@ -143,7 +140,7 @@ ProcessOtherEvent (xE, other, count) DeviceEventInfoRec eventinfo; eventinfo.events = (xEventPtr) xE; eventinfo.count = count; - CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); + CallCallbacks(&DeviceEventCallback, (void *)&eventinfo); } for (i=1; i<count; i++) if ((++xV)->type == DeviceValuator) @@ -302,7 +299,7 @@ InitProximityClassDeviceStruct( DeviceIntPtr dev) { register ProximityClassPtr proxc; - proxc = (ProximityClassPtr)xalloc(sizeof(ProximityClassRec)); + proxc = (ProximityClassPtr)malloc(sizeof(ProximityClassRec)); if (!proxc) return FALSE; dev->proximity = proxc; @@ -460,7 +457,7 @@ DeviceFocusEvent(dev, type, mode, detail, pWin) } } - sev = ev = (deviceStateNotify *) xalloc(evcount * sizeof(xEvent)); + sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent)); FixDeviceStateNotify (dev, ev, NULL, NULL, NULL, first); if (b != NULL) { @@ -515,7 +512,7 @@ DeviceFocusEvent(dev, type, mode, detail, pWin) (void) DeliverEventsToWindow(pWin, (xEvent *)sev, evcount, DeviceStateNotifyMask, NullGrab, dev->id); - xfree (sev); + free (sev); } } @@ -741,7 +738,7 @@ AddExtensionClient (pWin, client, mask, mskidx) if (!pWin->optional && !MakeWindowOptional (pWin)) return BadAlloc; - others = (InputClients *) xalloc(sizeof(InputClients)); + others = (InputClients *) malloc(sizeof(InputClients)); if (!others) return BadAlloc; if (!pWin->optional->inputMasks && !MakeInputMasks (pWin)) @@ -751,7 +748,7 @@ AddExtensionClient (pWin, client, mask, mskidx) others->resource = FakeClientID(client->index); others->next = pWin->optional->inputMasks->inputClients; pWin->optional->inputMasks->inputClients = others; - if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer)pWin)) + if (!AddResource(others->resource, RT_INPUTCLIENT, (void *)pWin)) return BadAlloc; return Success; } @@ -763,7 +760,7 @@ MakeInputMasks (pWin) struct _OtherInputMasks *imasks; imasks = (struct _OtherInputMasks *) - xalloc (sizeof (struct _OtherInputMasks)); + malloc (sizeof (struct _OtherInputMasks)); if (!imasks) return FALSE; bzero((char *) imasks, sizeof (struct _OtherInputMasks)); @@ -830,30 +827,30 @@ InputClientGone(pWin, id) if (prev) { prev->next = other->next; - xfree(other); + free(other); } else if (!(other->next)) { if (ShouldFreeInputMasks(pWin, TRUE)) { wOtherInputMasks(pWin)->inputClients = other->next; - xfree(wOtherInputMasks(pWin)); + free(wOtherInputMasks(pWin)); pWin->optional->inputMasks = (OtherInputMasks *) NULL; CheckWindowOptionalNeed (pWin); - xfree(other); + free(other); } else { other->resource = FakeClientID(0); if (!AddResource(other->resource, RT_INPUTCLIENT, - (pointer)pWin)) + (void *)pWin)) return BadAlloc; } } else { wOtherInputMasks(pWin)->inputClients = other->next; - xfree(other); + free(other); } RecalculateDeviceDeliverableEvents(pWin); return(Success); @@ -1027,12 +1024,12 @@ SetModifierMapping(client, dev, len, rlen, numKeyPerModifier, inputMap, k) * list of keycodes. */ if (inputMapLen) { - map = (KeyCode *)xalloc(inputMapLen); + map = (KeyCode *)malloc(inputMapLen); if (!map) return BadAlloc; } if ((*k)->modifierKeyMap) - xfree((*k)->modifierKeyMap); + free((*k)->modifierKeyMap); if (inputMapLen) { (*k)->modifierKeyMap = map; memmove((char *)(*k)->modifierKeyMap, (char *)inputMap, inputMapLen); diff --git a/nx-X11/programs/Xserver/Xi/exglobals.h b/nx-X11/programs/Xserver/Xi/exglobals.h index cba6310f4..e8d84e25f 100644 --- a/nx-X11/programs/Xserver/Xi/exglobals.h +++ b/nx-X11/programs/Xserver/Xi/exglobals.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/exglobals.h,v 3.2 1996/05/06 05:56:03 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c index 0b27b5cf7..d0052b1fb 100644 --- a/nx-X11/programs/Xserver/Xi/extinit.c +++ b/nx-X11/programs/Xserver/Xi/extinit.c @@ -1,4 +1,3 @@ -/* $Xorg: extinit.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.6 2001/12/14 19:58:55 dawes Exp $ */ /******************************************************************** * @@ -55,25 +53,24 @@ SOFTWARE. #define NUMTYPES 15 -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> -#include <X11/Xproto.h> +#include <nx-X11/X.h> +#include <nx-X11/Xproto.h> #include "inputstr.h" #include "gcstruct.h" /* pointer for extnsionst.h*/ #include "extnsionst.h" /* extension entry */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "dixevents.h" #include "exevents.h" #include "extinit.h" #include "exglobals.h" #include "swaprep.h" +#include "protocol-versions.h" /* modules local to Xi */ #include "allowev.h" @@ -204,8 +201,9 @@ Mask PropagateMask[MAX_DEVICES]; static XExtensionVersion thisversion = {XI_Present, - XI_Add_XChangeDeviceControl_Major, - XI_Add_XChangeDeviceControl_Minor}; + SERVER_XI_MAJOR_VERSION, + SERVER_XI_MINOR_VERSION, + }; /********************************************************************** * @@ -584,17 +582,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 */ } } @@ -603,12 +600,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 @@ -617,16 +612,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 */ } } @@ -635,10 +629,8 @@ SDeviceKeyStateNotifyEvent (from, to) deviceKeyStateNotify *from; deviceKeyStateNotify *to; { - register char n; - *to = *from; - swaps(&to->sequenceNumber,n); + swaps(&to->sequenceNumber); } void @@ -646,10 +638,8 @@ SDeviceButtonStateNotifyEvent (from, to) deviceButtonStateNotify *from; deviceButtonStateNotify *to; { - register char n; - *to = *from; - swaps(&to->sequenceNumber,n); + swaps(&to->sequenceNumber); } void @@ -657,11 +647,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 @@ -669,11 +657,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); } /************************************************************************ @@ -870,7 +856,7 @@ AssignTypeAndName (dev, type, name) char *name; { dev->type = type; - dev->name = (char *) xalloc(strlen(name)+1); + dev->name = (char *) malloc(strlen(name)+1); strcpy (dev->name, name); } diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c index a944d4cc8..af497869c 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.c +++ b/nx-X11/programs/Xserver/Xi/getbmap.c @@ -1,4 +1,3 @@ -/* $Xorg: getbmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getbmap.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -80,10 +76,8 @@ int SProcXGetDeviceButtonMapping(client) register ClientPtr client; { - register char n; - REQUEST(xGetDeviceButtonMappingReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXGetDeviceButtonMapping(client)); } @@ -128,7 +122,7 @@ ProcXGetDeviceButtonMapping (client) rep.nElts = b->numButtons; rep.length = (rep.nElts + (4-1))/4; WriteReplyToClient (client, sizeof (xGetDeviceButtonMappingReply), &rep); - (void)WriteToClient(client, rep.nElts, + WriteToClient(client, rep.nElts, (char *)&b->map[1]); return Success; } @@ -146,9 +140,7 @@ SRepXGetDeviceButtonMapping (client, size, rep) int size; xGetDeviceButtonMappingReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getbmap.h b/nx-X11/programs/Xserver/Xi/getbmap.h index 01cc3780a..85d2e63e9 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.h +++ b/nx-X11/programs/Xserver/Xi/getbmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getbmap.h,v 3.1 1996/04/15 11:18:37 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c index 527273ac4..c315f0bb6 100644 --- a/nx-X11/programs/Xserver/Xi/getdctl.c +++ b/nx-X11/programs/Xserver/Xi/getdctl.c @@ -1,4 +1,3 @@ -/* $Xorg: getdctl.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getdctl.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -81,12 +77,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)); } @@ -139,7 +133,7 @@ ProcXGetDeviceControl(client) return Success; } - buf = (char *) xalloc (total_length); + buf = (char *) malloc (total_length); if (!buf) { SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, @@ -161,7 +155,7 @@ ProcXGetDeviceControl(client) rep.length = (total_length+3) >> 2; WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); WriteToClient(client, total_length, savbuf); - xfree (savbuf); + free (savbuf); return Success; } @@ -178,7 +172,6 @@ CopySwapDeviceResolution (client, v, buf, length) char *buf; int length; { - register char n; AxisInfoPtr a; xDeviceResolutionState *r; int i, *iptr; @@ -197,13 +190,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 +214,8 @@ SRepXGetDeviceControl (client, size, rep) int size; xGetDeviceControlReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getdctl.h b/nx-X11/programs/Xserver/Xi/getdctl.h index 168620eca..0618b4d01 100644 --- a/nx-X11/programs/Xserver/Xi/getdctl.h +++ b/nx-X11/programs/Xserver/Xi/getdctl.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getdctl.h,v 3.1 1996/04/15 11:18:38 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c index 5652ad303..a8845c72b 100644 --- a/nx-X11/programs/Xserver/Xi/getfctl.c +++ b/nx-X11/programs/Xserver/Xi/getfctl.c @@ -1,4 +1,3 @@ -/* $Xorg: getfctl.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getfctl.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -81,10 +77,8 @@ int SProcXGetFeedbackControl(client) register ClientPtr client; { - register char n; - REQUEST(xGetFeedbackControlReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXGetFeedbackControl(client)); } @@ -165,7 +159,7 @@ ProcXGetFeedbackControl(client) return Success; } - buf = (char *) xalloc (total_length); + buf = (char *) malloc (total_length); if (!buf) { SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, @@ -190,7 +184,7 @@ ProcXGetFeedbackControl(client) rep.length = (total_length+3) >> 2; WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); WriteToClient(client, total_length, savbuf); - xfree (savbuf); + free (savbuf); return Success; } @@ -207,7 +201,6 @@ CopySwapKbdFeedback (client, k, buf) char **buf; { int i; - register char n; xKbdFeedbackState *k2; k2 = (xKbdFeedbackState *) *buf; @@ -224,11 +217,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 +238,6 @@ CopySwapPtrFeedback (client, p, buf) PtrFeedbackPtr p; char **buf; { - register char n; xPtrFeedbackState *p2; p2 = (xPtrFeedbackState *) *buf; @@ -257,10 +249,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 +269,6 @@ CopySwapIntegerFeedback (client, i, buf) IntegerFeedbackPtr i; char **buf; { - register char n; xIntegerFeedbackState *i2; i2 = (xIntegerFeedbackState *) *buf; @@ -289,10 +280,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 +301,6 @@ CopySwapStringFeedback (client, s, buf) char **buf; { int i; - register char n; xStringFeedbackState *s2; KeySym *kptr; @@ -327,13 +317,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 +341,6 @@ CopySwapLedFeedback (client, l, buf) LedFeedbackPtr l; char **buf; { - register char n; xLedFeedbackState *l2; l2 = (xLedFeedbackState *) *buf; @@ -362,9 +351,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 +370,6 @@ CopySwapBellFeedback (client, b, buf) BellFeedbackPtr b; char **buf; { - register char n; xBellFeedbackState *b2; b2 = (xBellFeedbackState *) *buf; @@ -393,9 +381,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 +401,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); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_feedbacks); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getfctl.h b/nx-X11/programs/Xserver/Xi/getfctl.h index 97805d9af..f8441b0b3 100644 --- a/nx-X11/programs/Xserver/Xi/getfctl.h +++ b/nx-X11/programs/Xserver/Xi/getfctl.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getfctl.h,v 3.1 1996/04/15 11:18:39 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getfocus.c b/nx-X11/programs/Xserver/Xi/getfocus.c index 3c1597cc9..6f30b011a 100644 --- a/nx-X11/programs/Xserver/Xi/getfocus.c +++ b/nx-X11/programs/Xserver/Xi/getfocus.c @@ -1,4 +1,3 @@ -/* $Xorg: getfocus.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getfocus.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -81,10 +77,8 @@ int SProcXGetDeviceFocus(client) register ClientPtr client; { - register char n; - REQUEST(xGetDeviceFocusReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXGetDeviceFocus(client)); } @@ -147,11 +141,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); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->focus); + swapl(&rep->time); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getfocus.h b/nx-X11/programs/Xserver/Xi/getfocus.h index 5d6438e1d..a404ee422 100644 --- a/nx-X11/programs/Xserver/Xi/getfocus.h +++ b/nx-X11/programs/Xserver/Xi/getfocus.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getfocus.h,v 3.1 1996/04/15 11:18:40 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 4e67d9c71..84f8a10a8 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -1,4 +1,3 @@ -/* $Xorg: getkmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getkmap.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -82,10 +78,8 @@ int SProcXGetDeviceKeyMapping(client) register ClientPtr client; { - register char n; - REQUEST(xGetDeviceKeyMappingReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXGetDeviceKeyMapping(client)); } @@ -169,10 +163,8 @@ SRepXGetDeviceKeyMapping (client, size, rep) int size; xGetDeviceKeyMappingReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getkmap.h b/nx-X11/programs/Xserver/Xi/getkmap.h index 5c2e3b189..4e8b4ba3a 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.h +++ b/nx-X11/programs/Xserver/Xi/getkmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getkmap.h,v 3.1 1996/04/15 11:18:41 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getmmap.c b/nx-X11/programs/Xserver/Xi/getmmap.c index 6b2e38d0b..53f2a6aec 100644 --- a/nx-X11/programs/Xserver/Xi/getmmap.c +++ b/nx-X11/programs/Xserver/Xi/getmmap.c @@ -1,4 +1,3 @@ -/* $Xorg: getmmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getmmap.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> /* Request macro */ +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> /* Request macro */ #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -81,10 +77,8 @@ int SProcXGetDeviceModifierMapping(client) register ClientPtr client; { - register char n; - REQUEST(xGetDeviceModifierMappingReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXGetDeviceModifierMapping(client)); } @@ -133,7 +127,7 @@ ProcXGetDeviceModifierMapping(client) WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); /* Reply with the (modified by DDX) map that SetModifierMapping passed in */ - WriteToClient(client, 8*maxkeys, (char *)kp->modifierKeyMap); + WriteToClient(client, 8*maxkeys, kp->modifierKeyMap); return Success; } @@ -150,9 +144,7 @@ SRepXGetDeviceModifierMapping (client, size, rep) int size; xGetDeviceModifierMappingReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getmmap.h b/nx-X11/programs/Xserver/Xi/getmmap.h index 88e4af427..32d7061e2 100644 --- a/nx-X11/programs/Xserver/Xi/getmmap.h +++ b/nx-X11/programs/Xserver/Xi/getmmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getmmap.h,v 3.1 1996/04/15 11:18:42 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 2b4de1f3e..569efcd1f 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -1,4 +1,3 @@ -/* $Xorg: getprop.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getprop.c,v 3.5 2001/08/23 14:56:19 alanh Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structs */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -85,12 +81,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)); } @@ -137,7 +131,7 @@ ProcXGetDeviceDontPropagateList (client) if (count) { rep.count = count; - buf = (XEventClass *) xalloc (rep.count * sizeof(XEventClass)); + buf = (XEventClass *) malloc (rep.count * sizeof(XEventClass)); rep.length = (rep.count * sizeof (XEventClass) + 3) >> 2; tbuf = buf; @@ -154,7 +148,7 @@ ProcXGetDeviceDontPropagateList (client) { client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; WriteSwappedDataToClient( client, count * sizeof(XEventClass), buf); - xfree (buf); + free (buf); } return Success; } @@ -206,10 +200,8 @@ SRepXGetDeviceDontPropagateList (client, size, rep) int size; xGetDeviceDontPropagateListReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->count, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->count); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getprop.h b/nx-X11/programs/Xserver/Xi/getprop.h index a8dcc3ab2..fd9011603 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.h +++ b/nx-X11/programs/Xserver/Xi/getprop.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getprop.h,v 3.1 1996/04/15 11:18:44 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c index c2ec2b9d5..bac74317b 100644 --- a/nx-X11/programs/Xserver/Xi/getselev.c +++ b/nx-X11/programs/Xserver/Xi/getselev.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getselev.c,v 3.5 2001/10/28 03:32:53 tsi Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -45,7 +44,6 @@ SOFTWARE. ********************************************************/ -/* $Xorg: getselev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /*********************************************************************** * @@ -53,16 +51,14 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window struct */ #include "extnsionst.h" @@ -83,12 +79,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)); } @@ -149,7 +143,7 @@ ProcXGetSelectedExtensionEvents(client) total_length = (rep.all_clients_count + rep.this_client_count) * sizeof (XEventClass); rep.length = (total_length + 3) >> 2; - buf = (XEventClass *) xalloc (total_length); + buf = (XEventClass *) malloc (total_length); tclient = buf; aclient = buf + rep.this_client_count; @@ -168,7 +162,7 @@ ProcXGetSelectedExtensionEvents(client) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient( client, total_length, buf); - xfree (buf); + free (buf); } return Success; } @@ -186,11 +180,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); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->this_client_count); + swaps(&rep->all_clients_count); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getselev.h b/nx-X11/programs/Xserver/Xi/getselev.h index bb0e71a11..ef9e3b606 100644 --- a/nx-X11/programs/Xserver/Xi/getselev.h +++ b/nx-X11/programs/Xserver/Xi/getselev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getselev.h,v 3.1 1996/04/15 11:18:49 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c index 1ad0ce785..00381a91c 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.c +++ b/nx-X11/programs/Xserver/Xi/getvers.c @@ -1,4 +1,3 @@ -/* $Xorg: getvers.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -82,12 +78,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)); } @@ -114,6 +108,7 @@ ProcXGetExtensionVersion (client) return Success; } + memset(&rep, 0, sizeof(xGetExtensionVersionReply)); rep.repType = X_Reply; rep.RepType = X_GetExtensionVersion; rep.length = 0; @@ -147,11 +142,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); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->major_version); + swaps(&rep->minor_version); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getvers.h b/nx-X11/programs/Xserver/Xi/getvers.h index 93b7bfbec..a09e2da2d 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.h +++ b/nx-X11/programs/Xserver/Xi/getvers.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/getvers.h,v 3.1 1996/04/15 11:18:50 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/grabdev.c b/nx-X11/programs/Xserver/Xi/grabdev.c index 21e920a35..8d8a5491e 100644 --- a/nx-X11/programs/Xserver/Xi/grabdev.c +++ b/nx-X11/programs/Xserver/Xi/grabdev.c @@ -1,4 +1,3 @@ -/* $Xorg: grabdev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdev.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -54,18 +52,16 @@ SOFTWARE. */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -86,14 +82,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 +215,7 @@ SRepXGrabDevice (client, size, rep) int size; xGrabDeviceReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/grabdev.h b/nx-X11/programs/Xserver/Xi/grabdev.h index d149da5d9..9e9196c47 100644 --- a/nx-X11/programs/Xserver/Xi/grabdev.h +++ b/nx-X11/programs/Xserver/Xi/grabdev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/grabdev.h,v 3.1 1996/04/15 11:18:51 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/grabdevb.c b/nx-X11/programs/Xserver/Xi/grabdevb.c index ad43c29a0..edf1d763b 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevb.c +++ b/nx-X11/programs/Xserver/Xi/grabdevb.c @@ -1,4 +1,3 @@ -/* $Xorg: grabdevb.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevb.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -83,14 +79,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/grabdevb.h b/nx-X11/programs/Xserver/Xi/grabdevb.h index 50929a32b..29f0401e1 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevb.h +++ b/nx-X11/programs/Xserver/Xi/grabdevb.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/grabdevb.h,v 3.1 1996/04/15 11:18:52 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/grabdevk.c b/nx-X11/programs/Xserver/Xi/grabdevk.c index 952c5d89a..cc7d2f034 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevk.c +++ b/nx-X11/programs/Xserver/Xi/grabdevk.c @@ -1,4 +1,3 @@ -/* $Xorg: grabdevk.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevk.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -83,14 +79,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/grabdevk.h b/nx-X11/programs/Xserver/Xi/grabdevk.h index 230461937..baa2d1533 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevk.h +++ b/nx-X11/programs/Xserver/Xi/grabdevk.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/grabdevk.h,v 3.1 1996/04/15 11:18:53 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c index 02b1fee32..9c04ca30e 100644 --- a/nx-X11/programs/Xserver/Xi/gtmotion.c +++ b/nx-X11/programs/Xserver/Xi/gtmotion.c @@ -1,4 +1,3 @@ -/* $Xorg: gtmotion.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/gtmotion.c,v 3.6 2001/10/28 03:32:53 tsi Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" @@ -81,13 +77,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)); } @@ -153,7 +147,7 @@ ProcXGetDeviceMotionEvents(client) { size = sizeof(Time) + (axes * sizeof (INT32)); tsize = num_events * size; - coords = (INT32 *) ALLOCATE_LOCAL(tsize); + coords = (INT32 *) malloc(tsize); if (!coords) { SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0, @@ -175,19 +169,17 @@ ProcXGetDeviceMotionEvents(client) { if (client->swapped) { - register char n; - bufptr = coords; for (i=0; i<nEvents * (axes+1); i++) { - swapl(bufptr, n); + swapl(bufptr); bufptr++; } } - WriteToClient(client, length * 4, (char *)coords); + WriteToClient(client, length * 4, coords); } if (coords) - DEALLOCATE_LOCAL(coords); + free(coords); return Success; } @@ -204,10 +196,8 @@ SRepXGetDeviceMotionEvents (client, size, rep) int size; xGetDeviceMotionEventsReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->nEvents, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->nEvents); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.h b/nx-X11/programs/Xserver/Xi/gtmotion.h index 205b19958..986eb5bad 100644 --- a/nx-X11/programs/Xserver/Xi/gtmotion.h +++ b/nx-X11/programs/Xserver/Xi/gtmotion.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/gtmotion.h,v 3.1 1996/04/15 11:18:56 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c index b7eed86b7..95896d49d 100644 --- a/nx-X11/programs/Xserver/Xi/listdev.c +++ b/nx-X11/programs/Xserver/Xi/listdev.c @@ -1,4 +1,3 @@ -/* $Xorg: listdev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/listdev.c,v 3.3 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -83,10 +79,8 @@ int SProcXListInputDevices(client) register ClientPtr client; { - register char n; - REQUEST(xListInputDevicesReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXListInputDevices(client)); } @@ -114,6 +108,7 @@ ProcXListInputDevices (client) REQUEST_SIZE_MATCH(xListInputDevicesReq); + memset(&rep, 0, sizeof(xListInputDevicesReply)); rep.repType = X_Reply; rep.RepType = X_ListInputDevices; rep.length = 0; @@ -128,7 +123,7 @@ ProcXListInputDevices (client) SizeDeviceInfo (d, &namesize, &size); total_length = numdevs * sizeof (xDeviceInfo) + size + namesize; - devbuf = (char *) xalloc (total_length); + devbuf = (char *) calloc (1, total_length); classbuf = devbuf + (numdevs * sizeof (xDeviceInfo)); namebuf = classbuf + size; savbuf = devbuf; @@ -143,7 +138,7 @@ ProcXListInputDevices (client) rep.length = (total_length + 3) >> 2; WriteReplyToClient (client, sizeof (xListInputDevicesReply), &rep); WriteToClient(client, total_length, savbuf); - xfree (savbuf); + free (savbuf); return Success; } @@ -253,7 +248,6 @@ CopySwapDevice (client, d, num_classes, buf) int num_classes; char **buf; { - register char n; xDeviceInfoPtr dev; dev = (xDeviceInfoPtr) *buf; @@ -269,7 +263,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); } @@ -286,7 +280,6 @@ CopySwapKeyClass (client, k, buf) KeyClassPtr k; char **buf; { - register char n; xKeyInfoPtr k2; k2 = (xKeyInfoPtr) *buf; @@ -297,7 +290,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); } @@ -314,7 +307,6 @@ CopySwapButtonClass (client, b, buf) ButtonClassPtr b; char **buf; { - register char n; xButtonInfoPtr b2; b2 = (xButtonInfoPtr) *buf; @@ -323,7 +315,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); } @@ -347,7 +339,6 @@ CopySwapValuatorClass (client, v, buf) char **buf; { int i, j, axes, t_axes; - register char n; xValuatorInfoPtr v2; AxisInfo *a; xAxisInfoPtr a2; @@ -364,7 +355,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); @@ -374,9 +365,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++; @@ -399,9 +390,7 @@ SRepXListInputDevices (client, size, rep) int size; xListInputDevicesReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/listdev.h b/nx-X11/programs/Xserver/Xi/listdev.h index 125ea3580..629dca215 100644 --- a/nx-X11/programs/Xserver/Xi/listdev.h +++ b/nx-X11/programs/Xserver/Xi/listdev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/listdev.h,v 3.1 1996/04/15 11:18:57 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/opendev.c b/nx-X11/programs/Xserver/Xi/opendev.c index 45bea7ae5..1b0a2476b 100644 --- a/nx-X11/programs/Xserver/Xi/opendev.c +++ b/nx-X11/programs/Xserver/Xi/opendev.c @@ -1,4 +1,3 @@ -/* $Xorg: opendev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/opendev.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "extnsionst.h" @@ -85,10 +81,8 @@ int SProcXOpenDevice(client) register ClientPtr client; { - register char n; - REQUEST(xOpenDeviceReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXOpenDevice(client)); } @@ -141,6 +135,7 @@ ProcXOpenDevice(client) if (enableit && dev->inited && dev->startup) (void)EnableDevice(dev); + memset(&rep, 0, sizeof(xOpenDeviceReply)); rep.repType = X_Reply; rep.RepType = X_OpenDevice; rep.sequenceNumber = client->sequence; @@ -180,7 +175,7 @@ ProcXOpenDevice(client) rep.length = (j * sizeof (xInputClassInfo) + 3) >> 2; rep.num_classes = j; WriteReplyToClient (client, sizeof (xOpenDeviceReply), &rep); - WriteToClient(client, j * sizeof (xInputClassInfo), (char *)evbase); + WriteToClient(client, j * sizeof (xInputClassInfo), evbase); return (Success); } @@ -197,9 +192,7 @@ SRepXOpenDevice (client, size, rep) int size; xOpenDeviceReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/opendev.h b/nx-X11/programs/Xserver/Xi/opendev.h index 94ed6f6bd..68b89da4c 100644 --- a/nx-X11/programs/Xserver/Xi/opendev.h +++ b/nx-X11/programs/Xserver/Xi/opendev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/opendev.h,v 3.1 1996/04/15 11:18:58 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/queryst.c b/nx-X11/programs/Xserver/Xi/queryst.c index 34b140c8e..4eeba4c5f 100644 --- a/nx-X11/programs/Xserver/Xi/queryst.c +++ b/nx-X11/programs/Xserver/Xi/queryst.c @@ -1,4 +1,3 @@ -/* $Xorg: queryst.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /* Copyright 1998, 1998 The Open Group @@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xi/queryst.c,v 3.4 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -34,18 +32,16 @@ from The Open Group. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" @@ -63,10 +59,8 @@ int SProcXQueryDeviceState(client) register ClientPtr client; { - register char n; - REQUEST(xQueryDeviceStateReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXQueryDeviceState(client)); } @@ -80,7 +74,6 @@ int ProcXQueryDeviceState(client) register ClientPtr client; { - register char n; int i; int num_classes = 0; int total_length = 0; @@ -135,7 +128,7 @@ ProcXQueryDeviceState(client) (v->numAxes * sizeof(int))); num_classes++; } - buf = (char *) xalloc (total_length); + buf = (char *) malloc (total_length); if (!buf) { SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, @@ -179,7 +172,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); } @@ -190,7 +183,7 @@ ProcXQueryDeviceState(client) WriteReplyToClient (client, sizeof(xQueryDeviceStateReply), &rep); if (total_length > 0) WriteToClient (client, total_length, savbuf); - xfree (savbuf); + free (savbuf); return Success; } @@ -207,9 +200,7 @@ SRepXQueryDeviceState (client, size, rep) int size; xQueryDeviceStateReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/queryst.h b/nx-X11/programs/Xserver/Xi/queryst.h index bf651b4bd..53378bb6c 100644 --- a/nx-X11/programs/Xserver/Xi/queryst.h +++ b/nx-X11/programs/Xserver/Xi/queryst.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/queryst.h,v 3.1 1996/04/15 11:19:00 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/selectev.c b/nx-X11/programs/Xserver/Xi/selectev.c index a9b731864..6887967ac 100644 --- a/nx-X11/programs/Xserver/Xi/selectev.c +++ b/nx-X11/programs/Xserver/Xi/selectev.c @@ -1,4 +1,3 @@ -/* $Xorg: selectev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/selectev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,19 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES - #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" @@ -87,13 +82,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/selectev.h b/nx-X11/programs/Xserver/Xi/selectev.h index 82bdbc6c0..69f8d65bc 100644 --- a/nx-X11/programs/Xserver/Xi/selectev.h +++ b/nx-X11/programs/Xserver/Xi/selectev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/selectev.h,v 3.1 1996/04/15 11:19:01 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/sendexev.c b/nx-X11/programs/Xserver/Xi/sendexev.c index 9b441f2d8..a851c5120 100644 --- a/nx-X11/programs/Xserver/Xi/sendexev.c +++ b/nx-X11/programs/Xserver/Xi/sendexev.c @@ -1,4 +1,3 @@ -/* $Xorg: sendexev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/sendexev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -54,18 +52,16 @@ SOFTWARE. */ #define EXTENSION_EVENT_BASE 64 -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* Window */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" @@ -86,7 +82,6 @@ int SProcXSendExtensionEvent(client) register ClientPtr client; { - register char n; CARD32 *p; register int i; xEvent eventT; @@ -94,10 +89,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 +149,15 @@ ProcXSendExtensionEvent (client) return Success; } + /* + the previous code here returned the unitialized variable ret, + so using Success we have defined returncode at least. FIXME: + Upstream works different here, we must check this! + */ + if (stuff->num_events == 0) + /* return ret; */ + return Success; + /* The client's event type must be one defined by an extension. */ first = ((xEvent *) &stuff[1]); diff --git a/nx-X11/programs/Xserver/Xi/sendexev.h b/nx-X11/programs/Xserver/Xi/sendexev.h index e5bc185a8..e52eda6f1 100644 --- a/nx-X11/programs/Xserver/Xi/sendexev.h +++ b/nx-X11/programs/Xserver/Xi/sendexev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/sendexev.h,v 3.1 1996/04/15 11:19:02 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/setbmap.c b/nx-X11/programs/Xserver/Xi/setbmap.c index 37db5110d..edaea78c7 100644 --- a/nx-X11/programs/Xserver/Xi/setbmap.c +++ b/nx-X11/programs/Xserver/Xi/setbmap.c @@ -1,4 +1,3 @@ -/* $Xorg: setbmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setbmap.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,8 +51,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #define IsOn(ptr, bit) \ (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) @@ -62,11 +58,11 @@ SOFTWARE. #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -84,10 +80,8 @@ int SProcXSetDeviceButtonMapping(client) register ClientPtr client; { - register char n; - REQUEST(xSetDeviceButtonMappingReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXSetDeviceButtonMapping(client)); } @@ -162,9 +156,7 @@ SRepXSetDeviceButtonMapping (client, size, rep) int size; xSetDeviceButtonMappingReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setbmap.h b/nx-X11/programs/Xserver/Xi/setbmap.h index dab5fcbde..7dd00c416 100644 --- a/nx-X11/programs/Xserver/Xi/setbmap.h +++ b/nx-X11/programs/Xserver/Xi/setbmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/setbmap.h,v 3.1 1996/04/15 11:19:03 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/setdval.c b/nx-X11/programs/Xserver/Xi/setdval.c index 9b5b1e20d..bb6db7bcb 100644 --- a/nx-X11/programs/Xserver/Xi/setdval.c +++ b/nx-X11/programs/Xserver/Xi/setdval.c @@ -1,4 +1,3 @@ -/* $Xorg: setdval.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setdval.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -81,10 +77,8 @@ int SProcXSetDeviceValuators(client) register ClientPtr client; { - register char n; - REQUEST(xSetDeviceValuatorsReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXSetDeviceValuators(client)); } @@ -166,9 +160,7 @@ SRepXSetDeviceValuators (client, size, rep) int size; xSetDeviceValuatorsReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setdval.h b/nx-X11/programs/Xserver/Xi/setdval.h index d475c7cc6..2817b2688 100644 --- a/nx-X11/programs/Xserver/Xi/setdval.h +++ b/nx-X11/programs/Xserver/Xi/setdval.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/setdval.h,v 3.1 1996/04/15 11:19:04 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/setfocus.c b/nx-X11/programs/Xserver/Xi/setfocus.c index a1dd09d71..b88a9ba02 100644 --- a/nx-X11/programs/Xserver/Xi/setfocus.c +++ b/nx-X11/programs/Xserver/Xi/setfocus.c @@ -1,4 +1,3 @@ -/* $Xorg: setfocus.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setfocus.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "dixevents.h" @@ -84,13 +80,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/setfocus.h b/nx-X11/programs/Xserver/Xi/setfocus.h index 62ff181d2..44f9457d7 100644 --- a/nx-X11/programs/Xserver/Xi/setfocus.h +++ b/nx-X11/programs/Xserver/Xi/setfocus.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/setfocus.h,v 3.1 1996/04/15 11:19:05 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/setmmap.c b/nx-X11/programs/Xserver/Xi/setmmap.c index 3fa2c7e7e..f50447952 100644 --- a/nx-X11/programs/Xserver/Xi/setmmap.c +++ b/nx-X11/programs/Xserver/Xi/setmmap.c @@ -1,4 +1,3 @@ -/* $Xorg: setmmap.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setmmap.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /******************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS /* for inputstr.h */ -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -82,10 +78,8 @@ int SProcXSetDeviceModifierMapping(client) register ClientPtr client; { - register char n; - REQUEST(xSetDeviceModifierMappingReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXSetDeviceModifierMapping(client)); } @@ -155,10 +149,8 @@ SRepXSetDeviceModifierMapping (client, size, rep) int size; xSetDeviceModifierMappingReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setmmap.h b/nx-X11/programs/Xserver/Xi/setmmap.h index c859095f8..7deb8bbf2 100644 --- a/nx-X11/programs/Xserver/Xi/setmmap.h +++ b/nx-X11/programs/Xserver/Xi/setmmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/setmmap.h,v 3.1 1996/04/15 11:19:06 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/setmode.c b/nx-X11/programs/Xserver/Xi/setmode.c index f95ef5514..91287088d 100644 --- a/nx-X11/programs/Xserver/Xi/setmode.c +++ b/nx-X11/programs/Xserver/Xi/setmode.c @@ -1,4 +1,3 @@ -/* $Xorg: setmode.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setmode.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -81,10 +77,8 @@ int SProcXSetDeviceMode(client) register ClientPtr client; { - register char n; - REQUEST(xSetDeviceModeReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcXSetDeviceMode(client)); } @@ -150,9 +144,7 @@ SRepXSetDeviceMode (client, size, rep) int size; xSetDeviceModeReply *rep; { - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setmode.h b/nx-X11/programs/Xserver/Xi/setmode.h index d570af7bd..95d90b7f4 100644 --- a/nx-X11/programs/Xserver/Xi/setmode.h +++ b/nx-X11/programs/Xserver/Xi/setmode.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/setmode.h,v 3.1 1996/04/15 11:19:07 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/stubs.c b/nx-X11/programs/Xserver/Xi/stubs.c index 7ad6d903e..e71db6051 100644 --- a/nx-X11/programs/Xserver/Xi/stubs.c +++ b/nx-X11/programs/Xserver/Xi/stubs.c @@ -1,4 +1,3 @@ -/* $Xorg: stubs.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.4 2001/12/14 19:58:59 dawes Exp $ */ /* * stubs.c -- stub routines for the X server side of the XINPUT @@ -57,16 +55,15 @@ SOFTWARE. * Xnest could do the same thing. */ -#define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> -#include <X11/Xproto.h> +#include <nx-X11/X.h> +#include <nx-X11/Xproto.h> #include "inputstr.h" -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "XIstubs.h" /*********************************************************************** @@ -209,7 +206,7 @@ AddOtherInputDevices () DeviceIntPtr dev; DeviceProc deviceProc; - pointer private; + void * private; dev = (DeviceIntPtr) AddInputDevice(deviceProc, TRUE); dev->public.devicePrivate = private; diff --git a/nx-X11/programs/Xserver/Xi/ungrdev.c b/nx-X11/programs/Xserver/Xi/ungrdev.c index 8de4cd225..ea7f0f6f1 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdev.c +++ b/nx-X11/programs/Xserver/Xi/ungrdev.c @@ -1,4 +1,3 @@ -/* $Xorg: ungrdev.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,17 +51,15 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -80,12 +76,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/ungrdev.h b/nx-X11/programs/Xserver/Xi/ungrdev.h index e8e866bc9..6ecfa5f67 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdev.h +++ b/nx-X11/programs/Xserver/Xi/ungrdev.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/ungrdev.h,v 3.1 1996/04/15 11:19:08 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/ungrdevb.c b/nx-X11/programs/Xserver/Xi/ungrdevb.c index 8927a5c6e..bbf3575ea 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevb.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevb.c @@ -1,4 +1,3 @@ -/* $Xorg: ungrdevb.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -86,13 +82,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/ungrdevb.h b/nx-X11/programs/Xserver/Xi/ungrdevb.h index 238e56954..29dd761b5 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevb.h +++ b/nx-X11/programs/Xserver/Xi/ungrdevb.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.h,v 3.1 1996/04/15 11:19:10 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> diff --git a/nx-X11/programs/Xserver/Xi/ungrdevk.c b/nx-X11/programs/Xserver/Xi/ungrdevk.c index 38cfa1b71..af3bb2348 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevk.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevk.c @@ -1,4 +1,3 @@ -/* $Xorg: ungrdevk.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ /*********************************************************************** * @@ -53,18 +51,16 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include <X11/extensions/XI.h> -#include <X11/extensions/XIproto.h> +#include <nx-X11/extensions/XI.h> +#include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -86,13 +82,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)); } diff --git a/nx-X11/programs/Xserver/Xi/ungrdevk.h b/nx-X11/programs/Xserver/Xi/ungrdevk.h index ba3455882..be383b519 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevk.h +++ b/nx-X11/programs/Xserver/Xi/ungrdevk.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.h,v 3.1 1996/04/15 11:19:12 dawes Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> |
