summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-25 17:57:22 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-25 17:57:22 -0400
commit04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 (patch)
treea7beb0dd1011c46492b4634556a057affac69c33
parentaf769892a91c9af59de53ca3bcd77fc4967daffb (diff)
Static and dead code cleaup for Xext/
-rw-r--r--Xext/appgroup.c52
-rw-r--r--Xext/appgroup.h22
-rw-r--r--Xext/panoramiX.c48
-rw-r--r--Xext/panoramiX.h12
-rw-r--r--Xext/panoramiXh.h5
-rw-r--r--Xext/panoramiXsrv.h3
-rw-r--r--Xext/saver.c4
-rw-r--r--Xext/security.c2
-rw-r--r--Xext/securitysrv.h9
-rw-r--r--Xext/xace.c4
-rw-r--r--Xext/xace.h10
-rw-r--r--Xext/xevie.c2
12 files changed, 29 insertions, 144 deletions
diff --git a/Xext/appgroup.c b/Xext/appgroup.c
index bb7a73ce1..7bd205587 100644
--- a/Xext/appgroup.c
+++ b/Xext/appgroup.c
@@ -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);
+ }
+}
diff --git a/Xext/appgroup.h b/Xext/appgroup.h
index a875068fc..778da5de6 100644
--- a/Xext/appgroup.h
+++ b/Xext/appgroup.h
@@ -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_ */
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 85f591356..95df04320 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -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;
diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h
index 7b3339204..3ad90fa84 100644
--- a/Xext/panoramiX.h
+++ b/Xext/panoramiX.h
@@ -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
diff --git a/Xext/panoramiXh.h b/Xext/panoramiXh.h
index 6cee650ac..1a76a45cd 100644
--- a/Xext/panoramiXh.h
+++ b/Xext/panoramiXh.h
@@ -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);
-
diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h
index bb032cfae..ae9024418 100644
--- a/Xext/panoramiXsrv.h
+++ b/Xext/panoramiXsrv.h
@@ -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);
diff --git a/Xext/saver.c b/Xext/saver.c
index 7e3ebf408..a9f1dd36c 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -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;
{
diff --git a/Xext/security.c b/Xext/security.c
index 7202d3947..c17a438b4 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -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 */
diff --git a/Xext/securitysrv.h b/Xext/securitysrv.h
index 7c6f432fe..67d864e2e 100644
--- a/Xext/securitysrv.h
+++ b/Xext/securitysrv.h
@@ -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 */
diff --git a/Xext/xace.c b/Xext/xace.c
index 6fc5c12ee..63856315c 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -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*/
);
diff --git a/Xext/xace.h b/Xext/xace.h
index 7231b04bc..4143cd42f 100644
--- a/Xext/xace.h
+++ b/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,
diff --git a/Xext/xevie.c b/Xext/xevie.c
index 2fd68f8ce..7922913ba 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -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);