diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-03-31 14:50:24 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2006-03-31 14:50:24 +0000 |
commit | f50ac4deec13dfd070715f636887e12f6301070f (patch) | |
tree | be5857de4d38d644938ad796fcfaab2c37b9f99f /src/XGetProp.c | |
parent | 6b055729fd0f89eedd2bf00befd8e42804f12b4a (diff) |
Mass reindent. Sorry.XORG-7_0_99_901
Diffstat (limited to 'src/XGetProp.c')
-rw-r--r-- | src/XGetProp.c | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/src/XGetProp.c b/src/XGetProp.c index ed5a2d1..59b8b87 100644 --- a/src/XGetProp.c +++ b/src/XGetProp.c @@ -61,60 +61,56 @@ SOFTWARE. #include <X11/extensions/extutil.h> #include "XIint.h" -XEventClass -*XGetDeviceDontPropagateList (dpy, window, count) - register Display *dpy; - Window window; - int *count; - { - XEventClass *list = NULL; - int rlen; - xGetDeviceDontPropagateListReq *req; - xGetDeviceDontPropagateListReply rep; - XExtDisplayInfo *info = XInput_find_display (dpy); - - LockDisplay (dpy); +XEventClass * XGetDeviceDontPropagateList(dpy, window, count) + register Display * + dpy; + Window + window; + int * + count; +{ + XEventClass *list = NULL; + int rlen; + xGetDeviceDontPropagateListReq *req; + xGetDeviceDontPropagateListReply rep; + XExtDisplayInfo *info = XInput_find_display(dpy); + + LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release) == -1) return ((XEventClass *) NoSuchExtension); - GetReq(GetDeviceDontPropagateList,req); + GetReq(GetDeviceDontPropagateList, req); req->reqType = info->codes->major_opcode; req->ReqType = X_GetDeviceDontPropagateList; req->window = window; - if (! _XReply (dpy, (xReply *) &rep, 0, xFalse)) - { + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return (XEventClass *) NULL; - } + } *count = rep.count; - if (*count) - { + if (*count) { rlen = rep.length << 2; - list = (XEventClass *) Xmalloc (rep.length * sizeof(XEventClass)); - if (list) - { - int i; - CARD32 ec; - - /* read and assign each XEventClass separately because - * the library representation may not be the same size - * as the wire representation (64 bit machines) - */ - for (i = 0; i < rep.length; i++) - { - _XRead (dpy, (char *)(&ec), sizeof(CARD32)); - list[i] = (XEventClass)ec; - } + list = (XEventClass *) Xmalloc(rep.length * sizeof(XEventClass)); + if (list) { + int i; + CARD32 ec; + + /* read and assign each XEventClass separately because + * the library representation may not be the same size + * as the wire representation (64 bit machines) + */ + for (i = 0; i < rep.length; i++) { + _XRead(dpy, (char *)(&ec), sizeof(CARD32)); + list[i] = (XEventClass) ec; } - else - _XEatData (dpy, (unsigned long) rlen); - } + } else + _XEatData(dpy, (unsigned long)rlen); + } UnlockDisplay(dpy); SyncHandle(); return (list); - } - +} |