diff options
Diffstat (limited to 'src/XSetDVal.c')
-rw-r--r-- | src/XSetDVal.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/XSetDVal.c b/src/XSetDVal.c index 3cee1a9..6b382f1 100644 --- a/src/XSetDVal.c +++ b/src/XSetDVal.c @@ -62,22 +62,22 @@ SOFTWARE. #include "XIint.h" int -XSetDeviceValuators (dpy, dev, valuators, first_valuator, num_valuators) - register Display *dpy; - XDevice *dev; - int *valuators; - int first_valuator; - int num_valuators; - { - xSetDeviceValuatorsReq *req; - xSetDeviceValuatorsReply rep; - XExtDisplayInfo *info = XInput_find_display (dpy); - - LockDisplay (dpy); +XSetDeviceValuators(dpy, dev, valuators, first_valuator, num_valuators) + register Display *dpy; + XDevice *dev; + int *valuators; + int first_valuator; + int num_valuators; +{ + xSetDeviceValuatorsReq *req; + xSetDeviceValuatorsReply rep; + XExtDisplayInfo *info = XInput_find_display(dpy); + + LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Add_XSetDeviceValuators) == -1) return (NoSuchExtension); - GetReq(SetDeviceValuators,req); + GetReq(SetDeviceValuators, req); req->reqType = info->codes->major_opcode; req->ReqType = X_SetDeviceValuators; req->deviceid = dev->device_id; @@ -86,15 +86,14 @@ XSetDeviceValuators (dpy, dev, valuators, first_valuator, num_valuators) req->length += num_valuators; /* note: Data is a macro that uses its arguments multiple - times, so "nvalues" is changed in a separate assignment - statement */ + * times, so "nvalues" is changed in a separate assignment + * statement */ num_valuators <<= 2; - Data (dpy, (char *) valuators, num_valuators); + Data(dpy, (char *)valuators, num_valuators); - (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); + (void)_XReply(dpy, (xReply *) & rep, 0, xTrue); UnlockDisplay(dpy); SyncHandle(); return (rep.status); - } - +} |