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/XGetKMap.c | |
parent | 6b055729fd0f89eedd2bf00befd8e42804f12b4a (diff) |
Mass reindent. Sorry.XORG-7_0_99_901
Diffstat (limited to 'src/XGetKMap.c')
-rw-r--r-- | src/XGetKMap.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/XGetKMap.c b/src/XGetKMap.c index c794006..59f6f93 100644 --- a/src/XGetKMap.c +++ b/src/XGetKMap.c @@ -61,51 +61,47 @@ SOFTWARE. #include "XIint.h" KeySym * -XGetDeviceKeyMapping ( - register Display *dpy, - XDevice *dev, +XGetDeviceKeyMapping(register Display * dpy, XDevice * dev, #if NeedWidePrototypes - unsigned int first, + unsigned int first, #else - KeyCode first, + KeyCode first, #endif - int keycount, - int *syms_per_code) - { + int keycount, int *syms_per_code) +{ long nbytes; register KeySym *mapping = NULL; xGetDeviceKeyMappingReq *req; xGetDeviceKeyMappingReply 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 ((KeySym *) NoSuchExtension); - GetReq(GetDeviceKeyMapping,req); + GetReq(GetDeviceKeyMapping, req); req->reqType = info->codes->major_opcode; req->ReqType = X_GetDeviceKeyMapping; req->deviceid = dev->device_id; req->firstKeyCode = first; req->count = keycount; - if (! _XReply (dpy, (xReply *) &rep, 0, xFalse)) - { + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return (KeySym *) NULL; - } + } if (rep.length > 0) { - *syms_per_code = rep.keySymsPerKeyCode; + *syms_per_code = rep.keySymsPerKeyCode; nbytes = (long)rep.length << 2; - mapping = (KeySym *) Xmalloc((unsigned) nbytes); + mapping = (KeySym *) Xmalloc((unsigned)nbytes); if (mapping) - _XRead (dpy, (char *)mapping, nbytes); + _XRead(dpy, (char *)mapping, nbytes); else - _XEatData (dpy, (unsigned long) nbytes); - } + _XEatData(dpy, (unsigned long)nbytes); + } UnlockDisplay(dpy); SyncHandle(); return (mapping); - } +} |