summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-25 17:57:54 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-03-25 17:57:54 -0400
commit4b5802ddbd45271be3cadeae0a83a6742df2515b (patch)
tree9569d18b523da979175562b113dd610752afd6ec
parent04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 (diff)
General DIX static and dead code cleanup.
-rw-r--r--dix/dispatch.c52
-rw-r--r--dix/dixutils.c6
-rw-r--r--dix/extension.c81
-rw-r--r--dix/gc.c11
-rw-r--r--dix/swaprep.c109
-rw-r--r--dix/window.c120
-rw-r--r--include/dix.h21
-rw-r--r--include/extnsionst.h35
-rw-r--r--include/gc.h5
-rw-r--r--include/os.h14
-rw-r--r--include/swaprep.h18
-rw-r--r--include/window.h19
-rw-r--r--os/access.c6
-rw-r--r--os/auth.c20
-rw-r--r--os/io.c13
-rw-r--r--os/osdep.h8
-rw-r--r--os/xdmcp.c58
-rw-r--r--record/set.c8
18 files changed, 166 insertions, 438 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 02665edea..3d8e71fdc 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -299,7 +299,6 @@ long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
long SmartScheduleTime;
static ClientPtr SmartLastClient;
static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
-int SmartScheduleClient(int *clientReady, int nready);
#ifdef SMART_DEBUG
long SmartLastPrint;
@@ -308,7 +307,7 @@ long SmartLastPrint;
void Dispatch(void);
void InitProcVectors(void);
-int
+static int
SmartScheduleClient (int *clientReady, int nready)
{
ClientPtr pClient;
@@ -834,7 +833,7 @@ ProcCirculateWindow(ClientPtr client)
return(client->noClientException);
}
-int
+static int
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
{
DrawablePtr pDraw;
@@ -2157,8 +2156,7 @@ ProcPutImage(ClientPtr client)
return (client->noClientException);
}
-
-int
+static int
DoGetImage(ClientPtr client, int format, Drawable drawable,
int x, int y, int width, int height,
Mask planemask, xGetImageReply **im_return)
@@ -3383,6 +3381,28 @@ ProcChangeAccessControl(ClientPtr client)
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
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 unsigned *clientPrivateSizes;
extern unsigned totalClientSize;
diff --git a/dix/dixutils.c b/dix/dixutils.c
index c0728da71..44d82c944 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -882,9 +882,7 @@ static CallbackFuncsRec default_cbfuncs =
_DeleteCallbackList
};
-/* ===== Public Procedures ===== */
-
-Bool
+static Bool
CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
{
CallbackListPtr cbl;
@@ -916,6 +914,8 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
return TRUE;
}
+/* ===== Public Procedures ===== */
+
_X_EXPORT Bool
AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
{
diff --git a/dix/extension.c b/dix/extension.c
index fb4ee6b95..88dff15e2 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -66,8 +66,6 @@ SOFTWARE.
#define LAST_EVENT 128
#define LAST_ERROR 255
-static ScreenProcEntry AuxillaryScreenProcs[MAXSCREENS];
-
static ExtensionEntry **extensions = (ExtensionEntry **)NULL;
int lastEvent = EXTENSION_EVENT_BASE;
@@ -298,21 +296,8 @@ CloseDownExtensions()
extensions = (ExtensionEntry **)NULL;
lastEvent = EXTENSION_EVENT_BASE;
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
ProcQueryExtension(ClientPtr client)
{
@@ -406,72 +391,6 @@ ProcListExtensions(ClientPtr client)
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
void LoadExtensionNames(char **RequestNames) {
int i;
diff --git a/dix/gc.c b/dix/gc.c
index 7b7953db1..7a76dd99d 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -907,17 +907,6 @@ FreeGC(pointer value, XID gid)
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)
like CreateGC, but doesn't do the default tile or stipple,
since we can't create them without already having a GC. any code
diff --git a/dix/swaprep.c b/dix/swaprep.c
index 6f4b277d9..7d3251ae3 100644
--- a/dix/swaprep.c
+++ b/dix/swaprep.c
@@ -317,7 +317,7 @@ SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
(void)WriteToClient(pClient, size, (char *) pRep);
}
-void
+static void
SwapTimecoord(xTimecoord* pCoord)
{
char n;
@@ -584,7 +584,7 @@ SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep
(void)WriteToClient(pClient, size, (char *) pRep);
}
-void
+static void
SwapRGB(xrgb *prgb)
{
char n;
@@ -1159,6 +1159,58 @@ SKeymapNotifyEvent(xEvent *from, xEvent *to)
*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
SwapConnSetupInfo(
char *pInfo,
@@ -1210,7 +1262,6 @@ SwapConnSetupInfo(
}
}
-
void
WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
{
@@ -1227,58 +1278,6 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo)
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
SwapConnSetupPrefix(xConnSetupPrefix *pcspFrom, xConnSetupPrefix *pcspTo)
{
diff --git a/dix/window.c b/dix/window.c
index 2a82f2e0a..7d99477ce 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -539,7 +539,7 @@ InitRootWindow(WindowPtr pWin)
* window from which the region came.
*/
-void
+static void
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
int x, int y,
int w, int h)
@@ -836,6 +836,26 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
}
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
FreeWindowResources(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -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
* If some other client has selected SubStructureReDirect on the parent
@@ -3203,21 +3247,6 @@ HandleSaveSet(ClientPtr client)
/**
*
- * \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
*/
Bool
@@ -3324,30 +3353,6 @@ SendVisibilityNotify(WindowPtr pWin)
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
#ifndef NOLOGOHACK
@@ -3700,41 +3705,6 @@ MakeWindowOptional (WindowPtr pWin)
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
static void
DrawLogo(WindowPtr pWin)
diff --git a/include/dix.h b/include/dix.h
index 5c2c5b862..b41268398 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -220,8 +220,6 @@ extern int dixDestroyPixmap(
pointer /*value*/,
XID /*pid*/);
-extern void CloseDownRetainedResources(void);
-
extern void InitClient(
ClientPtr /*client*/,
int /*i*/,
@@ -243,25 +241,10 @@ extern void DeleteWindowFromAnySelections(
extern void MarkClientException(
ClientPtr /*client*/);
-extern int GetGeometry(
- ClientPtr /*client*/,
- xGetGeometryReply* /* wa */);
-
extern int SendConnSetup(
ClientPtr /*client*/,
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)
extern void ddxBeforeReset (void);
#endif
@@ -632,10 +615,6 @@ typedef struct _CallbackProcs {
DeleteCallbackListProcPtr DeleteCallbackList;
} CallbackFuncsRec, *CallbackFuncsPtr;
-extern Bool CreateCallbackList(
- CallbackListPtr * /*pcbl*/,
- CallbackFuncsPtr /*cbfuncs*/);
-
extern Bool AddCallback(
CallbackListPtr * /*pcbl*/,
CallbackProcPtr /*callback*/,
diff --git a/include/extnsionst.h b/include/extnsionst.h
index 38d4bd7d9..28ae1d539 100644
--- a/include/extnsionst.h
+++ b/include/extnsionst.h
@@ -85,32 +85,11 @@ extern void NotImplemented ( /* FIXME: this may move to another file... */
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) \
pGC->VectorElement = NewRoutineAddress;
#define GetGCValue(pGC, GCElement) (pGC->GCElement)
-
extern ExtensionEntry *AddExtension(
char* /*name*/,
int /*NumEvents*/,
@@ -128,20 +107,6 @@ extern Bool AddExtensionAlias(
extern ExtensionEntry *CheckExtension(const char *extname);
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(
char * /*extname*/,
Bool /*secure*/);
diff --git a/include/gc.h b/include/gc.h
index 6c7add620..3b7e38e02 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -126,11 +126,6 @@ extern int FreeGC(
pointer /*pGC*/,
XID /*gid*/);
-extern void SetGCMask(
- GCPtr /*pGC*/,
- Mask /*selectMask*/,
- Mask /*newDataMask*/);
-
extern GCPtr CreateScratchGC(
ScreenPtr /*pScreen*/,
unsigned /*depth*/);
diff --git a/include/os.h b/include/os.h
index d4eed220f..7399436fb 100644
--- a/include/os.h
+++ b/include/os.h
@@ -348,12 +348,6 @@ extern void InitAuthorization(char * /*filename*/);
extern void RegisterAuthorizations(void);
-extern XID AuthorizationToID (
- unsigned short name_length,
- char *name,
- unsigned short data_length,
- char *data);
-
extern int AuthorizationFromID (
XID id,
unsigned short *name_lenp,
@@ -402,14 +396,6 @@ extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
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)
* 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
diff --git a/include/swaprep.h b/include/swaprep.h
index 8a9dcf036..bebd3a814 100644
--- a/include/swaprep.h
+++ b/include/swaprep.h
@@ -91,9 +91,6 @@ extern void SQueryPointerReply(
int /* size */,
xQueryPointerReply * /* pRep */);
-extern void SwapTimecoord(
- xTimecoord * /* pCoord */);
-
extern void SwapTimeCoordWrite(
ClientPtr /* pClient */,
int /* size */,
@@ -174,9 +171,6 @@ extern void SAllocColorPlanesReply(
int /* size */,
xAllocColorPlanesReply * /* pRep */);
-extern void SwapRGB(
- xrgb * /* prgb */);
-
extern void SQColorsExtend(
ClientPtr /* pClient */,
int /* size */,
@@ -255,18 +249,6 @@ extern void WriteSConnectionInfo(
unsigned long /* size */,
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(
xConnSetupPrefix * /* pcspFrom */,
xConnSetupPrefix * /* pcspTo */);
diff --git a/include/window.h b/include/window.h
index bddeb252b..cd8c5b283 100644
--- a/include/window.h
+++ b/include/window.h
@@ -93,14 +93,6 @@ extern Bool CreateRootWindow(
extern void InitRootWindow(
WindowPtr /*pWin*/);
-extern void ClippedRegionFromBox(
- WindowPtr /*pWin*/,
- RegionPtr /*Rgn*/,
- int /*x*/,
- int /*y*/,
- int /*w*/,
- int /*h*/);
-
typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
void RegisterRealChildHeadProc (RealChildHeadProc proc);
@@ -205,12 +197,6 @@ extern void UnmapSubwindows(
extern void HandleSaveSet(
ClientPtr /*client*/);
-extern Bool VisibleBoundingBoxFromPoint(
- WindowPtr /*pWin*/,
- int /*x*/,
- int /*y*/,
- BoxPtr /*box*/);
-
extern Bool PointInWindowIsVisible(
WindowPtr /*pWin*/,
int /*x*/,
@@ -235,9 +221,6 @@ extern void CheckWindowOptionalNeed(
extern Bool MakeWindowOptional(
WindowPtr /*pWin*/);
-extern void DisposeWindowOptional(
- WindowPtr /*pWin*/);
-
extern WindowPtr MoveWindowInStack(
WindowPtr /*pWin*/,
WindowPtr /*pNextSib*/);
@@ -271,7 +254,5 @@ extern void DisableMapUnmapEvents(
WindowPtr /* pWin */ );
extern void EnableMapUnmapEvents(
WindowPtr /* pWin */ );
-extern Bool MapUnmapEventsEnabled(
- WindowPtr /* pWin */ );
#endif /* WINDOW_H */
diff --git a/os/access.c b/os/access.c
index db5ca3135..221b8cbcd 100644
--- a/os/access.c
+++ b/os/access.c
@@ -234,8 +234,8 @@ static Bool NewHost(int /*family*/,
int /*len*/,
int /* addingLocalHosts */);
-int LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
- int **pSuppGids, int *nSuppGids);
+static int LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
+ int **pSuppGids, int *nSuppGids);
/* 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
*/
-int
+static int
LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
int **pSuppGids, int *nSuppGids)
{
diff --git a/os/auth.c b/os/auth.c
index bf33b7ef1..b06333e6b 100644
--- a/os/auth.c
+++ b/os/auth.c
@@ -255,26 +255,6 @@ ResetAuthorization (void)
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
AuthorizationFromID (
XID id,
diff --git a/os/io.c b/os/io.c
index 80a151f6a..4e83e682b 100644
--- a/os/io.c
+++ b/os/io.c
@@ -90,6 +90,11 @@ SOFTWARE.
_X_EXPORT CallbackListPtr ReplyCallback;
_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
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
*/
@@ -635,7 +640,7 @@ ResetCurrentRequest(ClientPtr client)
*
**********************/
-xReqPtr
+static xReqPtr
PeekNextRequest(
xReqPtr req, /* request we're starting from */
ClientPtr client, /* client whose requests we're skipping */
@@ -697,7 +702,7 @@ PeekNextRequest(
_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
-void
+static void
SkipRequests(
xReqPtr req, /* last request being skipped */
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 */
}
-ConnectionInputPtr
+static ConnectionInputPtr
AllocateInputBuffer(void)
{
ConnectionInputPtr oci;
@@ -1186,7 +1191,7 @@ AllocateInputBuffer(void)
return oci;
}
-ConnectionOutputPtr
+static ConnectionOutputPtr
AllocateOutputBuffer(void)
{
ConnectionOutputPtr oco;
diff --git a/os/osdep.h b/os/osdep.h
index 3d303f913..0984d51e8 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -210,10 +210,6 @@ extern void FreeOsBuffers(
#include "dix.h"
-extern ConnectionInputPtr AllocateInputBuffer(void);
-
-extern ConnectionOutputPtr AllocateOutputBuffer(void);
-
extern fd_set AllSockets;
extern fd_set AllClients;
extern fd_set LastSelectMask;
@@ -293,14 +289,12 @@ extern XID AuthSecurityCheck (AuthCheckArgs);
/* in xdmcp.c */
extern void XdmcpUseMsg (void);
extern int XdmcpOptions(int argc, char **argv, int i);
-extern void XdmcpSetAuthentication (ARRAY8Ptr name);
extern void XdmcpRegisterConnection (
int type,
char *address,
int addrlen);
extern void XdmcpRegisterAuthorizations (void);
extern void XdmcpRegisterAuthorization (char *name, int namelen);
-extern void XdmcpRegisterDisplayClass (char *name, int length);
extern void XdmcpInit (void);
extern void XdmcpReset (void);
extern void XdmcpOpenDisplay(int sock);
@@ -313,8 +307,6 @@ extern void XdmcpRegisterAuthentication (
ValidatorFunc Validator,
GeneratorFunc Generator,
AddAuthorFunc AddAuth);
-extern int XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type);
-extern int XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data);
struct sockaddr_in;
extern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr);
diff --git a/os/xdmcp.c b/os/xdmcp.c
index cfc1005c2..310f33bc0 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -197,8 +197,6 @@ static void receive_packet(int /*socketfd*/);
static void send_packet(void);
-extern void XdmcpDeadSession(char * /*reason*/);
-
static void timeout(void);
static void restart(void);
@@ -213,10 +211,23 @@ static void XdmcpWakeupHandler(
int /*i*/,
pointer /*LastSelectMask*/);
-void XdmcpRegisterManufacturerDisplayID(
- char * /*name*/,
- int /*length*/);
+/*
+ * Register the Manufacturer display ID
+ */
+
+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 Bool OneSession = FALSE;
@@ -417,7 +428,7 @@ static ARRAY8Ptr AuthenticationName = &noAuthenticationName;
static ARRAY8Ptr AuthenticationData = &noAuthenticationData;
static AuthenticationFuncsPtr AuthenticationFuncs;
-void
+static void
XdmcpSetAuthentication (ARRAY8Ptr name)
{
int i;
@@ -549,7 +560,7 @@ XdmcpRegisterAuthorization (char *name, int namelen)
static ARRAY8 DisplayClass;
-void
+static void
XdmcpRegisterDisplayClass (char *name, int length)
{
int i;
@@ -561,24 +572,6 @@ XdmcpRegisterDisplayClass (char *name, int length)
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
* number, set up the state machine
@@ -867,7 +860,7 @@ send_packet(void)
* timeouts, or Keepalive failure.
*/
-void
+static void
XdmcpDeadSession (char *reason)
{
ErrorF ("XDM: %s, declaring session dead\n", reason);
@@ -960,21 +953,16 @@ restart(void)
send_packet();
}
-int
-XdmcpCheckAuthentication (
- ARRAY8Ptr Name,
- ARRAY8Ptr Data,
- int packet_type)
+static int
+XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type)
{
return (XdmcpARRAY8Equal (Name, AuthenticationName) &&
(AuthenticationName->length == 0 ||
(*AuthenticationFuncs->Validator) (AuthenticationData, Data, packet_type)));
}
-int
-XdmcpAddAuthorization (
- ARRAY8Ptr name,
- ARRAY8Ptr data)
+static int
+XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data)
{
AddAuthorFunc AddAuth;
diff --git a/record/set.c b/record/set.c
index 0ebb0884d..07a3a63a3 100644
--- a/record/set.c
+++ b/record/set.c
@@ -164,10 +164,10 @@ BitVectorIterateSet(RecordSetPtr pSet, RecordSetIteratePtr pIter,
return (RecordSetIteratePtr)(long)(pInterval->last + 1);
}
-RecordSetOperations BitVectorSetOperations = {
+static RecordSetOperations BitVectorSetOperations = {
BitVectorDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet };
-RecordSetOperations BitVectorNoFreeOperations = {
+static RecordSetOperations BitVectorNoFreeOperations = {
NoopDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet };
static int
@@ -277,10 +277,10 @@ IntervalListIterateSet(RecordSetPtr pSet, RecordSetIteratePtr pIter,
return (RecordSetIteratePtr)NULL;
}
-RecordSetOperations IntervalListSetOperations = {
+static RecordSetOperations IntervalListSetOperations = {
IntervalListDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet };
-RecordSetOperations IntervalListNoFreeOperations = {
+static RecordSetOperations IntervalListNoFreeOperations = {
NoopDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet };
static int