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/XGetMMap.c | |
parent | 6b055729fd0f89eedd2bf00befd8e42804f12b4a (diff) |
Mass reindent. Sorry.XORG-7_0_99_901
Diffstat (limited to 'src/XGetMMap.c')
-rw-r--r-- | src/XGetMMap.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/XGetMMap.c b/src/XGetMMap.c index 04e89d8..b952a2f 100644 --- a/src/XGetMMap.c +++ b/src/XGetMMap.c @@ -60,45 +60,44 @@ SOFTWARE. #include <X11/extensions/extutil.h> #include "XIint.h" -XModifierKeymap -*XGetDeviceModifierMapping (dpy, dev) - register Display *dpy; - XDevice *dev; - { +XModifierKeymap * XGetDeviceModifierMapping(dpy, dev) + register Display * + dpy; + XDevice * + dev; +{ unsigned long nbytes; XModifierKeymap *res; xGetDeviceModifierMappingReq *req; xGetDeviceModifierMappingReply rep; - XExtDisplayInfo *info = XInput_find_display (dpy); + XExtDisplayInfo *info = XInput_find_display(dpy); - LockDisplay (dpy); + LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release) == -1) return ((XModifierKeymap *) NoSuchExtension); - GetReq(GetDeviceModifierMapping,req); + GetReq(GetDeviceModifierMapping, req); req->reqType = info->codes->major_opcode; req->ReqType = X_GetDeviceModifierMapping; req->deviceid = dev->device_id; - if (! _XReply (dpy, (xReply *) &rep, 0, xFalse)) - { + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return (XModifierKeymap *) NULL; - } + } nbytes = (unsigned long)rep.length << 2; - res = (XModifierKeymap *) Xmalloc(sizeof (XModifierKeymap)); - if (res) - { - res->modifiermap = (KeyCode *) Xmalloc (nbytes); + res = (XModifierKeymap *) Xmalloc(sizeof(XModifierKeymap)); + if (res) { + res->modifiermap = (KeyCode *) Xmalloc(nbytes); if (res->modifiermap) - _XReadPad(dpy, (char *) res->modifiermap, nbytes); + _XReadPad(dpy, (char *)res->modifiermap, nbytes); else - _XEatData (dpy, (unsigned long) nbytes); + _XEatData(dpy, (unsigned long)nbytes); res->max_keypermod = rep.numKeyPerModifier; - } + } UnlockDisplay(dpy); SyncHandle(); return (res); - } +} |