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/XGetBMap.c | |
parent | 6b055729fd0f89eedd2bf00befd8e42804f12b4a (diff) |
Mass reindent. Sorry.XORG-7_0_99_901
Diffstat (limited to 'src/XGetBMap.c')
-rw-r--r-- | src/XGetBMap.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/XGetBMap.c b/src/XGetBMap.c index 1c1658f..1eaaa23 100644 --- a/src/XGetBMap.c +++ b/src/XGetBMap.c @@ -60,22 +60,22 @@ SOFTWARE. #include <X11/extensions/extutil.h> #include "XIint.h" -#ifdef MIN /* some systems define this in <sys/param.h> */ +#ifdef MIN /* some systems define this in <sys/param.h> */ #undef MIN #endif #define MIN(a, b) ((a) < (b) ? (a) : (b)) int -XGetDeviceButtonMapping (dpy, device, map, nmap) - register Display *dpy; - XDevice *device; - unsigned char map[]; - unsigned int nmap; - { - int status = 0; - unsigned char mapping[256]; /* known fixed size */ +XGetDeviceButtonMapping(dpy, device, map, nmap) + register Display *dpy; + XDevice *device; + unsigned char map[]; + unsigned int nmap; +{ + int status = 0; + unsigned char mapping[256]; /* known fixed size */ long nbytes; - XExtDisplayInfo *info = XInput_find_display (dpy); + XExtDisplayInfo *info = XInput_find_display(dpy); register xGetDeviceButtonMappingReq *req; xGetDeviceButtonMappingReply rep; @@ -89,20 +89,18 @@ XGetDeviceButtonMapping (dpy, device, map, nmap) req->ReqType = X_GetDeviceButtonMapping; req->deviceid = device->device_id; - status = _XReply (dpy, (xReply *)&rep, 0, xFalse); - if (status == 1) - { + status = _XReply(dpy, (xReply *) & rep, 0, xFalse); + if (status == 1) { nbytes = (long)rep.length << 2; - _XRead (dpy, (char *)mapping, nbytes); + _XRead(dpy, (char *)mapping, nbytes); /* don't return more data than the user asked for. */ - if (rep.nElts) - memcpy ((char *) map, (char *) mapping, MIN((int)rep.nElts, nmap)); + if (rep.nElts) + memcpy((char *)map, (char *)mapping, MIN((int)rep.nElts, nmap)); status = rep.nElts; - } - else + } else status = 0; UnlockDisplay(dpy); SyncHandle(); return (status); - } +} |