diff options
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/getvers.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xi/getvers.c | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c index 00381a91c..d66175d58 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.c +++ b/nx-X11/programs/Xserver/Xi/getvers.c @@ -55,18 +55,18 @@ SOFTWARE. #include <dix-config.h> #endif -#include <nx-X11/X.h> /* for inputstr.h */ -#include <nx-X11/Xproto.h> /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ #include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getvers.h" -XExtensionVersion AllExtensionVersions[128]; +XExtensionVersion AllExtensionVersions[128]; /*********************************************************************** * @@ -75,15 +75,14 @@ XExtensionVersion AllExtensionVersions[128]; */ int -SProcXGetExtensionVersion(client) - register ClientPtr client; - { +SProcXGetExtensionVersion(register ClientPtr client) +{ REQUEST(xGetExtensionVersionReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); swaps(&stuff->nbytes); - return(ProcXGetExtensionVersion(client)); - } + return (ProcXGetExtensionVersion(client)); +} /*********************************************************************** * @@ -92,21 +91,19 @@ SProcXGetExtensionVersion(client) */ int -ProcXGetExtensionVersion (client) - register ClientPtr client; - { - xGetExtensionVersionReply rep; +ProcXGetExtensionVersion(register ClientPtr client) +{ + xGetExtensionVersionReply rep; REQUEST(xGetExtensionVersionReq); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); - if (stuff->length != (sizeof(xGetExtensionVersionReq) + - stuff->nbytes + 3)>>2) - { - SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0, - BadLength); + if (stuff->length != (sizeof(xGetExtensionVersionReq) + + stuff->nbytes + 3) >> 2) { + SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0, + BadLength); return Success; - } + } memset(&rep, 0, sizeof(xGetExtensionVersionReply)); rep.repType = X_Reply; @@ -117,17 +114,14 @@ ProcXGetExtensionVersion (client) rep.minor_version = 0; rep.present = TRUE; - if (rep.present) - { - rep.major_version = - AllExtensionVersions[IReqCode-128].major_version; - rep.minor_version = - AllExtensionVersions[IReqCode-128].minor_version; - } - WriteReplyToClient (client, sizeof (xGetExtensionVersionReply), &rep); + if (rep.present) { + rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; + rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; + } + WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep); return Success; - } +} /*********************************************************************** * @@ -137,14 +131,12 @@ ProcXGetExtensionVersion (client) */ void -SRepXGetExtensionVersion (client, size, rep) - ClientPtr client; - int size; - xGetExtensionVersionReply *rep; - { +SRepXGetExtensionVersion(ClientPtr client, int size, + xGetExtensionVersionReply * rep) +{ swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->major_version); swaps(&rep->minor_version); WriteToClient(client, size, rep); - } +} |