General DIX static and dead code cleanup.
This commit is contained in:
parent
04b87d6dfa
commit
4b5802ddbd
|
@ -299,7 +299,6 @@ long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
|
||||||
long SmartScheduleTime;
|
long SmartScheduleTime;
|
||||||
static ClientPtr SmartLastClient;
|
static ClientPtr SmartLastClient;
|
||||||
static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
|
static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
|
||||||
int SmartScheduleClient(int *clientReady, int nready);
|
|
||||||
|
|
||||||
#ifdef SMART_DEBUG
|
#ifdef SMART_DEBUG
|
||||||
long SmartLastPrint;
|
long SmartLastPrint;
|
||||||
|
@ -308,7 +307,7 @@ long SmartLastPrint;
|
||||||
void Dispatch(void);
|
void Dispatch(void);
|
||||||
void InitProcVectors(void);
|
void InitProcVectors(void);
|
||||||
|
|
||||||
int
|
static int
|
||||||
SmartScheduleClient (int *clientReady, int nready)
|
SmartScheduleClient (int *clientReady, int nready)
|
||||||
{
|
{
|
||||||
ClientPtr pClient;
|
ClientPtr pClient;
|
||||||
|
@ -834,7 +833,7 @@ ProcCirculateWindow(ClientPtr client)
|
||||||
return(client->noClientException);
|
return(client->noClientException);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -2157,8 +2156,7 @@ ProcPutImage(ClientPtr client)
|
||||||
return (client->noClientException);
|
return (client->noClientException);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
int
|
|
||||||
DoGetImage(ClientPtr client, int format, Drawable drawable,
|
DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
Mask planemask, xGetImageReply **im_return)
|
Mask planemask, xGetImageReply **im_return)
|
||||||
|
@ -3383,6 +3381,28 @@ ProcChangeAccessControl(ClientPtr client)
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* CloseDownRetainedResources
|
||||||
|
*
|
||||||
|
* Find all clients that are gone and have terminated in RetainTemporary
|
||||||
|
* and destroy their resources.
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
CloseDownRetainedResources(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
ClientPtr client;
|
||||||
|
|
||||||
|
for (i=1; i<currentMaxClients; i++)
|
||||||
|
{
|
||||||
|
client = clients[i];
|
||||||
|
if (client && (client->closeDownMode == RetainTemporary)
|
||||||
|
&& (client->clientGone))
|
||||||
|
CloseDownClient(client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcKillClient(ClientPtr client)
|
ProcKillClient(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -3651,28 +3671,6 @@ KillAllClients()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************
|
|
||||||
* CloseDownRetainedResources
|
|
||||||
*
|
|
||||||
* Find all clients that are gone and have terminated in RetainTemporary
|
|
||||||
* and destroy their resources.
|
|
||||||
*********************/
|
|
||||||
|
|
||||||
void
|
|
||||||
CloseDownRetainedResources()
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
ClientPtr client;
|
|
||||||
|
|
||||||
for (i=1; i<currentMaxClients; i++)
|
|
||||||
{
|
|
||||||
client = clients[i];
|
|
||||||
if (client && (client->closeDownMode == RetainTemporary)
|
|
||||||
&& (client->clientGone))
|
|
||||||
CloseDownClient(client);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extern int clientPrivateLen;
|
extern int clientPrivateLen;
|
||||||
extern unsigned *clientPrivateSizes;
|
extern unsigned *clientPrivateSizes;
|
||||||
extern unsigned totalClientSize;
|
extern unsigned totalClientSize;
|
||||||
|
|
|
@ -882,9 +882,7 @@ static CallbackFuncsRec default_cbfuncs =
|
||||||
_DeleteCallbackList
|
_DeleteCallbackList
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ===== Public Procedures ===== */
|
static Bool
|
||||||
|
|
||||||
Bool
|
|
||||||
CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
||||||
{
|
{
|
||||||
CallbackListPtr cbl;
|
CallbackListPtr cbl;
|
||||||
|
@ -916,6 +914,8 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ===== Public Procedures ===== */
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
|
AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,8 +66,6 @@ SOFTWARE.
|
||||||
#define LAST_EVENT 128
|
#define LAST_EVENT 128
|
||||||
#define LAST_ERROR 255
|
#define LAST_ERROR 255
|
||||||
|
|
||||||
static ScreenProcEntry AuxillaryScreenProcs[MAXSCREENS];
|
|
||||||
|
|
||||||
static ExtensionEntry **extensions = (ExtensionEntry **)NULL;
|
static ExtensionEntry **extensions = (ExtensionEntry **)NULL;
|
||||||
|
|
||||||
int lastEvent = EXTENSION_EVENT_BASE;
|
int lastEvent = EXTENSION_EVENT_BASE;
|
||||||
|
@ -298,21 +296,8 @@ CloseDownExtensions()
|
||||||
extensions = (ExtensionEntry **)NULL;
|
extensions = (ExtensionEntry **)NULL;
|
||||||
lastEvent = EXTENSION_EVENT_BASE;
|
lastEvent = EXTENSION_EVENT_BASE;
|
||||||
lastError = FirstExtensionError;
|
lastError = FirstExtensionError;
|
||||||
for (i=0; i<MAXSCREENS; i++)
|
|
||||||
{
|
|
||||||
ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
|
||||||
|
|
||||||
while (spentry->num)
|
|
||||||
{
|
|
||||||
spentry->num--;
|
|
||||||
xfree(spentry->procList[spentry->num].name);
|
|
||||||
}
|
|
||||||
xfree(spentry->procList);
|
|
||||||
spentry->procList = (ProcEntryPtr)NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcQueryExtension(ClientPtr client)
|
ProcQueryExtension(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -406,72 +391,6 @@ ProcListExtensions(ClientPtr client)
|
||||||
return(client->noClientException);
|
return(client->noClientException);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ExtensionLookupProc
|
|
||||||
LookupProc(char *name, GCPtr pGC)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
ScreenProcEntry *spentry;
|
|
||||||
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
|
|
||||||
if (spentry->num)
|
|
||||||
{
|
|
||||||
for (i = 0; i < spentry->num; i++)
|
|
||||||
if (strcmp(name, spentry->procList[i].name) == 0)
|
|
||||||
return(spentry->procList[i].proc);
|
|
||||||
}
|
|
||||||
return (ExtensionLookupProc)NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
|
||||||
RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc)
|
|
||||||
{
|
|
||||||
return RegisterScreenProc(name, pGC->pScreen, proc);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
|
||||||
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
|
|
||||||
{
|
|
||||||
ScreenProcEntry *spentry;
|
|
||||||
ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
|
||||||
char *newname;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
spentry = &AuxillaryScreenProcs[pScreen->myNum];
|
|
||||||
/* first replace duplicates */
|
|
||||||
if (spentry->num)
|
|
||||||
{
|
|
||||||
for (i = 0; i < spentry->num; i++)
|
|
||||||
if (strcmp(name, spentry->procList[i].name) == 0)
|
|
||||||
{
|
|
||||||
procEntry = &spentry->procList[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (procEntry)
|
|
||||||
procEntry->proc = proc;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newname = (char *)xalloc(strlen(name)+1);
|
|
||||||
if (!newname)
|
|
||||||
return FALSE;
|
|
||||||
procEntry = (ProcEntryPtr)
|
|
||||||
xrealloc(spentry->procList,
|
|
||||||
sizeof(ProcEntryRec) * (spentry->num+1));
|
|
||||||
if (!procEntry)
|
|
||||||
{
|
|
||||||
xfree(newname);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
spentry->procList = procEntry;
|
|
||||||
procEntry += spentry->num;
|
|
||||||
procEntry->name = newname;
|
|
||||||
strcpy(newname, name);
|
|
||||||
procEntry->proc = proc;
|
|
||||||
spentry->num++;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
void LoadExtensionNames(char **RequestNames) {
|
void LoadExtensionNames(char **RequestNames) {
|
||||||
int i;
|
int i;
|
||||||
|
|
11
dix/gc.c
11
dix/gc.c
|
@ -907,17 +907,6 @@ FreeGC(pointer value, XID gid)
|
||||||
return(Success);
|
return(Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
SetGCMask(GCPtr pGC, Mask selectMask, Mask newDataMask)
|
|
||||||
{
|
|
||||||
pGC->stateChanges = (~selectMask & pGC->stateChanges) |
|
|
||||||
(selectMask & newDataMask);
|
|
||||||
if (selectMask & newDataMask)
|
|
||||||
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* CreateScratchGC(pScreen, depth)
|
/* CreateScratchGC(pScreen, depth)
|
||||||
like CreateGC, but doesn't do the default tile or stipple,
|
like CreateGC, but doesn't do the default tile or stipple,
|
||||||
since we can't create them without already having a GC. any code
|
since we can't create them without already having a GC. any code
|
||||||
|
|
109
dix/swaprep.c
109
dix/swaprep.c
|
@ -317,7 +317,7 @@ SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
SwapTimecoord(xTimecoord* pCoord)
|
SwapTimecoord(xTimecoord* pCoord)
|
||||||
{
|
{
|
||||||
char n;
|
char n;
|
||||||
|
@ -584,7 +584,7 @@ SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
SwapRGB(xrgb *prgb)
|
SwapRGB(xrgb *prgb)
|
||||||
{
|
{
|
||||||
char n;
|
char n;
|
||||||
|
@ -1159,6 +1159,58 @@ SKeymapNotifyEvent(xEvent *from, xEvent *to)
|
||||||
*to = *from;
|
*to = *from;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT)
|
||||||
|
{
|
||||||
|
cpswapl(pConnSetup->release, pConnSetupT->release);
|
||||||
|
cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase);
|
||||||
|
cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask);
|
||||||
|
cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize);
|
||||||
|
cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor);
|
||||||
|
cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize);
|
||||||
|
pConnSetupT->minKeyCode = pConnSetup->minKeyCode;
|
||||||
|
pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode;
|
||||||
|
pConnSetupT->numRoots = pConnSetup->numRoots;
|
||||||
|
pConnSetupT->numFormats = pConnSetup->numFormats;
|
||||||
|
pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder;
|
||||||
|
pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder;
|
||||||
|
pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit;
|
||||||
|
pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT)
|
||||||
|
{
|
||||||
|
cpswapl(pRoot->windowId, pRootT->windowId);
|
||||||
|
cpswapl(pRoot->defaultColormap, pRootT->defaultColormap);
|
||||||
|
cpswapl(pRoot->whitePixel, pRootT->whitePixel);
|
||||||
|
cpswapl(pRoot->blackPixel, pRootT->blackPixel);
|
||||||
|
cpswapl(pRoot->currentInputMask, pRootT->currentInputMask);
|
||||||
|
cpswaps(pRoot->pixWidth, pRootT->pixWidth);
|
||||||
|
cpswaps(pRoot->pixHeight, pRootT->pixHeight);
|
||||||
|
cpswaps(pRoot->mmWidth, pRootT->mmWidth);
|
||||||
|
cpswaps(pRoot->mmHeight, pRootT->mmHeight);
|
||||||
|
cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps);
|
||||||
|
cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps);
|
||||||
|
cpswapl(pRoot->rootVisualID, pRootT->rootVisualID);
|
||||||
|
pRootT->backingStore = pRoot->backingStore;
|
||||||
|
pRootT->saveUnders = pRoot->saveUnders;
|
||||||
|
pRootT->rootDepth = pRoot->rootDepth;
|
||||||
|
pRootT->nDepths = pRoot->nDepths;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
SwapVisual(xVisualType *pVis, xVisualType *pVisT)
|
||||||
|
{
|
||||||
|
cpswapl(pVis->visualID, pVisT->visualID);
|
||||||
|
pVisT->class = pVis->class;
|
||||||
|
pVisT->bitsPerRGB = pVis->bitsPerRGB;
|
||||||
|
cpswaps(pVis->colormapEntries, pVisT->colormapEntries);
|
||||||
|
cpswapl(pVis->redMask, pVisT->redMask);
|
||||||
|
cpswapl(pVis->greenMask, pVisT->greenMask);
|
||||||
|
cpswapl(pVis->blueMask, pVisT->blueMask);
|
||||||
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SwapConnSetupInfo(
|
SwapConnSetupInfo(
|
||||||
char *pInfo,
|
char *pInfo,
|
||||||
|
@ -1210,7 +1262,6 @@ SwapConnSetupInfo(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
||||||
{
|
{
|
||||||
|
@ -1227,58 +1278,6 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
|
||||||
DEALLOCATE_LOCAL(pInfoTBase);
|
DEALLOCATE_LOCAL(pInfoTBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
SwapConnSetup(xConnSetup *pConnSetup, xConnSetup *pConnSetupT)
|
|
||||||
{
|
|
||||||
cpswapl(pConnSetup->release, pConnSetupT->release);
|
|
||||||
cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase);
|
|
||||||
cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask);
|
|
||||||
cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize);
|
|
||||||
cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor);
|
|
||||||
cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize);
|
|
||||||
pConnSetupT->minKeyCode = pConnSetup->minKeyCode;
|
|
||||||
pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode;
|
|
||||||
pConnSetupT->numRoots = pConnSetup->numRoots;
|
|
||||||
pConnSetupT->numFormats = pConnSetup->numFormats;
|
|
||||||
pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder;
|
|
||||||
pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder;
|
|
||||||
pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit;
|
|
||||||
pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SwapWinRoot(xWindowRoot *pRoot, xWindowRoot *pRootT)
|
|
||||||
{
|
|
||||||
cpswapl(pRoot->windowId, pRootT->windowId);
|
|
||||||
cpswapl(pRoot->defaultColormap, pRootT->defaultColormap);
|
|
||||||
cpswapl(pRoot->whitePixel, pRootT->whitePixel);
|
|
||||||
cpswapl(pRoot->blackPixel, pRootT->blackPixel);
|
|
||||||
cpswapl(pRoot->currentInputMask, pRootT->currentInputMask);
|
|
||||||
cpswaps(pRoot->pixWidth, pRootT->pixWidth);
|
|
||||||
cpswaps(pRoot->pixHeight, pRootT->pixHeight);
|
|
||||||
cpswaps(pRoot->mmWidth, pRootT->mmWidth);
|
|
||||||
cpswaps(pRoot->mmHeight, pRootT->mmHeight);
|
|
||||||
cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps);
|
|
||||||
cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps);
|
|
||||||
cpswapl(pRoot->rootVisualID, pRootT->rootVisualID);
|
|
||||||
pRootT->backingStore = pRoot->backingStore;
|
|
||||||
pRootT->saveUnders = pRoot->saveUnders;
|
|
||||||
pRootT->rootDepth = pRoot->rootDepth;
|
|
||||||
pRootT->nDepths = pRoot->nDepths;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
SwapVisual(xVisualType *pVis, xVisualType *pVisT)
|
|
||||||
{
|
|
||||||
cpswapl(pVis->visualID, pVisT->visualID);
|
|
||||||
pVisT->class = pVis->class;
|
|
||||||
pVisT->bitsPerRGB = pVis->bitsPerRGB;
|
|
||||||
cpswaps(pVis->colormapEntries, pVisT->colormapEntries);
|
|
||||||
cpswapl(pVis->redMask, pVisT->redMask);
|
|
||||||
cpswapl(pVis->greenMask, pVisT->greenMask);
|
|
||||||
cpswapl(pVis->blueMask, pVisT->blueMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo)
|
SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo)
|
||||||
{
|
{
|
||||||
|
|
120
dix/window.c
120
dix/window.c
|
@ -539,7 +539,7 @@ InitRootWindow(WindowPtr pWin)
|
||||||
* window from which the region came.
|
* window from which the region came.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static void
|
||||||
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
int w, int h)
|
int w, int h)
|
||||||
|
@ -835,6 +835,26 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||||
return pWin;
|
return pWin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
DisposeWindowOptional (WindowPtr pWin)
|
||||||
|
{
|
||||||
|
if (!pWin->optional)
|
||||||
|
return;
|
||||||
|
/*
|
||||||
|
* everything is peachy. Delete the optional record
|
||||||
|
* and clean up
|
||||||
|
*/
|
||||||
|
if (pWin->optional->cursor)
|
||||||
|
{
|
||||||
|
FreeCursor (pWin->optional->cursor, (Cursor)0);
|
||||||
|
pWin->cursorIsNone = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pWin->cursorIsNone = TRUE;
|
||||||
|
xfree (pWin->optional);
|
||||||
|
pWin->optional = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FreeWindowResources(WindowPtr pWin)
|
FreeWindowResources(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
@ -2703,6 +2723,30 @@ RealizeTree(WindowPtr pWin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WindowPtr windowDisableMapUnmapEvents;
|
||||||
|
|
||||||
|
void
|
||||||
|
DisableMapUnmapEvents(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
assert (windowDisableMapUnmapEvents == NULL);
|
||||||
|
|
||||||
|
windowDisableMapUnmapEvents = pWin;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EnableMapUnmapEvents(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
assert (windowDisableMapUnmapEvents != NULL);
|
||||||
|
|
||||||
|
windowDisableMapUnmapEvents = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
MapUnmapEventsEnabled(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
return pWin != windowDisableMapUnmapEvents;
|
||||||
|
}
|
||||||
|
|
||||||
/*****
|
/*****
|
||||||
* MapWindow
|
* MapWindow
|
||||||
* If some other client has selected SubStructureReDirect on the parent
|
* If some other client has selected SubStructureReDirect on the parent
|
||||||
|
@ -3201,21 +3245,6 @@ HandleSaveSet(ClientPtr client)
|
||||||
client->saveSet = (SaveSetElt *)NULL;
|
client->saveSet = (SaveSetElt *)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* \param x,y in root
|
|
||||||
* \param box "return" value
|
|
||||||
*/
|
|
||||||
Bool
|
|
||||||
VisibleBoundingBoxFromPoint(WindowPtr pWin, int x, int y, BoxPtr box)
|
|
||||||
{
|
|
||||||
if (!pWin->realized)
|
|
||||||
return (FALSE);
|
|
||||||
if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box))
|
|
||||||
return(TRUE);
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* \param x,y in root
|
* \param x,y in root
|
||||||
|
@ -3324,30 +3353,6 @@ SendVisibilityNotify(WindowPtr pWin)
|
||||||
DeliverEvents(pWin, &event, 1, NullWindow);
|
DeliverEvents(pWin, &event, 1, NullWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WindowPtr windowDisableMapUnmapEvents;
|
|
||||||
|
|
||||||
void
|
|
||||||
DisableMapUnmapEvents(WindowPtr pWin)
|
|
||||||
{
|
|
||||||
assert (windowDisableMapUnmapEvents == NULL);
|
|
||||||
|
|
||||||
windowDisableMapUnmapEvents = pWin;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
EnableMapUnmapEvents(WindowPtr pWin)
|
|
||||||
{
|
|
||||||
assert (windowDisableMapUnmapEvents != NULL);
|
|
||||||
|
|
||||||
windowDisableMapUnmapEvents = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
|
||||||
MapUnmapEventsEnabled(WindowPtr pWin)
|
|
||||||
{
|
|
||||||
return pWin != windowDisableMapUnmapEvents;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RANDOM_WIDTH 32
|
#define RANDOM_WIDTH 32
|
||||||
|
|
||||||
#ifndef NOLOGOHACK
|
#ifndef NOLOGOHACK
|
||||||
|
@ -3700,41 +3705,6 @@ MakeWindowOptional (WindowPtr pWin)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
DisposeWindowOptional (WindowPtr pWin)
|
|
||||||
{
|
|
||||||
if (!pWin->optional)
|
|
||||||
return;
|
|
||||||
/*
|
|
||||||
* everything is peachy. Delete the optional record
|
|
||||||
* and clean up
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* TOG changed this code to:
|
|
||||||
*
|
|
||||||
* if (pWin->cursorIsNone == FALSE)
|
|
||||||
* FreeCursor (pWin->optional->cursor, (Cursor)0);
|
|
||||||
* pWin->cursorIsNone = TRUE;
|
|
||||||
*
|
|
||||||
* This is blatently wrong; windows without optionals can have
|
|
||||||
* two different cursor values, either None or sharing their
|
|
||||||
* parents cursor. This difference is controlled by the
|
|
||||||
* cursorIsNone value; when TRUE, the window has no cursor,
|
|
||||||
* when false, it shares its cursor with its parent; TOG
|
|
||||||
* made it impossible for a window to have a cursor without
|
|
||||||
* an optional record.
|
|
||||||
*/
|
|
||||||
if (pWin->optional->cursor)
|
|
||||||
{
|
|
||||||
FreeCursor (pWin->optional->cursor, (Cursor)0);
|
|
||||||
pWin->cursorIsNone = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pWin->cursorIsNone = TRUE;
|
|
||||||
xfree (pWin->optional);
|
|
||||||
pWin->optional = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef NOLOGOHACK
|
#ifndef NOLOGOHACK
|
||||||
static void
|
static void
|
||||||
DrawLogo(WindowPtr pWin)
|
DrawLogo(WindowPtr pWin)
|
||||||
|
|
|
@ -220,8 +220,6 @@ extern int dixDestroyPixmap(
|
||||||
pointer /*value*/,
|
pointer /*value*/,
|
||||||
XID /*pid*/);
|
XID /*pid*/);
|
||||||
|
|
||||||
extern void CloseDownRetainedResources(void);
|
|
||||||
|
|
||||||
extern void InitClient(
|
extern void InitClient(
|
||||||
ClientPtr /*client*/,
|
ClientPtr /*client*/,
|
||||||
int /*i*/,
|
int /*i*/,
|
||||||
|
@ -243,25 +241,10 @@ extern void DeleteWindowFromAnySelections(
|
||||||
extern void MarkClientException(
|
extern void MarkClientException(
|
||||||
ClientPtr /*client*/);
|
ClientPtr /*client*/);
|
||||||
|
|
||||||
extern int GetGeometry(
|
|
||||||
ClientPtr /*client*/,
|
|
||||||
xGetGeometryReply* /* wa */);
|
|
||||||
|
|
||||||
extern int SendConnSetup(
|
extern int SendConnSetup(
|
||||||
ClientPtr /*client*/,
|
ClientPtr /*client*/,
|
||||||
char* /*reason*/);
|
char* /*reason*/);
|
||||||
|
|
||||||
extern int DoGetImage(
|
|
||||||
ClientPtr /*client*/,
|
|
||||||
int /*format*/,
|
|
||||||
Drawable /*drawable*/,
|
|
||||||
int /*x*/,
|
|
||||||
int /*y*/,
|
|
||||||
int /*width*/,
|
|
||||||
int /*height*/,
|
|
||||||
Mask /*planemask*/,
|
|
||||||
xGetImageReply ** /*im_return*/);
|
|
||||||
|
|
||||||
#if defined(DDXBEFORERESET)
|
#if defined(DDXBEFORERESET)
|
||||||
extern void ddxBeforeReset (void);
|
extern void ddxBeforeReset (void);
|
||||||
#endif
|
#endif
|
||||||
|
@ -632,10 +615,6 @@ typedef struct _CallbackProcs {
|
||||||
DeleteCallbackListProcPtr DeleteCallbackList;
|
DeleteCallbackListProcPtr DeleteCallbackList;
|
||||||
} CallbackFuncsRec, *CallbackFuncsPtr;
|
} CallbackFuncsRec, *CallbackFuncsPtr;
|
||||||
|
|
||||||
extern Bool CreateCallbackList(
|
|
||||||
CallbackListPtr * /*pcbl*/,
|
|
||||||
CallbackFuncsPtr /*cbfuncs*/);
|
|
||||||
|
|
||||||
extern Bool AddCallback(
|
extern Bool AddCallback(
|
||||||
CallbackListPtr * /*pcbl*/,
|
CallbackListPtr * /*pcbl*/,
|
||||||
CallbackProcPtr /*callback*/,
|
CallbackProcPtr /*callback*/,
|
||||||
|
|
|
@ -85,32 +85,11 @@ extern void NotImplemented ( /* FIXME: this may move to another file... */
|
||||||
xEvent *,
|
xEvent *,
|
||||||
xEvent *);
|
xEvent *);
|
||||||
|
|
||||||
typedef void (* ExtensionLookupProc)(
|
|
||||||
#ifdef EXTENSION_PROC_ARGS
|
|
||||||
EXTENSION_PROC_ARGS
|
|
||||||
#else
|
|
||||||
/* args no longer indeterminate */
|
|
||||||
char *name,
|
|
||||||
GCPtr pGC
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef struct _ProcEntry {
|
|
||||||
char *name;
|
|
||||||
ExtensionLookupProc proc;
|
|
||||||
} ProcEntryRec, *ProcEntryPtr;
|
|
||||||
|
|
||||||
typedef struct _ScreenProcEntry {
|
|
||||||
int num;
|
|
||||||
ProcEntryPtr procList;
|
|
||||||
} ScreenProcEntry;
|
|
||||||
|
|
||||||
#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
|
#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
|
||||||
pGC->VectorElement = NewRoutineAddress;
|
pGC->VectorElement = NewRoutineAddress;
|
||||||
|
|
||||||
#define GetGCValue(pGC, GCElement) (pGC->GCElement)
|
#define GetGCValue(pGC, GCElement) (pGC->GCElement)
|
||||||
|
|
||||||
|
|
||||||
extern ExtensionEntry *AddExtension(
|
extern ExtensionEntry *AddExtension(
|
||||||
char* /*name*/,
|
char* /*name*/,
|
||||||
int /*NumEvents*/,
|
int /*NumEvents*/,
|
||||||
|
@ -128,20 +107,6 @@ extern Bool AddExtensionAlias(
|
||||||
extern ExtensionEntry *CheckExtension(const char *extname);
|
extern ExtensionEntry *CheckExtension(const char *extname);
|
||||||
extern ExtensionEntry *GetExtensionEntry(int major);
|
extern ExtensionEntry *GetExtensionEntry(int major);
|
||||||
|
|
||||||
extern ExtensionLookupProc LookupProc(
|
|
||||||
char* /*name*/,
|
|
||||||
GCPtr /*pGC*/);
|
|
||||||
|
|
||||||
extern Bool RegisterProc(
|
|
||||||
char* /*name*/,
|
|
||||||
GCPtr /*pGC*/,
|
|
||||||
ExtensionLookupProc /*proc*/);
|
|
||||||
|
|
||||||
extern Bool RegisterScreenProc(
|
|
||||||
char* /*name*/,
|
|
||||||
ScreenPtr /*pScreen*/,
|
|
||||||
ExtensionLookupProc /*proc*/);
|
|
||||||
|
|
||||||
extern void DeclareExtensionSecurity(
|
extern void DeclareExtensionSecurity(
|
||||||
char * /*extname*/,
|
char * /*extname*/,
|
||||||
Bool /*secure*/);
|
Bool /*secure*/);
|
||||||
|
|
|
@ -126,11 +126,6 @@ extern int FreeGC(
|
||||||
pointer /*pGC*/,
|
pointer /*pGC*/,
|
||||||
XID /*gid*/);
|
XID /*gid*/);
|
||||||
|
|
||||||
extern void SetGCMask(
|
|
||||||
GCPtr /*pGC*/,
|
|
||||||
Mask /*selectMask*/,
|
|
||||||
Mask /*newDataMask*/);
|
|
||||||
|
|
||||||
extern GCPtr CreateScratchGC(
|
extern GCPtr CreateScratchGC(
|
||||||
ScreenPtr /*pScreen*/,
|
ScreenPtr /*pScreen*/,
|
||||||
unsigned /*depth*/);
|
unsigned /*depth*/);
|
||||||
|
|
14
include/os.h
14
include/os.h
|
@ -348,12 +348,6 @@ extern void InitAuthorization(char * /*filename*/);
|
||||||
|
|
||||||
extern void RegisterAuthorizations(void);
|
extern void RegisterAuthorizations(void);
|
||||||
|
|
||||||
extern XID AuthorizationToID (
|
|
||||||
unsigned short name_length,
|
|
||||||
char *name,
|
|
||||||
unsigned short data_length,
|
|
||||||
char *data);
|
|
||||||
|
|
||||||
extern int AuthorizationFromID (
|
extern int AuthorizationFromID (
|
||||||
XID id,
|
XID id,
|
||||||
unsigned short *name_lenp,
|
unsigned short *name_lenp,
|
||||||
|
@ -402,14 +396,6 @@ extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
|
||||||
|
|
||||||
extern void ddxUseMsg(void);
|
extern void ddxUseMsg(void);
|
||||||
|
|
||||||
/*
|
|
||||||
* idiom processing stuff
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore);
|
|
||||||
|
|
||||||
extern void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
|
|
||||||
|
|
||||||
/* int ReqLen(xReq *req, ClientPtr client)
|
/* int ReqLen(xReq *req, ClientPtr client)
|
||||||
* Given a pointer to a *complete* request, return its length in bytes.
|
* Given a pointer to a *complete* request, return its length in bytes.
|
||||||
* Note that if the request is a big request (as defined in the Big
|
* Note that if the request is a big request (as defined in the Big
|
||||||
|
|
|
@ -91,9 +91,6 @@ extern void SQueryPointerReply(
|
||||||
int /* size */,
|
int /* size */,
|
||||||
xQueryPointerReply * /* pRep */);
|
xQueryPointerReply * /* pRep */);
|
||||||
|
|
||||||
extern void SwapTimecoord(
|
|
||||||
xTimecoord * /* pCoord */);
|
|
||||||
|
|
||||||
extern void SwapTimeCoordWrite(
|
extern void SwapTimeCoordWrite(
|
||||||
ClientPtr /* pClient */,
|
ClientPtr /* pClient */,
|
||||||
int /* size */,
|
int /* size */,
|
||||||
|
@ -174,9 +171,6 @@ extern void SAllocColorPlanesReply(
|
||||||
int /* size */,
|
int /* size */,
|
||||||
xAllocColorPlanesReply * /* pRep */);
|
xAllocColorPlanesReply * /* pRep */);
|
||||||
|
|
||||||
extern void SwapRGB(
|
|
||||||
xrgb * /* prgb */);
|
|
||||||
|
|
||||||
extern void SQColorsExtend(
|
extern void SQColorsExtend(
|
||||||
ClientPtr /* pClient */,
|
ClientPtr /* pClient */,
|
||||||
int /* size */,
|
int /* size */,
|
||||||
|
@ -255,18 +249,6 @@ extern void WriteSConnectionInfo(
|
||||||
unsigned long /* size */,
|
unsigned long /* size */,
|
||||||
char * /* pInfo */);
|
char * /* pInfo */);
|
||||||
|
|
||||||
extern void SwapConnSetup(
|
|
||||||
xConnSetup * /* pConnSetup */,
|
|
||||||
xConnSetup * /* pConnSetupT */);
|
|
||||||
|
|
||||||
extern void SwapWinRoot(
|
|
||||||
xWindowRoot * /* pRoot */,
|
|
||||||
xWindowRoot * /* pRootT */);
|
|
||||||
|
|
||||||
extern void SwapVisual(
|
|
||||||
xVisualType * /* pVis */,
|
|
||||||
xVisualType * /* pVisT */);
|
|
||||||
|
|
||||||
extern void SwapConnSetupPrefix(
|
extern void SwapConnSetupPrefix(
|
||||||
xConnSetupPrefix * /* pcspFrom */,
|
xConnSetupPrefix * /* pcspFrom */,
|
||||||
xConnSetupPrefix * /* pcspTo */);
|
xConnSetupPrefix * /* pcspTo */);
|
||||||
|
|
|
@ -93,14 +93,6 @@ extern Bool CreateRootWindow(
|
||||||
extern void InitRootWindow(
|
extern void InitRootWindow(
|
||||||
WindowPtr /*pWin*/);
|
WindowPtr /*pWin*/);
|
||||||
|
|
||||||
extern void ClippedRegionFromBox(
|
|
||||||
WindowPtr /*pWin*/,
|
|
||||||
RegionPtr /*Rgn*/,
|
|
||||||
int /*x*/,
|
|
||||||
int /*y*/,
|
|
||||||
int /*w*/,
|
|
||||||
int /*h*/);
|
|
||||||
|
|
||||||
typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
|
typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
|
||||||
|
|
||||||
void RegisterRealChildHeadProc (RealChildHeadProc proc);
|
void RegisterRealChildHeadProc (RealChildHeadProc proc);
|
||||||
|
@ -205,12 +197,6 @@ extern void UnmapSubwindows(
|
||||||
extern void HandleSaveSet(
|
extern void HandleSaveSet(
|
||||||
ClientPtr /*client*/);
|
ClientPtr /*client*/);
|
||||||
|
|
||||||
extern Bool VisibleBoundingBoxFromPoint(
|
|
||||||
WindowPtr /*pWin*/,
|
|
||||||
int /*x*/,
|
|
||||||
int /*y*/,
|
|
||||||
BoxPtr /*box*/);
|
|
||||||
|
|
||||||
extern Bool PointInWindowIsVisible(
|
extern Bool PointInWindowIsVisible(
|
||||||
WindowPtr /*pWin*/,
|
WindowPtr /*pWin*/,
|
||||||
int /*x*/,
|
int /*x*/,
|
||||||
|
@ -235,9 +221,6 @@ extern void CheckWindowOptionalNeed(
|
||||||
extern Bool MakeWindowOptional(
|
extern Bool MakeWindowOptional(
|
||||||
WindowPtr /*pWin*/);
|
WindowPtr /*pWin*/);
|
||||||
|
|
||||||
extern void DisposeWindowOptional(
|
|
||||||
WindowPtr /*pWin*/);
|
|
||||||
|
|
||||||
extern WindowPtr MoveWindowInStack(
|
extern WindowPtr MoveWindowInStack(
|
||||||
WindowPtr /*pWin*/,
|
WindowPtr /*pWin*/,
|
||||||
WindowPtr /*pNextSib*/);
|
WindowPtr /*pNextSib*/);
|
||||||
|
@ -271,7 +254,5 @@ extern void DisableMapUnmapEvents(
|
||||||
WindowPtr /* pWin */ );
|
WindowPtr /* pWin */ );
|
||||||
extern void EnableMapUnmapEvents(
|
extern void EnableMapUnmapEvents(
|
||||||
WindowPtr /* pWin */ );
|
WindowPtr /* pWin */ );
|
||||||
extern Bool MapUnmapEventsEnabled(
|
|
||||||
WindowPtr /* pWin */ );
|
|
||||||
|
|
||||||
#endif /* WINDOW_H */
|
#endif /* WINDOW_H */
|
||||||
|
|
|
@ -234,8 +234,8 @@ static Bool NewHost(int /*family*/,
|
||||||
int /*len*/,
|
int /*len*/,
|
||||||
int /* addingLocalHosts */);
|
int /* addingLocalHosts */);
|
||||||
|
|
||||||
int LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
static int LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
||||||
int **pSuppGids, int *nSuppGids);
|
int **pSuppGids, int *nSuppGids);
|
||||||
|
|
||||||
|
|
||||||
/* XFree86 bug #156: To keep track of which hosts were explicitly requested in
|
/* XFree86 bug #156: To keep track of which hosts were explicitly requested in
|
||||||
|
@ -1431,7 +1431,7 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
|
||||||
*
|
*
|
||||||
* Used by localuser & localgroup ServerInterpreted access control forms below
|
* Used by localuser & localgroup ServerInterpreted access control forms below
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
||||||
int **pSuppGids, int *nSuppGids)
|
int **pSuppGids, int *nSuppGids)
|
||||||
{
|
{
|
||||||
|
|
20
os/auth.c
20
os/auth.c
|
@ -255,26 +255,6 @@ ResetAuthorization (void)
|
||||||
ShouldLoadAuth = TRUE;
|
ShouldLoadAuth = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
XID
|
|
||||||
AuthorizationToID (
|
|
||||||
unsigned short name_length,
|
|
||||||
char *name,
|
|
||||||
unsigned short data_length,
|
|
||||||
char *data)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < NUM_AUTHORIZATION; i++) {
|
|
||||||
if (protocols[i].name_length == name_length &&
|
|
||||||
memcmp (protocols[i].name, name, (int) name_length) == 0 &&
|
|
||||||
protocols[i].ToID)
|
|
||||||
{
|
|
||||||
return (*protocols[i].ToID) (data_length, data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (XID) ~0L;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
AuthorizationFromID (
|
AuthorizationFromID (
|
||||||
XID id,
|
XID id,
|
||||||
|
|
13
os/io.c
13
os/io.c
|
@ -90,6 +90,11 @@ SOFTWARE.
|
||||||
_X_EXPORT CallbackListPtr ReplyCallback;
|
_X_EXPORT CallbackListPtr ReplyCallback;
|
||||||
_X_EXPORT CallbackListPtr FlushCallback;
|
_X_EXPORT CallbackListPtr FlushCallback;
|
||||||
|
|
||||||
|
static ConnectionInputPtr AllocateInputBuffer(void);
|
||||||
|
static ConnectionOutputPtr AllocateOutputBuffer(void);
|
||||||
|
static xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore);
|
||||||
|
static void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
|
||||||
|
|
||||||
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
|
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
|
||||||
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
|
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
|
||||||
*/
|
*/
|
||||||
|
@ -635,7 +640,7 @@ ResetCurrentRequest(ClientPtr client)
|
||||||
*
|
*
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
xReqPtr
|
static xReqPtr
|
||||||
PeekNextRequest(
|
PeekNextRequest(
|
||||||
xReqPtr req, /* request we're starting from */
|
xReqPtr req, /* request we're starting from */
|
||||||
ClientPtr client, /* client whose requests we're skipping */
|
ClientPtr client, /* client whose requests we're skipping */
|
||||||
|
@ -697,7 +702,7 @@ PeekNextRequest(
|
||||||
|
|
||||||
_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
|
_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
|
||||||
|
|
||||||
void
|
static void
|
||||||
SkipRequests(
|
SkipRequests(
|
||||||
xReqPtr req, /* last request being skipped */
|
xReqPtr req, /* last request being skipped */
|
||||||
ClientPtr client, /* client whose requests we're skipping */
|
ClientPtr client, /* client whose requests we're skipping */
|
||||||
|
@ -1165,7 +1170,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
|
||||||
return extraCount; /* return only the amount explicitly requested */
|
return extraCount; /* return only the amount explicitly requested */
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionInputPtr
|
static ConnectionInputPtr
|
||||||
AllocateInputBuffer(void)
|
AllocateInputBuffer(void)
|
||||||
{
|
{
|
||||||
ConnectionInputPtr oci;
|
ConnectionInputPtr oci;
|
||||||
|
@ -1186,7 +1191,7 @@ AllocateInputBuffer(void)
|
||||||
return oci;
|
return oci;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionOutputPtr
|
static ConnectionOutputPtr
|
||||||
AllocateOutputBuffer(void)
|
AllocateOutputBuffer(void)
|
||||||
{
|
{
|
||||||
ConnectionOutputPtr oco;
|
ConnectionOutputPtr oco;
|
||||||
|
|
|
@ -210,10 +210,6 @@ extern void FreeOsBuffers(
|
||||||
|
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
|
|
||||||
extern ConnectionInputPtr AllocateInputBuffer(void);
|
|
||||||
|
|
||||||
extern ConnectionOutputPtr AllocateOutputBuffer(void);
|
|
||||||
|
|
||||||
extern fd_set AllSockets;
|
extern fd_set AllSockets;
|
||||||
extern fd_set AllClients;
|
extern fd_set AllClients;
|
||||||
extern fd_set LastSelectMask;
|
extern fd_set LastSelectMask;
|
||||||
|
@ -293,14 +289,12 @@ extern XID AuthSecurityCheck (AuthCheckArgs);
|
||||||
/* in xdmcp.c */
|
/* in xdmcp.c */
|
||||||
extern void XdmcpUseMsg (void);
|
extern void XdmcpUseMsg (void);
|
||||||
extern int XdmcpOptions(int argc, char **argv, int i);
|
extern int XdmcpOptions(int argc, char **argv, int i);
|
||||||
extern void XdmcpSetAuthentication (ARRAY8Ptr name);
|
|
||||||
extern void XdmcpRegisterConnection (
|
extern void XdmcpRegisterConnection (
|
||||||
int type,
|
int type,
|
||||||
char *address,
|
char *address,
|
||||||
int addrlen);
|
int addrlen);
|
||||||
extern void XdmcpRegisterAuthorizations (void);
|
extern void XdmcpRegisterAuthorizations (void);
|
||||||
extern void XdmcpRegisterAuthorization (char *name, int namelen);
|
extern void XdmcpRegisterAuthorization (char *name, int namelen);
|
||||||
extern void XdmcpRegisterDisplayClass (char *name, int length);
|
|
||||||
extern void XdmcpInit (void);
|
extern void XdmcpInit (void);
|
||||||
extern void XdmcpReset (void);
|
extern void XdmcpReset (void);
|
||||||
extern void XdmcpOpenDisplay(int sock);
|
extern void XdmcpOpenDisplay(int sock);
|
||||||
|
@ -313,8 +307,6 @@ extern void XdmcpRegisterAuthentication (
|
||||||
ValidatorFunc Validator,
|
ValidatorFunc Validator,
|
||||||
GeneratorFunc Generator,
|
GeneratorFunc Generator,
|
||||||
AddAuthorFunc AddAuth);
|
AddAuthorFunc AddAuth);
|
||||||
extern int XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type);
|
|
||||||
extern int XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data);
|
|
||||||
|
|
||||||
struct sockaddr_in;
|
struct sockaddr_in;
|
||||||
extern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr);
|
extern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr);
|
||||||
|
|
58
os/xdmcp.c
58
os/xdmcp.c
|
@ -197,8 +197,6 @@ static void receive_packet(int /*socketfd*/);
|
||||||
|
|
||||||
static void send_packet(void);
|
static void send_packet(void);
|
||||||
|
|
||||||
extern void XdmcpDeadSession(char * /*reason*/);
|
|
||||||
|
|
||||||
static void timeout(void);
|
static void timeout(void);
|
||||||
|
|
||||||
static void restart(void);
|
static void restart(void);
|
||||||
|
@ -213,10 +211,23 @@ static void XdmcpWakeupHandler(
|
||||||
int /*i*/,
|
int /*i*/,
|
||||||
pointer /*LastSelectMask*/);
|
pointer /*LastSelectMask*/);
|
||||||
|
|
||||||
void XdmcpRegisterManufacturerDisplayID(
|
/*
|
||||||
char * /*name*/,
|
* Register the Manufacturer display ID
|
||||||
int /*length*/);
|
*/
|
||||||
|
|
||||||
|
static ARRAY8 ManufacturerDisplayID;
|
||||||
|
|
||||||
|
static void
|
||||||
|
XdmcpRegisterManufacturerDisplayID (char *name, int length)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
XdmcpDisposeARRAY8 (&ManufacturerDisplayID);
|
||||||
|
if (!XdmcpAllocARRAY8 (&ManufacturerDisplayID, length))
|
||||||
|
return;
|
||||||
|
for (i = 0; i < length; i++)
|
||||||
|
ManufacturerDisplayID.data[i] = (CARD8) name[i];
|
||||||
|
}
|
||||||
|
|
||||||
static unsigned short xdm_udp_port = XDM_UDP_PORT;
|
static unsigned short xdm_udp_port = XDM_UDP_PORT;
|
||||||
static Bool OneSession = FALSE;
|
static Bool OneSession = FALSE;
|
||||||
|
@ -417,7 +428,7 @@ static ARRAY8Ptr AuthenticationName = &noAuthenticationName;
|
||||||
static ARRAY8Ptr AuthenticationData = &noAuthenticationData;
|
static ARRAY8Ptr AuthenticationData = &noAuthenticationData;
|
||||||
static AuthenticationFuncsPtr AuthenticationFuncs;
|
static AuthenticationFuncsPtr AuthenticationFuncs;
|
||||||
|
|
||||||
void
|
static void
|
||||||
XdmcpSetAuthentication (ARRAY8Ptr name)
|
XdmcpSetAuthentication (ARRAY8Ptr name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -549,7 +560,7 @@ XdmcpRegisterAuthorization (char *name, int namelen)
|
||||||
|
|
||||||
static ARRAY8 DisplayClass;
|
static ARRAY8 DisplayClass;
|
||||||
|
|
||||||
void
|
static void
|
||||||
XdmcpRegisterDisplayClass (char *name, int length)
|
XdmcpRegisterDisplayClass (char *name, int length)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -561,24 +572,6 @@ XdmcpRegisterDisplayClass (char *name, int length)
|
||||||
DisplayClass.data[i] = (CARD8) name[i];
|
DisplayClass.data[i] = (CARD8) name[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Register the Manufacturer display ID
|
|
||||||
*/
|
|
||||||
|
|
||||||
static ARRAY8 ManufacturerDisplayID;
|
|
||||||
|
|
||||||
void
|
|
||||||
XdmcpRegisterManufacturerDisplayID (char *name, int length)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
XdmcpDisposeARRAY8 (&ManufacturerDisplayID);
|
|
||||||
if (!XdmcpAllocARRAY8 (&ManufacturerDisplayID, length))
|
|
||||||
return;
|
|
||||||
for (i = 0; i < length; i++)
|
|
||||||
ManufacturerDisplayID.data[i] = (CARD8) name[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* initialize XDMCP; create the socket, compute the display
|
* initialize XDMCP; create the socket, compute the display
|
||||||
* number, set up the state machine
|
* number, set up the state machine
|
||||||
|
@ -867,7 +860,7 @@ send_packet(void)
|
||||||
* timeouts, or Keepalive failure.
|
* timeouts, or Keepalive failure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static void
|
||||||
XdmcpDeadSession (char *reason)
|
XdmcpDeadSession (char *reason)
|
||||||
{
|
{
|
||||||
ErrorF ("XDM: %s, declaring session dead\n", reason);
|
ErrorF ("XDM: %s, declaring session dead\n", reason);
|
||||||
|
@ -960,21 +953,16 @@ restart(void)
|
||||||
send_packet();
|
send_packet();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
XdmcpCheckAuthentication (
|
XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type)
|
||||||
ARRAY8Ptr Name,
|
|
||||||
ARRAY8Ptr Data,
|
|
||||||
int packet_type)
|
|
||||||
{
|
{
|
||||||
return (XdmcpARRAY8Equal (Name, AuthenticationName) &&
|
return (XdmcpARRAY8Equal (Name, AuthenticationName) &&
|
||||||
(AuthenticationName->length == 0 ||
|
(AuthenticationName->length == 0 ||
|
||||||
(*AuthenticationFuncs->Validator) (AuthenticationData, Data, packet_type)));
|
(*AuthenticationFuncs->Validator) (AuthenticationData, Data, packet_type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
XdmcpAddAuthorization (
|
XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data)
|
||||||
ARRAY8Ptr name,
|
|
||||||
ARRAY8Ptr data)
|
|
||||||
{
|
{
|
||||||
AddAuthorFunc AddAuth;
|
AddAuthorFunc AddAuth;
|
||||||
|
|
||||||
|
|
|
@ -164,10 +164,10 @@ BitVectorIterateSet(RecordSetPtr pSet, RecordSetIteratePtr pIter,
|
||||||
return (RecordSetIteratePtr)(long)(pInterval->last + 1);
|
return (RecordSetIteratePtr)(long)(pInterval->last + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
RecordSetOperations BitVectorSetOperations = {
|
static RecordSetOperations BitVectorSetOperations = {
|
||||||
BitVectorDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet };
|
BitVectorDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet };
|
||||||
|
|
||||||
RecordSetOperations BitVectorNoFreeOperations = {
|
static RecordSetOperations BitVectorNoFreeOperations = {
|
||||||
NoopDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet };
|
NoopDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet };
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -277,10 +277,10 @@ IntervalListIterateSet(RecordSetPtr pSet, RecordSetIteratePtr pIter,
|
||||||
return (RecordSetIteratePtr)NULL;
|
return (RecordSetIteratePtr)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
RecordSetOperations IntervalListSetOperations = {
|
static RecordSetOperations IntervalListSetOperations = {
|
||||||
IntervalListDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet };
|
IntervalListDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet };
|
||||||
|
|
||||||
RecordSetOperations IntervalListNoFreeOperations = {
|
static RecordSetOperations IntervalListNoFreeOperations = {
|
||||||
NoopDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet };
|
NoopDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet };
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue