diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-02-20 22:16:49 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-02-20 22:16:49 +0000 |
commit | 6d7083bd69724586338d79784655328f1fcd2ae5 (patch) | |
tree | 59f85a0e3892d181bffc5dba78e040e91b838a27 /Xi/selectev.c | |
parent | 5480c537cee79b324736eac3e438a4713dfa1036 (diff) |
indent fixes (OMG SO UGLY), and nuke old RCS keywords.
Diffstat (limited to 'Xi/selectev.c')
-rw-r--r-- | Xi/selectev.c | 85 |
1 files changed, 40 insertions, 45 deletions
diff --git a/Xi/selectev.c b/Xi/selectev.c index 057050c66..3483804b1 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -1,5 +1,3 @@ -/* $Xorg: selectev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ - /************************************************************ Copyright 1989, 1998 The Open Group @@ -45,7 +43,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 $ */ /*********************************************************************** * @@ -60,22 +57,22 @@ SOFTWARE. #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ +#include <X11/X.h> /* for inputstr.h */ +#include <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 "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" #include "grabdev.h" #include "selectev.h" -extern Mask ExtExclusiveMasks[]; -extern Mask ExtValidMasks[]; +extern Mask ExtExclusiveMasks[]; +extern Mask ExtValidMasks[]; /*********************************************************************** * @@ -84,7 +81,7 @@ extern Mask ExtValidMasks[]; */ int -SProcXSelectExtensionEvent (register ClientPtr client) +SProcXSelectExtensionEvent(register ClientPtr client) { register char n; register long *p; @@ -95,14 +92,13 @@ SProcXSelectExtensionEvent (register ClientPtr client) REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); swapl(&stuff->window, n); swaps(&stuff->count, n); - p = (long *) &stuff[1]; - for (i=0; i<stuff->count; i++) - { - swapl(p, n); + p = (long *)&stuff[1]; + for (i = 0; i < stuff->count; i++) { + swapl(p, n); p++; - } - return(ProcXSelectExtensionEvent(client)); } + return (ProcXSelectExtensionEvent(client)); +} /*********************************************************************** * @@ -111,47 +107,46 @@ SProcXSelectExtensionEvent (register ClientPtr client) */ int -ProcXSelectExtensionEvent (register ClientPtr client) +ProcXSelectExtensionEvent(register ClientPtr client) { - int ret; - int i; - WindowPtr pWin; - struct tmask tmp[EMASKSIZE]; + int ret; + int i; + WindowPtr pWin; + struct tmask tmp[EMASKSIZE]; REQUEST(xSelectExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); - if (stuff->length !=(sizeof(xSelectExtensionEventReq)>>2) + stuff->count) - { - SendErrorToClient (client, IReqCode, X_SelectExtensionEvent, 0, - BadLength); + if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + BadLength); return Success; - } + } - pWin = (WindowPtr) LookupWindow (stuff->window, client); - if (!pWin) - { + pWin = (WindowPtr) LookupWindow(stuff->window, client); + if (!pWin) { client->errorValue = stuff->window; - SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, - BadWindow); + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + BadWindow); return Success; - } + } - if ((ret = CreateMaskFromList (client, (XEventClass *)&stuff[1], - stuff->count, tmp, NULL, X_SelectExtensionEvent)) != Success) + if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1], + stuff->count, tmp, NULL, + X_SelectExtensionEvent)) != Success) return Success; - for (i=0; i<EMASKSIZE; i++) - if (tmp[i].dev != NULL) - { - if ((ret = SelectForWindow((DeviceIntPtr)tmp[i].dev, pWin, client, tmp[i].mask, - ExtExclusiveMasks[i], ExtValidMasks[i])) != Success) - { - SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, - ret); + for (i = 0; i < EMASKSIZE; i++) + if (tmp[i].dev != NULL) { + if ((ret = + SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, + tmp[i].mask, ExtExclusiveMasks[i], + ExtValidMasks[i])) != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + ret); return Success; - } } + } return Success; - } +} |