merge XFree86 4.3.0.1 to -CURRENT

parent 9508a382
......@@ -21,6 +21,8 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.9 2001/10/28 03:32:50 tsi Exp $ */
#include "X.h"
#include "Xproto.h"
#include "dixstruct.h"
......@@ -34,7 +36,7 @@ static EviPrivPtr eviPriv;
static int
ProcEVIQueryVersion(ClientPtr client)
{
REQUEST(xEVIQueryVersionReq);
/* REQUEST(xEVIQueryVersionReq); */
xEVIQueryVersionReply rep;
register int n;
REQUEST_SIZE_MATCH (xEVIQueryVersionReq);
......@@ -167,11 +169,11 @@ EVIResetProc(ExtensionEntry *extEntry)
void
EVIExtensionInit(void)
{
ExtensionEntry *extEntry, *AddExtension();
if (extEntry = AddExtension(EVINAME, 0, 0,
ExtensionEntry *extEntry;
if ((extEntry = AddExtension(EVINAME, 0, 0,
ProcEVIDispatch,
SProcEVIDispatch,
EVIResetProc, StandardMinorOpcode))
EVIResetProc, StandardMinorOpcode)))
{
XEVIReqCode = (unsigned char)extEntry->base;
eviPriv = eviDDXInit();
......
/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.9 2001/12/17 20:52:25 dawes Exp $ */
/*
Copyright 1996, 1998, 2001 The Open Group
......@@ -74,9 +75,9 @@ static int XagCallbackRefCount = 0;
static RESTYPE RT_APPGROUP;
static AppGroupPtr appGrpList = NULL;
extern WindowPtr* WindowTable;
extern xConnSetupPrefix connSetupPrefix;
extern char* ConnectionInfo;
extern int connBlockScreenStart;
static
int XagAppGroupFree (what, id)
......@@ -121,7 +122,7 @@ void XagClientStateChange (pcbl, nulldata, calldata)
NewClientInfoRec* pci = (NewClientInfoRec*) calldata;
ClientPtr pClient = pci->client;
AppGroupPtr pAppGrp;
XID authId;
XID authId = 0;
if (!pClient->appgroup) {
switch (pClient->clientState) {
......@@ -220,13 +221,13 @@ XagExtensionInit ()
{
ExtensionEntry* extEntry;
if (extEntry = AddExtension (XAGNAME,
if ((extEntry = AddExtension (XAGNAME,
0,
XagNumberErrors,
ProcXagDispatch,
SProcXagDispatch,
XagResetProc,
StandardMinorOpcode)) {
StandardMinorOpcode))) {
XagReqCode = (unsigned char)extEntry->base;
XagErrorBase = extEntry->errorBase;
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
......@@ -247,7 +248,7 @@ static
int ProcXagQueryVersion (client)
register ClientPtr client;
{
REQUEST (xXagQueryVersionReq);
/* REQUEST (xXagQueryVersionReq); */
xXagQueryVersionReply rep;
register int n;
......@@ -309,8 +310,6 @@ static
void CreateConnectionInfo (pAppGrp)
AppGroupPtr pAppGrp;
{
extern int connBlockScreenStart;
xConnSetup *setup = (xConnSetup*) ConnectionInfo;
xWindowRoot* rootp;
xWindowRoot* roots[MAXSCREENS];
unsigned int rootlens[MAXSCREENS];
......@@ -376,7 +375,6 @@ AppGroupPtr CreateAppGroup (client, appgroupId, attrib_mask, attribs)
CARD32* attribs;
{
AppGroupPtr pAppGrp;
int i;
pAppGrp = (AppGroupPtr) xalloc (sizeof(AppGroupRec));
if (pAppGrp) {
......@@ -570,7 +568,7 @@ int ProcXagCreateAssoc (client)
if (stuff->window_type != XagWindowTypeX11)
#endif
return BadMatch;
#ifdef WIN32 /* and Mac, etc */
#if defined(WIN32) || defined(__CYGWIN__) /* and Mac, etc */
if (!LocalClient (client))
return BadAccess;
#endif
......@@ -584,7 +582,7 @@ static
int ProcXagDestroyAssoc (client)
register ClientPtr client;
{
REQUEST (xXagDestroyAssocReq);
/* REQUEST (xXagDestroyAssocReq); */
REQUEST_SIZE_MATCH (xXagDestroyAssocReq);
/* Macintosh, OS/2, and MS-Windows servers have some work to do here */
......
......@@ -26,7 +26,9 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.5 2001/12/14 19:58:48 dawes Exp $ */
#define NEED_EVENTS
#include "X.h"
#include "Xproto.h"
#include "misc.h"
......@@ -36,17 +38,23 @@ from The Open Group.
#include "bigreqstr.h"
static unsigned char XBigReqCode;
static int ProcBigReqDispatch();
static void BigReqResetProc();
static void BigReqResetProc(
#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
#endif
);
static DISPATCH_PROC(ProcBigReqDispatch);
void
BigReqExtensionInit()
{
ExtensionEntry *extEntry, *AddExtension();
ExtensionEntry *extEntry;
if (extEntry = AddExtension(XBigReqExtensionName, 0, 0,
if ((extEntry = AddExtension(XBigReqExtensionName, 0, 0,
ProcBigReqDispatch, ProcBigReqDispatch,
BigReqResetProc, StandardMinorOpcode))
BigReqResetProc, StandardMinorOpcode)) != 0)
XBigReqCode = (unsigned char)extEntry->base;
DeclareExtensionSecurity(XBigReqExtensionName, TRUE);
}
......
......@@ -24,6 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.10 2001/12/14 19:58:48 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
......@@ -35,11 +36,16 @@ in this Software without prior written authorization from The Open Group.
#include "colormapst.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "swapreq.h"
#define _XCUP_SERVER_
#include "Xcupstr.h"
#include "Xfuncproto.h"
#ifndef EXTMODULE
#include "../os/osdep.h"
#else
#include "xf86_ansic.h"
#endif
static int ProcDispatch (), SProcDispatch ();
static void ResetProc ();
......@@ -121,13 +127,13 @@ XcupExtensionInit ()
{
ExtensionEntry* extEntry;
if (extEntry = AddExtension (XCUPNAME,
if ((extEntry = AddExtension (XCUPNAME,
0,
XcupNumberErrors,
ProcDispatch,
SProcDispatch,
ResetProc,
StandardMinorOpcode)) {
StandardMinorOpcode))) {
ReqCode = (unsigned char)extEntry->base;
ErrorBase = extEntry->errorBase;
}
......@@ -146,7 +152,7 @@ static
int ProcQueryVersion (client)
register ClientPtr client;
{
REQUEST (xXcupQueryVersionReq);
/* REQUEST (xXcupQueryVersionReq); */
xXcupQueryVersionReply rep;
register int n;
......@@ -214,7 +220,6 @@ int ProcStoreColors (client)
int ncolors, n;
xXcupStoreColorsReply rep;
xColorItem* cptr;
Pixel pixel;
if (!(pcmp->class & DynamicClass))
return BadMatch;
......@@ -302,7 +307,7 @@ int SProcGetReservedColormapEntries (client)
}
static
int SProcStoreColors (client)
int SProcXcupStoreColors (client)
ClientPtr client;
{
register int n;
......@@ -331,7 +336,7 @@ int SProcDispatch (client)
case X_XcupGetReservedColormapEntries:
return SProcGetReservedColormapEntries (client);
case X_XcupStoreColors:
return SProcStoreColors (client);
return SProcXcupStoreColors (client);
default:
return BadRequest;
}
......
......@@ -27,43 +27,55 @@ Equipment Corporation.
******************************************************************/
/*
* HISTORY
*
* @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00
*/
/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.9 2001/10/28 03:32:50 tsi Exp $ */
#include "X.h"
#include "Xproto.h"
#include "misc.h"
#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "opaque.h"
#define DPMS_SERVER
#include "dpms.h"
#include "dpmsstr.h"
#include <stdio.h>
#include "dpmsproc.h"
static unsigned char DPMSCode;
static int ProcDPMSDispatch(), SProcDPMSDispatch();
static void DPMSResetProc();
static int ProcDPMSGetVersion(), SProcDPMSGetVersion();
static int ProcDPMSGetTimeouts(), SProcDPMSGetTimeouts();
static int ProcDPMSSetTimeouts(), ProcDPMSSetTimeouts();
static int ProcDPMSEnable(), ProcDPMSEnable();
static int ProcDPMSDisable(), ProcDPMSDisable();
static int ProcDPMSForceLevel(), ProcDPMSForceLevel();
extern void Swap32Write(); /* XXX should be in header file */
extern CARD32 ScreenSaverTime;
extern CARD32 DPMSStandbyTime;
extern CARD32 DPMSSuspendTime;
extern CARD32 DPMSOffTime;
extern BOOL DPMSCapableFlag;
extern BOOL DPMSEnabled;
extern CARD16 DPMSPowerLevel;
static DISPATCH_PROC(ProcDPMSDispatch);
static DISPATCH_PROC(SProcDPMSDispatch);
static DISPATCH_PROC(ProcDPMSGetVersion);
static DISPATCH_PROC(SProcDPMSGetVersion);
static DISPATCH_PROC(ProcDPMSGetTimeouts);
static DISPATCH_PROC(SProcDPMSGetTimeouts);
static DISPATCH_PROC(ProcDPMSSetTimeouts);
static DISPATCH_PROC(SProcDPMSSetTimeouts);
static DISPATCH_PROC(ProcDPMSEnable);
static DISPATCH_PROC(SProcDPMSEnable);
static DISPATCH_PROC(ProcDPMSDisable);
static DISPATCH_PROC(SProcDPMSDisable);
static DISPATCH_PROC(ProcDPMSForceLevel);
static DISPATCH_PROC(SProcDPMSForceLevel);
static DISPATCH_PROC(ProcDPMSInfo);
static DISPATCH_PROC(SProcDPMSInfo);
static DISPATCH_PROC(ProcDPMSCapable);
static DISPATCH_PROC(SProcDPMSCapable);
static void DPMSResetProc(ExtensionEntry* extEntry);
void
DPMSExtensionInit()
{
ExtensionEntry *extEntry, *AddExtension();
ExtensionEntry *extEntry;
if (extEntry = AddExtension(DPMSExtensionName, 0, 0,
if ((extEntry = AddExtension(DPMSExtensionName, 0, 0,
ProcDPMSDispatch, SProcDPMSDispatch,
DPMSResetProc, StandardMinorOpcode))
DPMSResetProc, StandardMinorOpcode)))
DPMSCode = (unsigned char)extEntry->base;
return;
}
......@@ -79,7 +91,7 @@ static int
ProcDPMSGetVersion(client)
register ClientPtr client;
{
REQUEST(xDPMSGetVersionReq);
/* REQUEST(xDPMSGetVersionReq); */
xDPMSGetVersionReply rep;
register int n;
......@@ -100,10 +112,9 @@ ProcDPMSGetVersion(client)
}
static int
ProcDPMSCapable(client)
register ClientPtr client;
ProcDPMSCapable(register ClientPtr client)
{
REQUEST(xDPMSCapableReq);
/* REQUEST(xDPMSCapableReq); */
xDPMSCapableReply rep;
register int n;
......@@ -114,6 +125,9 @@ ProcDPMSCapable(client)
rep.sequenceNumber = client->sequence;
rep.capable = DPMSCapableFlag;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
}
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
return(client->noClientException);
}
......@@ -122,7 +136,7 @@ static int
ProcDPMSGetTimeouts(client)
register ClientPtr client;
{
REQUEST(xDPMSGetTimeoutsReq);
/* REQUEST(xDPMSGetTimeoutsReq); */
xDPMSGetTimeoutsReply rep;
register int n;
......@@ -150,7 +164,6 @@ ProcDPMSSetTimeouts(client)
register ClientPtr client;
{
REQUEST(xDPMSSetTimeoutsReq);
register int n;
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
......@@ -176,7 +189,7 @@ static int
ProcDPMSEnable(client)
register ClientPtr client;
{
REQUEST(xDPMSEnableReq);
/* REQUEST(xDPMSEnableReq); */
REQUEST_SIZE_MATCH(xDPMSEnableReq);
......@@ -190,13 +203,11 @@ static int
ProcDPMSDisable(client)
register ClientPtr client;
{
REQUEST(xDPMSDisableReq);
/* REQUEST(xDPMSDisableReq); */
REQUEST_SIZE_MATCH(xDPMSDisableReq);
#ifdef DPMSExtension
DPMSSet(DPMSModeOn);
#endif
DPMSEnabled = FALSE;
......@@ -217,9 +228,7 @@ ProcDPMSForceLevel(client)
if (stuff->level == DPMSModeOn) {
lastDeviceEventTime.milliseconds =
GetTimeInMillis();
}
#if 0
else if (stuff->level == DPMSModeStandby) {
} else if (stuff->level == DPMSModeStandby) {
lastDeviceEventTime.milliseconds =
GetTimeInMillis() - DPMSStandbyTime;
} else if (stuff->level == DPMSModeSuspend) {
......@@ -232,20 +241,16 @@ ProcDPMSForceLevel(client)
client->errorValue = stuff->level;
return BadValue;
}
#endif
#ifdef DPMSExtension
DPMSSet(stuff->level);
#endif
return(client->noClientException);
}
static int
ProcDPMSInfo(client)
register ClientPtr client;
ProcDPMSInfo(register ClientPtr client)
{
REQUEST(xDPMSInfoReq);
/* REQUEST(xDPMSInfoReq); */
xDPMSInfoReply rep;
register int n;
......@@ -309,8 +314,7 @@ SProcDPMSGetVersion(client)
}
static int
SProcDPMSCapable(client)
register ClientPtr client;
SProcDPMSCapable(register ClientPtr client)
{
REQUEST(xDPMSCapableReq);
register int n;
......
......@@ -26,23 +26,23 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.4 2001/01/17 22:13:15 dawes Exp $ */
typedef int Bool;
#define FALSE 0
Bool DPMSSupported()
Bool DPMSSupported(void)
{
return FALSE;
}
int DPSMGet(level)
int *level;
int DPSMGet(int *level)
{
return -1;
}
void DPMSSet(level)
void DPMSSet(int level)
{
}
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */
/*
Copyright 1989, 1998 The Open Group
......
/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
......
/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
......@@ -28,6 +29,7 @@ in this Software without prior written authorization from The Open Group.
/* $Xorg: mitmisc.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
#define NEED_EVENTS
#include "X.h"
#include "Xproto.h"
#include "misc.h"
......@@ -40,17 +42,28 @@ in this Software without prior written authorization from The Open Group.
extern Bool permitOldBugs;
static unsigned char MITReqCode;
static int ProcMITDispatch(), SProcMITDispatch();
static void MITResetProc();
static void MITResetProc(
#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
#endif