Static and dead code cleaup for Xext/
This commit is contained in:
parent
af769892a9
commit
04b87d6dfa
|
@ -116,8 +116,7 @@ int XagAppGroupFree(
|
|||
return Success;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void XagClientStateChange(
|
||||
static void XagClientStateChange(
|
||||
CallbackListPtr* pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
|
@ -172,21 +171,6 @@ void XagClientStateChange(
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
XagExtensionInit(INITARGS)
|
||||
{
|
||||
if (AddExtension (XAGNAME,
|
||||
0,
|
||||
XagNumberErrors,
|
||||
ProcXagDispatch,
|
||||
SProcXagDispatch,
|
||||
XagResetProc,
|
||||
StandardMinorOpcode)) {
|
||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static
|
||||
void XagResetProc(
|
||||
|
@ -393,8 +377,7 @@ int AttrValidate(
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
/* static */
|
||||
int ProcXagCreate (
|
||||
static int ProcXagCreate (
|
||||
register ClientPtr client)
|
||||
{
|
||||
REQUEST (xXagCreateReq);
|
||||
|
@ -425,8 +408,7 @@ int ProcXagCreate (
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
/* static */
|
||||
int ProcXagDestroy(
|
||||
static int ProcXagDestroy(
|
||||
register ClientPtr client)
|
||||
{
|
||||
AppGroupPtr pAppGrp;
|
||||
|
@ -743,18 +725,7 @@ XID XagId(
|
|||
return (client->appgroup ? client->appgroup->appgroupId : 0);
|
||||
}
|
||||
|
||||
void XagGetDeltaInfo(
|
||||
ClientPtr client,
|
||||
CARD32* buf)
|
||||
{
|
||||
*buf++ = (CARD32) client->appgroup->default_root;
|
||||
*buf++ = (CARD32) client->appgroup->root_visual;
|
||||
*buf++ = (CARD32) client->appgroup->default_colormap;
|
||||
*buf++ = (CARD32) client->appgroup->black_pixel;
|
||||
*buf = (CARD32) client->appgroup->white_pixel;
|
||||
}
|
||||
|
||||
void XagCallClientStateChange(
|
||||
static void XagCallClientStateChange(
|
||||
CallbackListPtr *pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata)
|
||||
|
@ -785,3 +756,18 @@ void XagCallClientStateChange(
|
|||
XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
XagExtensionInit(INITARGS)
|
||||
{
|
||||
if (AddExtension (XAGNAME,
|
||||
0,
|
||||
XagNumberErrors,
|
||||
ProcXagDispatch,
|
||||
SProcXagDispatch,
|
||||
XagResetProc,
|
||||
StandardMinorOpcode)) {
|
||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,12 +50,6 @@ extern ClientPtr XagLeader(
|
|||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
extern void XagCallClientStateChange(
|
||||
CallbackListPtr * /* pcbl */,
|
||||
pointer /* nulldata */,
|
||||
pointer /* calldata */
|
||||
);
|
||||
|
||||
extern Bool XagIsControlledRoot (
|
||||
ClientPtr /* client */,
|
||||
WindowPtr /* pParent */
|
||||
|
@ -65,22 +59,6 @@ extern XID XagId (
|
|||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
extern void XagGetDeltaInfo (
|
||||
ClientPtr /* client */,
|
||||
CARD32* /* buf */
|
||||
);
|
||||
|
||||
extern void XagClientStateChange(
|
||||
CallbackListPtr* pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata);
|
||||
|
||||
extern int ProcXagCreate (
|
||||
register ClientPtr client);
|
||||
|
||||
extern int ProcXagDestroy(
|
||||
register ClientPtr client);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#endif /* _APPGROUP_SRV_H_ */
|
||||
|
|
|
@ -77,7 +77,7 @@ int PanoramiXPixHeight = 0;
|
|||
_X_EXPORT int PanoramiXNumScreens = 0;
|
||||
|
||||
_X_EXPORT PanoramiXData *panoramiXdataPtr = NULL;
|
||||
RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
|
||||
static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
|
||||
|
||||
static int PanoramiXNumDepths;
|
||||
static DepthPtr PanoramiXDepths;
|
||||
|
@ -109,7 +109,6 @@ static void PanoramiXResetProc(ExtensionEntry*);
|
|||
#include "panoramiXh.h"
|
||||
|
||||
int (* SavedProcVector[256]) (ClientPtr client) = { NULL, };
|
||||
ScreenInfo *GlobalScrInfo = NULL;
|
||||
|
||||
static int PanoramiXGCIndex = -1;
|
||||
static int PanoramiXScreenIndex = -1;
|
||||
|
@ -135,7 +134,7 @@ static void XineramaChangeClip(GCPtr, int, pointer, int);
|
|||
static void XineramaDestroyClip(GCPtr);
|
||||
static void XineramaCopyClip(GCPtr, GCPtr);
|
||||
|
||||
GCFuncs XineramaGCFuncs = {
|
||||
static GCFuncs XineramaGCFuncs = {
|
||||
XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC,
|
||||
XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip
|
||||
};
|
||||
|
@ -168,7 +167,7 @@ XineramaCloseScreen (int i, ScreenPtr pScreen)
|
|||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
static Bool
|
||||
XineramaCreateGC(GCPtr pGC)
|
||||
{
|
||||
ScreenPtr pScreen = pGC->pScreen;
|
||||
|
@ -330,8 +329,6 @@ XineramaDestroyClip(GCPtr pGC)
|
|||
Xinerama_GC_FUNC_EPILOGUE (pGC);
|
||||
}
|
||||
|
||||
|
||||
|
||||
_X_EXPORT int
|
||||
XineramaDeleteResource(pointer data, XID id)
|
||||
{
|
||||
|
@ -339,32 +336,11 @@ XineramaDeleteResource(pointer data, XID id)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
XineramaFindIDOnAnyScreen(pointer resource, XID id, pointer privdata)
|
||||
{
|
||||
PanoramiXRes *res = (PanoramiXRes*)resource;
|
||||
int j;
|
||||
|
||||
FOR_NSCREENS(j)
|
||||
if(res->info[j].id == *((XID*)privdata)) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
PanoramiXRes *
|
||||
PanoramiXFindIDOnAnyScreen(RESTYPE type, XID id)
|
||||
{
|
||||
return LookupClientResourceComplex(clients[CLIENT_ID(id)], type,
|
||||
XineramaFindIDOnAnyScreen, &id);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
int screen;
|
||||
int id;
|
||||
} PanoramiXSearchData;
|
||||
|
||||
|
||||
static Bool
|
||||
XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata)
|
||||
{
|
||||
|
@ -389,23 +365,6 @@ PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen)
|
|||
XineramaFindIDByScrnum, &data);
|
||||
}
|
||||
|
||||
WindowPtr
|
||||
PanoramiXChangeWindow(int ScrnNum, WindowPtr pWin)
|
||||
{
|
||||
int num = pWin->drawable.pScreen->myNum;
|
||||
|
||||
if(num != ScrnNum) {
|
||||
PanoramiXRes *win;
|
||||
|
||||
win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, num);
|
||||
|
||||
if (win)
|
||||
pWin = (WindowPtr) LookupIDByType(win->info[ScrnNum].id, RT_WINDOW);
|
||||
}
|
||||
|
||||
return pWin;
|
||||
}
|
||||
|
||||
typedef struct _connect_callback_list {
|
||||
void (*func)(void);
|
||||
struct _connect_callback_list *next;
|
||||
|
@ -496,7 +455,6 @@ void PanoramiXExtensionInit(int argc, char *argv[])
|
|||
if (noPanoramiXExtension)
|
||||
return;
|
||||
|
||||
GlobalScrInfo = &screenInfo; /* For debug visibility */
|
||||
PanoramiXNumScreens = screenInfo.numScreens;
|
||||
if (PanoramiXNumScreens == 1) { /* Only 1 screen */
|
||||
noPanoramiXExtension = TRUE;
|
||||
|
|
|
@ -94,18 +94,6 @@ typedef struct {
|
|||
(a).root = WindowTable[0]->drawable.id; \
|
||||
}
|
||||
|
||||
#define FORCE_WIN(a) { \
|
||||
if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \
|
||||
(a) = win->info[0].id; /* Real ID */ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define FORCE_CMAP(a) { \
|
||||
if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \
|
||||
(a) = win->info[0].id; /* Real ID */ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
|
||||
|
||||
#define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return
|
||||
|
|
|
@ -19,10 +19,10 @@ extern int PanoramiXGetGeometry(ClientPtr client);
|
|||
extern int PanoramiXTranslateCoords(ClientPtr client);
|
||||
extern int PanoramiXCreatePixmap(ClientPtr client);
|
||||
extern int PanoramiXFreePixmap(ClientPtr client);
|
||||
extern int PanoramiXCreateGC(ClientPtr client);
|
||||
extern int PanoramiXChangeGC(ClientPtr client);
|
||||
extern int PanoramiXCopyGC(ClientPtr client);
|
||||
extern int PanoramiXCopyColormapAndFree(ClientPtr client);
|
||||
extern int PanoramiXCreateGC(ClientPtr client);
|
||||
extern int PanoramiXSetDashes(ClientPtr client);
|
||||
extern int PanoramiXSetClipRectangles(ClientPtr client);
|
||||
extern int PanoramiXFreeGC(ClientPtr client);
|
||||
|
@ -64,7 +64,6 @@ PROC_EXTERN(ProcPanoramiXGetScreenSize);
|
|||
|
||||
PROC_EXTERN(ProcXineramaQueryScreens);
|
||||
PROC_EXTERN(ProcXineramaIsActive);
|
||||
extern Bool XineramaCreateGC(GCPtr pGC);
|
||||
|
||||
extern int SProcPanoramiXDispatch(ClientPtr client);
|
||||
|
||||
|
@ -72,6 +71,4 @@ extern char *ConnectionInfo;
|
|||
extern int connBlockScreenStart;
|
||||
extern xConnSetupPrefix connSetupPrefix;
|
||||
|
||||
extern ScreenInfo *GlobalScrInfo;
|
||||
extern int (* SavedProcVector[256]) (ClientPtr client);
|
||||
|
||||
|
|
|
@ -12,14 +12,11 @@ extern int PanoramiXNumScreens;
|
|||
extern PanoramiXData *panoramiXdataPtr;
|
||||
extern int PanoramiXPixWidth;
|
||||
extern int PanoramiXPixHeight;
|
||||
extern RegionRec PanoramiXScreenRegion;
|
||||
extern XID *PanoramiXVisualTable;
|
||||
|
||||
extern void PanoramiXConsolidate(void);
|
||||
extern Bool PanoramiXCreateConnectionBlock(void);
|
||||
extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
|
||||
extern PanoramiXRes * PanoramiXFindIDOnAnyScreen(RESTYPE, XID);
|
||||
extern WindowPtr PanoramiXChangeWindow(int, WindowPtr);
|
||||
extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
|
||||
extern int XineramaDeleteResource(pointer, XID);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static unsigned char ScreenSaverReqCode = 0;
|
|||
#endif
|
||||
static int ScreenSaverEventBase = 0;
|
||||
|
||||
extern DISPATCH_PROC(ProcScreenSaverQueryInfo);
|
||||
static DISPATCH_PROC(ProcScreenSaverQueryInfo);
|
||||
static DISPATCH_PROC(ProcScreenSaverDispatch);
|
||||
static DISPATCH_PROC(ProcScreenSaverQueryVersion);
|
||||
static DISPATCH_PROC(ProcScreenSaverSelectInput);
|
||||
|
@ -774,7 +774,7 @@ ProcScreenSaverQueryVersion (client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ProcScreenSaverQueryInfo (client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ typedef struct {
|
|||
#define AUTHID(client) \
|
||||
(((SecurityClientStateRec*)STATEPTR(client))->authId)
|
||||
|
||||
CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
|
||||
static CallbackListPtr SecurityValidateGroupCallback = NULL;
|
||||
|
||||
RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */
|
||||
|
||||
|
|
|
@ -72,15 +72,6 @@ typedef struct {
|
|||
struct _OtherClients *eventClients; /* clients wanting events */
|
||||
} SecurityAuthorizationRec, *SecurityAuthorizationPtr;
|
||||
|
||||
/* The following callback is called when a GenerateAuthorization request
|
||||
* is processed to sanity check the group argument. The call data will
|
||||
* be a pointer to a SecurityValidateGroupInfoRec (below).
|
||||
* Functions registered on this callback are expected to examine the
|
||||
* group and set the valid field to TRUE if they recognize the group as a
|
||||
* legitimate group. If they don't recognize it, they should not change the
|
||||
* valid field.
|
||||
*/
|
||||
extern CallbackListPtr SecurityValidateGroupCallback;
|
||||
typedef struct {
|
||||
XID group; /* the group that was sent in GenerateAuthorization */
|
||||
Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
||||
|
|
|
@ -37,10 +37,10 @@ CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0};
|
|||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
int (*UntrustedProcVector[256])(
|
||||
static int (*UntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
int (*SwappedUntrustedProcVector[256])(
|
||||
static int (*SwappedUntrustedProcVector[256])(
|
||||
ClientPtr /*client*/
|
||||
);
|
||||
|
||||
|
|
10
Xext/xace.h
10
Xext/xace.h
|
@ -82,16 +82,6 @@ extern int XaceHook(
|
|||
/* From the original Security extension...
|
||||
*/
|
||||
|
||||
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||
* These are the same as the normal proc vectors except that extensions
|
||||
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||
* from guessing extension major opcodes and using the extension even though
|
||||
* the extension can't be listed or queried.
|
||||
*/
|
||||
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
||||
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
||||
|
||||
extern void XaceCensorImage(
|
||||
ClientPtr client,
|
||||
RegionPtr pVisibleRegion,
|
||||
|
|
|
@ -105,7 +105,7 @@ typedef struct {
|
|||
} xevieKeycQueueRec, *xevieKeycQueuePtr;
|
||||
|
||||
#define KEYC_QUEUE_SIZE 100
|
||||
xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}};
|
||||
static xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}};
|
||||
static int keycqHead = 0, keycqTail = 0;
|
||||
|
||||
static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr);
|
||||
|
|
Loading…
Reference in New Issue