From 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 25 Jul 2009 19:39:46 +0000 Subject: Added xorg-server-1.6.2.tar.gz --- xorg-server/dix/main.c | 110 +++++++++++++++---------------------------------- 1 file changed, 33 insertions(+), 77 deletions(-) (limited to 'xorg-server/dix/main.c') diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 6d9dd3332..0527621e7 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -103,9 +103,6 @@ Equipment Corporation. #include "extnsionst.h" #include "privates.h" #include "registry.h" -#ifdef XPRINT -#include "DiPrint.h" -#endif #ifdef PANORAMIX #include "panoramiXsrv.h" #else @@ -121,7 +118,6 @@ Equipment Corporation. extern void Dispatch(void); -char *ConnectionInfo; xConnSetupPrefix connSetupPrefix; extern FontPtr defaultFont; @@ -237,51 +233,31 @@ static int indexForScanlinePad[ 65 ] = { #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif -#ifdef __APPLE__ -void DarwinHandleGUI(int argc, char **argv, char **envp); -#endif +#ifdef XQUARTZ +#include -int -main(int argc, char *argv[], char *envp[]) +BOOL serverInitComplete = FALSE; +pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER; + +int dix_main(int argc, char *argv[], char *envp[]) +#else +int main(int argc, char *argv[], char *envp[]) +#endif { - int i, j, k, error; - char *xauthfile; + int i; HWEventQueueType alwaysCheckForInput[2]; display = "0"; - InitGlobals(); InitRegions(); -#ifdef XPRINT - PrinterInitGlobals(); -#endif - -#ifdef XQUARTZ - /* Quartz support on Mac OS X requires that the Cocoa event loop be in - * the main thread. This allows the X server main to be called again - * from another thread. */ - DarwinHandleGUI(argc, argv, envp); -#endif CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); -#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS - ExpandCommandLine(&argc, &argv); -#endif - InitConnectionLimits(); - /* These are needed by some routines which are called from interrupt - * handlers, thus have no direct calling path back to main and thus - * can't be passed argc, argv as parameters */ - argcGlobal = argc; - argvGlobal = argv; - /* prep X authority file from environment; this can be overriden by a - * command line option */ - xauthfile = getenv("XAUTHORITY"); - if (xauthfile) InitAuthorization (xauthfile); ProcessCommandLine(argc, argv); alwaysCheckForInput[0] = 0; @@ -308,10 +284,7 @@ main(int argc, char *argv[], char *envp[]) { CreateWellKnownSockets(); InitProcVectors(); - clients = (ClientPtr *)xalloc(MAXCLIENTS * sizeof(ClientPtr)); - if (!clients) - FatalError("couldn't create client array"); - for (i=1; i= 0; i--) { @@ -472,9 +431,6 @@ main(int argc, char *argv[], char *envp[]) xfree(screenInfo.screens[i]); screenInfo.numScreens = i; } - CloseDownEvents(); - xfree(WindowTable); - WindowTable = NULL; FreeFonts(); FreeAuditTimer(); @@ -516,7 +472,7 @@ SetVendorString(char *string) VendorString = string; } -static int padlength[4] = {0, 3, 2, 1}; +static const int padlength[4] = {0, 3, 2, 1}; #ifndef PANORAMIX static @@ -607,7 +563,7 @@ CreateConnectionBlock(void) root.maxInstalledMaps = pScreen->maxInstalledCmaps; root.rootVisualID = pScreen->rootVisual; root.backingStore = pScreen->backingStoreSupport; - root.saveUnders = pScreen->saveUnderSupport != NotUseful; + root.saveUnders = FALSE; root.rootDepth = pScreen->rootDepth; root.nDepths = pScreen->numDepths; memmove(pBuf, (char *)&root, sizeof(xWindowRoot)); -- cgit v1.2.3