hrp@boring.cray.com (Hal Peterson) (02/24/89)
This arose while compiling the file server/dix/window.c from the X11R3 distribution. We are running GCC 1.33 on Sun-3/50 Workstations and Sun-3/280 file servers under SunOS 3.5. Here is what happens: ============================================================ rothko% gcc -v -S -O -traditional -finline-functions -fstrength-reduce -msoft-float gcc-bug.c gcc version 1.33 /usr/earth4/gnu/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -traditional -Dmc68020 gcc-bug.c /tmp/cca04506.cpp GNU CPP version 1.33 /usr/earth4/gnu/lib/gcc-cc1 /tmp/cca04506.cpp -quiet -dumpbase gcc-bug.c -msoft-float -finline-functions -fstrength-reduce -O -traditional -version -o gcc-bug.s GNU C version 1.33 (68k, MIT syntax) compiled by GNU C version 1.33. gcc: Program cc1 got fatal signal 11. rothko% ============================================================ Following my .signature is the file that produces it (named gcc-bug.c above). Hal Peterson / Cray Research / 1440 Northland Dr. / Mendota Hts, MN 55120 hrp@cray.com uunet!cray!hrp +1 612 681 3145 ============================================================ typedef unsigned long XID; typedef XID Window; typedef XID Drawable; typedef XID Font; typedef XID Pixmap; typedef XID Cursor; typedef XID Colormap; typedef XID GContext; typedef XID KeySym; typedef unsigned long Mask; typedef unsigned long Atom; typedef unsigned long VisualID; typedef unsigned long Time; typedef unsigned char KeyCode; typedef long INT32; typedef short INT16; typedef char INT8; typedef unsigned long CARD32; typedef unsigned short CARD16; typedef unsigned char CARD8; typedef unsigned long BITS32; typedef unsigned short BITS16; typedef unsigned char BYTE; typedef unsigned char BOOL; typedef struct _xSegment { INT16 x1 , y1 , x2 , y2 ; } xSegment; typedef struct _xPoint { INT16 x , y ; } xPoint; typedef struct _xRectangle { INT16 x , y ; CARD16 width , height ; } xRectangle; typedef struct _xArc { INT16 x , y ; CARD16 width , height ; INT16 angle1 , angle2 ; } xArc; typedef CARD16 KeyButMask; typedef struct { CARD8 byteOrder; BYTE pad; CARD16 majorVersion , minorVersion ; CARD16 nbytesAuthProto ; CARD16 nbytesAuthString ; CARD16 pad2; } xConnClientPrefix; typedef struct { BOOL success; BYTE lengthReason; CARD16 majorVersion , minorVersion ; CARD16 length ; } xConnSetupPrefix; typedef struct { CARD32 release ; CARD32 ridBase , ridMask ; CARD32 motionBufferSize ; CARD16 nbytesVendor ; CARD16 maxRequestSize ; CARD8 numRoots; CARD8 numFormats; CARD8 imageByteOrder; CARD8 bitmapBitOrder; CARD8 bitmapScanlineUnit, bitmapScanlinePad; CARD8 minKeyCode, maxKeyCode; CARD32 pad2 ; } xConnSetup; typedef struct { CARD8 depth; CARD8 bitsPerPixel; CARD8 scanLinePad; CARD8 pad1; CARD32 pad2 ; } xPixmapFormat; typedef struct { CARD8 depth; CARD8 pad1; CARD16 nVisuals ; CARD32 pad2 ; } xDepth; typedef struct { CARD32 visualID ; CARD8 class; CARD8 bitsPerRGB; CARD16 colormapEntries ; CARD32 redMask , greenMask , blueMask ; CARD32 pad ; } xVisualType; typedef struct { CARD32 windowId ; CARD32 defaultColormap ; CARD32 whitePixel , blackPixel ; CARD32 currentInputMask ; CARD16 pixWidth , pixHeight ; CARD16 mmWidth , mmHeight ; CARD16 minInstalledMaps , maxInstalledMaps ; CARD32 rootVisualID ; CARD8 backingStore; BOOL saveUnders; CARD8 rootDepth; CARD8 nDepths; } xWindowRoot; typedef struct { CARD32 time ; INT16 x , y ; } xTimecoord; typedef struct { CARD8 family; BYTE pad; CARD16 length ; } xHostEntry; typedef struct { INT16 leftSideBearing , rightSideBearing , characterWidth , ascent , descent ; CARD16 attributes ; } xCharInfo; typedef struct { CARD32 name ; CARD32 value ; } xFontProp; typedef struct { CARD8 len; INT8 delta; } xTextElt; typedef struct { CARD32 pixel ; CARD16 red , green , blue ; CARD8 flags; CARD8 pad; } xColorItem; typedef struct { CARD16 red , green , blue , pad ; } xrgb; typedef CARD8 KEYCODE; typedef struct { BYTE type; BYTE data1; CARD16 sequenceNumber ; CARD32 length ; CARD32 data00 ; CARD32 data01 ; CARD32 data02 ; CARD32 data03 ; CARD32 data04 ; CARD32 data05 ; } xGenericReply; typedef struct { BYTE type; CARD8 backingStore; CARD16 sequenceNumber ; CARD32 length ; CARD32 visualID ; CARD16 class ; CARD8 bitGravity; CARD8 winGravity; CARD32 backingBitPlanes ; CARD32 backingPixel ; BOOL saveUnder; BOOL mapInstalled; CARD8 mapState; BOOL override; CARD32 colormap ; CARD32 allEventMasks ; CARD32 yourEventMask ; CARD16 doNotPropagateMask ; CARD16 pad ; } xGetWindowAttributesReply; typedef struct { BYTE type; CARD8 depth; CARD16 sequenceNumber ; CARD32 length ; CARD32 root ; INT16 x , y ; CARD16 width , height ; CARD16 borderWidth ; CARD16 pad1 ; CARD32 pad2 ; CARD32 pad3 ; } xGetGeometryReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 root , parent ; CARD16 nChildren ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xQueryTreeReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 atom ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xInternAtomReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nameLength ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetAtomNameReply; typedef struct { BYTE type; CARD8 format; CARD16 sequenceNumber ; CARD32 length ; CARD32 propertyType ; CARD32 bytesAfter ; CARD32 nItems ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; } xGetPropertyReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nProperties ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListPropertiesReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 owner ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetSelectionOwnerReply; typedef struct { BYTE type; BYTE status; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGrabPointerReply; typedef xGrabPointerReply xGrabKeyboardReply; typedef struct { BYTE type; BOOL sameScreen; CARD16 sequenceNumber ; CARD32 length ; CARD32 root , child ; INT16 rootX , rootY , winX , winY ; CARD16 mask ; CARD16 pad1 ; CARD32 pad ; } xQueryPointerReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 nEvents ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetMotionEventsReply; typedef struct { BYTE type; BOOL sameScreen; CARD16 sequenceNumber ; CARD32 length ; CARD32 child ; INT16 dstX , dstY ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xTranslateCoordsReply; typedef struct { BYTE type; CARD8 revertTo; CARD16 sequenceNumber ; CARD32 length ; CARD32 focus ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xGetInputFocusReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; BYTE map[32]; } xQueryKeymapReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; xCharInfo minBounds; CARD32 walign1 ; xCharInfo maxBounds; CARD32 walign2 ; CARD16 minCharOrByte2 , maxCharOrByte2 ; CARD16 defaultChar ; CARD16 nFontProps ; CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent , fontDescent ; CARD32 nCharInfos ; } xQueryFontReply; typedef struct { BYTE type; CARD8 drawDirection; CARD16 sequenceNumber ; CARD32 length ; INT16 fontAscent , fontDescent ; INT16 overallAscent , overallDescent ; INT32 overallWidth , overallLeft , overallRight ; CARD32 pad ; } xQueryTextExtentsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nFonts ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListFontsReply; typedef struct { BYTE type; CARD8 nameLength; CARD16 sequenceNumber ; CARD32 length ; xCharInfo minBounds; CARD32 walign1 ; xCharInfo maxBounds; CARD32 walign2 ; CARD16 minCharOrByte2 , maxCharOrByte2 ; CARD16 defaultChar ; CARD16 nFontProps ; CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent , fontDescent ; CARD32 nReplies ; } xListFontsWithInfoReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nPaths ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetFontPathReply; typedef struct { BYTE type; CARD8 depth; CARD16 sequenceNumber ; CARD32 length ; CARD32 visual ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetImageReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nColormaps ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListInstalledColormapsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 red , green , blue ; CARD16 pad2 ; CARD32 pixel ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xAllocColorReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 pixel ; CARD16 exactRed , exactGreen , exactBlue ; CARD16 screenRed , screenGreen , screenBlue ; CARD32 pad2 ; CARD32 pad3 ; } xAllocNamedColorReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nPixels , nMasks ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xAllocColorCellsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nPixels ; CARD16 pad2 ; CARD32 redMask , greenMask , blueMask ; CARD32 pad3 ; CARD32 pad4 ; } xAllocColorPlanesReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nColors ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xQueryColorsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 exactRed , exactGreen , exactBlue ; CARD16 screenRed , screenGreen , screenBlue ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xLookupColorReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 width , height ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xQueryBestSizeReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; BOOL present; CARD8 major_opcode; CARD8 first_event; CARD8 first_error; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xQueryExtensionReply; typedef struct { BYTE type; CARD8 nExtensions; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListExtensionsReply; typedef struct { BYTE type; CARD8 success; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xSetMappingReply; typedef xSetMappingReply xSetPointerMappingReply; typedef xSetMappingReply xSetModifierMappingReply; typedef struct { BYTE type; CARD8 nElts; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetPointerMappingReply; typedef struct { BYTE type; CARD8 keySymsPerKeyCode; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetKeyboardMappingReply; typedef struct { BYTE type; CARD8 numKeyPerModifier; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetModifierMappingReply; typedef struct { BYTE type; BOOL globalAutoRepeat; CARD16 sequenceNumber ; CARD32 length ; CARD32 ledMask ; CARD8 keyClickPercent, bellPercent; CARD16 bellPitch , bellDuration ; CARD16 pad ; BYTE map[32]; } xGetKeyboardControlReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 accelNumerator , accelDenominator ; CARD16 threshold ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetPointerControlReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 timeout , interval ; BOOL preferBlanking; BOOL allowExposures; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetScreenSaverReply; typedef struct { BYTE type; BOOL enabled; CARD16 sequenceNumber ; CARD32 length ; CARD16 nHosts ; CARD16 pad1 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListHostsReply; typedef struct { BYTE type; BYTE errorCode; CARD16 sequenceNumber ; CARD32 resourceID ; CARD16 minorCode ; CARD8 majorCode; BYTE pad1; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xError; typedef struct { union { struct { BYTE type; BYTE detail; CARD16 sequenceNumber ; } u; struct { CARD32 pad00 ; CARD32 time ; CARD32 root , event , child ; INT16 rootX , rootY , eventX , eventY ; KeyButMask state ; BOOL sameScreen; BYTE pad1; } keyButtonPointer; struct { CARD32 pad00 ; CARD32 time ; CARD32 root , event , child ; INT16 rootX , rootY , eventX , eventY ; KeyButMask state ; BYTE mode; BYTE flags; } enterLeave; struct { CARD32 pad00 ; CARD32 window ; BYTE mode; BYTE pad1, pad2, pad3; } focus; struct { CARD32 pad00 ; CARD32 window ; CARD16 x , y , width , height ; CARD16 count ; CARD16 pad2 ; } expose; struct { CARD32 pad00 ; CARD32 drawable ; CARD16 x , y , width , height ; CARD16 minorEvent ; CARD16 count ; BYTE majorEvent; BYTE pad1, pad2, pad3; } graphicsExposure; struct { CARD32 pad00 ; CARD32 drawable ; CARD16 minorEvent ; BYTE majorEvent; BYTE bpad; } noExposure; struct { CARD32 pad00 ; CARD32 window ; CARD8 state; BYTE pad1, pad2, pad3; } visibility; struct { CARD32 pad00 ; CARD32 parent , window ; INT16 x , y ; CARD16 width , height , borderWidth ; BOOL override; BYTE bpad; } createNotify; struct { CARD32 pad00 ; CARD32 event , window ; } destroyNotify; struct { CARD32 pad00 ; CARD32 event , window ; BOOL fromConfigure; BYTE pad1, pad2, pad3; } unmapNotify; struct { CARD32 pad00 ; CARD32 event , window ; BOOL override; BYTE pad1, pad2, pad3; } mapNotify; struct { CARD32 pad00 ; CARD32 parent , window ; } mapRequest; struct { CARD32 pad00 ; CARD32 event , window , parent ; INT16 x , y ; BOOL override; BYTE pad1, pad2, pad3; } reparent; struct { CARD32 pad00 ; CARD32 event , window , aboveSibling ; INT16 x , y ; CARD16 width , height , borderWidth ; BOOL override; BYTE bpad; } configureNotify; struct { CARD32 pad00 ; CARD32 parent , window , sibling ; INT16 x , y ; CARD16 width , height , borderWidth ; CARD16 valueMask ; CARD32 pad1 ; } configureRequest; struct { CARD32 pad00 ; CARD32 event , window ; INT16 x , y ; CARD32 pad1, pad2, pad3, pad4; } gravity; struct { CARD32 pad00 ; CARD32 window ; CARD16 width , height ; } resizeRequest; struct { CARD32 pad00 ; CARD32 event , window , parent ; BYTE place; BYTE pad1, pad2, pad3; } circulate; struct { CARD32 pad00 ; CARD32 window ; CARD32 atom ; CARD32 time ; BYTE state; BYTE pad1; CARD16 pad2 ; } property; struct { CARD32 pad00 ; CARD32 time ; CARD32 window ; CARD32 atom ; } selectionClear; struct { CARD32 pad00 ; CARD32 time ; CARD32 owner , requestor ; CARD32 selection , target , property ; } selectionRequest; struct { CARD32 pad00 ; CARD32 time ; CARD32 requestor ; CARD32 selection , target , property ; } selectionNotify; struct { CARD32 pad00 ; CARD32 window ; CARD32 colormap ; BOOL new; BYTE state; BYTE pad1, pad2; } colormap; struct { CARD32 pad00 ; CARD8 request; CARD8 firstKeyCode; CARD8 count; BYTE pad1; } mappingNotify; struct { CARD32 pad00 ; CARD32 window ; union { struct { CARD32 type ; INT32 longs0 ; INT32 longs1 ; INT32 longs2 ; INT32 longs3 ; INT32 longs4 ; } l; struct { CARD32 type ; INT16 shorts0 ; INT16 shorts1 ; INT16 shorts2 ; INT16 shorts3 ; INT16 shorts4 ; INT16 shorts5 ; INT16 shorts6 ; INT16 shorts7 ; INT16 shorts8 ; INT16 shorts9 ; } s; struct { CARD32 type ; INT8 bytes[20]; } b; } u; } clientMessage; } u; } xEvent; typedef struct { BYTE type; BYTE map[31]; } xKeymapEvent; typedef union { xGenericReply generic; xGetGeometryReply geom; xQueryTreeReply tree; xInternAtomReply atom; xGetAtomNameReply atomName; xGetPropertyReply property; xListPropertiesReply listProperties; xGetSelectionOwnerReply selection; xGrabPointerReply grabPointer; xGrabKeyboardReply grabKeyboard; xQueryPointerReply pointer; xGetMotionEventsReply motionEvents; xTranslateCoordsReply coords; xGetInputFocusReply inputFocus; xQueryTextExtentsReply textExtents; xListFontsReply fonts; xGetFontPathReply fontPath; xGetImageReply image; xListInstalledColormapsReply colormaps; xAllocColorReply allocColor; xAllocNamedColorReply allocNamedColor; xAllocColorCellsReply colorCells; xAllocColorPlanesReply colorPlanes; xQueryColorsReply colors; xLookupColorReply lookupColor; xQueryBestSizeReply bestSize; xQueryExtensionReply extension; xListExtensionsReply extensions; xSetModifierMappingReply setModifierMapping; xGetModifierMappingReply getModifierMapping; xSetPointerMappingReply setPointerMapping; xGetKeyboardMappingReply getKeyboardMapping; xGetPointerMappingReply getPointerMapping; xGetPointerControlReply pointerControl; xGetScreenSaverReply screenSaver; xListHostsReply hosts; xError error; xEvent event; } xReply; typedef struct { CARD8 reqType; CARD8 data; CARD16 length ; } xReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 id ; } xResourceReq; typedef struct { CARD8 reqType; CARD8 depth; CARD16 length ; CARD32 wid , parent ; INT16 x , y ; CARD16 width , height , borderWidth ; CARD16 class ; CARD32 visual ; CARD32 mask ; } xCreateWindowReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 valueMask ; } xChangeWindowAttributesReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length ; CARD32 window ; } xChangeSaveSetReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window , parent ; INT16 x , y ; } xReparentWindowReq; typedef struct { CARD8 reqType; CARD8 pad; CARD16 length ; CARD32 window ; CARD16 mask ; CARD16 pad2 ; } xConfigureWindowReq; typedef struct { CARD8 reqType; CARD8 direction; CARD16 length ; CARD32 window ; } xCirculateWindowReq; typedef struct { CARD8 reqType; BOOL onlyIfExists; CARD16 length ; CARD16 nbytes ; CARD16 pad ; } xInternAtomReq; typedef struct { CARD8 reqType; CARD8 mode; CARD16 length ; CARD32 window ; CARD32 property , type ; CARD8 format; BYTE pad[3]; CARD32 nUnits ; } xChangePropertyReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 property ; } xDeletePropertyReq; typedef struct { CARD8 reqType; BOOL delete; CARD16 length ; CARD32 window ; CARD32 property , type ; CARD32 longOffset ; CARD32 longLength ; } xGetPropertyReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 selection ; CARD32 time ; } xSetSelectionOwnerReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 requestor ; CARD32 selection , target , property ; CARD32 time ; } xConvertSelectionReq; typedef struct { CARD8 reqType; BOOL propagate; CARD16 length ; CARD32 destination ; CARD32 eventMask ; xEvent event; } xSendEventReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD16 eventMask ; BYTE pointerMode, keyboardMode; CARD32 confineTo ; CARD32 cursor ; CARD32 time ; } xGrabPointerReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD16 eventMask ; BYTE pointerMode, keyboardMode; CARD32 confineTo ; CARD32 cursor ; CARD8 button; BYTE pad; CARD16 modifiers ; } xGrabButtonReq; typedef struct { CARD8 reqType; CARD8 button; CARD16 length ; CARD32 grabWindow ; CARD16 modifiers ; CARD16 pad ; } xUngrabButtonReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cursor ; CARD32 time ; CARD16 eventMask ; CARD16 pad2 ; } xChangeActivePointerGrabReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD32 time ; BYTE pointerMode, keyboardMode; CARD16 pad ; } xGrabKeyboardReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD16 modifiers ; CARD8 key; BYTE pointerMode, keyboardMode; BYTE pad1, pad2, pad3; } xGrabKeyReq; typedef struct { CARD8 reqType; CARD8 key; CARD16 length ; CARD32 grabWindow ; CARD16 modifiers ; CARD16 pad ; } xUngrabKeyReq; typedef struct { CARD8 reqType; CARD8 mode; CARD16 length ; CARD32 time ; } xAllowEventsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 start , stop ; } xGetMotionEventsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcWid , dstWid ; INT16 srcX , srcY ; } xTranslateCoordsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcWid , dstWid ; INT16 srcX , srcY ; CARD16 srcWidth , srcHeight ; INT16 dstX , dstY ; } xWarpPointerReq; typedef struct { CARD8 reqType; CARD8 revertTo; CARD16 length ; CARD32 focus ; CARD32 time ; } xSetInputFocusReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 fid ; CARD16 nbytes ; BYTE pad1, pad2; } xOpenFontReq; typedef struct { CARD8 reqType; BOOL oddLength; CARD16 length ; CARD32 fid ; } xQueryTextExtentsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD16 maxNames ; CARD16 nbytes ; } xListFontsReq; typedef xListFontsReq xListFontsWithInfoReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD16 nFonts ; BYTE pad1, pad2; } xSetFontPathReq; typedef struct { CARD8 reqType; CARD8 depth; CARD16 length ; CARD32 pid ; CARD32 drawable ; CARD16 width , height ; } xCreatePixmapReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 gc ; CARD32 drawable ; CARD32 mask ; } xCreateGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 gc ; CARD32 mask ; } xChangeGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcGC , dstGC ; CARD32 mask ; } xCopyGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 gc ; CARD16 dashOffset ; CARD16 nDashes ; } xSetDashesReq; typedef struct { CARD8 reqType; BYTE ordering; CARD16 length ; CARD32 gc ; INT16 xOrigin , yOrigin ; } xSetClipRectanglesReq; typedef struct { CARD8 reqType; BOOL exposures; CARD16 length ; CARD32 window ; INT16 x , y ; CARD16 width , height ; } xClearAreaReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcDrawable , dstDrawable ; CARD32 gc ; INT16 srcX , srcY , dstX , dstY ; CARD16 width , height ; } xCopyAreaReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcDrawable , dstDrawable ; CARD32 gc ; INT16 srcX , srcY , dstX , dstY ; CARD16 width , height ; CARD32 bitPlane ; } xCopyPlaneReq; typedef struct { CARD8 reqType; BYTE coordMode; CARD16 length ; CARD32 drawable ; CARD32 gc ; } xPolyPointReq; typedef xPolyPointReq xPolyLineReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 drawable ; CARD32 gc ; } xPolySegmentReq; typedef xPolySegmentReq xPolyArcReq; typedef xPolySegmentReq xPolyRectangleReq; typedef xPolySegmentReq xPolyFillRectangleReq; typedef xPolySegmentReq xPolyFillArcReq; typedef struct _FillPolyReq { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 drawable ; CARD32 gc ; BYTE shape; BYTE coordMode; CARD16 pad1 ; } xFillPolyReq; typedef struct _PutImageReq { CARD8 reqType; CARD8 format; CARD16 length ; CARD32 drawable ; CARD32 gc ; CARD16 width , height ; INT16 dstX , dstY ; CARD8 leftPad; CARD8 depth; CARD16 pad ; } xPutImageReq; typedef struct { CARD8 reqType; CARD8 format; CARD16 length ; CARD32 drawable ; INT16 x , y ; CARD16 width , height ; CARD32 planeMask ; } xGetImageReq; typedef struct { CARD8 reqType; CARD8 pad; CARD16 length ; CARD32 drawable ; CARD32 gc ; INT16 x , y ; } xPolyTextReq; typedef xPolyTextReq xPolyText8Req; typedef xPolyTextReq xPolyText16Req; typedef struct { CARD8 reqType; BYTE nChars; CARD16 length ; CARD32 drawable ; CARD32 gc ; INT16 x , y ; } xImageTextReq; typedef xImageTextReq xImageText8Req; typedef xImageTextReq xImageText16Req; typedef struct { CARD8 reqType; BYTE alloc; CARD16 length ; CARD32 mid ; CARD32 window ; CARD32 visual ; } xCreateColormapReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 mid ; CARD32 srcCmap ; } xCopyColormapAndFreeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD16 red , green , blue ; CARD16 pad2 ; } xAllocColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD16 nbytes ; BYTE pad1, pad2; } xAllocNamedColorReq; typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length ; CARD32 cmap ; CARD16 colors , planes ; } xAllocColorCellsReq; typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length ; CARD32 cmap ; CARD16 colors , red , green , blue ; } xAllocColorPlanesReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD32 planeMask ; } xFreeColorsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; } xStoreColorsReq; typedef struct { CARD8 reqType; CARD8 flags; CARD16 length ; CARD32 cmap ; CARD32 pixel ; CARD16 nbytes ; BYTE pad1, pad2; } xStoreNamedColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; } xQueryColorsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD16 nbytes ; BYTE pad1, pad2; } xLookupColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cid ; CARD32 source , mask ; CARD16 foreRed , foreGreen , foreBlue ; CARD16 backRed , backGreen , backBlue ; CARD16 x , y ; } xCreateCursorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cid ; CARD32 source , mask ; CARD16 sourceChar , maskChar ; CARD16 foreRed , foreGreen , foreBlue ; CARD16 backRed , backGreen , backBlue ; } xCreateGlyphCursorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cursor ; CARD16 foreRed , foreGreen , foreBlue ; CARD16 backRed , backGreen , backBlue ; } xRecolorCursorReq; typedef struct { CARD8 reqType; CARD8 class; CARD16 length ; CARD32 drawable ; CARD16 width , height ; } xQueryBestSizeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD16 nbytes ; BYTE pad1, pad2; } xQueryExtensionReq; typedef struct { CARD8 reqType; CARD8 numKeyPerModifier; CARD16 length ; } xSetModifierMappingReq; typedef struct { CARD8 reqType; CARD8 nElts; CARD16 length ; } xSetPointerMappingReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD8 firstKeyCode; CARD8 count; CARD16 pad1 ; } xGetKeyboardMappingReq; typedef struct { CARD8 reqType; CARD8 keyCodes; CARD16 length ; CARD8 firstKeyCode; CARD8 keySymsPerKeyCode; CARD16 pad1 ; } xChangeKeyboardMappingReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 mask ; } xChangeKeyboardControlReq; typedef struct { CARD8 reqType; INT8 percent; CARD16 length ; } xBellReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; INT16 accelNum , accelDenum ; INT16 threshold ; BOOL doAccel, doThresh; } xChangePointerControlReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; INT16 timeout , interval ; BYTE preferBlank, allowExpose; CARD16 pad2 ; } xSetScreenSaverReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length ; CARD8 hostFamily; BYTE pad; CARD16 hostLength ; } xChangeHostsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; } xListHostsReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length ; } xChangeModeReq; typedef xChangeModeReq xSetAccessControlReq; typedef xChangeModeReq xSetCloseDownModeReq; typedef xChangeModeReq xForceScreenSaverReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD16 nAtoms ; INT16 nPositions ; } xRotatePropertiesReq; extern unsigned long globalSerialNumber; typedef unsigned char *pointer; typedef int Bool; typedef unsigned long PIXEL; typedef unsigned long ATOM; typedef pointer FID; typedef struct _FontPathRec *FontPathPtr; typedef struct _NewClientRec *NewClientPtr; char *ReadRequestFromClient(); char *strcat(); char *strncat(); char *strcpy(); char *strncpy(); Bool CloseDownConnection(); FontPathPtr GetFontPath(); FontPathPtr ExpandFontNamePattern(); FID FiOpenForRead(); void CreateWellKnownSockets(); void SetDefaultFontPath(); void FreeFontRecord(); void SetFontPath(); void ErrorF(); void Error(); void FatalError(); void ProcessCommandLine(); void Xfree(); void FlushAllOutput(); void FlushIfCriticalOutputPending(); unsigned long *Xalloc(); unsigned long *Xrealloc(); long GetTimeInMillis(); typedef struct _DDXPoint *DDXPointPtr; typedef struct _Box *BoxPtr; typedef struct _PixmapFormat *PixmapFormatPtr; typedef struct _Visual *VisualPtr; typedef struct _Depth *DepthPtr; typedef struct _Screen *ScreenPtr; typedef struct _Region *RegionPtr; extern int SingleRectRegionEqual(); typedef struct _DrawInfo *DrawablePtr; typedef struct _Pixmap *PixmapPtr; typedef struct _GCInterest *GCInterestPtr; typedef struct _GC *GCPtr; extern void ValidateGC(); extern int ChangeGC(); extern GCPtr CreateGC(); extern int CopyGC(); extern int FreeGC(); extern void SetGCMask(); extern GCPtr GetScratchGC(); extern void FreeScratchGC(); typedef unsigned long Pixel; typedef struct _CMEntry *EntryPtr; typedef struct _ColormapRec *ColormapPtr; extern int CreateColormap(); extern Pixel FindColor(); extern int FreeColormap(); extern int TellNoMap(); extern int TellLostMap(); extern int TellGainedMap(); extern int IsMapInstalled(); extern void UninstallColormap(); typedef struct _PixmapFormat { unsigned char depth; unsigned char bitsPerPixel; unsigned char scanlinePad; } PixmapFormatRec; typedef struct _Visual { unsigned long vid; short screen; short class; unsigned long redMask, greenMask, blueMask; int offsetRed, offsetGreen, offsetBlue; short bitsPerRGBValue; short ColormapEntries; short nplanes; } VisualRec; typedef struct _Depth { int depth; int numVids; unsigned long *vids; } DepthRec; typedef struct _Screen { int myNum; ATOM id; short width, height; short mmWidth, mmHeight; short numDepths; DepthPtr allowedDepths; short rootDepth; unsigned long rootVisual; unsigned long defColormap; short minInstalledCmaps, maxInstalledCmaps; char backingStoreSupport, saveUnderSupport; unsigned long whitePixel, blackPixel; unsigned long rgf; GCPtr GCperDepth[8+1]; PixmapPtr PixmapPerDepth[1]; pointer devPrivate; short numVisuals; VisualPtr visuals; Bool (* CloseScreen)(); void (* QueryBestSize)(); Bool (* SaveScreen)(); void (* GetImage)(); unsigned int *(* GetSpans)(); void (* PointerNonInterestBox)(); Bool (* CreateWindow)(); Bool (* DestroyWindow)(); Bool (* PositionWindow)(); Bool (* ChangeWindowAttributes)(); Bool (* RealizeWindow)(); Bool (* UnrealizeWindow)(); int (* ValidateTree)(); void (* WindowExposures)(); PixmapPtr (* CreatePixmap)(); Bool (* DestroyPixmap)(); Bool (* RealizeFont)(); Bool (* UnrealizeFont)(); void (* ConstrainCursor)(); void (* CursorLimits)(); Bool (* DisplayCursor)(); Bool (* RealizeCursor)(); Bool (* UnrealizeCursor)(); void (* RecolorCursor)(); Bool (* SetCursorPosition)(); Bool (* CreateGC)(); void (* CreateColormap)(); void (* DestroyColormap)(); void (* InstallColormap)(); void (* UninstallColormap)(); int (* ListInstalledColormaps) (); void (* StoreColors)(); void (* ResolveColor)(); RegionPtr (* RegionCreate)(); void (* RegionCopy)(); void (* RegionDestroy)(); int (* Intersect)(); int (* Union)(); int (* Subtract)(); int (* Inverse)(); void (* RegionReset)(); void (* TranslateRegion)(); int (* RectIn)(); Bool (* PointInRegion)(); Bool (* RegionNotEmpty)(); void (* RegionEmpty)(); BoxPtr (*RegionExtents)(); void (* SendGraphicsExpose)(); void (* BlockHandler)(); void (* WakeupHandler)(); pointer blockData; pointer wakeupData; } ScreenRec; typedef struct _ScreenInfo { int imageByteOrder; int bitmapScanlineUnit; int bitmapScanlinePad; int bitmapBitOrder; int numPixmapFormats; PixmapFormatRec formats[8]; int arraySize; int numScreens; ScreenPtr screen; } ScreenInfo; extern ScreenInfo screenInfo; extern unsigned long globalSerialNumber; typedef struct _DDXPoint { short x, y; } DDXPointRec; typedef struct _Box { short x1, y1, x2, y2; } BoxRec; typedef struct _Region { long size; long numRects; BoxPtr rects; BoxRec extents; } RegionRec; extern RegionPtr miRegionCreate(); extern void miprintRects(); extern void miRegionCopy(); extern int miInverse(); extern int miIntersect(); extern int miUnion(); extern int miSubtract(); extern int miRectIn(); extern void miTranslateRegion(); extern void miRegionDestroy(); extern void miRegionReset(); extern Bool miPointInRegion(); typedef struct _BackingStore *BackingStorePtr; typedef struct _Window *WindowPtr; typedef struct _DrawInfo { short type; ScreenPtr pScreen; int depth; unsigned long serialNumber; } DrawableRec; typedef struct _Pixmap { DrawableRec drawable; int width, height; int refcnt; int devKind; pointer devPrivate; } PixmapRec; typedef struct _Cursor *CursorPtr; typedef struct _CursorMetric *CursorMetricPtr; extern CursorPtr rootCursor; typedef struct _Property *PropertyPtr; unsigned short CreateNewResourceType(); short CreateNewResourceClass(); unsigned long FakeClientID(); void AddResource(); void FreeResource(); void FreeClientResources(); pointer LookupID(); typedef struct _TimeStamp *TimeStampPtr; typedef struct _Client *ClientPtr; extern ClientPtr requestingClient; extern ClientPtr *clients; extern ClientPtr serverClient; extern int currentMaxClients; extern int ProcAllowEvents(); extern int ProcBell(); extern int ProcChangeActivePointerGrab(); extern int ProcChangeKeyboardControl(); extern int ProcChangePointerControl(); extern int ProcGetKeyboardMapping(); extern int ProcGetPointerMapping(); extern int ProcGetInputFocus(); extern int ProcGetKeyboardControl(); extern int ProcGetMotionEvents(); extern int ProcGetPointerControl(); extern int ProcGrabButton(); extern int ProcGrabKey(); extern int ProcGrabKeyboard(); extern int ProcGrabPointer(); extern int ProcQueryKeymap(); extern int ProcQueryPointer(); extern int ProcSetInputFocus(); extern int ProcSetKeyboardMapping(); extern int ProcSetPointerMapping(); extern int ProcSendEvent(); extern int ProcUngrabButton(); extern int ProcUngrabKey(); extern int ProcUngrabKeyboard(); extern int ProcUngrabPointer(); extern int ProcWarpPointer(); extern int ProcRecolorCursor(); extern WindowPtr LookupWindow(); extern pointer LookupDrawable(); extern void NoopDDA(); typedef struct _BackingStore { RegionPtr obscured; DDXPointRec oldAbsCorner; void (* SaveDoomedAreas)(); RegionPtr (* RestoreAreas)(); void (* ExposeCopy)(); void (* TranslateBackingStore)(); void (* ClearToBackground)(); void (* DrawGuarantee)(); } BackingStoreRec; typedef struct _Window { DrawableRec drawable; VisualID visual; struct _Window *parent; struct _Window *nextSib; struct _Window *prevSib; struct _Window *firstChild; struct _Window *lastChild; CursorPtr cursor; ClientPtr client; Window wid; RegionPtr clipList; RegionPtr winSize; RegionPtr borderClip; RegionPtr borderSize; RegionPtr exposed; RegionPtr borderExposed; xRectangle clientWinSize; DDXPointRec absCorner; DDXPointRec oldAbsCorner; int class; Mask eventMask; Mask dontPropagateMask; Mask allEventMasks; Mask deliverableEvents; pointer otherClients; pointer passiveGrabs; PropertyPtr userProps; XID nolongerused; PixmapPtr backgroundTile; unsigned long backgroundPixel; PixmapPtr borderTile; unsigned long borderPixel; int borderWidth; void (* PaintWindowBackground)(); void (* PaintWindowBorder)(); void (* CopyWindow)(); void (* ClearToBackground)(); unsigned long backingBitPlanes; unsigned long backingPixel; int backingStore; BackingStorePtr backStorage; char bitGravity; char winGravity; Colormap colormap; Bool saveUnder:1; unsigned visibility:2; unsigned mapped:1; unsigned realized:1; unsigned viewable:1; unsigned overrideRedirect:1; unsigned marked:1; pointer devBackingStore; pointer devPrivate; } WindowRec; extern int DeleteWindow(); extern int ChangeWindowAttributes(); extern int WalkTree(); extern CreateRootWindow(); extern WindowPtr CreateWindow(); extern int DeleteWindow(); extern int DestroySubwindows(); extern int ChangeWindowAttributes(); extern int GetWindowAttributes(); extern int ConfigureWindow(); extern int ReparentWindow(); extern int MapWindow(); extern int MapSubwindow(); extern int UnmapWindow(); extern int UnmapSubwindow(); extern RegionPtr NotClippedByChildren(); typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _GrabRec *GrabPtr; typedef int (*DeviceProc)(); typedef void (*ProcessInputProc)(); typedef struct _DeviceRec { pointer devicePrivate; ProcessInputProc processInputProc; Bool on; } DeviceRec, *DevicePtr; typedef struct { int count; DevicePtr *devices; } DevicesDescriptor; typedef struct { int click, bell, bell_pitch, bell_duration; Bool autoRepeat; unsigned char autoRepeats[32]; Leds leds; } KeybdCtrl; typedef struct { KeySym *map; KeyCode minKeyCode, maxKeyCode; int mapWidth; } KeySymsRec, *KeySymsPtr; typedef struct { int num, den, threshold; } PtrCtrl; extern KeybdCtrl defaultKeyboardControl; extern PtrCtrl defaultPointerControl; extern int DeliverEvents(); extern int MaybeDeliverEventsToClient( ); extern DevicePtr AddInputDevice(); extern void RegisterPointerDevice(); extern void RegisterKeyboardDevice(); extern void ProcessPointerEvent(); extern void ProcessKeyboardEvent(); extern void ProcessOtherEvent(); extern void InitPointerDeviceStruct(); extern void InitKeyboardDeviceStruct(); extern void InitOtherDeviceStruct(); extern GrabPtr SetDeviceGrab(); extern DevicesDescriptor GetInputDevices(); extern DevicePtr LookupInputDevice(); extern DevicePtr LookupKeyboardDevice(); extern DevicePtr LookupPointerDevice(); extern void CloseDownDevices(); extern int InitAndStartDevices(); extern int NumMotionEvents(); extern void WriteEventsToClient(); extern int EventSelectForWindow(); extern int EventSuppressForWindow(); typedef struct { unsigned short color; short refcnt; } SHAREDCOLOR; typedef struct { unsigned short red, green, blue; } LOCO; typedef struct { SHAREDCOLOR *red, *green, *blue; } SHCO; typedef struct _CMEntry { union { LOCO local; SHCO shco; } co; short refcnt; Bool fShared; } Entry; typedef struct _ColormapRec { VisualPtr pVisual; short class; long mid; ScreenPtr pScreen; short flags; int freeRed; int freeGreen; int freeBlue; int *numPixelsRed; int *numPixelsGreen; int *numPixelsBlue; Pixel **clientPixelsRed; Pixel **clientPixelsGreen; Pixel **clientPixelsBlue; Entry *red; Entry *green; Entry *blue; pointer devPriv; } ColormapRec; typedef struct _Cursor { unsigned char *source; unsigned char *mask; long width; long height; long xhot; long yhot; unsigned foreRed, foreGreen, foreBlue; unsigned backRed, backGreen, backBlue; int refcnt; pointer devPriv[3]; } CursorRec; typedef struct _CursorMetric { long width, height, xhot, yhot; } CursorMetricRec; extern int FreeCursor(); extern CursorPtr AllocCursor(); extern CursorPtr CreateRootCursor(); typedef struct _TimeStamp { unsigned long months; unsigned long milliseconds; } TimeStamp; typedef struct _Client { int index; Mask clientAsMask; pointer requestBuffer; pointer osPrivate; Bool swapped; void (* pSwapReplyFunc)(); XID errorValue; int sequence; int closeDownMode; int clientGone; int noClientException; DrawablePtr lastDrawable; Drawable lastDrawableID; GCPtr lastGC; GContext lastGCID; pointer *saveSet; int numSaved; int requestLog[100]; int requestLogIndex; pointer screenPrivate[3]; } ClientRec; extern TimeStamp currentTime; extern void CloseDownClient(); extern TimeStamp ClientTimeToServerTime(); typedef struct _DIXFontProp *DIXFontPropPtr; typedef struct _Font *FontPtr; typedef enum {Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit} FontEncoding; typedef struct _FontData *FontDataPtr; extern FontPtr OpenFont(); typedef struct _GCInterest { struct _GCInterest *pNextGCInterest; struct _GCInterest *pLastGCInterest; int length; ATOM owner; unsigned long ValInterestMask; void (* ValidateGC) (); unsigned long ChangeInterestMask; int (* ChangeGC) (); void (* CopyGCSource) (); void (* CopyGCDest) (); void (* DestroyGC) (); pointer extPriv; } GCInterestRec; typedef struct _GC{ ScreenPtr pScreen; pointer devPriv; pointer devBackingStore; int depth; unsigned long serialNumber; GCInterestPtr pNextGCInterest; GCInterestPtr pLastGCInterest; int alu; unsigned long planemask; unsigned long fgPixel, bgPixel; int lineWidth; int lineStyle; int capStyle; int joinStyle; int fillStyle; int fillRule; int arcMode; PixmapPtr tile; PixmapPtr stipple; DDXPointRec patOrg; FontPtr font; int subWindowMode; Bool graphicsExposures; DDXPointRec clipOrg; pointer clientClip; int clientClipType; int dashOffset; int numInDashList; unsigned char *dash; unsigned long stateChanges; DDXPointRec lastWinOrg; int miTranslate:1; void (* FillSpans)(); void (* SetSpans)(); void (* PutImage)(); RegionPtr (* CopyArea)(); RegionPtr (* CopyPlane)(); void (* PolyPoint)(); void (* Polylines)(); void (* PolySegment)(); void (* PolyRectangle)(); void (* PolyArc)(); void (* FillPolygon)(); void (* PolyFillRect)(); void (* PolyFillArc)(); int (* PolyText8)(); int (* PolyText16)(); void (* ImageText8)(); void (* ImageText16)(); void (* ImageGlyphBlt)(); void (* PolyGlyphBlt)(); void (* PushPixels)(); void (* LineHelper)(); void (* ChangeClip) (); void (* DestroyClip) (); void (* CopyClip)(); } GC; typedef struct _PaddingInfo { int padRoundUp; int padPixelsLog2; int padBytesLog2; } PaddingInfo; extern PaddingInfo PixmapWidthPaddingInfo[]; static unsigned char _back_lsb[4] = {0x88, 0x22, 0x44, 0x11}; static unsigned char _back_msb[4] = {0x11, 0x44, 0x22, 0x88}; typedef struct _ScreenSaverStuff { WindowPtr pWindow; XID wid; XID cid; BYTE blanked; } ScreenSaverStuffRec; extern int ScreenSaverBlanking, ScreenSaverAllowExposures; int screenIsSaved = 1; static ScreenSaverStuffRec savedScreenInfo[3]; extern WindowRec WindowTable[]; extern void (* ReplySwapVector[256]) (); static void ResizeChildrenWinSize(); extern void CheckCursorConfinement(); extern void DeleteWindowFromAnySelections(); extern void DeleteWindowFromAnyEvents(); extern Mask EventMaskForClient(); extern void WindowHasNewCursor(); extern void RecalculateDeliverableEvents(); extern long random(); static Bool MarkSiblingsBelowMe(); int defaultBackingStore = 0; Bool disableBackingStore = 0; Bool disableSaveUnders = 0; int CreateRootWindow(screen) int screen; { WindowPtr pWin; BoxRec box; ScreenPtr pScreen; savedScreenInfo[screen].pWindow = 0; savedScreenInfo[screen].wid = FakeClientID(0); savedScreenInfo[screen].cid = FakeClientID(0); screenIsSaved = 1; pWin = &WindowTable[screen]; pScreen = &screenInfo.screen[screen]; InitProcedures(pWin); pWin->drawable.pScreen = pScreen; pWin->drawable.type = 0; pWin->drawable.depth = pScreen->rootDepth; pWin->drawable.serialNumber = ((++globalSerialNumber) > (1L<<28) ? (globalSerialNumber = 1): globalSerialNumber);; pWin->parent = ((WindowPtr) 0); SetWindowToDefaults(pWin, pScreen); pWin->colormap = pScreen->defColormap; pWin->nextSib = ((WindowPtr) 0); MakeRootCursor(pWin); pWin->client = serverClient; pWin->wid = FakeClientID(0); pWin->clientWinSize.x = pWin->clientWinSize.y = 0; pWin->clientWinSize.height = pScreen->height; pWin->clientWinSize.width = pScreen->width; pWin->absCorner.x = pWin->absCorner.y = 0; pWin->oldAbsCorner.x = pWin->oldAbsCorner.y = 0; box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; pWin->clipList = (* pScreen->RegionCreate)(&box, 1); pWin->winSize = (* pScreen->RegionCreate)(&box, 1); pWin->borderSize = (* pScreen->RegionCreate)(&box, 1); pWin->borderClip = (* pScreen->RegionCreate)(&box, 1); pWin->class = 1; pWin->visual = pScreen->rootVisual; pWin->backgroundTile = (PixmapPtr)3; pWin->backgroundPixel = pScreen->whitePixel; pWin->borderTile = (PixmapPtr)3; pWin->borderPixel = pScreen->blackPixel; pWin->borderWidth = 0; AddResource(pWin->wid, 1<<4, (pointer)pWin, DeleteWindow, 0); (*pScreen->CreateWindow)(pWin); (*pScreen->PositionWindow)(pWin, 0, 0); MakeRootTile(pWin); (*pScreen->ChangeWindowAttributes)(pWin, (1L<<0) | (1L<<3)); (void)EventSelectForWindow(pWin, serverClient, (Mask)0); MapWindow(pWin, 0, 0, 0, serverClient); (*pWin->PaintWindowBackground)(pWin, pWin->clipList, 0); pWin->backingStore = defaultBackingStore; (*pScreen->ChangeWindowAttributes)(pWin, (1L<<6)); if (disableBackingStore) pScreen->backingStoreSupport = 0; if ((pScreen->backingStoreSupport != 0) && (pScreen->saveUnderSupport == 0)) { pScreen->saveUnderSupport = 0x40; } if (disableSaveUnders) pScreen->saveUnderSupport = 0; return( 0 ); }