~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to Xi/getvers.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Xorg: getvers.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */
2
 
 
3
1
/************************************************************
4
2
 
5
3
Copyright 1989, 1998  The Open Group
45
43
SOFTWARE.
46
44
 
47
45
********************************************************/
48
 
/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */
49
46
 
50
47
/***********************************************************************
51
48
 *
59
56
#include <dix-config.h>
60
57
#endif
61
58
 
62
 
#include <X11/X.h>                              /* for inputstr.h    */
63
 
#include <X11/Xproto.h>                 /* Request macro     */
64
 
#include "inputstr.h"                   /* DeviceIntPtr      */
 
59
#include <X11/X.h>      /* for inputstr.h    */
 
60
#include <X11/Xproto.h> /* Request macro     */
 
61
#include "inputstr.h"   /* DeviceIntPtr      */
65
62
#include <X11/extensions/XI.h>
66
63
#include <X11/extensions/XIproto.h>
67
64
#include "extnsionst.h"
68
 
#include "extinit.h"                    /* LookupDeviceIntRec */
 
65
#include "extinit.h"    /* LookupDeviceIntRec */
69
66
#include "exglobals.h"
70
67
 
71
68
#include "getvers.h"
72
69
 
73
 
XExtensionVersion       AllExtensionVersions[128];
 
70
XExtensionVersion AllExtensionVersions[128];
74
71
 
75
72
/***********************************************************************
76
73
 *
79
76
 */
80
77
 
81
78
int
82
 
SProcXGetExtensionVersion(client)
83
 
    register ClientPtr client;
84
 
    {
 
79
SProcXGetExtensionVersion(register ClientPtr client)
 
80
{
85
81
    register char n;
86
82
 
87
83
    REQUEST(xGetExtensionVersionReq);
88
84
    swaps(&stuff->length, n);
89
85
    REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
90
86
    swaps(&stuff->nbytes, n);
91
 
    return(ProcXGetExtensionVersion(client));
92
 
    }
 
87
    return (ProcXGetExtensionVersion(client));
 
88
}
93
89
 
94
90
/***********************************************************************
95
91
 *
98
94
 */
99
95
 
100
96
int
101
 
ProcXGetExtensionVersion (client)
102
 
    register ClientPtr client;
103
 
    {
104
 
    xGetExtensionVersionReply   rep;
 
97
ProcXGetExtensionVersion(register ClientPtr client)
 
98
{
 
99
    xGetExtensionVersionReply rep;
105
100
 
106
101
    REQUEST(xGetExtensionVersionReq);
107
102
    REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
108
103
 
109
 
    if (stuff->length != (sizeof(xGetExtensionVersionReq) + 
110
 
        stuff->nbytes + 3)>>2)
111
 
        {
112
 
        SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0, 
113
 
                BadLength);
 
104
    if (stuff->length != (sizeof(xGetExtensionVersionReq) +
 
105
                          stuff->nbytes + 3) >> 2) {
 
106
        SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0,
 
107
                          BadLength);
114
108
        return Success;
115
 
        }
 
109
    }
116
110
 
117
111
    rep.repType = X_Reply;
118
112
    rep.RepType = X_GetExtensionVersion;
122
116
    rep.minor_version = 0;
123
117
 
124
118
    rep.present = TRUE;
125
 
    if (rep.present)
126
 
        {
127
 
        rep.major_version = 
128
 
            AllExtensionVersions[IReqCode-128].major_version;
129
 
        rep.minor_version = 
130
 
            AllExtensionVersions[IReqCode-128].minor_version;
131
 
        }
132
 
    WriteReplyToClient (client, sizeof (xGetExtensionVersionReply), &rep);
 
119
    if (rep.present) {
 
120
        rep.major_version = AllExtensionVersions[IReqCode - 128].major_version;
 
121
        rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version;
 
122
    }
 
123
    WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep);
133
124
 
134
125
    return Success;
135
 
    }
 
126
}
136
127
 
137
128
/***********************************************************************
138
129
 *
142
133
 */
143
134
 
144
135
void
145
 
SRepXGetExtensionVersion (client, size, rep)
146
 
    ClientPtr   client;
147
 
    int         size;
148
 
    xGetExtensionVersionReply   *rep;
149
 
    {
 
136
SRepXGetExtensionVersion(ClientPtr client, int size,
 
137
                         xGetExtensionVersionReply * rep)
 
138
{
150
139
    register char n;
151
140
 
152
141
    swaps(&rep->sequenceNumber, n);
154
143
    swaps(&rep->major_version, n);
155
144
    swaps(&rep->minor_version, n);
156
145
    WriteToClient(client, size, (char *)rep);
157
 
    }
 
146
}