|
version 3.73, 1997/06/15 07:12:24
|
version 3.74, 1998/01/24 16:57:25
|
|
|
|
| /* | /* |
| * $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.72 1997/05/18 12:12:07 dawes Exp $ |
* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.73 1997/06/15 07:12:24 dawes Exp $ |
| * | * |
| * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. | * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. |
| * | * |
|
|
|
| extern int atoi(); | extern int atoi(); |
| #endif | #endif |
| | |
| |
#if !defined(AMOEBA) && !defined(MINIX) |
| |
#if defined(MetroLink) && defined(Lynx) |
| |
#include <sys/types.h> |
| |
#endif |
| |
#include <sys/wait.h> |
| |
#endif |
| |
|
| #define NEED_EVENTS | #define NEED_EVENTS |
| #include "X.h" | #include "X.h" |
| #include "Xmd.h" | #include "Xmd.h" |
|
|
|
| #define setruid(x) /*nothing*/ | #define setruid(x) /*nothing*/ |
| #endif | #endif |
| | |
| |
extern void xf86WrapperInit(void); |
| |
#ifdef XFree86LOADER |
| |
extern void LoaderInit(void); |
| |
#endif |
| |
|
| /* xf86Exiting is set while the screen is shutting down (even on a reset) */ | /* xf86Exiting is set while the screen is shutting down (even on a reset) */ |
| Bool xf86Exiting = FALSE; | Bool xf86Exiting = FALSE; |
| Bool xf86Resetting = FALSE; | Bool xf86Resetting = FALSE; |
|
|
|
| int vgaCRIndex = 0x3d4; | int vgaCRIndex = 0x3d4; |
| int vgaCRReg = 0x3d5; | int vgaCRReg = 0x3d5; |
| | |
| static void xf86PrintBanner( |
void xf86PrintBanner( |
| #if NeedFunctionPrototypes | #if NeedFunctionPrototypes |
| void | void |
| #endif | #endif |
|
|
|
| | |
| extern ScrnInfoPtr xf86Screens[]; | extern ScrnInfoPtr xf86Screens[]; |
| extern int xf86MaxScreens; | extern int xf86MaxScreens; |
| |
/* argh if you include <math.h> it redefines MINSHORT and MAXSHORT */ |
| |
#if NeedFunctionPrototypes |
| |
extern double pow(double,double); |
| |
#else |
| extern double pow(); | extern double pow(); |
| |
#endif |
| #ifdef USE_XF86_SERVERLOCK | #ifdef USE_XF86_SERVERLOCK |
| extern void xf86UnlockServer(); | extern void xf86UnlockServer(); |
| #endif | #endif |
|
|
|
| | |
| xf86InfoRec xf86Info; | xf86InfoRec xf86Info; |
| int xf86ScreenIndex; | int xf86ScreenIndex; |
| |
int xf86PixmapIndex; |
| | |
| /* | /* |
| * InitOutput -- | * InitOutput -- |
|
|
|
| pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; | pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; |
| | |
| xf86WrapperInit(); | xf86WrapperInit(); |
| |
#ifdef XFree86LOADER |
| |
LoaderInit(); |
| |
#endif |
| |
if (generation != serverGeneration) { |
| |
xf86PixmapIndex = AllocatePixmapPrivateIndex(); |
| |
} |
| |
|
| | |
| if ((xf86ServerName = strrchr(argv[0], '/')) != 0) | if ((xf86ServerName = strrchr(argv[0], '/')) != 0) |
| xf86ServerName++; | xf86ServerName++; |
|
|
|
| | |
| /* For each screen, check if DPMS is supported */ | /* For each screen, check if DPMS is supported */ |
| for (i = 0; i < screenInfo.numScreens; i++) { | for (i = 0; i < screenInfo.numScreens; i++) { |
| if (XF86SCRNINFO(screenInfo.screens[i])->DPMSSet != (void (*)())NoopDDA) |
if (XF86SCRNINFO(screenInfo.screens[i])->DPMSSet != (void (*)(int))NoopDDA) |
| return TRUE; | return TRUE; |
| } | } |
| return FALSE; | return FALSE; |
|
|
|
| #define OSVENDOR "" | #define OSVENDOR "" |
| #endif | #endif |
| | |
| static void |
void |
| xf86PrintBanner() | xf86PrintBanner() |
| { | { |
| |
#if defined(MetroLink) |
| |
ErrorF("\nMetro Link, Inc Version %s/ X Window System\n",METRO_VERSION); |
| |
ErrorF("(protocol Version %d, revision %d, vendor release %d)\n", |
| |
X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); |
| |
ErrorF("Operating System: %s %s\n", OSNAME, OSVENDOR); |
| |
#else |
| ErrorF("\nXFree86 Version%s/ X Window System\n",XF86_VERSION); | ErrorF("\nXFree86 Version%s/ X Window System\n",XF86_VERSION); |
| ErrorF("(protocol Version %d, revision %d, vendor release %d)\n", | ErrorF("(protocol Version %d, revision %d, vendor release %d)\n", |
| X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); | X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); |
|
|
|
| "reporting\n" | "reporting\n" |
| "\tproblems. (see http://www.XFree86.Org/FAQ)\n"); | "\tproblems. (see http://www.XFree86.Org/FAQ)\n"); |
| ErrorF("Operating System: %s %s\n", OSNAME, OSVENDOR); | ErrorF("Operating System: %s %s\n", OSNAME, OSVENDOR); |
| |
#endif |
| } | } |
| | |
| static void | static void |
|
|
|
| (xf86Screens[i]->PrintIdent)(); | (xf86Screens[i]->PrintIdent)(); |
| } | } |
| | |
| |
|
| |
void |
| |
xf86SetCurrentScreen(pScr) |
| |
ScreenPtr pScr; |
| |
{ |
| |
xf86Info.currentScreen = pScr; |
| |
} |
| |
|
| |
ScreenPtr |
| |
xf86GetCurrentScreen() |
| |
{ |
| |
return xf86Info.currentScreen; |
| |
} |
| |
|
| |
int |
| |
xf86GetConsoleFD() |
| |
{ |
| |
return xf86Info.consoleFd; |
| |
} |