summaryrefslogtreecommitdiff
path: root/Xi/getvers.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-02-20 22:16:49 +0000
committerAdam Jackson <ajax@nwnk.net>2006-02-20 22:16:49 +0000
commit6d7083bd69724586338d79784655328f1fcd2ae5 (patch)
tree59f85a0e3892d181bffc5dba78e040e91b838a27 /Xi/getvers.c
parent5480c537cee79b324736eac3e438a4713dfa1036 (diff)
indent fixes (OMG SO UGLY), and nuke old RCS keywords.
Diffstat (limited to 'Xi/getvers.c')
-rw-r--r--Xi/getvers.c52
1 files changed, 23 insertions, 29 deletions
diff --git a/Xi/getvers.c b/Xi/getvers.c
index efd2683e9..c5f1750be 100644
--- a/Xi/getvers.c
+++ b/Xi/getvers.c
@@ -1,5 +1,3 @@
-/* $Xorg: getvers.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */
-
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -45,7 +43,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */
/***********************************************************************
*
@@ -59,18 +56,18 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h> /* for inputstr.h */
-#include <X11/Xproto.h> /* Request macro */
-#include "inputstr.h" /* DeviceIntPtr */
+#include <X11/X.h> /* for inputstr.h */
+#include <X11/Xproto.h> /* Request macro */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <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];
/***********************************************************************
*
@@ -87,8 +84,8 @@ SProcXGetExtensionVersion(register ClientPtr client)
swaps(&stuff->length, n);
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
swaps(&stuff->nbytes, n);
- return(ProcXGetExtensionVersion(client));
- }
+ return (ProcXGetExtensionVersion(client));
+}
/***********************************************************************
*
@@ -97,20 +94,19 @@ SProcXGetExtensionVersion(register ClientPtr client)
*/
int
-ProcXGetExtensionVersion (register ClientPtr client)
+ProcXGetExtensionVersion(register ClientPtr client)
{
- xGetExtensionVersionReply rep;
+ 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;
- }
+ }
rep.repType = X_Reply;
rep.RepType = X_GetExtensionVersion;
@@ -120,17 +116,14 @@ ProcXGetExtensionVersion (register ClientPtr 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;
- }
+}
/***********************************************************************
*
@@ -140,7 +133,8 @@ ProcXGetExtensionVersion (register ClientPtr client)
*/
void
-SRepXGetExtensionVersion (ClientPtr client, int size, xGetExtensionVersionReply *rep)
+SRepXGetExtensionVersion(ClientPtr client, int size,
+ xGetExtensionVersionReply * rep)
{
register char n;
@@ -149,4 +143,4 @@ SRepXGetExtensionVersion (ClientPtr client, int size, xGetExtensionVersionReply
swaps(&rep->major_version, n);
swaps(&rep->minor_version, n);
WriteToClient(client, size, (char *)rep);
- }
+}