Merge branch 'master' into mpx
Conflicts: dix/devices.c dix/events.c mi/misprite.c
This commit is contained in:
commit
015d728bcd
|
@ -496,11 +496,11 @@ int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
|
|||
GLXDrawable *drawId;
|
||||
int *buffer;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
(void) drawId;
|
||||
(void) buffer;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
|
||||
__GLX_SWAP_SHORT(&req->length);
|
||||
|
|
|
@ -495,6 +495,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
|||
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
|
||||
context->base.copy = __glXDRIcontextCopy;
|
||||
context->base.forceCurrent = __glXDRIcontextForceCurrent;
|
||||
context->base.pScreen = screen->base.pScreen;
|
||||
|
||||
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
|
||||
|
||||
|
|
23
Xext/shm.c
23
Xext/shm.c
|
@ -119,9 +119,7 @@ static int pixmapFormat;
|
|||
static int shmPixFormat[MAXSCREENS];
|
||||
static ShmFuncsPtr shmFuncs[MAXSCREENS];
|
||||
static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS];
|
||||
#ifdef PIXPRIV
|
||||
static int shmPixmapPrivate;
|
||||
#endif
|
||||
static ShmFuncs miFuncs = {NULL, miShmPutImage};
|
||||
static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage};
|
||||
|
||||
|
@ -237,7 +235,6 @@ ShmExtensionInit(INITARGS)
|
|||
destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap;
|
||||
screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap;
|
||||
}
|
||||
#ifdef PIXPRIV
|
||||
shmPixmapPrivate = AllocatePixmapPrivateIndex();
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
{
|
||||
|
@ -245,7 +242,6 @@ ShmExtensionInit(INITARGS)
|
|||
shmPixmapPrivate, 0))
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
ShmSegType = CreateNewResourceType(ShmDetachSegment);
|
||||
|
@ -299,22 +295,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap)
|
|||
if (pPixmap->refcnt == 1)
|
||||
{
|
||||
ShmDescPtr shmdesc;
|
||||
#ifdef PIXPRIV
|
||||
shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr;
|
||||
#else
|
||||
char *base = (char *) pPixmap->devPrivate.ptr;
|
||||
|
||||
if (base != (pointer) (pPixmap + 1))
|
||||
{
|
||||
for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next)
|
||||
{
|
||||
if (shmdesc->addr <= base && base <= shmdesc->addr + shmdesc->size)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
shmdesc = 0;
|
||||
#endif
|
||||
if (shmdesc)
|
||||
ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id);
|
||||
}
|
||||
|
@ -781,9 +762,7 @@ CreatePmap:
|
|||
shmdesc->addr + stuff->offset);
|
||||
|
||||
if (pMap) {
|
||||
#ifdef PIXPRIV
|
||||
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
||||
#endif
|
||||
shmdesc->refcnt++;
|
||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pMap->drawable.id = newPix->info[j].id;
|
||||
|
@ -1097,9 +1076,7 @@ CreatePmap:
|
|||
shmdesc->addr + stuff->offset);
|
||||
if (pMap)
|
||||
{
|
||||
#ifdef PIXPRIV
|
||||
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
|
||||
#endif
|
||||
shmdesc->refcnt++;
|
||||
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pMap->drawable.id = stuff->pid;
|
||||
|
|
|
@ -102,12 +102,8 @@ afbCreatePixmap(pScreen, width, height, depth)
|
|||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedWidth;
|
||||
pPixmap->refcnt = 1;
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivate.ptr = datasize ?
|
||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
||||
#endif
|
||||
return(pPixmap);
|
||||
}
|
||||
|
||||
|
|
|
@ -96,12 +96,8 @@ cfbCreatePixmap (pScreen, width, height, depth)
|
|||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedWidth;
|
||||
pPixmap->refcnt = 1;
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivate.ptr = datasize ?
|
||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
||||
#endif
|
||||
return pPixmap;
|
||||
}
|
||||
|
||||
|
|
|
@ -1297,6 +1297,8 @@ return 0;}
|
|||
# LDFLAGS=$save_LDFLAGS
|
||||
# ])
|
||||
xorg_cv_AGL_framework=no
|
||||
DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
|
||||
AC_SUBST([DARWIN_LIBS])
|
||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||
|
|
|
@ -77,10 +77,10 @@ void FreeAtom(NodePtr patom);
|
|||
_X_EXPORT Atom
|
||||
MakeAtom(char *string, unsigned len, Bool makeit)
|
||||
{
|
||||
register NodePtr * np;
|
||||
NodePtr * np;
|
||||
unsigned i;
|
||||
int comp;
|
||||
register unsigned int fp = 0;
|
||||
int comp;
|
||||
unsigned int fp = 0;
|
||||
|
||||
np = &atomRoot;
|
||||
for (i = 0; i < (len+1)/2; i++)
|
||||
|
@ -107,7 +107,7 @@ MakeAtom(char *string, unsigned len, Bool makeit)
|
|||
}
|
||||
if (makeit)
|
||||
{
|
||||
register NodePtr nd;
|
||||
NodePtr nd;
|
||||
|
||||
nd = (NodePtr) xalloc(sizeof(NodeRec));
|
||||
if (!nd)
|
||||
|
|
|
@ -95,8 +95,8 @@ static int BlueComp(
|
|||
);
|
||||
|
||||
static void FreePixels(
|
||||
register ColormapPtr /*pmap*/,
|
||||
register int /*client*/
|
||||
ColormapPtr /*pmap*/,
|
||||
int /*client*/
|
||||
);
|
||||
|
||||
static void CopyFree(
|
||||
|
@ -259,9 +259,9 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
|
|||
int class, size;
|
||||
unsigned long sizebytes;
|
||||
ColormapPtr pmap;
|
||||
register EntryPtr pent;
|
||||
EntryPtr pent;
|
||||
int i;
|
||||
register Pixel *ppix, **pptr;
|
||||
Pixel *ppix, **pptr;
|
||||
|
||||
class = pVisual->class;
|
||||
if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID))
|
||||
|
@ -428,8 +428,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
|
|||
int
|
||||
FreeColormap (pointer value, XID mid)
|
||||
{
|
||||
int i;
|
||||
register EntryPtr pent;
|
||||
int i;
|
||||
EntryPtr pent;
|
||||
ColormapPtr pmap = (ColormapPtr)value;
|
||||
|
||||
if(CLIENT_ID(mid) != SERVER_ID)
|
||||
|
@ -744,9 +744,9 @@ static void
|
|||
UpdateColors (ColormapPtr pmap)
|
||||
{
|
||||
xColorItem *defs;
|
||||
register xColorItem *pdef;
|
||||
register EntryPtr pent;
|
||||
register VisualPtr pVisual;
|
||||
xColorItem *pdef;
|
||||
EntryPtr pent;
|
||||
VisualPtr pVisual;
|
||||
int i, n, size;
|
||||
|
||||
pVisual = pmap->pVisual;
|
||||
|
@ -993,14 +993,14 @@ AllocColor (ColormapPtr pmap,
|
|||
*/
|
||||
|
||||
_X_EXPORT void
|
||||
FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
|
||||
FakeAllocColor (ColormapPtr pmap, xColorItem *item)
|
||||
{
|
||||
Pixel pixR, pixG, pixB;
|
||||
Pixel temp;
|
||||
int entries;
|
||||
xrgb rgb;
|
||||
int class;
|
||||
register VisualPtr pVisual;
|
||||
Pixel pixR, pixG, pixB;
|
||||
Pixel temp;
|
||||
int entries;
|
||||
xrgb rgb;
|
||||
int class;
|
||||
VisualPtr pVisual;
|
||||
|
||||
pVisual = pmap->pVisual;
|
||||
rgb.red = item->red;
|
||||
|
@ -1059,9 +1059,9 @@ FakeAllocColor (register ColormapPtr pmap, register xColorItem *item)
|
|||
|
||||
/* free a pixel value obtained from FakeAllocColor */
|
||||
_X_EXPORT void
|
||||
FakeFreeColor(register ColormapPtr pmap, Pixel pixel)
|
||||
FakeFreeColor(ColormapPtr pmap, Pixel pixel)
|
||||
{
|
||||
register VisualPtr pVisual;
|
||||
VisualPtr pVisual;
|
||||
Pixel pixR, pixG, pixB;
|
||||
|
||||
switch (pmap->class) {
|
||||
|
@ -1507,11 +1507,11 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList)
|
|||
}
|
||||
|
||||
static void
|
||||
FreePixels(register ColormapPtr pmap, register int client)
|
||||
FreePixels(ColormapPtr pmap, int client)
|
||||
{
|
||||
register Pixel *ppix, *ppixStart;
|
||||
register int n;
|
||||
int class;
|
||||
Pixel *ppix, *ppixStart;
|
||||
int n;
|
||||
int class;
|
||||
|
||||
class = pmap->class;
|
||||
ppixStart = pmap->clientPixelsRed[client];
|
||||
|
@ -1646,8 +1646,8 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors,
|
|||
{
|
||||
int ok;
|
||||
Pixel mask, *ppixFirst;
|
||||
register Pixel shift;
|
||||
register int i;
|
||||
Pixel shift;
|
||||
int i;
|
||||
int class;
|
||||
int oldcount;
|
||||
colorResource *pcr = (colorResource *)NULL;
|
||||
|
@ -2409,10 +2409,10 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe
|
|||
_X_EXPORT int
|
||||
StoreColors (ColormapPtr pmap, int count, xColorItem *defs)
|
||||
{
|
||||
register Pixel pix;
|
||||
register xColorItem *pdef;
|
||||
register EntryPtr pent, pentT, pentLast;
|
||||
register VisualPtr pVisual;
|
||||
Pixel pix;
|
||||
xColorItem *pdef;
|
||||
EntryPtr pent, pentT, pentLast;
|
||||
VisualPtr pVisual;
|
||||
SHAREDCOLOR *pred, *pgreen, *pblue;
|
||||
int n, ChgRed, ChgGreen, ChgBlue, idef;
|
||||
int class, errVal = Success;
|
||||
|
|
|
@ -87,7 +87,7 @@ FreeCursorBits(CursorBitsPtr bits)
|
|||
#endif
|
||||
if (bits->refcnt == 0)
|
||||
{
|
||||
register GlyphSharePtr *prev, this;
|
||||
GlyphSharePtr *prev, this;
|
||||
|
||||
for (prev = &sharedGlyphs;
|
||||
(this = *prev) && (this->bits != bits);
|
||||
|
@ -142,7 +142,7 @@ FreeCursor(pointer value, XID cid)
|
|||
static void
|
||||
CheckForEmptyMask(CursorBitsPtr bits)
|
||||
{
|
||||
register unsigned char *msk = bits->mask;
|
||||
unsigned char *msk = bits->mask;
|
||||
int n = BitmapBytePad(bits->width) * bits->height;
|
||||
|
||||
bits->emptyMask = FALSE;
|
||||
|
@ -341,8 +341,8 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
|||
}
|
||||
if (!maskfont)
|
||||
{
|
||||
register long n;
|
||||
register unsigned char *mskptr;
|
||||
long n;
|
||||
unsigned char *mskptr;
|
||||
|
||||
n = BitmapBytePad(cm.width)*(long)cm.height;
|
||||
mskptr = mskbits = (unsigned char *)xalloc(n);
|
||||
|
|
|
@ -87,7 +87,7 @@ static ClientPtr pairingClient = NULL;
|
|||
DeviceIntPtr
|
||||
AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
||||
{
|
||||
register DeviceIntPtr dev, *prev; /* not a typo */
|
||||
DeviceIntPtr dev, *prev; /* not a typo */
|
||||
|
||||
if (inputInfo.numDevices >= MAX_DEVICES)
|
||||
return (DeviceIntPtr)NULL;
|
||||
|
@ -156,9 +156,9 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
|
|||
}
|
||||
|
||||
Bool
|
||||
EnableDevice(register DeviceIntPtr dev)
|
||||
EnableDevice(DeviceIntPtr dev)
|
||||
{
|
||||
register DeviceIntPtr *prev;
|
||||
DeviceIntPtr *prev;
|
||||
int ret;
|
||||
|
||||
for (prev = &inputInfo.off_devices;
|
||||
|
@ -182,9 +182,9 @@ EnableDevice(register DeviceIntPtr dev)
|
|||
}
|
||||
|
||||
Bool
|
||||
DisableDevice(register DeviceIntPtr dev)
|
||||
DisableDevice(DeviceIntPtr dev)
|
||||
{
|
||||
register DeviceIntPtr *prev;
|
||||
DeviceIntPtr *prev;
|
||||
|
||||
for (prev = &inputInfo.devices;
|
||||
*prev && (*prev != dev);
|
||||
|
@ -336,7 +336,7 @@ CorePointerProc(DeviceIntPtr pDev, int what)
|
|||
void
|
||||
InitCoreDevices()
|
||||
{
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
if (CoreDevicePrivatesGeneration != serverGeneration) {
|
||||
CoreDevicePrivatesIndex = AllocateDevicePrivateIndex();
|
||||
|
@ -453,7 +453,7 @@ InitAndStartDevices()
|
|||
}
|
||||
|
||||
static void
|
||||
CloseDevice(register DeviceIntPtr dev)
|
||||
CloseDevice(DeviceIntPtr dev)
|
||||
{
|
||||
KbdFeedbackPtr k, knext;
|
||||
PtrFeedbackPtr p, pnext;
|
||||
|
@ -552,6 +552,9 @@ CloseDevice(register DeviceIntPtr dev)
|
|||
PickPointer(clients[j]);
|
||||
}
|
||||
|
||||
if (dev->devPrivates)
|
||||
xfree(dev->devPrivates);
|
||||
|
||||
xfree(dev->coreGrab.sync.event);
|
||||
xfree(dev->deviceGrab.sync.event);
|
||||
xfree(dev);
|
||||
|
@ -560,7 +563,7 @@ CloseDevice(register DeviceIntPtr dev)
|
|||
void
|
||||
CloseDownDevices()
|
||||
{
|
||||
register DeviceIntPtr dev, next;
|
||||
DeviceIntPtr dev, next;
|
||||
|
||||
for (dev = inputInfo.devices; dev; dev = next)
|
||||
{
|
||||
|
@ -692,7 +695,7 @@ QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode)
|
|||
}
|
||||
|
||||
Bool
|
||||
SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
|
||||
SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src)
|
||||
{
|
||||
int i, j;
|
||||
int rowDif = src->minKeyCode - dst->minKeyCode;
|
||||
|
@ -741,7 +744,7 @@ SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
|
|||
}
|
||||
|
||||
static Bool
|
||||
InitModMap(register KeyClassPtr keyc)
|
||||
InitModMap(KeyClassPtr keyc)
|
||||
{
|
||||
int i, j;
|
||||
CARD8 keysPerModifier[8];
|
||||
|
@ -786,7 +789,7 @@ _X_EXPORT Bool
|
|||
InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[])
|
||||
{
|
||||
int i;
|
||||
register KeyClassPtr keyc;
|
||||
KeyClassPtr keyc;
|
||||
|
||||
keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec));
|
||||
if (!keyc)
|
||||
|
@ -821,10 +824,10 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
InitButtonClassDeviceStruct(register DeviceIntPtr dev, int numButtons,
|
||||
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons,
|
||||
CARD8 *map)
|
||||
{
|
||||
register ButtonClassPtr butc;
|
||||
ButtonClassPtr butc;
|
||||
int i;
|
||||
|
||||
butc = (ButtonClassPtr)xalloc(sizeof(ButtonClassRec));
|
||||
|
@ -850,7 +853,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
|||
int numMotionEvents, int mode)
|
||||
{
|
||||
int i;
|
||||
register ValuatorClassPtr valc;
|
||||
ValuatorClassPtr valc;
|
||||
|
||||
if (!dev)
|
||||
return FALSE;
|
||||
|
@ -892,7 +895,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
|
|||
_X_EXPORT Bool
|
||||
InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
||||
{
|
||||
register AbsoluteClassPtr abs;
|
||||
AbsoluteClassPtr abs;
|
||||
|
||||
abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
|
||||
if (!abs)
|
||||
|
@ -922,7 +925,7 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
|||
_X_EXPORT Bool
|
||||
InitFocusClassDeviceStruct(DeviceIntPtr dev)
|
||||
{
|
||||
register FocusClassPtr focc;
|
||||
FocusClassPtr focc;
|
||||
|
||||
focc = (FocusClassPtr)xalloc(sizeof(FocusClassRec));
|
||||
if (!focc)
|
||||
|
@ -941,7 +944,7 @@ _X_EXPORT Bool
|
|||
InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
||||
KbdCtrlProcPtr controlProc)
|
||||
{
|
||||
register KbdFeedbackPtr feedc;
|
||||
KbdFeedbackPtr feedc;
|
||||
|
||||
feedc = (KbdFeedbackPtr)xalloc(sizeof(KbdFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -968,7 +971,7 @@ InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
|
|||
_X_EXPORT Bool
|
||||
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
|
||||
{
|
||||
register PtrFeedbackPtr feedc;
|
||||
PtrFeedbackPtr feedc;
|
||||
|
||||
feedc = (PtrFeedbackPtr)xalloc(sizeof(PtrFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1006,7 +1009,7 @@ InitStringFeedbackClassDeviceStruct (
|
|||
int max_symbols, int num_symbols_supported, KeySym *symbols)
|
||||
{
|
||||
int i;
|
||||
register StringFeedbackPtr feedc;
|
||||
StringFeedbackPtr feedc;
|
||||
|
||||
feedc = (StringFeedbackPtr)xalloc(sizeof(StringFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1044,7 +1047,7 @@ _X_EXPORT Bool
|
|||
InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
||||
BellCtrlProcPtr controlProc)
|
||||
{
|
||||
register BellFeedbackPtr feedc;
|
||||
BellFeedbackPtr feedc;
|
||||
|
||||
feedc = (BellFeedbackPtr)xalloc(sizeof(BellFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1063,7 +1066,7 @@ InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
|
|||
_X_EXPORT Bool
|
||||
InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
||||
{
|
||||
register LedFeedbackPtr feedc;
|
||||
LedFeedbackPtr feedc;
|
||||
|
||||
feedc = (LedFeedbackPtr)xalloc(sizeof(LedFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1084,7 +1087,7 @@ InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
|
|||
_X_EXPORT Bool
|
||||
InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr controlProc)
|
||||
{
|
||||
register IntegerFeedbackPtr feedc;
|
||||
IntegerFeedbackPtr feedc;
|
||||
|
||||
feedc = (IntegerFeedbackPtr)xalloc(sizeof(IntegerFeedbackClassRec));
|
||||
if (!feedc)
|
||||
|
@ -1169,9 +1172,9 @@ SendMappingNotify(DeviceIntPtr pDev, unsigned request, unsigned firstKeyCode,
|
|||
* sort it to do the checking. How often is it called? Just being lazy?
|
||||
*/
|
||||
Bool
|
||||
BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *errval)
|
||||
BadDeviceMap(BYTE *buff, int length, unsigned low, unsigned high, XID *errval)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
if (buff[i]) /* only check non-zero elements */
|
||||
|
@ -1193,12 +1196,12 @@ BadDeviceMap(register BYTE *buff, int length, unsigned low, unsigned high, XID *
|
|||
|
||||
Bool
|
||||
AllModifierKeysAreUp(dev, map1, per1, map2, per2)
|
||||
register DeviceIntPtr dev;
|
||||
register CARD8 *map1, *map2;
|
||||
DeviceIntPtr dev;
|
||||
CARD8 *map1, *map2;
|
||||
int per1, per2;
|
||||
{
|
||||
register int i, j, k;
|
||||
register CARD8 *down = dev->key->down;
|
||||
int i, j, k;
|
||||
CARD8 *down = dev->key->down;
|
||||
|
||||
for (i = 8; --i >= 0; map2 += per2)
|
||||
{
|
||||
|
@ -1315,7 +1318,7 @@ int
|
|||
ProcGetModifierMapping(ClientPtr client)
|
||||
{
|
||||
xGetModifierMappingReply rep;
|
||||
register KeyClassPtr keyc = inputInfo.keyboard->key;
|
||||
KeyClassPtr keyc = inputInfo.keyboard->key;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
rep.type = X_Reply;
|
||||
|
@ -1524,7 +1527,7 @@ NoteLedState(DeviceIntPtr keybd, int led, Bool on)
|
|||
_X_EXPORT int
|
||||
Ones(unsigned long mask) /* HACKMEM 169 */
|
||||
{
|
||||
register unsigned long y;
|
||||
unsigned long y;
|
||||
|
||||
y = (mask >> 1) &033333333333;
|
||||
y = mask - y - ((y >>1) & 033333333333);
|
||||
|
@ -1741,7 +1744,7 @@ int
|
|||
ProcGetKeyboardControl (ClientPtr client)
|
||||
{
|
||||
int i;
|
||||
register KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
|
||||
KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
|
||||
xGetKeyboardControlReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
|
@ -1763,7 +1766,7 @@ ProcGetKeyboardControl (ClientPtr client)
|
|||
int
|
||||
ProcBell(ClientPtr client)
|
||||
{
|
||||
register DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
int base = keybd->kbdfeed->ctrl.bell;
|
||||
int newpercent;
|
||||
REQUEST(xBellReq);
|
||||
|
@ -1888,7 +1891,7 @@ ProcGetPointerControl(ClientPtr client)
|
|||
}
|
||||
|
||||
void
|
||||
MaybeStopHint(register DeviceIntPtr dev, ClientPtr client)
|
||||
MaybeStopHint(DeviceIntPtr dev, ClientPtr client)
|
||||
{
|
||||
GrabPtr grab = dev->coreGrab.grab;
|
||||
|
||||
|
|
245
dix/dispatch.c
245
dix/dispatch.c
|
@ -262,7 +262,7 @@ void
|
|||
FlushClientCaches(XID id)
|
||||
{
|
||||
int i;
|
||||
register ClientPtr client;
|
||||
ClientPtr client;
|
||||
|
||||
client = clients[CLIENT_ID(id)];
|
||||
if (client == NullClient)
|
||||
|
@ -394,11 +394,11 @@ SmartScheduleClient (int *clientReady, int nready)
|
|||
void
|
||||
Dispatch(void)
|
||||
{
|
||||
register int *clientReady; /* array of request ready clients */
|
||||
register int result;
|
||||
register ClientPtr client;
|
||||
register int nready;
|
||||
register HWEventQueuePtr* icheck = checkForInput;
|
||||
int *clientReady; /* array of request ready clients */
|
||||
int result;
|
||||
ClientPtr client;
|
||||
int nready;
|
||||
HWEventQueuePtr* icheck = checkForInput;
|
||||
#ifdef SMART_SCHEDULE
|
||||
long start_tick;
|
||||
#endif
|
||||
|
@ -594,11 +594,11 @@ ProcCreateWindow(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeWindowAttributes(register ClientPtr client)
|
||||
ProcChangeWindowAttributes(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xChangeWindowAttributesReq);
|
||||
register int result;
|
||||
int result;
|
||||
int len, rc;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
|
||||
|
@ -619,7 +619,7 @@ ProcChangeWindowAttributes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetWindowAttributes(register ClientPtr client)
|
||||
ProcGetWindowAttributes(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -636,7 +636,7 @@ ProcGetWindowAttributes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcDestroyWindow(register ClientPtr client)
|
||||
ProcDestroyWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -652,7 +652,7 @@ ProcDestroyWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcDestroySubwindows(register ClientPtr client)
|
||||
ProcDestroySubwindows(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -667,11 +667,11 @@ ProcDestroySubwindows(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeSaveSet(register ClientPtr client)
|
||||
ProcChangeSaveSet(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xChangeSaveSetReq);
|
||||
register int result, rc;
|
||||
int result, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
|
||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
|
||||
|
@ -695,11 +695,11 @@ ProcChangeSaveSet(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcReparentWindow(register ClientPtr client)
|
||||
ProcReparentWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin, pParent;
|
||||
REQUEST(xReparentWindowReq);
|
||||
register int result, rc;
|
||||
int result, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
|
||||
|
@ -728,7 +728,7 @@ ProcReparentWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcMapWindow(register ClientPtr client)
|
||||
ProcMapWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -744,7 +744,7 @@ ProcMapWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcMapSubwindows(register ClientPtr client)
|
||||
ProcMapSubwindows(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -760,7 +760,7 @@ ProcMapSubwindows(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUnmapWindow(register ClientPtr client)
|
||||
ProcUnmapWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -776,7 +776,7 @@ ProcUnmapWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUnmapSubwindows(register ClientPtr client)
|
||||
ProcUnmapSubwindows(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -791,11 +791,11 @@ ProcUnmapSubwindows(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcConfigureWindow(register ClientPtr client)
|
||||
ProcConfigureWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xConfigureWindowReq);
|
||||
register int result;
|
||||
int result;
|
||||
int len, rc;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
||||
|
@ -814,7 +814,7 @@ ProcConfigureWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCirculateWindow(register ClientPtr client)
|
||||
ProcCirculateWindow(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xCirculateWindowReq);
|
||||
|
@ -835,7 +835,7 @@ ProcCirculateWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
||||
GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
int rc;
|
||||
|
@ -865,7 +865,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
|||
if ((pDraw->type == UNDRAWABLE_WINDOW) ||
|
||||
((pDraw->type == DRAWABLE_WINDOW) && (stuff->id == pDraw->id)))
|
||||
{
|
||||
register WindowPtr pWin = (WindowPtr)pDraw;
|
||||
WindowPtr pWin = (WindowPtr)pDraw;
|
||||
rep->x = pWin->origin.x - wBorderWidth (pWin);
|
||||
rep->y = pWin->origin.y - wBorderWidth (pWin);
|
||||
rep->borderWidth = pWin->borderWidth;
|
||||
|
@ -880,7 +880,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
|||
|
||||
|
||||
int
|
||||
ProcGetGeometry(register ClientPtr client)
|
||||
ProcGetGeometry(ClientPtr client)
|
||||
{
|
||||
xGetGeometryReply rep;
|
||||
int status;
|
||||
|
@ -894,7 +894,7 @@ ProcGetGeometry(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcQueryTree(register ClientPtr client)
|
||||
ProcQueryTree(ClientPtr client)
|
||||
{
|
||||
xQueryTreeReply reply;
|
||||
int rc, numChildren = 0;
|
||||
|
@ -942,7 +942,7 @@ ProcQueryTree(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcInternAtom(register ClientPtr client)
|
||||
ProcInternAtom(ClientPtr client)
|
||||
{
|
||||
Atom atom;
|
||||
char *tchar;
|
||||
|
@ -971,7 +971,7 @@ ProcInternAtom(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetAtomName(register ClientPtr client)
|
||||
ProcGetAtomName(ClientPtr client)
|
||||
{
|
||||
char *str;
|
||||
xGetAtomNameReply reply;
|
||||
|
@ -1002,7 +1002,7 @@ extern int k5_bad();
|
|||
#endif
|
||||
|
||||
int
|
||||
ProcSetSelectionOwner(register ClientPtr client)
|
||||
ProcSetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
TimeStamp time;
|
||||
|
@ -1097,7 +1097,7 @@ ProcSetSelectionOwner(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetSelectionOwner(register ClientPtr client)
|
||||
ProcGetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
REQUEST(xResourceReq);
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ ProcGetSelectionOwner(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcConvertSelection(register ClientPtr client)
|
||||
ProcConvertSelection(ClientPtr client)
|
||||
{
|
||||
Bool paramsOkay;
|
||||
xEvent event;
|
||||
|
@ -1188,7 +1188,7 @@ ProcConvertSelection(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGrabServer(register ClientPtr client)
|
||||
ProcGrabServer(ClientPtr client)
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
if (grabState != GrabNone && client != grabClient)
|
||||
|
@ -1242,7 +1242,7 @@ UngrabServer(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUngrabServer(register ClientPtr client)
|
||||
ProcUngrabServer(ClientPtr client)
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
UngrabServer(client);
|
||||
|
@ -1250,7 +1250,7 @@ ProcUngrabServer(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcTranslateCoords(register ClientPtr client)
|
||||
ProcTranslateCoords(ClientPtr client)
|
||||
{
|
||||
REQUEST(xTranslateCoordsReq);
|
||||
|
||||
|
@ -1327,7 +1327,7 @@ ProcTranslateCoords(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcOpenFont(register ClientPtr client)
|
||||
ProcOpenFont(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
REQUEST(xOpenFontReq);
|
||||
|
@ -1346,7 +1346,7 @@ ProcOpenFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCloseFont(register ClientPtr client)
|
||||
ProcCloseFont(ClientPtr client)
|
||||
{
|
||||
FontPtr pFont;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -1367,11 +1367,11 @@ ProcCloseFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryFont(register ClientPtr client)
|
||||
ProcQueryFont(ClientPtr client)
|
||||
{
|
||||
xQueryFontReply *reply;
|
||||
FontPtr pFont;
|
||||
register GC *pGC;
|
||||
GC *pGC;
|
||||
REQUEST(xResourceReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
|
@ -1425,7 +1425,7 @@ ProcQueryFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryTextExtents(register ClientPtr client)
|
||||
ProcQueryTextExtents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xQueryTextExtentsReq);
|
||||
xQueryTextExtentsReply reply;
|
||||
|
@ -1475,7 +1475,7 @@ ProcQueryTextExtents(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListFonts(register ClientPtr client)
|
||||
ProcListFonts(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListFontsReq);
|
||||
|
||||
|
@ -1486,7 +1486,7 @@ ProcListFonts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListFontsWithInfo(register ClientPtr client)
|
||||
ProcListFontsWithInfo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListFontsWithInfoReq);
|
||||
|
||||
|
@ -1508,13 +1508,13 @@ dixDestroyPixmap(pointer value, XID pid)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreatePixmap(register ClientPtr client)
|
||||
ProcCreatePixmap(ClientPtr client)
|
||||
{
|
||||
PixmapPtr pMap;
|
||||
DrawablePtr pDraw;
|
||||
REQUEST(xCreatePixmapReq);
|
||||
DepthPtr pDepth;
|
||||
register int i, rc;
|
||||
int i, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xCreatePixmapReq);
|
||||
client->errorValue = stuff->pid;
|
||||
|
@ -1571,7 +1571,7 @@ CreatePmap:
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreePixmap(register ClientPtr client)
|
||||
ProcFreePixmap(ClientPtr client)
|
||||
{
|
||||
PixmapPtr pMap;
|
||||
|
||||
|
@ -1593,7 +1593,7 @@ ProcFreePixmap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreateGC(register ClientPtr client)
|
||||
ProcCreateGC(ClientPtr client)
|
||||
{
|
||||
int error, rc;
|
||||
GC *pGC;
|
||||
|
@ -1621,7 +1621,7 @@ ProcCreateGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeGC(register ClientPtr client)
|
||||
ProcChangeGC(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
int result;
|
||||
|
@ -1648,7 +1648,7 @@ ProcChangeGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCopyGC(register ClientPtr client)
|
||||
ProcCopyGC(ClientPtr client)
|
||||
{
|
||||
GC *dstGC;
|
||||
GC *pGC;
|
||||
|
@ -1675,7 +1675,7 @@ ProcCopyGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcSetDashes(register ClientPtr client)
|
||||
ProcSetDashes(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
int result;
|
||||
|
@ -1704,7 +1704,7 @@ ProcSetDashes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcSetClipRectangles(register ClientPtr client)
|
||||
ProcSetClipRectangles(ClientPtr client)
|
||||
{
|
||||
int nr, result;
|
||||
GC *pGC;
|
||||
|
@ -1734,7 +1734,7 @@ ProcSetClipRectangles(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreeGC(register ClientPtr client)
|
||||
ProcFreeGC(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
int rc;
|
||||
|
@ -1750,7 +1750,7 @@ ProcFreeGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcClearToBackground(register ClientPtr client)
|
||||
ProcClearToBackground(ClientPtr client)
|
||||
{
|
||||
REQUEST(xClearAreaReq);
|
||||
WindowPtr pWin;
|
||||
|
@ -1777,7 +1777,7 @@ ProcClearToBackground(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCopyArea(register ClientPtr client)
|
||||
ProcCopyArea(ClientPtr client)
|
||||
{
|
||||
DrawablePtr pDst;
|
||||
DrawablePtr pSrc;
|
||||
|
@ -1821,7 +1821,7 @@ ProcCopyArea(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCopyPlane(register ClientPtr client)
|
||||
ProcCopyPlane(ClientPtr client)
|
||||
{
|
||||
DrawablePtr psrcDraw, pdstDraw;
|
||||
GC *pGC;
|
||||
|
@ -1872,7 +1872,7 @@ ProcCopyPlane(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyPoint(register ClientPtr client)
|
||||
ProcPolyPoint(ClientPtr client)
|
||||
{
|
||||
int npoint;
|
||||
GC *pGC;
|
||||
|
@ -1895,7 +1895,7 @@ ProcPolyPoint(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyLine(register ClientPtr client)
|
||||
ProcPolyLine(ClientPtr client)
|
||||
{
|
||||
int npoint;
|
||||
GC *pGC;
|
||||
|
@ -1918,7 +1918,7 @@ ProcPolyLine(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolySegment(register ClientPtr client)
|
||||
ProcPolySegment(ClientPtr client)
|
||||
{
|
||||
int nsegs;
|
||||
GC *pGC;
|
||||
|
@ -1937,7 +1937,7 @@ ProcPolySegment(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyRectangle (register ClientPtr client)
|
||||
ProcPolyRectangle (ClientPtr client)
|
||||
{
|
||||
int nrects;
|
||||
GC *pGC;
|
||||
|
@ -1957,7 +1957,7 @@ ProcPolyRectangle (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyArc(register ClientPtr client)
|
||||
ProcPolyArc(ClientPtr client)
|
||||
{
|
||||
int narcs;
|
||||
GC *pGC;
|
||||
|
@ -1976,7 +1976,7 @@ ProcPolyArc(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFillPoly(register ClientPtr client)
|
||||
ProcFillPoly(ClientPtr client)
|
||||
{
|
||||
int things;
|
||||
GC *pGC;
|
||||
|
@ -2007,7 +2007,7 @@ ProcFillPoly(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyFillRectangle(register ClientPtr client)
|
||||
ProcPolyFillRectangle(ClientPtr client)
|
||||
{
|
||||
int things;
|
||||
GC *pGC;
|
||||
|
@ -2028,7 +2028,7 @@ ProcPolyFillRectangle(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyFillArc(register ClientPtr client)
|
||||
ProcPolyFillArc(ClientPtr client)
|
||||
{
|
||||
int narcs;
|
||||
GC *pGC;
|
||||
|
@ -2101,7 +2101,7 @@ ReformatImage (char *base, int nbytes, int bpp, int order)
|
|||
* boundary, even if the scanlines are padded to our satisfaction.
|
||||
*/
|
||||
int
|
||||
ProcPutImage(register ClientPtr client)
|
||||
ProcPutImage(ClientPtr client)
|
||||
{
|
||||
GC *pGC;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -2159,13 +2159,13 @@ ProcPutImage(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
||||
DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||
int x, int y, int width, int height,
|
||||
Mask planemask, xGetImageReply **im_return)
|
||||
{
|
||||
DrawablePtr pDraw;
|
||||
int nlines, linesPerBuf, rc;
|
||||
register int linesDone;
|
||||
int linesDone;
|
||||
long widthBytesLine, length;
|
||||
Mask plane = 0;
|
||||
char *pBuf;
|
||||
|
@ -2379,7 +2379,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetImage(register ClientPtr client)
|
||||
ProcGetImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetImageReq);
|
||||
|
||||
|
@ -2392,7 +2392,7 @@ ProcGetImage(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcPolyText(register ClientPtr client)
|
||||
ProcPolyText(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
REQUEST(xPolyTextReq);
|
||||
|
@ -2421,7 +2421,7 @@ ProcPolyText(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcImageText8(register ClientPtr client)
|
||||
ProcImageText8(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -2451,7 +2451,7 @@ ProcImageText8(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcImageText16(register ClientPtr client)
|
||||
ProcImageText16(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -2482,7 +2482,7 @@ ProcImageText16(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcCreateColormap(register ClientPtr client)
|
||||
ProcCreateColormap(ClientPtr client)
|
||||
{
|
||||
VisualPtr pVisual;
|
||||
ColormapPtr pmap;
|
||||
|
@ -2524,7 +2524,7 @@ ProcCreateColormap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreeColormap(register ClientPtr client)
|
||||
ProcFreeColormap(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pmap;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -2548,7 +2548,7 @@ ProcFreeColormap(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcCopyColormapAndFree(register ClientPtr client)
|
||||
ProcCopyColormapAndFree(ClientPtr client)
|
||||
{
|
||||
Colormap mid;
|
||||
ColormapPtr pSrcMap;
|
||||
|
@ -2575,7 +2575,7 @@ ProcCopyColormapAndFree(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcInstallColormap(register ClientPtr client)
|
||||
ProcInstallColormap(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -2596,7 +2596,7 @@ ProcInstallColormap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcUninstallColormap(register ClientPtr client)
|
||||
ProcUninstallColormap(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -2618,7 +2618,7 @@ ProcUninstallColormap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListInstalledColormaps(register ClientPtr client)
|
||||
ProcListInstalledColormaps(ClientPtr client)
|
||||
{
|
||||
xListInstalledColormapsReply *preply;
|
||||
int nummaps, rc;
|
||||
|
@ -2651,7 +2651,7 @@ ProcListInstalledColormaps(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocColor (register ClientPtr client)
|
||||
ProcAllocColor (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pmap;
|
||||
int retval;
|
||||
|
@ -2693,7 +2693,7 @@ ProcAllocColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocNamedColor (register ClientPtr client)
|
||||
ProcAllocNamedColor (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xAllocNamedColorReq);
|
||||
|
@ -2745,7 +2745,7 @@ ProcAllocNamedColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocColorCells (register ClientPtr client)
|
||||
ProcAllocColorCells (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xAllocColorCellsReq);
|
||||
|
@ -2811,7 +2811,7 @@ ProcAllocColorCells (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllocColorPlanes(register ClientPtr client)
|
||||
ProcAllocColorPlanes(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xAllocColorPlanesReq);
|
||||
|
@ -2875,7 +2875,7 @@ ProcAllocColorPlanes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcFreeColors(register ClientPtr client)
|
||||
ProcFreeColors(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xFreeColorsReq);
|
||||
|
@ -2944,7 +2944,7 @@ ProcStoreColors (ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcStoreNamedColor (register ClientPtr client)
|
||||
ProcStoreNamedColor (ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xStoreNamedColorReq);
|
||||
|
@ -2978,7 +2978,7 @@ ProcStoreNamedColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryColors(register ClientPtr client)
|
||||
ProcQueryColors(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xQueryColorsReq);
|
||||
|
@ -3029,7 +3029,7 @@ ProcQueryColors(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcLookupColor(register ClientPtr client)
|
||||
ProcLookupColor(ClientPtr client)
|
||||
{
|
||||
ColormapPtr pcmp;
|
||||
REQUEST(xLookupColorReq);
|
||||
|
@ -3067,17 +3067,16 @@ ProcLookupColor(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreateCursor (register ClientPtr client)
|
||||
ProcCreateCursor (ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
|
||||
register PixmapPtr src;
|
||||
register PixmapPtr msk;
|
||||
CursorPtr pCursor;
|
||||
PixmapPtr src;
|
||||
PixmapPtr msk;
|
||||
unsigned char * srcbits;
|
||||
unsigned char * mskbits;
|
||||
unsigned short width, height;
|
||||
long n;
|
||||
CursorMetricRec cm;
|
||||
CursorMetricRec cm;
|
||||
|
||||
|
||||
REQUEST(xCreateCursorReq);
|
||||
|
@ -3132,7 +3131,7 @@ ProcCreateCursor (register ClientPtr client)
|
|||
XYPixmap, 1, (pointer)srcbits);
|
||||
if ( msk == (PixmapPtr)NULL)
|
||||
{
|
||||
register unsigned char *bits = mskbits;
|
||||
unsigned char *bits = mskbits;
|
||||
while (--n >= 0)
|
||||
*bits++ = ~0;
|
||||
}
|
||||
|
@ -3157,7 +3156,7 @@ ProcCreateCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcCreateGlyphCursor (register ClientPtr client)
|
||||
ProcCreateGlyphCursor (ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
int res;
|
||||
|
@ -3181,7 +3180,7 @@ ProcCreateGlyphCursor (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcFreeCursor (register ClientPtr client)
|
||||
ProcFreeCursor (ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
REQUEST(xResourceReq);
|
||||
|
@ -3202,7 +3201,7 @@ ProcFreeCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcQueryBestSize (register ClientPtr client)
|
||||
ProcQueryBestSize (ClientPtr client)
|
||||
{
|
||||
xQueryBestSizeReply reply;
|
||||
DrawablePtr pDraw;
|
||||
|
@ -3239,7 +3238,7 @@ ProcQueryBestSize (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
ProcSetScreenSaver (register ClientPtr client)
|
||||
ProcSetScreenSaver (ClientPtr client)
|
||||
{
|
||||
int blankingOption, exposureOption;
|
||||
REQUEST(xSetScreenSaverReq);
|
||||
|
@ -3295,7 +3294,7 @@ ProcSetScreenSaver (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetScreenSaver(register ClientPtr client)
|
||||
ProcGetScreenSaver(ClientPtr client)
|
||||
{
|
||||
xGetScreenSaverReply rep;
|
||||
|
||||
|
@ -3312,7 +3311,7 @@ ProcGetScreenSaver(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeHosts(register ClientPtr client)
|
||||
ProcChangeHosts(ClientPtr client)
|
||||
{
|
||||
REQUEST(xChangeHostsReq);
|
||||
int result;
|
||||
|
@ -3336,7 +3335,7 @@ ProcChangeHosts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcListHosts(register ClientPtr client)
|
||||
ProcListHosts(ClientPtr client)
|
||||
{
|
||||
xListHostsReply reply;
|
||||
int len, nHosts, result;
|
||||
|
@ -3367,7 +3366,7 @@ ProcListHosts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeAccessControl(register ClientPtr client)
|
||||
ProcChangeAccessControl(ClientPtr client)
|
||||
{
|
||||
int result;
|
||||
REQUEST(xSetAccessControlReq);
|
||||
|
@ -3385,7 +3384,7 @@ ProcChangeAccessControl(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcKillClient(register ClientPtr client)
|
||||
ProcKillClient(ClientPtr client)
|
||||
{
|
||||
REQUEST(xResourceReq);
|
||||
ClientPtr killclient;
|
||||
|
@ -3417,7 +3416,7 @@ ProcKillClient(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcSetFontPath(register ClientPtr client)
|
||||
ProcSetFontPath(ClientPtr client)
|
||||
{
|
||||
unsigned char *ptr;
|
||||
unsigned long nbytes, total;
|
||||
|
@ -3452,7 +3451,7 @@ ProcSetFontPath(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcGetFontPath(register ClientPtr client)
|
||||
ProcGetFontPath(ClientPtr client)
|
||||
{
|
||||
xGetFontPathReply reply;
|
||||
int stringLens, numpaths;
|
||||
|
@ -3474,7 +3473,7 @@ ProcGetFontPath(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcChangeCloseDownMode(register ClientPtr client)
|
||||
ProcChangeCloseDownMode(ClientPtr client)
|
||||
{
|
||||
REQUEST(xSetCloseDownModeReq);
|
||||
|
||||
|
@ -3493,7 +3492,7 @@ ProcChangeCloseDownMode(register ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
int ProcForceScreenSaver(register ClientPtr client)
|
||||
int ProcForceScreenSaver(ClientPtr client)
|
||||
{
|
||||
REQUEST(xForceScreenSaverReq);
|
||||
|
||||
|
@ -3509,7 +3508,7 @@ int ProcForceScreenSaver(register ClientPtr client)
|
|||
return client->noClientException;
|
||||
}
|
||||
|
||||
int ProcNoOperation(register ClientPtr client)
|
||||
int ProcNoOperation(ClientPtr client)
|
||||
{
|
||||
REQUEST_AT_LEAST_SIZE(xReq);
|
||||
|
||||
|
@ -3552,7 +3551,7 @@ InitProcVectors(void)
|
|||
char dispatchExceptionAtReset = DE_RESET;
|
||||
|
||||
void
|
||||
CloseDownClient(register ClientPtr client)
|
||||
CloseDownClient(ClientPtr client)
|
||||
{
|
||||
Bool really_close_down = client->clientGone ||
|
||||
client->closeDownMode == DestroyAll;
|
||||
|
@ -3664,8 +3663,8 @@ KillAllClients()
|
|||
void
|
||||
CloseDownRetainedResources()
|
||||
{
|
||||
register int i;
|
||||
register ClientPtr client;
|
||||
int i;
|
||||
ClientPtr client;
|
||||
|
||||
for (i=1; i<currentMaxClients; i++)
|
||||
{
|
||||
|
@ -3737,11 +3736,11 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
|||
int
|
||||
InitClientPrivates(ClientPtr client)
|
||||
{
|
||||
register char *ptr;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
if (totalClientSize == sizeof(ClientRec))
|
||||
ppriv = (DevUnion *)NULL;
|
||||
|
@ -3791,8 +3790,8 @@ InitClientPrivates(ClientPtr client)
|
|||
|
||||
ClientPtr NextAvailableClient(pointer ospriv)
|
||||
{
|
||||
register int i;
|
||||
register ClientPtr client;
|
||||
int i;
|
||||
ClientPtr client;
|
||||
xReq data;
|
||||
|
||||
i = nextFreeClientID;
|
||||
|
@ -3833,10 +3832,10 @@ ClientPtr NextAvailableClient(pointer ospriv)
|
|||
}
|
||||
|
||||
int
|
||||
ProcInitialConnection(register ClientPtr client)
|
||||
ProcInitialConnection(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
register xConnClientPrefix *prefix;
|
||||
xConnClientPrefix *prefix;
|
||||
int whichbyte = 1;
|
||||
|
||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||
|
@ -3860,10 +3859,10 @@ ProcInitialConnection(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SendConnSetup(register ClientPtr client, char *reason)
|
||||
SendConnSetup(ClientPtr client, char *reason)
|
||||
{
|
||||
register xWindowRoot *root;
|
||||
register int i;
|
||||
xWindowRoot *root;
|
||||
int i;
|
||||
int numScreens;
|
||||
char* lConnectionInfo;
|
||||
xConnSetupPrefix* lconnSetupPrefix;
|
||||
|
@ -3918,8 +3917,8 @@ SendConnSetup(register ClientPtr client, char *reason)
|
|||
|
||||
for (i=0; i<numScreens; i++)
|
||||
{
|
||||
register unsigned int j;
|
||||
register xDepth *pDepth;
|
||||
unsigned int j;
|
||||
xDepth *pDepth;
|
||||
|
||||
root->currentInputMask = WindowTable[i]->eventMask |
|
||||
wOtherEventMasks (WindowTable[i]);
|
||||
|
@ -3960,10 +3959,10 @@ SendConnSetup(register ClientPtr client, char *reason)
|
|||
}
|
||||
|
||||
int
|
||||
ProcEstablishConnection(register ClientPtr client)
|
||||
ProcEstablishConnection(ClientPtr client)
|
||||
{
|
||||
char *reason, *auth_proto, *auth_string;
|
||||
register xConnClientPrefix *prefix;
|
||||
xConnClientPrefix *prefix;
|
||||
REQUEST(xReq);
|
||||
|
||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||
|
@ -4012,7 +4011,7 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
|
|||
void
|
||||
DeleteWindowFromAnySelections(WindowPtr pWin)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i< NumCurrentSelections; i++)
|
||||
if (CurrentSelections[i].pWin == pWin)
|
||||
|
@ -4034,7 +4033,7 @@ DeleteWindowFromAnySelections(WindowPtr pWin)
|
|||
static void
|
||||
DeleteClientFromAnySelections(ClientPtr client)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i< NumCurrentSelections; i++)
|
||||
if (CurrentSelections[i].client == client)
|
||||
|
|
|
@ -1145,9 +1145,9 @@ static XID clearGC[] = { CT_NONE };
|
|||
#define clearGCmask (GCClipMask)
|
||||
|
||||
int
|
||||
doPolyText(ClientPtr client, register PTclosurePtr c)
|
||||
doPolyText(ClientPtr client, PTclosurePtr c)
|
||||
{
|
||||
register FontPtr pFont = c->pGC->font, oldpFont;
|
||||
FontPtr pFont = c->pGC->font, oldpFont;
|
||||
Font fid, oldfid;
|
||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||
enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT;
|
||||
|
@ -1447,7 +1447,7 @@ PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt,
|
|||
#undef FontShiftSize
|
||||
|
||||
int
|
||||
doImageText(ClientPtr client, register ITclosurePtr c)
|
||||
doImageText(ClientPtr client, ITclosurePtr c)
|
||||
{
|
||||
int err = Success, lgerr; /* err is in X error, not font error, space */
|
||||
FontPathElementPtr fpe;
|
||||
|
|
|
@ -168,7 +168,7 @@ ISOLatin1ToLower (unsigned char source)
|
|||
_X_EXPORT void
|
||||
CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < length; i++, source++, dest++)
|
||||
*dest = ISOLatin1ToLower (*source);
|
||||
|
@ -392,8 +392,8 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode,
|
|||
void
|
||||
DeleteWindowFromAnySaveSet(WindowPtr pWin)
|
||||
{
|
||||
register int i;
|
||||
register ClientPtr client;
|
||||
int i;
|
||||
ClientPtr client;
|
||||
|
||||
for (i = 0; i< currentMaxClients; i++)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ static Bool handlerDeleted;
|
|||
void
|
||||
BlockHandler(pointer pTimeout, pointer pReadmask)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
++inHandler;
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
|
@ -468,7 +468,7 @@ BlockHandler(pointer pTimeout, pointer pReadmask)
|
|||
void
|
||||
WakeupHandler(int result, pointer pReadmask)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
++inHandler;
|
||||
for (i = numHandlers - 1; i >= 0; i--)
|
||||
|
|
181
dix/events.c
181
dix/events.c
|
@ -805,9 +805,9 @@ CheckPhysLimits(
|
|||
|
||||
static void
|
||||
CheckVirtualMotion(
|
||||
register DeviceIntPtr pDev,
|
||||
register QdEventPtr qe,
|
||||
register WindowPtr pWin)
|
||||
DeviceIntPtr pDev,
|
||||
QdEventPtr qe,
|
||||
WindowPtr pWin)
|
||||
{
|
||||
SpritePtr pSprite = pDev->pSprite;
|
||||
|
||||
|
@ -926,7 +926,7 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
|
|||
|
||||
/* returns true if b is a descendent of a */
|
||||
Bool
|
||||
IsParent(register WindowPtr a, register WindowPtr b)
|
||||
IsParent(WindowPtr a, WindowPtr b)
|
||||
{
|
||||
for (b = b->parent; b; b = b->parent)
|
||||
if (b == a) return TRUE;
|
||||
|
@ -936,8 +936,8 @@ IsParent(register WindowPtr a, register WindowPtr b)
|
|||
static void
|
||||
PostNewCursor(DeviceIntPtr pDev)
|
||||
{
|
||||
register WindowPtr win;
|
||||
register GrabPtr grab = pDev->coreGrab.grab;
|
||||
WindowPtr win;
|
||||
GrabPtr grab = pDev->coreGrab.grab;
|
||||
SpritePtr pSprite = pDev->pSprite;
|
||||
CursorPtr pCursor;
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ XineramaGetCursorScreen(DeviceIntPtr pDev)
|
|||
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
||||
|
||||
static void
|
||||
MonthChangedOrBadTime(register xEvent *xE)
|
||||
MonthChangedOrBadTime(xEvent *xE)
|
||||
{
|
||||
/* If the ddx/OS is careless about not processing timestamped events from
|
||||
* different sources in sorted order, then it's possible for time to go
|
||||
|
@ -1033,7 +1033,7 @@ MonthChangedOrBadTime(register xEvent *xE)
|
|||
lastDeviceEventTime = currentTime; }
|
||||
|
||||
void
|
||||
NoticeEventTime(register xEvent *xE)
|
||||
NoticeEventTime(xEvent *xE)
|
||||
{
|
||||
if (!syncEvents.playingEvents)
|
||||
NoticeTime(xE);
|
||||
|
@ -1046,8 +1046,8 @@ NoticeEventTime(register xEvent *xE)
|
|||
void
|
||||
EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
||||
{
|
||||
register QdEventPtr tail = *syncEvents.pendtail;
|
||||
register QdEventPtr qe;
|
||||
QdEventPtr tail = *syncEvents.pendtail;
|
||||
QdEventPtr qe;
|
||||
xEvent *qxE;
|
||||
SpritePtr pSprite = device->pSprite;
|
||||
|
||||
|
@ -1122,8 +1122,8 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
|||
static void
|
||||
PlayReleasedEvents(void)
|
||||
{
|
||||
register QdEventPtr *prev, qe;
|
||||
register DeviceIntPtr dev;
|
||||
QdEventPtr *prev, qe;
|
||||
DeviceIntPtr dev;
|
||||
DeviceIntPtr pDev;
|
||||
|
||||
prev = &syncEvents.pending;
|
||||
|
@ -1169,7 +1169,7 @@ PlayReleasedEvents(void)
|
|||
}
|
||||
|
||||
static void
|
||||
FreezeThaw(register DeviceIntPtr dev, Bool frozen)
|
||||
FreezeThaw(DeviceIntPtr dev, Bool frozen)
|
||||
{
|
||||
dev->coreGrab.sync.frozen = frozen;
|
||||
if (frozen)
|
||||
|
@ -1181,13 +1181,13 @@ FreezeThaw(register DeviceIntPtr dev, Bool frozen)
|
|||
void
|
||||
ComputeFreezes()
|
||||
{
|
||||
register DeviceIntPtr replayDev = syncEvents.replayDev;
|
||||
register int i;
|
||||
DeviceIntPtr replayDev = syncEvents.replayDev;
|
||||
int i;
|
||||
WindowPtr w;
|
||||
register xEvent *xE;
|
||||
xEvent *xE;
|
||||
int count;
|
||||
GrabPtr grab;
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||
FreezeThaw(dev, dev->coreGrab.sync.other ||
|
||||
|
@ -1283,10 +1283,10 @@ ScreenRestructured (ScreenPtr pScreen)
|
|||
#endif
|
||||
|
||||
void
|
||||
CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
||||
CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
||||
{
|
||||
register GrabPtr grab = thisDev->coreGrab.grab;
|
||||
register DeviceIntPtr dev;
|
||||
GrabPtr grab = thisDev->coreGrab.grab;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
if (thisMode == GrabModeSync)
|
||||
thisDev->coreGrab.sync.state = FROZEN_NO_EVENT;
|
||||
|
@ -1317,7 +1317,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
|
|||
}
|
||||
|
||||
void
|
||||
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
|
||||
ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
|
||||
TimeStamp time, Bool autoGrab)
|
||||
{
|
||||
WindowPtr oldWin = (mouse->coreGrab.grab) ?
|
||||
|
@ -1347,10 +1347,10 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
|
|||
}
|
||||
|
||||
void
|
||||
DeactivatePointerGrab(register DeviceIntPtr mouse)
|
||||
DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||
{
|
||||
register GrabPtr grab = mouse->coreGrab.grab;
|
||||
register DeviceIntPtr dev;
|
||||
GrabPtr grab = mouse->coreGrab.grab;
|
||||
DeviceIntPtr dev;
|
||||
|
||||
mouse->valuator->motionHintWindow = NullWindow;
|
||||
mouse->coreGrab.grab = NullGrab;
|
||||
|
@ -1372,7 +1372,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
|
|||
}
|
||||
|
||||
void
|
||||
ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
|
||||
ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
|
||||
{
|
||||
WindowPtr oldWin;
|
||||
|
||||
|
@ -1398,11 +1398,11 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
|
|||
}
|
||||
|
||||
void
|
||||
DeactivateKeyboardGrab(register DeviceIntPtr keybd)
|
||||
DeactivateKeyboardGrab(DeviceIntPtr keybd)
|
||||
{
|
||||
register GrabPtr grab = keybd->coreGrab.grab;
|
||||
register DeviceIntPtr dev;
|
||||
register WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
||||
GrabPtr grab = keybd->coreGrab.grab;
|
||||
DeviceIntPtr dev;
|
||||
WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
||||
: keybd->pSprite->win;
|
||||
|
||||
if (focusWin == FollowKeyboardWin)
|
||||
|
@ -1434,7 +1434,7 @@ AllowSome(ClientPtr client,
|
|||
{
|
||||
Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced;
|
||||
TimeStamp grabTime;
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
GrabInfoPtr devgrabinfo,
|
||||
grabinfo = (core) ? &thisDev->coreGrab : &thisDev->deviceGrab;
|
||||
|
||||
|
@ -1551,7 +1551,7 @@ AllowSome(ClientPtr client,
|
|||
}
|
||||
|
||||
int
|
||||
ProcAllowEvents(register ClientPtr client)
|
||||
ProcAllowEvents(ClientPtr client)
|
||||
{
|
||||
TimeStamp time;
|
||||
DeviceIntPtr mouse = PickPointer(client);
|
||||
|
@ -1596,7 +1596,7 @@ ProcAllowEvents(register ClientPtr client)
|
|||
void
|
||||
ReleaseActiveGrabs(ClientPtr client)
|
||||
{
|
||||
register DeviceIntPtr dev;
|
||||
DeviceIntPtr dev;
|
||||
Bool done;
|
||||
|
||||
/* XXX CloseDownClient should remove passive grabs before
|
||||
|
@ -1704,12 +1704,12 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
|||
}
|
||||
|
||||
int
|
||||
DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent
|
||||
DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||
*pEvents, int count, Mask filter, GrabPtr grab, int mskidx)
|
||||
{
|
||||
int deliveries = 0, nondeliveries = 0;
|
||||
int attempt;
|
||||
register InputClients *other;
|
||||
InputClients *other;
|
||||
ClientPtr client = NullClient;
|
||||
Mask deliveryMask = 0; /* If a grab occurs due to a button press, then
|
||||
this mask is the mask of the grab. */
|
||||
|
@ -1839,10 +1839,10 @@ XineramaTryClientEventsResult(
|
|||
#endif
|
||||
|
||||
int
|
||||
MaybeDeliverEventsToClient(register WindowPtr pWin, xEvent *pEvents,
|
||||
MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents,
|
||||
int count, Mask filter, ClientPtr dontClient)
|
||||
{
|
||||
register OtherClients *other;
|
||||
OtherClients *other;
|
||||
|
||||
|
||||
if (pWin->eventMask & filter)
|
||||
|
@ -1997,8 +1997,8 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab,
|
|||
|
||||
/* not useful for events that propagate up the tree or extension events */
|
||||
_X_EXPORT int
|
||||
DeliverEvents(register WindowPtr pWin, register xEvent *xE, int count,
|
||||
register WindowPtr otherParent)
|
||||
DeliverEvents(WindowPtr pWin, xEvent *xE, int count,
|
||||
WindowPtr otherParent)
|
||||
{
|
||||
Mask filter;
|
||||
int deliveries;
|
||||
|
@ -2065,7 +2065,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
|||
static WindowPtr
|
||||
XYToWindow(int x, int y)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
BoxRec box;
|
||||
|
||||
spriteTraceGood = 1; /* root window still there */
|
||||
|
@ -2255,7 +2255,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
|
|||
#endif
|
||||
|
||||
void
|
||||
DefineInitialRootWindow(register WindowPtr win)
|
||||
DefineInitialRootWindow(WindowPtr win)
|
||||
{
|
||||
DeviceIntPtr pDev = inputInfo.devices;
|
||||
|
||||
|
@ -2632,14 +2632,14 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
|
|||
static Bool
|
||||
CheckPassiveGrabsOnWindow(
|
||||
WindowPtr pWin,
|
||||
register DeviceIntPtr device,
|
||||
register xEvent *xE,
|
||||
DeviceIntPtr device,
|
||||
xEvent *xE,
|
||||
int count)
|
||||
{
|
||||
register GrabPtr grab = wPassiveGrabs(pWin);
|
||||
GrabPtr grab = wPassiveGrabs(pWin);
|
||||
GrabRec tempGrab;
|
||||
GrabInfoPtr grabinfo;
|
||||
register xEvent *dxE;
|
||||
xEvent *dxE;
|
||||
|
||||
if (!grab)
|
||||
return FALSE;
|
||||
|
@ -2737,12 +2737,12 @@ tried. PRH
|
|||
*/
|
||||
|
||||
Bool
|
||||
CheckDeviceGrabs(register DeviceIntPtr device, register xEvent *xE,
|
||||
CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE,
|
||||
int checkFirst, int count)
|
||||
{
|
||||
register int i;
|
||||
register WindowPtr pWin = NULL;
|
||||
register FocusClassPtr focus = device->focus;
|
||||
int i;
|
||||
WindowPtr pWin = NULL;
|
||||
FocusClassPtr focus = device->focus;
|
||||
|
||||
if (((xE->u.u.type == ButtonPress)
|
||||
#if defined(XINPUT) && defined(XKB)
|
||||
|
@ -2809,14 +2809,14 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count)
|
|||
}
|
||||
|
||||
void
|
||||
DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
|
||||
DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
|
||||
Bool deactivateGrab, int count)
|
||||
{
|
||||
register GrabPtr grab;
|
||||
GrabPtr grab;
|
||||
GrabInfoPtr grabinfo;
|
||||
int deliveries = 0;
|
||||
register DeviceIntPtr dev;
|
||||
register xEvent *dxE;
|
||||
DeviceIntPtr dev;
|
||||
xEvent *dxE;
|
||||
SpritePtr pSprite = thisDev->pSprite;
|
||||
|
||||
if (xE->u.u.type & EXTENSION_EVENT_BASE)
|
||||
|
@ -2906,21 +2906,20 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
|
|||
|
||||
void
|
||||
#ifdef XKB
|
||||
CoreProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count)
|
||||
CoreProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count)
|
||||
#else
|
||||
ProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int count)
|
||||
ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count)
|
||||
#endif
|
||||
{
|
||||
int key, bit;
|
||||
register BYTE *kptr;
|
||||
register int i;
|
||||
register CARD8 modifiers;
|
||||
register CARD16 mask;
|
||||
register GrabPtr grab;
|
||||
BYTE *kptr;
|
||||
int i;
|
||||
CARD8 modifiers;
|
||||
CARD16 mask;
|
||||
GrabPtr grab;
|
||||
GrabInfoPtr grabinfo;
|
||||
Bool deactivateGrab = FALSE;
|
||||
register KeyClassPtr keyc = keybd->key;
|
||||
|
||||
KeyClassPtr keyc = keybd->key;
|
||||
#ifdef XEVIE
|
||||
static Window rootWin = 0;
|
||||
|
||||
|
@ -3079,11 +3078,11 @@ drawable.id:0;
|
|||
CoreProcessKeyEvent to be called, as in for example Mouse Keys.
|
||||
*/
|
||||
void
|
||||
FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
||||
FixKeyState (xEvent *xE, DeviceIntPtr keybd)
|
||||
{
|
||||
int key, bit;
|
||||
register BYTE *kptr;
|
||||
register KeyClassPtr keyc = keybd->key;
|
||||
BYTE *kptr;
|
||||
KeyClassPtr keyc = keybd->key;
|
||||
|
||||
key = xE->u.u.detail;
|
||||
kptr = &keyc->down[key >> 3];
|
||||
|
@ -3110,14 +3109,14 @@ FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
|||
|
||||
void
|
||||
#ifdef XKB
|
||||
CoreProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count)
|
||||
CoreProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
#else
|
||||
ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count)
|
||||
ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
#endif
|
||||
{
|
||||
GrabPtr grab = mouse->coreGrab.grab;
|
||||
Bool deactivateGrab = FALSE;
|
||||
register ButtonClassPtr butc = mouse->button;
|
||||
ButtonClassPtr butc = mouse->button;
|
||||
SpritePtr pSprite = mouse->pSprite;
|
||||
|
||||
#ifdef XKB
|
||||
|
@ -3163,8 +3162,8 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
|
|||
}
|
||||
if (xE->u.u.type != MotionNotify)
|
||||
{
|
||||
register int key;
|
||||
register BYTE *kptr;
|
||||
int key;
|
||||
BYTE *kptr;
|
||||
int bit;
|
||||
|
||||
XE_KBPTR.rootX = pSprite->hot.x;
|
||||
|
@ -3225,10 +3224,10 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
|
|||
|
||||
void
|
||||
RecalculateDeliverableEvents(pWin)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register OtherClients *others;
|
||||
register WindowPtr pChild;
|
||||
OtherClients *others;
|
||||
WindowPtr pChild;
|
||||
|
||||
pChild = pWin;
|
||||
while (1)
|
||||
|
@ -3267,8 +3266,8 @@ RecalculateDeliverableEvents(pWin)
|
|||
int
|
||||
OtherClientGone(pointer value, XID id)
|
||||
{
|
||||
register OtherClientsPtr other, prev;
|
||||
register WindowPtr pWin = (WindowPtr)value;
|
||||
OtherClientsPtr other, prev;
|
||||
WindowPtr pWin = (WindowPtr)value;
|
||||
|
||||
prev = 0;
|
||||
for (other = wOtherClients(pWin); other; other = other->next)
|
||||
|
@ -3294,7 +3293,7 @@ OtherClientGone(pointer value, XID id)
|
|||
}
|
||||
|
||||
int
|
||||
EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask mask)
|
||||
EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
|
||||
{
|
||||
Mask check;
|
||||
OtherClients * others;
|
||||
|
@ -3366,10 +3365,10 @@ maskSet:
|
|||
}
|
||||
|
||||
int
|
||||
EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client,
|
||||
EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
|
||||
Mask mask, Bool *checkOptional)
|
||||
{
|
||||
register int i, free;
|
||||
int i, free;
|
||||
|
||||
if (mask & ~PropagateMask)
|
||||
{
|
||||
|
@ -3423,8 +3422,8 @@ EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client,
|
|||
|
||||
static WindowPtr
|
||||
CommonAncestor(
|
||||
register WindowPtr a,
|
||||
register WindowPtr b)
|
||||
WindowPtr a,
|
||||
WindowPtr b)
|
||||
{
|
||||
for (b = b->parent; b; b = b->parent)
|
||||
if (IsParent(b, a)) return b;
|
||||
|
@ -3437,13 +3436,13 @@ EnterLeaveEvent(
|
|||
int type,
|
||||
int mode,
|
||||
int detail,
|
||||
register WindowPtr pWin,
|
||||
WindowPtr pWin,
|
||||
Window child)
|
||||
{
|
||||
xEvent event;
|
||||
register DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
DeviceIntPtr keybd = inputInfo.keyboard;
|
||||
WindowPtr focus;
|
||||
register DeviceIntPtr mouse = pDev;
|
||||
DeviceIntPtr mouse = pDev;
|
||||
GrabPtr grab = mouse->coreGrab.grab;
|
||||
GrabPtr devgrab = mouse->deviceGrab.grab;
|
||||
Mask mask;
|
||||
|
@ -3564,7 +3563,7 @@ LeaveNotifies(DeviceIntPtr pDev,
|
|||
int mode,
|
||||
int detail)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
if (ancestor == child)
|
||||
return;
|
||||
|
@ -3613,7 +3612,7 @@ DoEnterLeaveEvents(DeviceIntPtr pDev,
|
|||
}
|
||||
|
||||
static void
|
||||
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr pWin)
|
||||
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
|
||||
{
|
||||
xEvent event;
|
||||
|
||||
|
@ -3683,7 +3682,7 @@ FocusOutEvents(
|
|||
int mode, int detail,
|
||||
Bool doAncestor)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
for (pWin = child; pWin != ancestor; pWin = pWin->parent)
|
||||
FocusEvent(dev, FocusOut, mode, detail, pWin);
|
||||
|
@ -3827,7 +3826,7 @@ SetInputFocus(
|
|||
Time ctime,
|
||||
Bool followOK)
|
||||
{
|
||||
register FocusClassPtr focus;
|
||||
FocusClassPtr focus;
|
||||
WindowPtr focusWin;
|
||||
int mode, rc;
|
||||
TimeStamp time;
|
||||
|
@ -3875,7 +3874,7 @@ SetInputFocus(
|
|||
else
|
||||
{
|
||||
int depth = 0;
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
for (pWin = focusWin; pWin; pWin = pWin->parent) depth++;
|
||||
if (depth > focus->traceSize)
|
||||
|
@ -4045,7 +4044,7 @@ int
|
|||
ProcChangeActivePointerGrab(ClientPtr client)
|
||||
{
|
||||
DeviceIntPtr device = PickPointer(client);
|
||||
register GrabPtr grab = device->coreGrab.grab;
|
||||
GrabPtr grab = device->coreGrab.grab;
|
||||
CursorPtr newCursor, oldCursor;
|
||||
REQUEST(xChangeActivePointerGrabReq);
|
||||
TimeStamp time;
|
||||
|
@ -4107,12 +4106,12 @@ ProcUngrabPointer(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
GrabDevice(register ClientPtr client, register DeviceIntPtr dev,
|
||||
GrabDevice(ClientPtr client, DeviceIntPtr dev,
|
||||
unsigned this_mode, unsigned other_mode, Window grabWindow,
|
||||
unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
register GrabPtr grab;
|
||||
GrabPtr grab;
|
||||
TimeStamp time;
|
||||
int rc;
|
||||
|
||||
|
@ -4746,7 +4745,7 @@ CheckCursorConfinement(WindowPtr pWin)
|
|||
Mask
|
||||
EventMaskForClient(WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
register OtherClientsPtr other;
|
||||
OtherClientsPtr other;
|
||||
|
||||
if (wClient (pWin) == client)
|
||||
return pWin->eventMask;
|
||||
|
|
|
@ -81,11 +81,11 @@ extern unsigned totalExtensionSize;
|
|||
static void
|
||||
InitExtensionPrivates(ExtensionEntry *ext)
|
||||
{
|
||||
register char *ptr;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
if (totalExtensionSize == sizeof(ExtensionEntry))
|
||||
ppriv = (DevUnion *)NULL;
|
||||
|
@ -115,7 +115,7 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
|||
unsigned short (*MinorOpcodeProc)(ClientPtr c3))
|
||||
{
|
||||
int i;
|
||||
register ExtensionEntry *ext, **newexts;
|
||||
ExtensionEntry *ext, **newexts;
|
||||
|
||||
if (!MainProc || !SwappedMainProc || !CloseDownProc || !MinorOpcodeProc)
|
||||
return((ExtensionEntry *) NULL);
|
||||
|
@ -282,7 +282,7 @@ MinorOpcodeOfRequest(ClientPtr client)
|
|||
void
|
||||
CloseDownExtensions()
|
||||
{
|
||||
register int i,j;
|
||||
int i,j;
|
||||
|
||||
for (i = NumExtensions - 1; i >= 0; i--)
|
||||
{
|
||||
|
@ -300,7 +300,7 @@ CloseDownExtensions()
|
|||
lastError = FirstExtensionError;
|
||||
for (i=0; i<MAXSCREENS; i++)
|
||||
{
|
||||
register ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
||||
ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
|
||||
|
||||
while (spentry->num)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ ProcListExtensions(ClientPtr client)
|
|||
|
||||
if ( NumExtensions )
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
for (i=0; i<NumExtensions; i++)
|
||||
{
|
||||
|
@ -410,8 +410,8 @@ ProcListExtensions(ClientPtr client)
|
|||
ExtensionLookupProc
|
||||
LookupProc(char *name, GCPtr pGC)
|
||||
{
|
||||
register int i;
|
||||
register ScreenProcEntry *spentry;
|
||||
int i;
|
||||
ScreenProcEntry *spentry;
|
||||
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
|
||||
if (spentry->num)
|
||||
{
|
||||
|
@ -431,8 +431,8 @@ RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc)
|
|||
Bool
|
||||
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
|
||||
{
|
||||
register ScreenProcEntry *spentry;
|
||||
register ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
||||
ScreenProcEntry *spentry;
|
||||
ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
|
||||
char *newname;
|
||||
int i;
|
||||
|
||||
|
|
68
dix/gc.c
68
dix/gc.c
|
@ -144,12 +144,12 @@ ValidateGC(DrawablePtr pDraw, GC *pGC)
|
|||
assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; }
|
||||
|
||||
_X_EXPORT int
|
||||
dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
|
||||
dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion)
|
||||
{
|
||||
register BITS32 index2;
|
||||
register int error = 0;
|
||||
PixmapPtr pPixmap;
|
||||
BITS32 maskQ;
|
||||
BITS32 index2;
|
||||
int error = 0;
|
||||
PixmapPtr pPixmap;
|
||||
BITS32 maskQ;
|
||||
|
||||
assert( (pC32 && !pUnion) || (!pC32 && pUnion) );
|
||||
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
|
||||
|
@ -522,7 +522,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
|
|||
/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells
|
||||
* it that all of the entries are constants or IDs */
|
||||
_X_EXPORT int
|
||||
ChangeGC(register GC *pGC, register BITS32 mask, XID *pval)
|
||||
ChangeGC(GC *pGC, BITS32 mask, XID *pval)
|
||||
{
|
||||
return (dixChangeGC(NullClient, pGC, mask, pval, NULL));
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ NOTE:
|
|||
32 bits long
|
||||
*/
|
||||
_X_EXPORT int
|
||||
DoChangeGC(register GC *pGC, register BITS32 mask, XID *pval, int fPointer)
|
||||
DoChangeGC(GC *pGC, BITS32 mask, XID *pval, int fPointer)
|
||||
{
|
||||
if (fPointer)
|
||||
/* XXX might be a problem on 64 bit big-endian servers */
|
||||
|
@ -572,11 +572,11 @@ static GCPtr
|
|||
AllocateGC(ScreenPtr pScreen)
|
||||
{
|
||||
GCPtr pGC;
|
||||
register char *ptr;
|
||||
register DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
pGC = (GCPtr)xalloc(pScreen->totalGCSize);
|
||||
if (pGC)
|
||||
|
@ -602,7 +602,7 @@ AllocateGC(ScreenPtr pScreen)
|
|||
_X_EXPORT GCPtr
|
||||
CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus)
|
||||
{
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
|
||||
pGC = AllocateGC(pDrawable->pScreen);
|
||||
if (!pGC)
|
||||
|
@ -724,11 +724,11 @@ CreateDefaultTile (GCPtr pGC)
|
|||
}
|
||||
|
||||
_X_EXPORT int
|
||||
CopyGC(register GC *pgcSrc, register GC *pgcDst, register BITS32 mask)
|
||||
CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask)
|
||||
{
|
||||
register BITS32 index2;
|
||||
BITS32 maskQ;
|
||||
int error = 0;
|
||||
BITS32 index2;
|
||||
BITS32 maskQ;
|
||||
int error = 0;
|
||||
|
||||
if (pgcSrc == pgcDst)
|
||||
return Success;
|
||||
|
@ -934,7 +934,7 @@ go with CreateGC() or ChangeGC().)
|
|||
_X_EXPORT GCPtr
|
||||
CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
||||
{
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
|
||||
pGC = AllocateGC(pScreen);
|
||||
if (!pGC)
|
||||
|
@ -986,8 +986,8 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
|
|||
void
|
||||
FreeGCperDepth(int screenNum)
|
||||
{
|
||||
register int i;
|
||||
register ScreenPtr pScreen;
|
||||
int i;
|
||||
ScreenPtr pScreen;
|
||||
GCPtr *ppGC;
|
||||
|
||||
pScreen = screenInfo.screens[screenNum];
|
||||
|
@ -1002,8 +1002,8 @@ FreeGCperDepth(int screenNum)
|
|||
Bool
|
||||
CreateGCperDepth(int screenNum)
|
||||
{
|
||||
register int i;
|
||||
register ScreenPtr pScreen;
|
||||
int i;
|
||||
ScreenPtr pScreen;
|
||||
DepthPtr pDepth;
|
||||
GCPtr *ppGC;
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ CreateGCperDepth(int screenNum)
|
|||
Bool
|
||||
CreateDefaultStipple(int screenNum)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
XID tmpval[3];
|
||||
xRectangle rect;
|
||||
CARD16 w, h;
|
||||
|
@ -1077,10 +1077,10 @@ FreeDefaultStipple(int screenNum)
|
|||
}
|
||||
|
||||
_X_EXPORT int
|
||||
SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
|
||||
SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
|
||||
{
|
||||
register long i;
|
||||
register unsigned char *p, *indash;
|
||||
long i;
|
||||
unsigned char *p, *indash;
|
||||
BITS32 maskQ = 0;
|
||||
|
||||
i = ndash;
|
||||
|
@ -1135,8 +1135,8 @@ SetDashes(register GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pd
|
|||
_X_EXPORT int
|
||||
VerifyRectOrder(int nrects, xRectangle *prects, int ordering)
|
||||
{
|
||||
register xRectangle *prectP, *prectN;
|
||||
register int i;
|
||||
xRectangle *prectP, *prectN;
|
||||
int i;
|
||||
|
||||
switch(ordering)
|
||||
{
|
||||
|
@ -1220,10 +1220,10 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
|
|||
you use it often enough it will become real.)
|
||||
*/
|
||||
_X_EXPORT GCPtr
|
||||
GetScratchGC(register unsigned depth, register ScreenPtr pScreen)
|
||||
GetScratchGC(unsigned depth, ScreenPtr pScreen)
|
||||
{
|
||||
register int i;
|
||||
register GCPtr pGC;
|
||||
int i;
|
||||
GCPtr pGC;
|
||||
|
||||
for (i=0; i<=pScreen->numDepths; i++)
|
||||
if ( pScreen->GCperDepth[i]->depth == depth &&
|
||||
|
@ -1269,10 +1269,10 @@ mark it as available.
|
|||
if not, free it for real
|
||||
*/
|
||||
_X_EXPORT void
|
||||
FreeScratchGC(register GCPtr pGC)
|
||||
FreeScratchGC(GCPtr pGC)
|
||||
{
|
||||
register ScreenPtr pScreen = pGC->pScreen;
|
||||
register int i;
|
||||
ScreenPtr pScreen = pGC->pScreen;
|
||||
int i;
|
||||
|
||||
for (i=0; i<=pScreen->numDepths; i++)
|
||||
{
|
||||
|
|
|
@ -74,10 +74,10 @@ cursor metrics.
|
|||
*/
|
||||
|
||||
int
|
||||
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, unsigned char **ppbits)
|
||||
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned char **ppbits)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
register GCPtr pGC;
|
||||
ScreenPtr pScreen;
|
||||
GCPtr pGC;
|
||||
xRectangle rect;
|
||||
PixmapPtr ppix;
|
||||
long nby;
|
||||
|
@ -140,7 +140,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
|
|||
|
||||
|
||||
Bool
|
||||
CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
|
||||
CursorMetricsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm)
|
||||
{
|
||||
CharInfoPtr pci;
|
||||
unsigned long nglyphs;
|
||||
|
|
|
@ -128,7 +128,7 @@ FreeGrab(GrabPtr pGrab)
|
|||
int
|
||||
DeletePassiveGrab(pointer value, XID id)
|
||||
{
|
||||
register GrabPtr g, prev;
|
||||
GrabPtr g, prev;
|
||||
GrabPtr pGrab = (GrabPtr)value;
|
||||
|
||||
/* it is OK if the grab isn't found */
|
||||
|
@ -153,8 +153,8 @@ DeletePassiveGrab(pointer value, XID id)
|
|||
static Mask *
|
||||
DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
|
||||
{
|
||||
register Mask *mask;
|
||||
register int i;
|
||||
Mask *mask;
|
||||
int i;
|
||||
|
||||
mask = (Mask *)xalloc(sizeof(Mask) * MasksPerDetailMask);
|
||||
if (mask)
|
||||
|
@ -305,7 +305,7 @@ AddPassiveGrabToList(GrabPtr pGrab)
|
|||
Bool
|
||||
DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
|
||||
{
|
||||
register GrabPtr grab;
|
||||
GrabPtr grab;
|
||||
GrabPtr *deletes, *adds;
|
||||
Mask ***updates, **details;
|
||||
int i, ndels, nadds, nups;
|
||||
|
|
|
@ -361,9 +361,7 @@ main(int argc, char *argv[], char *envp[])
|
|||
ResetScreenPrivates();
|
||||
ResetWindowPrivates();
|
||||
ResetGCPrivates();
|
||||
#ifdef PIXPRIV
|
||||
ResetPixmapPrivates();
|
||||
#endif
|
||||
ResetColormapPrivates();
|
||||
ResetFontPrivateIndex();
|
||||
ResetDevicePrivateIndex();
|
||||
|
@ -731,11 +729,9 @@ AddScreen(
|
|||
pScreen->GCPrivateSizes = (unsigned *)NULL;
|
||||
pScreen->totalGCSize =
|
||||
((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long);
|
||||
#ifdef PIXPRIV
|
||||
pScreen->PixmapPrivateLen = 0;
|
||||
pScreen->PixmapPrivateSizes = (unsigned *)NULL;
|
||||
pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8);
|
||||
#endif
|
||||
pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
|
||||
pScreen->CreateScreenResources = 0;
|
||||
|
||||
|
@ -799,9 +795,7 @@ FreeScreen(ScreenPtr pScreen)
|
|||
{
|
||||
xfree(pScreen->WindowPrivateSizes);
|
||||
xfree(pScreen->GCPrivateSizes);
|
||||
#ifdef PIXPRIV
|
||||
xfree(pScreen->PixmapPrivateSizes);
|
||||
#endif
|
||||
xfree(pScreen->devPrivates);
|
||||
xfree(pScreen);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@ _X_EXPORT PixmapPtr
|
|||
AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
||||
{
|
||||
PixmapPtr pPixmap;
|
||||
#ifdef PIXPRIV
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
unsigned *sizes;
|
||||
|
@ -136,9 +135,6 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
|||
else
|
||||
ppriv->ptr = (pointer)NULL;
|
||||
}
|
||||
#else
|
||||
pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + pixDataSize);
|
||||
#endif
|
||||
|
||||
#ifdef _XSERVER64
|
||||
if (pPixmap) {
|
||||
|
|
|
@ -225,7 +225,7 @@ AllocateWindowPrivateIndex()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||
AllocateWindowPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
|
@ -275,7 +275,7 @@ AllocateGCPrivateIndex()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||
AllocateGCPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
|
@ -309,7 +309,6 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
|||
/*
|
||||
* pixmap private machinery
|
||||
*/
|
||||
#ifdef PIXPRIV
|
||||
static int pixmapPrivateCount;
|
||||
|
||||
void
|
||||
|
@ -325,7 +324,7 @@ AllocatePixmapPrivateIndex()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
||||
AllocatePixmapPrivate(ScreenPtr pScreen, int index2, unsigned amount)
|
||||
{
|
||||
unsigned oldamount;
|
||||
|
||||
|
@ -355,7 +354,6 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount)
|
|||
pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -76,7 +76,7 @@ static void
|
|||
PrintPropertys(WindowPtr pWin)
|
||||
{
|
||||
PropertyPtr pProp;
|
||||
register int j;
|
||||
int j;
|
||||
|
||||
pProp = pWin->userProps;
|
||||
while (pProp)
|
||||
|
@ -97,7 +97,7 @@ ProcRotateProperties(ClientPtr client)
|
|||
int i, j, delta, rc;
|
||||
REQUEST(xRotatePropertiesReq);
|
||||
WindowPtr pWin;
|
||||
register Atom * atoms;
|
||||
Atom * atoms;
|
||||
PropertyPtr * props; /* array of pointer */
|
||||
PropertyPtr pProp;
|
||||
xEvent event;
|
||||
|
@ -622,7 +622,7 @@ ProcListProperties(ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
ProcDeleteProperty(register ClientPtr client)
|
||||
ProcDeleteProperty(ClientPtr client)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
REQUEST(xDeletePropertyReq);
|
||||
|
|
|
@ -257,7 +257,7 @@ ClientResourceRec clientTable[MAXCLIENTS];
|
|||
Bool
|
||||
InitClientResources(ClientPtr client)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
|
||||
if (client == serverClient)
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ InitClientResources(ClientPtr client)
|
|||
|
||||
|
||||
static int
|
||||
Hash(int client, register XID id)
|
||||
Hash(int client, XID id)
|
||||
{
|
||||
id &= RESOURCE_ID_MASK;
|
||||
switch (clientTable[client].hashsize)
|
||||
|
@ -337,12 +337,12 @@ Hash(int client, register XID id)
|
|||
|
||||
static XID
|
||||
AvailableID(
|
||||
register int client,
|
||||
register XID id,
|
||||
register XID maxid,
|
||||
register XID goodid)
|
||||
int client,
|
||||
XID id,
|
||||
XID maxid,
|
||||
XID goodid)
|
||||
{
|
||||
register ResourcePtr res;
|
||||
ResourcePtr res;
|
||||
|
||||
if ((goodid >= id) && (goodid <= maxid))
|
||||
return goodid;
|
||||
|
@ -360,10 +360,10 @@ AvailableID(
|
|||
_X_EXPORT void
|
||||
GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
|
||||
{
|
||||
register XID id, maxid;
|
||||
register ResourcePtr *resp;
|
||||
register ResourcePtr res;
|
||||
register int i;
|
||||
XID id, maxid;
|
||||
ResourcePtr *resp;
|
||||
ResourcePtr res;
|
||||
int i;
|
||||
XID goodid;
|
||||
|
||||
id = (Mask)client << CLIENTOFFSET;
|
||||
|
@ -436,7 +436,7 @@ GetXIDList(ClientPtr pClient, unsigned count, XID *pids)
|
|||
*/
|
||||
|
||||
_X_EXPORT XID
|
||||
FakeClientID(register int client)
|
||||
FakeClientID(int client)
|
||||
{
|
||||
XID id, maxid;
|
||||
|
||||
|
@ -460,8 +460,8 @@ _X_EXPORT Bool
|
|||
AddResource(XID id, RESTYPE type, pointer value)
|
||||
{
|
||||
int client;
|
||||
register ClientResourceRec *rrec;
|
||||
register ResourcePtr res, *head;
|
||||
ClientResourceRec *rrec;
|
||||
ResourcePtr res, *head;
|
||||
|
||||
#ifdef XSERVER_DTRACE
|
||||
XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type));
|
||||
|
@ -498,10 +498,10 @@ AddResource(XID id, RESTYPE type, pointer value)
|
|||
static void
|
||||
RebuildTable(int client)
|
||||
{
|
||||
register int j;
|
||||
register ResourcePtr res, next;
|
||||
int j;
|
||||
ResourcePtr res, next;
|
||||
ResourcePtr **tails, *resources;
|
||||
register ResourcePtr **tptr, *rptr;
|
||||
ResourcePtr **tptr, *rptr;
|
||||
|
||||
/*
|
||||
* For now, preserve insertion order, since some ddx layers depend
|
||||
|
@ -548,9 +548,9 @@ _X_EXPORT void
|
|||
FreeResource(XID id, RESTYPE skipDeleteFuncType)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
register ResourcePtr *prev, *head;
|
||||
register int *eltptr;
|
||||
ResourcePtr res;
|
||||
ResourcePtr *prev, *head;
|
||||
int *eltptr;
|
||||
int elements;
|
||||
Bool gotOne = FALSE;
|
||||
|
||||
|
@ -600,8 +600,8 @@ _X_EXPORT void
|
|||
FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
register ResourcePtr *prev, *head;
|
||||
ResourcePtr res;
|
||||
ResourcePtr *prev, *head;
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
||||
{
|
||||
head = &clientTable[cid].resources[Hash(cid, id)];
|
||||
|
@ -644,7 +644,7 @@ _X_EXPORT Bool
|
|||
ChangeResourceValue (XID id, RESTYPE rtype, pointer value)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
ResourcePtr res;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets)
|
||||
{
|
||||
|
@ -675,10 +675,10 @@ FindClientResourcesByType(
|
|||
FindResType func,
|
||||
pointer cdata
|
||||
){
|
||||
register ResourcePtr *resources;
|
||||
register ResourcePtr this, next;
|
||||
ResourcePtr *resources;
|
||||
ResourcePtr this, next;
|
||||
int i, elements;
|
||||
register int *eltptr;
|
||||
int *eltptr;
|
||||
|
||||
if (!client)
|
||||
client = serverClient;
|
||||
|
@ -706,10 +706,10 @@ FindAllClientResources(
|
|||
FindAllRes func,
|
||||
pointer cdata
|
||||
){
|
||||
register ResourcePtr *resources;
|
||||
register ResourcePtr this, next;
|
||||
ResourcePtr *resources;
|
||||
ResourcePtr this, next;
|
||||
int i, elements;
|
||||
register int *eltptr;
|
||||
int *eltptr;
|
||||
|
||||
if (!client)
|
||||
client = serverClient;
|
||||
|
@ -796,8 +796,8 @@ FreeClientNeverRetainResources(ClientPtr client)
|
|||
void
|
||||
FreeClientResources(ClientPtr client)
|
||||
{
|
||||
register ResourcePtr *resources;
|
||||
register ResourcePtr this;
|
||||
ResourcePtr *resources;
|
||||
ResourcePtr this;
|
||||
int j;
|
||||
|
||||
/* This routine shouldn't be called with a null client, but just in
|
||||
|
@ -856,7 +856,7 @@ FreeAllResources()
|
|||
}
|
||||
|
||||
_X_EXPORT Bool
|
||||
LegalNewID(XID id, register ClientPtr client)
|
||||
LegalNewID(XID id, ClientPtr client)
|
||||
{
|
||||
|
||||
#ifdef PANORAMIX
|
||||
|
@ -887,7 +887,7 @@ _X_EXPORT pointer
|
|||
SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res;
|
||||
ResourcePtr res;
|
||||
pointer retval = NULL;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
|
@ -914,7 +914,7 @@ _X_EXPORT pointer
|
|||
SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
|
||||
{
|
||||
int cid;
|
||||
register ResourcePtr res = NULL;
|
||||
ResourcePtr res = NULL;
|
||||
pointer retval = NULL;
|
||||
|
||||
if (((cid = CLIENT_ID(id)) < MAXCLIENTS) &&
|
||||
|
|
|
@ -73,10 +73,10 @@ static void SwapFont(xQueryFontReply *pr, Bool hasGlyphs);
|
|||
* \param size size in bytes
|
||||
*/
|
||||
_X_EXPORT void
|
||||
Swap32Write(ClientPtr pClient, int size, register CARD32 *pbuf)
|
||||
Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||
{
|
||||
register int i;
|
||||
register char n;
|
||||
int i;
|
||||
char n;
|
||||
|
||||
size >>= 2;
|
||||
for(i = 0; i < size; i++)
|
||||
|
@ -97,7 +97,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
|||
{
|
||||
int bufsize = size;
|
||||
CARD32 *pbufT;
|
||||
register CARD32 *from, *to, *fromLast, *toLast;
|
||||
CARD32 *from, *to, *fromLast, *toLast;
|
||||
CARD32 tmpbuf[1];
|
||||
|
||||
/* Allocate as big a buffer as we can... */
|
||||
|
@ -145,7 +145,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
|||
{
|
||||
int bufsize = size;
|
||||
short *pbufT;
|
||||
register short *from, *to, *fromLast, *toLast;
|
||||
short *from, *to, *fromLast, *toLast;
|
||||
short tmpbuf[2];
|
||||
|
||||
/* Allocate as big a buffer as we can... */
|
||||
|
@ -189,7 +189,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
|||
void
|
||||
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||
|
@ -200,7 +200,7 @@ void
|
|||
SGetWindowAttributesReply(ClientPtr pClient, int size,
|
||||
xGetWindowAttributesReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -218,7 +218,7 @@ SGetWindowAttributesReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->root, n);
|
||||
|
@ -233,7 +233,7 @@ SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
|||
void
|
||||
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -246,7 +246,7 @@ SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
|||
void
|
||||
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->atom, n);
|
||||
|
@ -256,7 +256,7 @@ SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
|||
void
|
||||
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -268,7 +268,7 @@ SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
|||
void
|
||||
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -281,7 +281,7 @@ SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
|||
void
|
||||
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -293,7 +293,7 @@ void
|
|||
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||
xGetSelectionOwnerReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->owner, n);
|
||||
|
@ -304,7 +304,7 @@ SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->root, n);
|
||||
|
@ -320,7 +320,7 @@ SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
|||
void
|
||||
SwapTimecoord(xTimecoord* pCoord)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swapl(&pCoord->time, n);
|
||||
swaps(&pCoord->x, n);
|
||||
|
@ -346,7 +346,7 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep)
|
|||
void
|
||||
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -357,7 +357,7 @@ SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
|||
void
|
||||
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->child, n);
|
||||
|
@ -369,7 +369,7 @@ STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
|||
void
|
||||
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->focus, n);
|
||||
|
@ -380,7 +380,7 @@ SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
|||
void
|
||||
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -390,7 +390,7 @@ SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
|||
static void
|
||||
SwapCharInfo(xCharInfo *pInfo)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pInfo->leftSideBearing, n);
|
||||
swaps(&pInfo->rightSideBearing, n);
|
||||
|
@ -403,7 +403,7 @@ SwapCharInfo(xCharInfo *pInfo)
|
|||
static void
|
||||
SwapFontInfo(xQueryFontReply *pr)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pr->minCharOrByte2, n);
|
||||
swaps(&pr->maxCharOrByte2, n);
|
||||
|
@ -423,7 +423,7 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
|
|||
xCharInfo * pxci;
|
||||
unsigned nchars, nprops;
|
||||
char *pby;
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pr->sequenceNumber, n);
|
||||
swapl(&pr->length, n);
|
||||
|
@ -458,7 +458,7 @@ SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep)
|
|||
void
|
||||
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->fontAscent, n);
|
||||
|
@ -474,7 +474,7 @@ SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep
|
|||
void
|
||||
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -493,7 +493,7 @@ SListFontsWithInfoReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -504,7 +504,7 @@ SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
|||
void
|
||||
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -517,7 +517,7 @@ void
|
|||
SListInstalledColormapsReply(ClientPtr pClient, int size,
|
||||
xListInstalledColormapsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -531,7 +531,7 @@ SAllocColorReply(pClient, size, pRep)
|
|||
int size;
|
||||
xAllocColorReply *pRep;
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->red, n);
|
||||
|
@ -544,7 +544,7 @@ SAllocColorReply(pClient, size, pRep)
|
|||
void
|
||||
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->pixel, n);
|
||||
|
@ -560,7 +560,7 @@ SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
|||
void
|
||||
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -573,7 +573,7 @@ SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
|||
void
|
||||
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -587,7 +587,7 @@ SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep
|
|||
void
|
||||
SwapRGB(xrgb *prgb)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&prgb->red, n);
|
||||
swaps(&prgb->green, n);
|
||||
|
@ -613,7 +613,7 @@ SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb)
|
|||
void
|
||||
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -624,7 +624,7 @@ SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
|||
void
|
||||
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->exactRed, n);
|
||||
|
@ -639,7 +639,7 @@ SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
|||
void
|
||||
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->width, n);
|
||||
|
@ -650,7 +650,7 @@ SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
|||
void
|
||||
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -661,7 +661,7 @@ void
|
|||
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
||||
xGetKeyboardMappingReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -672,7 +672,7 @@ void
|
|||
SGetPointerMappingReply(ClientPtr pClient, int size,
|
||||
xGetPointerMappingReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -683,7 +683,7 @@ void
|
|||
SGetModifierMappingReply(ClientPtr pClient, int size,
|
||||
xGetModifierMappingReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -693,7 +693,7 @@ SGetModifierMappingReply(ClientPtr pClient, int size,
|
|||
void
|
||||
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
@ -706,7 +706,7 @@ SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *
|
|||
void
|
||||
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->accelNumerator, n);
|
||||
|
@ -718,7 +718,7 @@ SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pR
|
|||
void
|
||||
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swaps(&pRep->timeout, n);
|
||||
|
@ -734,7 +734,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
|||
while (bufT < endbuf) {
|
||||
xHostEntry *host = (xHostEntry *) bufT;
|
||||
int len = host->length;
|
||||
register char n;
|
||||
char n;
|
||||
swaps (&host->length, n);
|
||||
bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2);
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
|||
void
|
||||
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pRep->sequenceNumber, n);
|
||||
swapl(&pRep->length, n);
|
||||
|
|
276
dix/swapreq.c
276
dix/swapreq.c
|
@ -63,9 +63,9 @@ SOFTWARE.
|
|||
|
||||
/* Byte swap a list of longs */
|
||||
_X_EXPORT void
|
||||
SwapLongs (register CARD32 *list, register unsigned long count)
|
||||
SwapLongs (CARD32 *list, unsigned long count)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
while (count >= 8) {
|
||||
swapl(list+0, n);
|
||||
|
@ -89,9 +89,9 @@ SwapLongs (register CARD32 *list, register unsigned long count)
|
|||
|
||||
/* Byte swap a list of shorts */
|
||||
_X_EXPORT void
|
||||
SwapShorts (register short *list, register unsigned long count)
|
||||
SwapShorts (short *list, unsigned long count)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
while (count >= 16) {
|
||||
swaps(list+0, n);
|
||||
|
@ -124,9 +124,9 @@ SwapShorts (register short *list, register unsigned long count)
|
|||
/* The following is used for all requests that have
|
||||
no fields to be swapped (except "length") */
|
||||
int
|
||||
SProcSimpleReq(register ClientPtr client)
|
||||
SProcSimpleReq(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -137,9 +137,9 @@ SProcSimpleReq(register ClientPtr client)
|
|||
only a single 32-bit field to be swapped, coming
|
||||
right after the "length" field */
|
||||
int
|
||||
SProcResourceReq(register ClientPtr client)
|
||||
SProcResourceReq(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xResourceReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -149,9 +149,9 @@ SProcResourceReq(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateWindow(register ClientPtr client)
|
||||
SProcCreateWindow(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xCreateWindowReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -171,9 +171,9 @@ SProcCreateWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeWindowAttributes(register ClientPtr client)
|
||||
SProcChangeWindowAttributes(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xChangeWindowAttributesReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -185,9 +185,9 @@ SProcChangeWindowAttributes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcReparentWindow(register ClientPtr client)
|
||||
SProcReparentWindow(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xReparentWindowReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xReparentWindowReq);
|
||||
|
@ -199,9 +199,9 @@ SProcReparentWindow(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcConfigureWindow(register ClientPtr client)
|
||||
SProcConfigureWindow(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xConfigureWindowReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
|
||||
|
@ -214,9 +214,9 @@ SProcConfigureWindow(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcInternAtom(register ClientPtr client)
|
||||
SProcInternAtom(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xInternAtomReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xInternAtomReq);
|
||||
|
@ -225,9 +225,9 @@ SProcInternAtom(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeProperty(register ClientPtr client)
|
||||
SProcChangeProperty(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangePropertyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangePropertyReq);
|
||||
|
@ -249,9 +249,9 @@ SProcChangeProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcDeleteProperty(register ClientPtr client)
|
||||
SProcDeleteProperty(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xDeletePropertyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xDeletePropertyReq);
|
||||
|
@ -262,9 +262,9 @@ SProcDeleteProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGetProperty(register ClientPtr client)
|
||||
SProcGetProperty(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGetPropertyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGetPropertyReq);
|
||||
|
@ -277,9 +277,9 @@ SProcGetProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetSelectionOwner(register ClientPtr client)
|
||||
SProcSetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetSelectionOwnerReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
|
||||
|
@ -290,9 +290,9 @@ SProcSetSelectionOwner(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcConvertSelection(register ClientPtr client)
|
||||
SProcConvertSelection(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xConvertSelectionReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xConvertSelectionReq);
|
||||
|
@ -305,9 +305,9 @@ SProcConvertSelection(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSendEvent(register ClientPtr client)
|
||||
SProcSendEvent(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
xEvent eventT;
|
||||
EventSwapPtr proc;
|
||||
REQUEST(xSendEventReq);
|
||||
|
@ -327,9 +327,9 @@ SProcSendEvent(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabPointer(register ClientPtr client)
|
||||
SProcGrabPointer(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabPointerReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabPointerReq);
|
||||
|
@ -342,9 +342,9 @@ SProcGrabPointer(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabButton(register ClientPtr client)
|
||||
SProcGrabButton(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabButtonReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabButtonReq);
|
||||
|
@ -357,9 +357,9 @@ SProcGrabButton(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcUngrabButton(register ClientPtr client)
|
||||
SProcUngrabButton(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xUngrabButtonReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xUngrabButtonReq);
|
||||
|
@ -369,9 +369,9 @@ SProcUngrabButton(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeActivePointerGrab(register ClientPtr client)
|
||||
SProcChangeActivePointerGrab(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeActivePointerGrabReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
|
||||
|
@ -382,9 +382,9 @@ SProcChangeActivePointerGrab(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabKeyboard(register ClientPtr client)
|
||||
SProcGrabKeyboard(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabKeyboardReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
|
||||
|
@ -394,9 +394,9 @@ SProcGrabKeyboard(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGrabKey(register ClientPtr client)
|
||||
SProcGrabKey(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGrabKeyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGrabKeyReq);
|
||||
|
@ -406,9 +406,9 @@ SProcGrabKey(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcUngrabKey(register ClientPtr client)
|
||||
SProcUngrabKey(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xUngrabKeyReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xUngrabKeyReq);
|
||||
|
@ -418,9 +418,9 @@ SProcUngrabKey(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGetMotionEvents(register ClientPtr client)
|
||||
SProcGetMotionEvents(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGetMotionEventsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGetMotionEventsReq);
|
||||
|
@ -431,9 +431,9 @@ SProcGetMotionEvents(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcTranslateCoords(register ClientPtr client)
|
||||
SProcTranslateCoords(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xTranslateCoordsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
|
||||
|
@ -445,9 +445,9 @@ SProcTranslateCoords(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcWarpPointer(register ClientPtr client)
|
||||
SProcWarpPointer(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xWarpPointerReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xWarpPointerReq);
|
||||
|
@ -463,9 +463,9 @@ SProcWarpPointer(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetInputFocus(register ClientPtr client)
|
||||
SProcSetInputFocus(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetInputFocusReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xSetInputFocusReq);
|
||||
|
@ -475,9 +475,9 @@ SProcSetInputFocus(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcOpenFont(register ClientPtr client)
|
||||
SProcOpenFont(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xOpenFontReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xOpenFontReq);
|
||||
|
@ -487,9 +487,9 @@ SProcOpenFont(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcListFonts(register ClientPtr client)
|
||||
SProcListFonts(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xListFontsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xListFontsReq);
|
||||
|
@ -499,9 +499,9 @@ SProcListFonts(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcListFontsWithInfo(register ClientPtr client)
|
||||
SProcListFontsWithInfo(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xListFontsWithInfoReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq);
|
||||
|
@ -511,9 +511,9 @@ SProcListFontsWithInfo(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetFontPath(register ClientPtr client)
|
||||
SProcSetFontPath(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetFontPathReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
|
||||
|
@ -522,9 +522,9 @@ SProcSetFontPath(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreatePixmap(register ClientPtr client)
|
||||
SProcCreatePixmap(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreatePixmapReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -537,9 +537,9 @@ SProcCreatePixmap(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateGC(register ClientPtr client)
|
||||
SProcCreateGC(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateGCReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
|
||||
|
@ -551,9 +551,9 @@ SProcCreateGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeGC(register ClientPtr client)
|
||||
SProcChangeGC(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeGCReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
|
||||
|
@ -564,9 +564,9 @@ SProcChangeGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCopyGC(register ClientPtr client)
|
||||
SProcCopyGC(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyGCReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyGCReq);
|
||||
|
@ -577,9 +577,9 @@ SProcCopyGC(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetDashes(register ClientPtr client)
|
||||
SProcSetDashes(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetDashesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xSetDashesReq);
|
||||
|
@ -591,9 +591,9 @@ SProcSetDashes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcSetClipRectangles(register ClientPtr client)
|
||||
SProcSetClipRectangles(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetClipRectanglesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
|
||||
|
@ -605,9 +605,9 @@ SProcSetClipRectangles(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcClearToBackground(register ClientPtr client)
|
||||
SProcClearToBackground(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xClearAreaReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xClearAreaReq);
|
||||
|
@ -620,9 +620,9 @@ SProcClearToBackground(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCopyArea(register ClientPtr client)
|
||||
SProcCopyArea(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyAreaReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyAreaReq);
|
||||
|
@ -639,9 +639,9 @@ SProcCopyArea(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCopyPlane(register ClientPtr client)
|
||||
SProcCopyPlane(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyPlaneReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyPlaneReq);
|
||||
|
@ -661,9 +661,9 @@ SProcCopyPlane(register ClientPtr client)
|
|||
/* The following routine is used for all Poly drawing requests
|
||||
(except FillPoly, which uses a different request format) */
|
||||
int
|
||||
SProcPoly(register ClientPtr client)
|
||||
SProcPoly(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xPolyPointReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -678,9 +678,9 @@ SProcPoly(register ClientPtr client)
|
|||
is longer than xPolyPointReq, and we don't want to swap
|
||||
the difference as shorts! */
|
||||
int
|
||||
SProcFillPoly(register ClientPtr client)
|
||||
SProcFillPoly(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xFillPolyReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -692,9 +692,9 @@ SProcFillPoly(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcPutImage(register ClientPtr client)
|
||||
SProcPutImage(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xPutImageReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xPutImageReq);
|
||||
|
@ -710,9 +710,9 @@ SProcPutImage(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcGetImage(register ClientPtr client)
|
||||
SProcGetImage(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xGetImageReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xGetImageReq);
|
||||
|
@ -728,9 +728,9 @@ SProcGetImage(register ClientPtr client)
|
|||
/* ProcPolyText used for both PolyText8 and PolyText16 */
|
||||
|
||||
int
|
||||
SProcPolyText(register ClientPtr client)
|
||||
SProcPolyText(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xPolyTextReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
||||
|
@ -744,9 +744,9 @@ SProcPolyText(register ClientPtr client)
|
|||
/* ProcImageText used for both ImageText8 and ImageText16 */
|
||||
|
||||
int
|
||||
SProcImageText(register ClientPtr client)
|
||||
SProcImageText(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xImageTextReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xImageTextReq);
|
||||
|
@ -758,9 +758,9 @@ SProcImageText(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateColormap(register ClientPtr client)
|
||||
SProcCreateColormap(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateColormapReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCreateColormapReq);
|
||||
|
@ -772,9 +772,9 @@ SProcCreateColormap(register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcCopyColormapAndFree(register ClientPtr client)
|
||||
SProcCopyColormapAndFree(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCopyColormapAndFreeReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
|
||||
|
@ -785,9 +785,9 @@ SProcCopyColormapAndFree(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocColor(register ClientPtr client)
|
||||
SProcAllocColor(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xAllocColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xAllocColorReq);
|
||||
|
@ -799,9 +799,9 @@ SProcAllocColor(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocNamedColor(register ClientPtr client)
|
||||
SProcAllocNamedColor(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xAllocNamedColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -812,9 +812,9 @@ SProcAllocNamedColor(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocColorCells(register ClientPtr client)
|
||||
SProcAllocColorCells(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xAllocColorCellsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
|
||||
|
@ -825,9 +825,9 @@ SProcAllocColorCells(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcAllocColorPlanes(register ClientPtr client)
|
||||
SProcAllocColorPlanes(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xAllocColorPlanesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
|
||||
|
@ -840,9 +840,9 @@ SProcAllocColorPlanes(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcFreeColors(register ClientPtr client)
|
||||
SProcFreeColors(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xFreeColorsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
|
||||
|
@ -856,7 +856,7 @@ SProcFreeColors(register ClientPtr client)
|
|||
_X_EXPORT void
|
||||
SwapColorItem(xColorItem *pItem)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swapl(&pItem->pixel, n);
|
||||
swaps(&pItem->red, n);
|
||||
|
@ -865,9 +865,9 @@ SwapColorItem(xColorItem *pItem)
|
|||
}
|
||||
|
||||
int
|
||||
SProcStoreColors(register ClientPtr client)
|
||||
SProcStoreColors(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
long count;
|
||||
xColorItem *pItem;
|
||||
|
||||
|
@ -882,9 +882,9 @@ SProcStoreColors(register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcStoreNamedColor (register ClientPtr client)
|
||||
SProcStoreNamedColor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xStoreNamedColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq);
|
||||
|
@ -895,9 +895,9 @@ SProcStoreNamedColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcQueryColors (register ClientPtr client)
|
||||
SProcQueryColors (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xQueryColorsReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
|
||||
|
@ -907,9 +907,9 @@ SProcQueryColors (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcLookupColor (register ClientPtr client)
|
||||
SProcLookupColor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xLookupColorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xLookupColorReq);
|
||||
|
@ -919,9 +919,9 @@ SProcLookupColor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateCursor (register ClientPtr client)
|
||||
SProcCreateCursor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateCursorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCreateCursorReq);
|
||||
|
@ -940,9 +940,9 @@ SProcCreateCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcCreateGlyphCursor (register ClientPtr client)
|
||||
SProcCreateGlyphCursor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xCreateGlyphCursorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
|
||||
|
@ -962,9 +962,9 @@ SProcCreateGlyphCursor (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcRecolorCursor (register ClientPtr client)
|
||||
SProcRecolorCursor (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xRecolorCursorReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xRecolorCursorReq);
|
||||
|
@ -979,9 +979,9 @@ SProcRecolorCursor (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcQueryBestSize (register ClientPtr client)
|
||||
SProcQueryBestSize (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xQueryBestSizeReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
|
||||
|
@ -993,9 +993,9 @@ SProcQueryBestSize (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcQueryExtension (register ClientPtr client)
|
||||
SProcQueryExtension (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xQueryExtensionReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xQueryExtensionReq);
|
||||
|
@ -1004,9 +1004,9 @@ SProcQueryExtension (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeKeyboardMapping (register ClientPtr client)
|
||||
SProcChangeKeyboardMapping (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeKeyboardMappingReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
|
||||
|
@ -1016,9 +1016,9 @@ SProcChangeKeyboardMapping (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcChangeKeyboardControl (register ClientPtr client)
|
||||
SProcChangeKeyboardControl (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangeKeyboardControlReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
|
||||
|
@ -1028,9 +1028,9 @@ SProcChangeKeyboardControl (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangePointerControl (register ClientPtr client)
|
||||
SProcChangePointerControl (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xChangePointerControlReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xChangePointerControlReq);
|
||||
|
@ -1042,9 +1042,9 @@ SProcChangePointerControl (register ClientPtr client)
|
|||
|
||||
|
||||
int
|
||||
SProcSetScreenSaver (register ClientPtr client)
|
||||
SProcSetScreenSaver (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xSetScreenSaverReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
|
||||
|
@ -1054,9 +1054,9 @@ SProcSetScreenSaver (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcChangeHosts (register ClientPtr client)
|
||||
SProcChangeHosts (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
REQUEST(xChangeHostsReq);
|
||||
swaps(&stuff->length, n);
|
||||
|
@ -1066,9 +1066,9 @@ SProcChangeHosts (register ClientPtr client)
|
|||
|
||||
}
|
||||
|
||||
int SProcRotateProperties (register ClientPtr client)
|
||||
int SProcRotateProperties (ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xRotatePropertiesReq);
|
||||
swaps(&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq);
|
||||
|
@ -1080,9 +1080,9 @@ int SProcRotateProperties (register ClientPtr client)
|
|||
}
|
||||
|
||||
int
|
||||
SProcNoOperation(register ClientPtr client)
|
||||
SProcNoOperation(ClientPtr client)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
REQUEST(xReq);
|
||||
swaps(&stuff->length, n);
|
||||
return ((* ProcVector[X_NoOperation])(client));
|
||||
|
@ -1091,7 +1091,7 @@ SProcNoOperation(register ClientPtr client)
|
|||
void
|
||||
SwapConnClientPrefix(xConnClientPrefix *pCCP)
|
||||
{
|
||||
register char n;
|
||||
char n;
|
||||
|
||||
swaps(&pCCP->majorVersion, n);
|
||||
swaps(&pCCP->minorVersion, n);
|
||||
|
|
200
dix/window.c
200
dix/window.c
|
@ -230,10 +230,10 @@ PrintWindowTree(void)
|
|||
#endif
|
||||
|
||||
_X_EXPORT int
|
||||
TraverseTree(register WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||
TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||
{
|
||||
register int result;
|
||||
register WindowPtr pChild;
|
||||
int result;
|
||||
WindowPtr pChild;
|
||||
|
||||
if (!(pChild = pWin))
|
||||
return(WT_NOMATCH);
|
||||
|
@ -279,7 +279,7 @@ Bool enableBackingStore = FALSE;
|
|||
Bool disableSaveUnders = FALSE;
|
||||
|
||||
static void
|
||||
SetWindowToDefaults(register WindowPtr pWin)
|
||||
SetWindowToDefaults(WindowPtr pWin)
|
||||
{
|
||||
pWin->prevSib = NullWindow;
|
||||
pWin->firstChild = NullWindow;
|
||||
|
@ -323,8 +323,8 @@ MakeRootTile(WindowPtr pWin)
|
|||
GCPtr pGC;
|
||||
unsigned char back[128];
|
||||
int len = BitmapBytePad(sizeof(long));
|
||||
register unsigned char *from, *to;
|
||||
register int i, j;
|
||||
unsigned char *from, *to;
|
||||
int i, j;
|
||||
|
||||
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
|
||||
pScreen->rootDepth);
|
||||
|
@ -363,11 +363,11 @@ WindowPtr
|
|||
AllocateWindow(ScreenPtr pScreen)
|
||||
{
|
||||
WindowPtr pWin;
|
||||
register char *ptr;
|
||||
register DevUnion *ppriv;
|
||||
register unsigned *sizes;
|
||||
register unsigned size;
|
||||
register int i;
|
||||
char *ptr;
|
||||
DevUnion *ppriv;
|
||||
unsigned *sizes;
|
||||
unsigned size;
|
||||
int i;
|
||||
|
||||
pWin = (WindowPtr)xalloc(pScreen->totalWindowSize);
|
||||
if (pWin)
|
||||
|
@ -558,9 +558,9 @@ InitRootWindow(WindowPtr pWin)
|
|||
*/
|
||||
|
||||
void
|
||||
ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
|
||||
register int x, register int y,
|
||||
register int w, register int h)
|
||||
ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
||||
int x, int y,
|
||||
int w, int h)
|
||||
{
|
||||
ScreenPtr pScreen;
|
||||
BoxRec box;
|
||||
|
@ -597,7 +597,7 @@ RegisterRealChildHeadProc (RealChildHeadProc proc)
|
|||
|
||||
|
||||
WindowPtr
|
||||
RealChildHead(register WindowPtr pWin)
|
||||
RealChildHead(WindowPtr pWin)
|
||||
{
|
||||
if (realChildHeadProc) {
|
||||
return realChildHeadProc (pWin);
|
||||
|
@ -617,19 +617,19 @@ RealChildHead(register WindowPtr pWin)
|
|||
*****/
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
||||
unsigned h, unsigned bw, unsigned class, register Mask vmask, XID *vlist,
|
||||
CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||
unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist,
|
||||
int depth, ClientPtr client, VisualID visual, int *error)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
WindowPtr pHead;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
xEvent event;
|
||||
int idepth, ivisual;
|
||||
Bool fOK;
|
||||
DepthPtr pDepth;
|
||||
PixmapFormatRec *format;
|
||||
register WindowOptPtr ancwopt;
|
||||
WindowOptPtr ancwopt;
|
||||
|
||||
if (class == CopyFromParent)
|
||||
class = pParent->drawable.class;
|
||||
|
@ -854,9 +854,9 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
|
|||
}
|
||||
|
||||
static void
|
||||
FreeWindowResources(register WindowPtr pWin)
|
||||
FreeWindowResources(WindowPtr pWin)
|
||||
{
|
||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
DeleteWindowFromAnySaveSet(pWin);
|
||||
DeleteWindowFromAnySelections(pWin);
|
||||
|
@ -887,7 +887,7 @@ FreeWindowResources(register WindowPtr pWin)
|
|||
static void
|
||||
CrushTree(WindowPtr pWin)
|
||||
{
|
||||
register WindowPtr pChild, pSib, pParent;
|
||||
WindowPtr pChild, pSib, pParent;
|
||||
UnrealizeWindowProcPtr UnrealizeWindow;
|
||||
xEvent event;
|
||||
|
||||
|
@ -944,8 +944,8 @@ CrushTree(WindowPtr pWin)
|
|||
int
|
||||
DeleteWindow(pointer value, XID wid)
|
||||
{
|
||||
register WindowPtr pParent;
|
||||
register WindowPtr pWin = (WindowPtr)value;
|
||||
WindowPtr pParent;
|
||||
WindowPtr pWin = (WindowPtr)value;
|
||||
xEvent event;
|
||||
|
||||
UnmapWindow(pWin, FALSE);
|
||||
|
@ -977,7 +977,7 @@ DeleteWindow(pointer value, XID wid)
|
|||
}
|
||||
|
||||
void
|
||||
DestroySubwindows(register WindowPtr pWin, ClientPtr client)
|
||||
DestroySubwindows(WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
/* XXX
|
||||
* The protocol is quite clear that each window should be
|
||||
|
@ -1004,10 +1004,10 @@ DestroySubwindows(register WindowPtr pWin, ClientPtr client)
|
|||
*****/
|
||||
|
||||
_X_EXPORT int
|
||||
ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||
ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||
{
|
||||
register Mask index2;
|
||||
register XID *pVlist;
|
||||
Mask index2;
|
||||
XID *pVlist;
|
||||
PixmapPtr pPixmap;
|
||||
Pixmap pixID;
|
||||
CursorPtr pCursor, pOldCursor;
|
||||
|
@ -1017,9 +1017,9 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
|
|||
ColormapPtr pCmap;
|
||||
xEvent xE;
|
||||
int result;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Mask vmaskCopy = 0;
|
||||
register Mask tmask;
|
||||
Mask tmask;
|
||||
unsigned int val;
|
||||
int error;
|
||||
Bool checkOptional = FALSE;
|
||||
|
@ -1538,7 +1538,7 @@ PatchUp:
|
|||
*****/
|
||||
|
||||
void
|
||||
GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa)
|
||||
GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa)
|
||||
{
|
||||
wa->type = X_Reply;
|
||||
wa->bitGravity = pWin->bitGravity;
|
||||
|
@ -1574,9 +1574,9 @@ GetWindowAttributes(register WindowPtr pWin, ClientPtr client, xGetWindowAttribu
|
|||
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib)
|
||||
MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib)
|
||||
{
|
||||
register WindowPtr pParent = pWin->parent;
|
||||
WindowPtr pParent = pWin->parent;
|
||||
WindowPtr pFirstChange = pWin; /* highest window where list changes */
|
||||
|
||||
if (pWin->nextSib != pNextSib)
|
||||
|
@ -1658,7 +1658,7 @@ MoveWindowInStack(register WindowPtr pWin, register WindowPtr pNextSib)
|
|||
}
|
||||
|
||||
_X_EXPORT RegionPtr
|
||||
CreateUnclippedWinSize (register WindowPtr pWin)
|
||||
CreateUnclippedWinSize (WindowPtr pWin)
|
||||
{
|
||||
RegionPtr pRgn;
|
||||
BoxRec box;
|
||||
|
@ -1686,7 +1686,7 @@ CreateUnclippedWinSize (register WindowPtr pWin)
|
|||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SetWinSize (register WindowPtr pWin)
|
||||
SetWinSize (WindowPtr pWin)
|
||||
{
|
||||
#ifdef COMPOSITE
|
||||
if (pWin->redirectDraw)
|
||||
|
@ -1725,7 +1725,7 @@ SetWinSize (register WindowPtr pWin)
|
|||
}
|
||||
|
||||
_X_EXPORT void
|
||||
SetBorderSize (register WindowPtr pWin)
|
||||
SetBorderSize (WindowPtr pWin)
|
||||
{
|
||||
int bw;
|
||||
|
||||
|
@ -1777,9 +1777,9 @@ SetBorderSize (register WindowPtr pWin)
|
|||
*/
|
||||
|
||||
_X_EXPORT void
|
||||
GravityTranslate (register int x, register int y, int oldx, int oldy,
|
||||
GravityTranslate (int x, int y, int oldx, int oldy,
|
||||
int dw, int dh, unsigned gravity,
|
||||
register int *destx, register int *desty)
|
||||
int *destx, int *desty)
|
||||
{
|
||||
switch (gravity) {
|
||||
case NorthGravity:
|
||||
|
@ -1827,10 +1827,10 @@ GravityTranslate (register int x, register int y, int oldx, int oldy,
|
|||
|
||||
/* XXX need to retile border on each window with ParentRelative origin */
|
||||
_X_EXPORT void
|
||||
ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||
ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
register WindowPtr pSib, pChild;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr pSib, pChild;
|
||||
Bool resized = (dw || dh);
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
@ -1922,10 +1922,10 @@ ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
|
|||
|
||||
static int
|
||||
IsSiblingAboveMe(
|
||||
register WindowPtr pMe,
|
||||
register WindowPtr pSib)
|
||||
WindowPtr pMe,
|
||||
WindowPtr pSib)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
|
||||
pWin = pMe->parent->firstChild;
|
||||
while (pWin)
|
||||
|
@ -1941,8 +1941,8 @@ IsSiblingAboveMe(
|
|||
|
||||
static BoxPtr
|
||||
WindowExtents(
|
||||
register WindowPtr pWin,
|
||||
register BoxPtr pBox)
|
||||
WindowPtr pWin,
|
||||
BoxPtr pBox)
|
||||
{
|
||||
pBox->x1 = pWin->drawable.x - wBorderWidth (pWin);
|
||||
pBox->y1 = pWin->drawable.y - wBorderWidth (pWin);
|
||||
|
@ -1958,7 +1958,7 @@ WindowExtents(
|
|||
|
||||
static RegionPtr
|
||||
MakeBoundingRegion (
|
||||
register WindowPtr pWin,
|
||||
WindowPtr pWin,
|
||||
BoxPtr pBox)
|
||||
{
|
||||
RegionPtr pRgn;
|
||||
|
@ -1984,7 +1984,7 @@ ShapeOverlap (
|
|||
BoxPtr pSibBox)
|
||||
{
|
||||
RegionPtr pWinRgn, pSibRgn;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Bool ret;
|
||||
|
||||
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
|
||||
|
@ -2004,11 +2004,11 @@ static Bool
|
|||
AnyWindowOverlapsMe(
|
||||
WindowPtr pWin,
|
||||
WindowPtr pHead,
|
||||
register BoxPtr box)
|
||||
BoxPtr box)
|
||||
{
|
||||
register WindowPtr pSib;
|
||||
WindowPtr pSib;
|
||||
BoxRec sboxrec;
|
||||
register BoxPtr sbox;
|
||||
BoxPtr sbox;
|
||||
|
||||
for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib)
|
||||
{
|
||||
|
@ -2029,11 +2029,11 @@ AnyWindowOverlapsMe(
|
|||
static Bool
|
||||
IOverlapAnyWindow(
|
||||
WindowPtr pWin,
|
||||
register BoxPtr box)
|
||||
BoxPtr box)
|
||||
{
|
||||
register WindowPtr pSib;
|
||||
WindowPtr pSib;
|
||||
BoxRec sboxrec;
|
||||
register BoxPtr sbox;
|
||||
BoxPtr sbox;
|
||||
|
||||
for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib)
|
||||
{
|
||||
|
@ -2081,8 +2081,8 @@ IOverlapAnyWindow(
|
|||
|
||||
static WindowPtr
|
||||
WhereDoIGoInTheStack(
|
||||
register WindowPtr pWin,
|
||||
register WindowPtr pSib,
|
||||
WindowPtr pWin,
|
||||
WindowPtr pSib,
|
||||
short x,
|
||||
short y,
|
||||
unsigned short w,
|
||||
|
@ -2090,7 +2090,7 @@ WhereDoIGoInTheStack(
|
|||
int smode)
|
||||
{
|
||||
BoxRec box;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr pHead, pFirst;
|
||||
|
||||
if ((pWin == pWin->parent->firstChild) &&
|
||||
|
@ -2187,8 +2187,8 @@ WhereDoIGoInTheStack(
|
|||
|
||||
static void
|
||||
ReflectStackChange(
|
||||
register WindowPtr pWin,
|
||||
register WindowPtr pSib,
|
||||
WindowPtr pWin,
|
||||
WindowPtr pSib,
|
||||
VTKind kind)
|
||||
{
|
||||
/* Note that pSib might be NULL */
|
||||
|
@ -2240,17 +2240,17 @@ ReflectStackChange(
|
|||
*****/
|
||||
|
||||
int
|
||||
ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client)
|
||||
ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
|
||||
{
|
||||
#define RESTACK_WIN 0
|
||||
#define MOVE_WIN 1
|
||||
#define RESIZE_WIN 2
|
||||
#define REBORDER_WIN 3
|
||||
register WindowPtr pSib = NullWindow;
|
||||
register WindowPtr pParent = pWin->parent;
|
||||
WindowPtr pSib = NullWindow;
|
||||
WindowPtr pParent = pWin->parent;
|
||||
Window sibwid = 0;
|
||||
Mask index2, tmask;
|
||||
register XID *pVlist;
|
||||
XID *pVlist;
|
||||
short x, y, beforeX, beforeY;
|
||||
unsigned short w = pWin->drawable.width,
|
||||
h = pWin->drawable.height,
|
||||
|
@ -2527,7 +2527,7 @@ ActuallyDoSomething:
|
|||
int
|
||||
CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
|
||||
{
|
||||
register WindowPtr pWin, pHead, pFirst;
|
||||
WindowPtr pWin, pHead, pFirst;
|
||||
xEvent event;
|
||||
BoxRec box;
|
||||
|
||||
|
@ -2597,14 +2597,14 @@ CompareWIDs(
|
|||
*****/
|
||||
|
||||
int
|
||||
ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
|
||||
ReparentWindow(WindowPtr pWin, WindowPtr pParent,
|
||||
int x, int y, ClientPtr client)
|
||||
{
|
||||
WindowPtr pPrev, pPriorParent;
|
||||
Bool WasMapped = (Bool)(pWin->mapped);
|
||||
xEvent event;
|
||||
int bw = wBorderWidth (pWin);
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING)
|
||||
|
@ -2691,7 +2691,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
|
|||
static void
|
||||
RealizeTree(WindowPtr pWin)
|
||||
{
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
RealizeWindowProcPtr Realize;
|
||||
|
||||
Realize = pWin->drawable.pScreen->RealizeWindow;
|
||||
|
@ -2730,11 +2730,11 @@ RealizeTree(WindowPtr pWin)
|
|||
*****/
|
||||
|
||||
_X_EXPORT int
|
||||
MapWindow(register WindowPtr pWin, ClientPtr client)
|
||||
MapWindow(WindowPtr pWin, ClientPtr client)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
register WindowPtr pParent;
|
||||
WindowPtr pParent;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -2850,18 +2850,18 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
|
|||
*****/
|
||||
|
||||
void
|
||||
MapSubwindows(register WindowPtr pParent, ClientPtr client)
|
||||
MapSubwindows(WindowPtr pParent, ClientPtr client)
|
||||
{
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pFirstMapped = NullWindow;
|
||||
WindowPtr pWin;
|
||||
WindowPtr pFirstMapped = NullWindow;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
WindowPtr pFirstSaveUndered = NullWindow;
|
||||
WindowPtr pFirstSaveUndered = NullWindow;
|
||||
#endif
|
||||
register ScreenPtr pScreen;
|
||||
register Mask parentRedirect;
|
||||
register Mask parentNotify;
|
||||
xEvent event;
|
||||
Bool anyMarked;
|
||||
ScreenPtr pScreen;
|
||||
Mask parentRedirect;
|
||||
Mask parentNotify;
|
||||
xEvent event;
|
||||
Bool anyMarked;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
|
@ -2970,7 +2970,7 @@ UnrealizeTree(
|
|||
WindowPtr pWin,
|
||||
Bool fromConfigure)
|
||||
{
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
UnrealizeWindowProcPtr Unrealize;
|
||||
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
||||
|
||||
|
@ -3029,9 +3029,9 @@ UnrealizeTree(
|
|||
*****/
|
||||
|
||||
_X_EXPORT int
|
||||
UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
|
||||
UnmapWindow(WindowPtr pWin, Bool fromConfigure)
|
||||
{
|
||||
register WindowPtr pParent;
|
||||
WindowPtr pParent;
|
||||
xEvent event;
|
||||
Bool wasRealized = (Bool)pWin->realized;
|
||||
Bool wasViewable = (Bool)pWin->viewable;
|
||||
|
@ -3088,9 +3088,9 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
|
|||
*****/
|
||||
|
||||
void
|
||||
UnmapSubwindows(register WindowPtr pWin)
|
||||
UnmapSubwindows(WindowPtr pWin)
|
||||
{
|
||||
register WindowPtr pChild, pHead;
|
||||
WindowPtr pChild, pHead;
|
||||
xEvent event;
|
||||
Bool wasRealized = (Bool)pWin->realized;
|
||||
Bool wasViewable = (Bool)pWin->viewable;
|
||||
|
@ -3179,10 +3179,10 @@ UnmapSubwindows(register WindowPtr pWin)
|
|||
|
||||
|
||||
void
|
||||
HandleSaveSet(register ClientPtr client)
|
||||
HandleSaveSet(ClientPtr client)
|
||||
{
|
||||
register WindowPtr pParent, pWin;
|
||||
register int j;
|
||||
WindowPtr pParent, pWin;
|
||||
int j;
|
||||
|
||||
for (j=0; j<client->numSaved; j++)
|
||||
{
|
||||
|
@ -3225,7 +3225,7 @@ HandleSaveSet(register ClientPtr client)
|
|||
* \param box "return" value
|
||||
*/
|
||||
Bool
|
||||
VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
|
||||
VisibleBoundingBoxFromPoint(WindowPtr pWin, int x, int y, BoxPtr box)
|
||||
{
|
||||
if (!pWin->realized)
|
||||
return (FALSE);
|
||||
|
@ -3239,7 +3239,7 @@ VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
|
|||
* \param x,y in root
|
||||
*/
|
||||
Bool
|
||||
PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
|
||||
PointInWindowIsVisible(WindowPtr pWin, int x, int y)
|
||||
{
|
||||
BoxRec box;
|
||||
|
||||
|
@ -3258,9 +3258,9 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
|
|||
|
||||
|
||||
_X_EXPORT RegionPtr
|
||||
NotClippedByChildren(register WindowPtr pWin)
|
||||
NotClippedByChildren(WindowPtr pWin)
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
RegionPtr pReg;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
@ -3606,7 +3606,7 @@ TileScreenSaver(int i, int kind)
|
|||
*/
|
||||
|
||||
_X_EXPORT WindowPtr
|
||||
FindWindowWithOptional (register WindowPtr w)
|
||||
FindWindowWithOptional (WindowPtr w)
|
||||
{
|
||||
do
|
||||
w = w->parent;
|
||||
|
@ -3623,10 +3623,10 @@ FindWindowWithOptional (register WindowPtr w)
|
|||
*/
|
||||
|
||||
_X_EXPORT void
|
||||
CheckWindowOptionalNeed (register WindowPtr w)
|
||||
CheckWindowOptionalNeed (WindowPtr w)
|
||||
{
|
||||
register WindowOptPtr optional;
|
||||
register WindowOptPtr parentOptional;
|
||||
WindowOptPtr optional;
|
||||
WindowOptPtr parentOptional;
|
||||
|
||||
if (!w->parent)
|
||||
return;
|
||||
|
@ -3691,10 +3691,10 @@ CheckWindowOptionalNeed (register WindowPtr w)
|
|||
*/
|
||||
|
||||
_X_EXPORT Bool
|
||||
MakeWindowOptional (register WindowPtr pWin)
|
||||
MakeWindowOptional (WindowPtr pWin)
|
||||
{
|
||||
register WindowOptPtr optional;
|
||||
register WindowOptPtr parentOptional;
|
||||
WindowOptPtr optional;
|
||||
WindowOptPtr parentOptional;
|
||||
|
||||
if (pWin->optional)
|
||||
return TRUE;
|
||||
|
@ -3739,7 +3739,7 @@ MakeWindowOptional (register WindowPtr pWin)
|
|||
}
|
||||
|
||||
void
|
||||
DisposeWindowOptional (register WindowPtr pWin)
|
||||
DisposeWindowOptional (WindowPtr pWin)
|
||||
{
|
||||
if (!pWin->optional)
|
||||
return;
|
||||
|
|
|
@ -43,11 +43,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
|
|||
if (paddedWidth / 4 > 32767 || height > 32767)
|
||||
return NullPixmap;
|
||||
datasize = height * paddedWidth;
|
||||
#ifdef PIXPRIV
|
||||
base = pScreen->totalPixmapSize;
|
||||
#else
|
||||
base = sizeof (PixmapRec);
|
||||
#endif
|
||||
adjust = 0;
|
||||
if (base & 7)
|
||||
adjust = 8 - (base & 7);
|
||||
|
|
|
@ -17,7 +17,6 @@ SUBDIRS = \
|
|||
utils \
|
||||
.
|
||||
|
||||
|
||||
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
|
||||
|
||||
libdarwinShared_a_SOURCES = darwin.c \
|
||||
|
@ -62,25 +61,11 @@ XDarwin_LDADD = \
|
|||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
$(top_builddir)/os/libos.la \
|
||||
./libdarwinShared.a \
|
||||
./iokit/libiokit.a \
|
||||
$(top_builddir)/dix/libxpstubs.la \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/fb/libfb.la \
|
||||
$(top_builddir)/composite/libcomposite.la \
|
||||
$(top_builddir)/damageext/libdamageext.la \
|
||||
$(top_builddir)/miext/damage/libdamage.la \
|
||||
$(top_builddir)/xfixes/libxfixes.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(top_builddir)/Xext/libXext.la \
|
||||
$(top_builddir)/xkb/libxkb.la \
|
||||
$(top_builddir)/xkb/libxkbstubs.la \
|
||||
$(top_builddir)/Xi/libXi.la \
|
||||
$(top_builddir)/dbe/libdbe.la \
|
||||
$(top_builddir)/record/librecord.la \
|
||||
$(top_builddir)/XTrap/libxtrap.la \
|
||||
$(XGLX_LIBS) \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
|
@ -91,23 +76,10 @@ Xquartz_LDADD = \
|
|||
$(top_builddir)/dix/dixfonts.lo \
|
||||
$(top_builddir)/dix/libdix.la \
|
||||
$(top_builddir)/config/libconfig.a \
|
||||
$(top_builddir)/os/libos.la \
|
||||
./libdarwinShared.a \
|
||||
$(top_builddir)/dix/libxpstubs.la \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/fb/libfb.la \
|
||||
$(top_builddir)/composite/libcomposite.la \
|
||||
$(top_builddir)/damageext/libdamageext.la \
|
||||
$(top_builddir)/miext/damage/libdamage.la \
|
||||
$(top_builddir)/xfixes/libxfixes.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(top_builddir)/Xext/libXext.la \
|
||||
$(top_builddir)/xkb/libxkb.la \
|
||||
$(top_builddir)/xkb/libxkbstubs.la \
|
||||
$(top_builddir)/Xi/libXi.la \
|
||||
$(top_builddir)/dbe/libdbe.la \
|
||||
$(top_builddir)/record/librecord.la \
|
||||
$(top_builddir)/XTrap/libxtrap.la \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
|
@ -140,7 +112,7 @@ macos_PROGRAMS = XDarwinApp
|
|||
macos_SCRIPTS = x11app
|
||||
|
||||
x11app:
|
||||
cd apple && xcodebuild
|
||||
cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
|
||||
|
||||
XDarwinApp_SOURCES = \
|
||||
$(top_srcdir)/fb/fbcmap.c \
|
||||
|
@ -155,28 +127,14 @@ XDarwinApp_LDADD = \
|
|||
./quartz/XApplication.o \
|
||||
./libdarwinShared.a \
|
||||
./quartz/libXQuartz.a \
|
||||
$(top_builddir)/dix/libxpstubs.la \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/fb/libfb.la \
|
||||
$(top_builddir)/composite/libcomposite.la \
|
||||
$(top_builddir)/damageext/libdamageext.la \
|
||||
$(top_builddir)/miext/damage/libdamage.la \
|
||||
$(top_builddir)/xfixes/libxfixes.la \
|
||||
$(top_builddir)/miext/cw/libcw.la \
|
||||
$(top_builddir)/Xext/libXext.la \
|
||||
$(top_builddir)/xkb/libxkb.la \
|
||||
$(top_builddir)/xkb/libxkbstubs.la \
|
||||
$(top_builddir)/Xi/libXi.la \
|
||||
$(top_builddir)/dbe/libdbe.la \
|
||||
$(top_builddir)/record/librecord.la \
|
||||
$(top_builddir)/XTrap/libxtrap.la \
|
||||
$(XGLX_LIBS) \
|
||||
$(DARWIN_LIBS) \
|
||||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
$(XSERVER_LIBS) \
|
||||
$(top_builddir)/fb/libfb.la
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
XDarwinApp_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
|
|
|
@ -22,20 +22,14 @@ The server builds 4 targets:
|
|||
Known issues:
|
||||
|
||||
* AGL and CGL support for 3D indirect acceleration does not work;
|
||||
indirect.c needs to be rewritten.
|
||||
indirect.c has been rewritten, but not yet integrated into this source tree.
|
||||
|
||||
* Fullscreen mode does not work; I don't know why.
|
||||
|
||||
* The keyboard and mouse do not work at all; they worked in X11R7.1,
|
||||
and I believe that they were broken by the events changes in dix/.
|
||||
|
||||
* Some features in X11.app are not yet implemented; these are marked
|
||||
with #ifdef DARWIN_DDX_MISSING in the code.
|
||||
|
||||
* The build system code could probably be cleaned up slightly.
|
||||
|
||||
* Most testing of this code has occurred under 10.5, but it should
|
||||
also work under 10.4.
|
||||
|
||||
Any patches or code contributions would be most welcome and may be
|
||||
sent to me at bbyer@apple.com.
|
||||
|
|
|
@ -224,15 +224,12 @@
|
|||
DSTROOT = "$(DSTROOT)";
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = /usr/X11/include;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
||||
LIBRARY_SEARCH_PATHS = /usr/X11/lib;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-lXau",
|
||||
"-lX11",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_CFLAGS = "$(CFLAGS)";
|
||||
OTHER_LDFLAGS = "$(LDFLAGS)";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = X11;
|
||||
SECTORDER_FLAGS = "";
|
||||
|
@ -252,15 +249,12 @@
|
|||
DSTROOT = "$(DSTROOT)";
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = /usr/X11/include;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
||||
LIBRARY_SEARCH_PATHS = /usr/X11/lib;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-lXau",
|
||||
"-lX11",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_CFLAGS = "$(CFLAGS)";
|
||||
OTHER_LDFLAGS = "$(LDFLAGS)";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = X11;
|
||||
SECTORDER_FLAGS = "";
|
||||
|
@ -279,15 +273,12 @@
|
|||
DSTROOT = "$(DSTROOT)";
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = /usr/X11/include;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = $DSTROOT/Applications/Utilties;
|
||||
LIBRARY_SEARCH_PATHS = /usr/X11/lib;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-lXau",
|
||||
"-lX11",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_CFLAGS = "$(CFLAGS)";
|
||||
OTHER_LDFLAGS = "$(LDFLAGS)";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_NAME = X11;
|
||||
SECTORDER_FLAGS = "";
|
||||
|
|
|
@ -56,7 +56,7 @@ extern int darwinFakeButtons, input_check_flag;
|
|||
// extern Bool enable_stereo;
|
||||
Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed
|
||||
|
||||
static xEvent *quartzEvents;
|
||||
extern xEvent *darwinEvents;
|
||||
|
||||
X11Application *X11App;
|
||||
|
||||
|
@ -805,7 +805,6 @@ void X11ApplicationMain (int argc, const char *argv[],
|
|||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
X11App = (X11Application *) [X11Application sharedApplication];
|
||||
quartzEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
|
||||
|
||||
init_ports ();
|
||||
|
||||
|
@ -856,21 +855,16 @@ convert_flags (unsigned int nsflags) {
|
|||
return xflags;
|
||||
}
|
||||
|
||||
|
||||
// This code should probably be merged with that in XDarwin's XServer.m - BB
|
||||
static void send_nsevent (NSEventType type, NSEvent *e) {
|
||||
static unsigned int button_state = 0;
|
||||
// static unsigned int button_state = 0;
|
||||
NSRect screen;
|
||||
NSPoint location;
|
||||
NSWindow *window;
|
||||
int pointer_x, pointer_y, ev_button, ev_type;
|
||||
int num_events=0, i=0, state;
|
||||
int valuators[2];
|
||||
float count;
|
||||
// int num_events=0, i=0, state;
|
||||
xEvent xe;
|
||||
char nullbyte=0;
|
||||
|
||||
bzero(&xe, sizeof(xe));
|
||||
input_check_flag++;
|
||||
|
||||
/* convert location to global top-left coordinates */
|
||||
location = [e locationInWindow];
|
||||
|
@ -887,11 +881,8 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
|
|||
pointer_y = (screen.origin.y + screen.size.height) - location.y;
|
||||
}
|
||||
|
||||
// ErrorF("send_nsevent: type=%d pointer=(%d,%d)\n", type, pointer_x, pointer_y);
|
||||
|
||||
valuators[0] = pointer_x;
|
||||
valuators[1] = pointer_y - aquaMenuBarHeight;
|
||||
state = convert_flags ([e modifierFlags]);
|
||||
pointer_y -= aquaMenuBarHeight;
|
||||
// state = convert_flags ([e modifierFlags]);
|
||||
|
||||
switch (type) {
|
||||
case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse;
|
||||
|
@ -906,50 +897,30 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
|
|||
case NSMouseMoved: ev_button=0; ev_type=MotionNotify; goto handle_mouse;
|
||||
handle_mouse:
|
||||
|
||||
if(ev_type==ButtonPress) {
|
||||
/* I'm not sure the below code is necessary or useful (-bb)
|
||||
if(ev_type==ButtonPress) {
|
||||
if (!quartzProcs->IsX11Window([e window], [e windowNumber])) {
|
||||
fprintf(stderr, "Dropping event because it's not a window\n");
|
||||
break;
|
||||
}
|
||||
button_state |= (1 << ev_button);
|
||||
DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
|
||||
} else if (ev_type==ButtonRelease && (button_state & (1 << ev_button)) == 0) break;
|
||||
|
||||
num_events = GetPointerEvents(quartzEvents, darwinPointer, ev_type, ev_button,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
|
||||
for(i=0; i<num_events; i++)
|
||||
mieqEnqueue (darwinPointer,&quartzEvents[i]);
|
||||
*/
|
||||
DarwinSendPointerEvents(ev_type, ev_button, pointer_x, pointer_y);
|
||||
break;
|
||||
case NSScrollWheel:
|
||||
count = [e deltaY];
|
||||
ev_button = count > 0.0f ? 4 : 5;
|
||||
for (count = fabs(count); count > 0.0; count = count - 1.0f) {
|
||||
num_events = GetPointerEvents(quartzEvents, darwinPointer, ButtonPress, ev_button,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
for(i=0; i<num_events; i++)
|
||||
mieqEnqueue(darwinPointer,&quartzEvents[i]);
|
||||
num_events = GetPointerEvents(quartzEvents, darwinPointer, ButtonRelease, ev_button,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
for(i=0; i<num_events; i++)
|
||||
mieqEnqueue(darwinPointer,&quartzEvents[i]);
|
||||
}
|
||||
DarwinSendScrollEvents([e deltaY], pointer_x, pointer_y);
|
||||
break;
|
||||
|
||||
case NSKeyDown: // do we need to translate these keyCodes?
|
||||
case NSKeyUp:
|
||||
num_events = GetKeyboardEvents(quartzEvents, darwinKeyboard,
|
||||
(type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
|
||||
for(i=0; i<num_events; i++)
|
||||
mieqEnqueue(darwinKeyboard,&quartzEvents[i]);
|
||||
DarwinSendKeyboardEvents((type == NSKeyDown)?KeyPress:KeyRelease, [e keyCode]);
|
||||
break;
|
||||
|
||||
case NSFlagsChanged:
|
||||
xe.u.u.type = kXDarwinUpdateModifiers;
|
||||
xe.u.clientMessage.u.l.longs0 = [e modifierFlags];
|
||||
DarwinEQEnqueue (&xe);
|
||||
DarwinUpdateModKeys([e modifierFlags]);
|
||||
break;
|
||||
default: break; /* for gcc */
|
||||
}
|
||||
// <daniels> bushing: oh, i ... er ... christ.
|
||||
write(darwinEventWriteFD, &nullbyte, 1);
|
||||
}
|
||||
|
|
|
@ -601,10 +601,10 @@ display_exists_p (int number)
|
|||
int idisplay, iscreen;
|
||||
char *conn_auth_name, *conn_auth_data;
|
||||
int conn_auth_namelen, conn_auth_datalen;
|
||||
|
||||
#ifdef USE_XTRANS_INTERNALS
|
||||
extern void *_X11TransConnectDisplay ();
|
||||
extern void _XDisconnectDisplay ();
|
||||
|
||||
#endif
|
||||
/* Since connecting to the display waits for a few seconds if the
|
||||
display doesn't exist, check for trivial non-existence - if the
|
||||
socket in /tmp exists or not.. (note: if the socket exists, the
|
||||
|
@ -613,7 +613,7 @@ display_exists_p (int number)
|
|||
sprintf (buf, "/tmp/.X11-unix/X%d", number);
|
||||
if (access (buf, F_OK) != 0)
|
||||
return FALSE;
|
||||
|
||||
#ifdef USE_XTRANS_INTERNALS
|
||||
/* This is a private function that we shouldn't really be calling,
|
||||
but it's the best way to see if the server exists (without
|
||||
needing to hold the necessary authentication to use it) */
|
||||
|
@ -626,6 +626,7 @@ display_exists_p (int number)
|
|||
return FALSE;
|
||||
|
||||
_XDisconnectDisplay (conn);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
|
|||
void DarwinEQEnqueue(const xEvent *e);
|
||||
void DarwinEQPointerPost(xEvent *e);
|
||||
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
||||
void DarwinPokeEQ(void);
|
||||
void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
|
||||
void DarwinSendKeyboardEvents(int ev_type, int keycode);
|
||||
void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
|
||||
|
||||
// From darwinKeyboard.c
|
||||
int DarwinModifierNXKeyToNXKeycode(int key, int side);
|
||||
|
|
|
@ -63,6 +63,8 @@ typedef struct _Event {
|
|||
|
||||
int input_check_zero, input_check_flag;
|
||||
|
||||
static int old_flags = 0; // last known modifier state
|
||||
|
||||
typedef struct _EventQueue {
|
||||
HWEventQueueType head, tail; /* long for SetInputCheck */
|
||||
CARD32 lastEventTime; /* to avoid time running backwards */
|
||||
|
@ -74,24 +76,22 @@ typedef struct _EventQueue {
|
|||
} EventQueueRec, *EventQueuePtr;
|
||||
|
||||
static EventQueueRec darwinEventQueue;
|
||||
xEvent *darwinEvents;
|
||||
|
||||
/*
|
||||
* DarwinPressModifierMask
|
||||
* Press or release the given modifier key, specified by its mask.
|
||||
*/
|
||||
static void DarwinPressModifierMask(
|
||||
xEvent *xe, // must already have type, time and mouse location
|
||||
int pressed,
|
||||
int mask) // one of NX_*MASK constants
|
||||
{
|
||||
int key = DarwinModifierNXMaskToNXKey(mask);
|
||||
|
||||
if (key != -1) {
|
||||
int keycode = DarwinModifierNXKeyToNXKeycode(key, 0);
|
||||
if (keycode != 0) {
|
||||
xe->u.u.detail = keycode + MIN_KEYCODE;
|
||||
(*darwinEventQueue.pKbd->processInputProc)(xe,
|
||||
(DeviceIntPtr)darwinEventQueue.pKbd, 1);
|
||||
}
|
||||
if (keycode != 0)
|
||||
DarwinSendKeyboardEvents(pressed, keycode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,28 +124,26 @@ static void DarwinPressModifierMask(
|
|||
* Send events to update the modifier state.
|
||||
*/
|
||||
static void DarwinUpdateModifiers(
|
||||
xEvent *xe, // event template with time and mouse position set
|
||||
int pressed, // KeyPress or KeyRelease
|
||||
int flags ) // modifier flags that have changed
|
||||
{
|
||||
xe->u.u.type = pressed;
|
||||
if (flags & NX_ALPHASHIFTMASK) {
|
||||
DarwinPressModifierMask(xe, NX_ALPHASHIFTMASK);
|
||||
DarwinPressModifierMask(pressed, NX_ALPHASHIFTMASK);
|
||||
}
|
||||
if (flags & NX_COMMANDMASK) {
|
||||
DarwinPressModifierMask(xe, COMMAND_MASK(flags));
|
||||
DarwinPressModifierMask(pressed, COMMAND_MASK(flags));
|
||||
}
|
||||
if (flags & NX_CONTROLMASK) {
|
||||
DarwinPressModifierMask(xe, CONTROL_MASK(flags));
|
||||
DarwinPressModifierMask(pressed, CONTROL_MASK(flags));
|
||||
}
|
||||
if (flags & NX_ALTERNATEMASK) {
|
||||
DarwinPressModifierMask(xe, ALTERNATE_MASK(flags));
|
||||
DarwinPressModifierMask(pressed, ALTERNATE_MASK(flags));
|
||||
}
|
||||
if (flags & NX_SHIFTMASK) {
|
||||
DarwinPressModifierMask(xe, SHIFT_MASK(flags));
|
||||
DarwinPressModifierMask(pressed, SHIFT_MASK(flags));
|
||||
}
|
||||
if (flags & NX_SECONDARYFNMASK) {
|
||||
DarwinPressModifierMask(xe, NX_SECONDARYFNMASK);
|
||||
DarwinPressModifierMask(pressed, NX_SECONDARYFNMASK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,23 +160,25 @@ static void DarwinUpdateModifiers(
|
|||
* simulate a button 2 press instead of Command-button 2.
|
||||
*/
|
||||
static void DarwinSimulateMouseClick(
|
||||
xEvent *xe, // event template with time and
|
||||
// mouse position filled in
|
||||
int pointer_x,
|
||||
int pointer_y,
|
||||
int whichButton, // mouse button to be pressed
|
||||
int modifierMask) // modifiers used for the fake click
|
||||
{
|
||||
// first fool X into forgetting about the keys
|
||||
DarwinUpdateModifiers(xe, KeyRelease, modifierMask);
|
||||
DarwinUpdateModifiers(KeyRelease, modifierMask);
|
||||
|
||||
// push the mouse button
|
||||
xe->u.u.type = ButtonPress;
|
||||
xe->u.u.detail = whichButton;
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
DarwinSendPointerEvents(ButtonPress, whichButton, pointer_x, pointer_y);
|
||||
DarwinSendPointerEvents(ButtonRelease, whichButton, pointer_x, pointer_y);
|
||||
|
||||
// restore old modifiers
|
||||
DarwinUpdateModifiers(KeyPress, modifierMask);
|
||||
}
|
||||
|
||||
|
||||
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
||||
darwinEvents = (xEvent *)malloc(sizeof(xEvent) * GetMaximumEventsNum());
|
||||
mieqInit();
|
||||
darwinEventQueue.head = darwinEventQueue.tail = 0;
|
||||
darwinEventQueue.lastEventTime = GetTimeInMillis ();
|
||||
|
@ -232,7 +232,7 @@ void DarwinEQEnqueue(const xEvent *e) {
|
|||
darwinEventQueue.tail = newtail;
|
||||
|
||||
// Signal there is an event ready to handle
|
||||
write(darwinEventWriteFD, &byte, 1);
|
||||
DarwinPokeEQ();
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,11 +263,9 @@ void ProcessInputEvents(void) {
|
|||
xEvent xe;
|
||||
static int old_flags = 0; // last known modifier state
|
||||
// button number and modifier mask of currently pressed fake button
|
||||
static int darwinFakeMouseButtonDown = 0;
|
||||
static int darwinFakeMouseButtonMask = 0;
|
||||
input_check_flag=0;
|
||||
|
||||
ErrorF("calling mieqProcessInputEvents\n");
|
||||
// ErrorF("calling mieqProcessInputEvents\n");
|
||||
mieqProcessInputEvents();
|
||||
|
||||
// Empty the signaling pipe
|
||||
|
@ -290,12 +288,12 @@ void ProcessInputEvents(void) {
|
|||
xe.u.keyButtonPointer.rootY -= darwinMainScreenY +
|
||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].y;
|
||||
|
||||
ErrorF("old rootX = (%d,%d) darwinMainScreen = (%d,%d) dixScreenOrigins[%d]=(%d,%d)\n",
|
||||
/* ErrorF("old rootX = (%d,%d) darwinMainScreen = (%d,%d) dixScreenOrigins[%d]=(%d,%d)\n",
|
||||
xe.u.keyButtonPointer.rootX, xe.u.keyButtonPointer.rootY,
|
||||
darwinMainScreenX, darwinMainScreenY,
|
||||
miPointerCurrentScreen()->myNum,
|
||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].x,
|
||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].y);
|
||||
dixScreenOrigins[miPointerCurrentScreen()->myNum].y); */
|
||||
|
||||
//Assumption - screen switching can only occur on motion events
|
||||
|
||||
|
@ -316,155 +314,35 @@ void ProcessInputEvents(void) {
|
|||
darwinEventQueue.head = 0;
|
||||
else
|
||||
++darwinEventQueue.head;
|
||||
switch (xe.u.u.type)
|
||||
{
|
||||
switch (xe.u.u.type) {
|
||||
case KeyPress:
|
||||
if (old_flags == 0
|
||||
&& darwinSyncKeymap && darwinKeymapFile == NULL)
|
||||
{
|
||||
/* See if keymap has changed. */
|
||||
|
||||
static unsigned int last_seed;
|
||||
unsigned int this_seed;
|
||||
|
||||
this_seed = DarwinModeSystemKeymapSeed();
|
||||
if (this_seed != last_seed)
|
||||
{
|
||||
last_seed = this_seed;
|
||||
DarwinKeyboardReload(darwinKeyboard);
|
||||
}
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
case KeyRelease:
|
||||
xe.u.u.detail += MIN_KEYCODE;
|
||||
(*darwinEventQueue.pKbd->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pKbd, 1);
|
||||
break;
|
||||
ErrorF("Unexpected Keyboard event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
case ButtonPress:
|
||||
miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX,
|
||||
xe.u.keyButtonPointer.rootY,
|
||||
xe.u.keyButtonPointer.time);
|
||||
if (darwinFakeButtons && xe.u.u.detail == 1) {
|
||||
// Mimic multi-button mouse with modifier-clicks
|
||||
// If both sets of modifiers are pressed,
|
||||
// button 2 is clicked.
|
||||
if ((old_flags & darwinFakeMouse2Mask) ==
|
||||
darwinFakeMouse2Mask)
|
||||
{
|
||||
DarwinSimulateMouseClick(&xe, 2, darwinFakeMouse2Mask);
|
||||
darwinFakeMouseButtonDown = 2;
|
||||
darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
|
||||
break;
|
||||
}
|
||||
else if ((old_flags & darwinFakeMouse3Mask) ==
|
||||
darwinFakeMouse3Mask)
|
||||
{
|
||||
DarwinSimulateMouseClick(&xe, 3, darwinFakeMouse3Mask);
|
||||
darwinFakeMouseButtonDown = 3;
|
||||
darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
|
||||
break;
|
||||
}
|
||||
}
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
ErrorF("Unexpected ButtonPress event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX,
|
||||
xe.u.keyButtonPointer.rootY,
|
||||
xe.u.keyButtonPointer.time);
|
||||
if (darwinFakeButtons && xe.u.u.detail == 1 &&
|
||||
darwinFakeMouseButtonDown)
|
||||
{
|
||||
// If last mousedown was a fake click, don't check for
|
||||
// mouse modifiers here. The user may have released the
|
||||
// modifiers before the mouse button.
|
||||
xe.u.u.detail = darwinFakeMouseButtonDown;
|
||||
darwinFakeMouseButtonDown = 0;
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
|
||||
// Bring modifiers back up to date
|
||||
DarwinUpdateModifiers(&xe, KeyPress,
|
||||
darwinFakeMouseButtonMask & old_flags);
|
||||
darwinFakeMouseButtonMask = 0;
|
||||
} else {
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
}
|
||||
ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX,
|
||||
xe.u.keyButtonPointer.rootY,
|
||||
xe.u.keyButtonPointer.time);
|
||||
ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
case kXDarwinUpdateModifiers:
|
||||
{
|
||||
// Update modifier state.
|
||||
// Any amount of modifiers may have changed.
|
||||
int flags = xe.u.clientMessage.u.l.longs0;
|
||||
DarwinUpdateModifiers(&xe, KeyRelease,
|
||||
old_flags & ~flags);
|
||||
DarwinUpdateModifiers(&xe, KeyPress,
|
||||
~old_flags & flags);
|
||||
old_flags = flags;
|
||||
break;
|
||||
}
|
||||
ErrorF("Unexpected ButtonRelease event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
case kXDarwinUpdateButtons:
|
||||
{
|
||||
long hwDelta = xe.u.clientMessage.u.l.longs0;
|
||||
long hwButtons = xe.u.clientMessage.u.l.longs1;
|
||||
int i;
|
||||
ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
for (i = 1; i < 5; i++) {
|
||||
if (hwDelta & (1 << i)) {
|
||||
// IOKit and X have different numbering for the
|
||||
// middle and right mouse buttons.
|
||||
if (i == 1) {
|
||||
xe.u.u.detail = 3;
|
||||
} else if (i == 2) {
|
||||
xe.u.u.detail = 2;
|
||||
} else {
|
||||
xe.u.u.detail = i + 1;
|
||||
}
|
||||
if (hwButtons & (1 << i)) {
|
||||
xe.u.u.type = ButtonPress;
|
||||
} else {
|
||||
xe.u.u.type = ButtonRelease;
|
||||
}
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case kXDarwinScrollWheel:
|
||||
{
|
||||
short count = xe.u.clientMessage.u.s.shorts0;
|
||||
|
||||
if (count > 0) {
|
||||
xe.u.u.detail = SCROLLWHEELUPFAKE;
|
||||
} else {
|
||||
xe.u.u.detail = SCROLLWHEELDOWNFAKE;
|
||||
count = -count;
|
||||
}
|
||||
|
||||
for (; count; --count) {
|
||||
xe.u.u.type = ButtonPress;
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
xe.u.u.type = ButtonRelease;
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kXDarwinScrollWheel:
|
||||
ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
// Check for mode specific event
|
||||
|
@ -473,5 +351,96 @@ void ProcessInputEvents(void) {
|
|||
}
|
||||
}
|
||||
|
||||
miPointerUpdate();
|
||||
// miPointerUpdate();
|
||||
}
|
||||
|
||||
/* Sends a null byte down darwinEventWriteFD, which will cause the
|
||||
Dispatch() event loop to check out event queue */
|
||||
void DarwinPokeEQ(void) {
|
||||
char nullbyte=0;
|
||||
input_check_flag++;
|
||||
// <daniels> bushing: oh, i ... er ... christ.
|
||||
write(darwinEventWriteFD, &nullbyte, 1);
|
||||
}
|
||||
|
||||
void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y) {
|
||||
static int darwinFakeMouseButtonDown = 0;
|
||||
static int darwinFakeMouseButtonMask = 0;
|
||||
int i, num_events;
|
||||
int valuators[2] = {pointer_x, pointer_y};
|
||||
if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) {
|
||||
// Mimic multi-button mouse with modifier-clicks
|
||||
// If both sets of modifiers are pressed,
|
||||
// button 2 is clicked.
|
||||
if ((old_flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) {
|
||||
DarwinSimulateMouseClick(pointer_x, pointer_y, 2, darwinFakeMouse2Mask);
|
||||
darwinFakeMouseButtonDown = 2;
|
||||
darwinFakeMouseButtonMask = darwinFakeMouse2Mask;
|
||||
} else if ((old_flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) {
|
||||
DarwinSimulateMouseClick(pointer_x, pointer_y, 3, darwinFakeMouse3Mask);
|
||||
darwinFakeMouseButtonDown = 3;
|
||||
darwinFakeMouseButtonMask = darwinFakeMouse3Mask;
|
||||
}
|
||||
}
|
||||
if (ev_type == ButtonRelease && darwinFakeButtons && darwinFakeMouseButtonDown) {
|
||||
// If last mousedown was a fake click, don't check for
|
||||
// mouse modifiers here. The user may have released the
|
||||
// modifiers before the mouse button.
|
||||
ev_button = darwinFakeMouseButtonDown;
|
||||
darwinFakeMouseButtonDown = 0;
|
||||
// Bring modifiers back up to date
|
||||
DarwinUpdateModifiers(KeyPress, darwinFakeMouseButtonMask & old_flags);
|
||||
darwinFakeMouseButtonMask = 0;
|
||||
}
|
||||
|
||||
num_events = GetPointerEvents(darwinEvents, darwinPointer, ev_type, ev_button,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
|
||||
for(i=0; i<num_events; i++) mieqEnqueue (darwinPointer,&darwinEvents[i]);
|
||||
DarwinPokeEQ();
|
||||
}
|
||||
|
||||
void DarwinSendKeyboardEvents(int ev_type, int keycode) {
|
||||
int i, num_events;
|
||||
if (old_flags == 0 && darwinSyncKeymap && darwinKeymapFile == NULL) {
|
||||
/* See if keymap has changed. */
|
||||
|
||||
static unsigned int last_seed;
|
||||
unsigned int this_seed;
|
||||
|
||||
this_seed = DarwinModeSystemKeymapSeed();
|
||||
if (this_seed != last_seed) {
|
||||
last_seed = this_seed;
|
||||
DarwinKeyboardReload(darwinKeyboard);
|
||||
}
|
||||
}
|
||||
|
||||
num_events = GetKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE);
|
||||
for(i=0; i<num_events; i++) mieqEnqueue(darwinKeyboard,&darwinEvents[i]);
|
||||
DarwinPokeEQ();
|
||||
}
|
||||
|
||||
/* Send the appropriate number of button 4 / 5 clicks to emulate scroll wheel */
|
||||
void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y) {
|
||||
int i;
|
||||
int ev_button = count > 0.0f ? 4 : 5;
|
||||
int valuators[2] = {pointer_x, pointer_y};
|
||||
|
||||
for (count = fabs(count); count > 0.0; count = count - 1.0f) {
|
||||
int num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonPress, ev_button,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
for(i=0; i<num_events; i++) mieqEnqueue(darwinPointer,&darwinEvents[i]);
|
||||
num_events = GetPointerEvents(darwinEvents, darwinPointer, ButtonRelease, ev_button,
|
||||
POINTER_ABSOLUTE, 0, 2, valuators);
|
||||
for(i=0; i<num_events; i++) mieqEnqueue(darwinPointer,&darwinEvents[i]);
|
||||
}
|
||||
DarwinPokeEQ();
|
||||
}
|
||||
|
||||
/* Send the appropriate KeyPress/KeyRelease events to GetKeyboardEvents to
|
||||
reflect changing modifier flags (alt, control, meta, etc) */
|
||||
void DarwinUpdateModKeys(int flags) {
|
||||
DarwinUpdateModifiers(KeyRelease, old_flags & ~flags);
|
||||
DarwinUpdateModifiers(KeyPress, ~old_flags & flags);
|
||||
old_flags = flags;
|
||||
}
|
||||
|
|
|
@ -49,15 +49,11 @@
|
|||
/** Initialize a private area in \a pScreen for pixmap information. */
|
||||
Bool dmxInitPixmap(ScreenPtr pScreen)
|
||||
{
|
||||
#ifdef PIXPRIV
|
||||
if (!AllocatePixmapPrivate(pScreen, dmxPixPrivateIndex,
|
||||
sizeof(dmxPixPrivRec)))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
#error Must define PIXPRIV to compile DMX X server
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Create a pixmap on the back-end server. */
|
||||
|
|
|
@ -70,9 +70,7 @@ static unsigned long *dmxCursorGeneration;
|
|||
|
||||
int dmxGCPrivateIndex; /**< Private index for GCs */
|
||||
int dmxWinPrivateIndex; /**< Private index for Windows */
|
||||
#ifdef PIXPRIV
|
||||
int dmxPixPrivateIndex; /**< Private index for Pixmaps */
|
||||
#endif
|
||||
int dmxFontPrivateIndex; /**< Private index for Fonts */
|
||||
int dmxScreenPrivateIndex; /**< Private index for Screens */
|
||||
int dmxColormapPrivateIndex; /**< Private index for Colormaps */
|
||||
|
@ -233,14 +231,10 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
|
|||
if (dmxWinPrivateIndex == -1)
|
||||
return FALSE;
|
||||
|
||||
#ifdef PIXPRIV
|
||||
/* Allocate pixmap private index */
|
||||
dmxPixPrivateIndex = AllocatePixmapPrivateIndex();
|
||||
if (dmxPixPrivateIndex == -1)
|
||||
return FALSE;
|
||||
#else
|
||||
#error Must define PIXPRIV to compile DMX X server
|
||||
#endif
|
||||
|
||||
/* Allocate font private index */
|
||||
dmxFontPrivateIndex = AllocateFontPrivateIndex();
|
||||
|
|
|
@ -56,6 +56,7 @@ XORG_LIBS = \
|
|||
parser/libxf86config.a \
|
||||
dixmods/libdixmods.la \
|
||||
modes/libxf86modes.a \
|
||||
ramdac/libramdac.a \
|
||||
ddc/libddc.a \
|
||||
i2c/libi2c.a \
|
||||
@XORG_LIBS@
|
||||
|
|
|
@ -968,7 +968,7 @@ localAllocateOffscreenLinear(
|
|||
linear->size = h * w;
|
||||
linear->offset = (pitch * area->box.y1) + area->box.x1;
|
||||
if (gran > 1)
|
||||
linear->offset += ((linear->offset + gran - 1) / gran) * gran;
|
||||
linear->offset = ((linear->offset + gran - 1) / gran) * gran;
|
||||
linear->granularity = gran;
|
||||
linear->MoveLinearCallback = moveCB;
|
||||
linear->RemoveLinearCallback = removeCB;
|
||||
|
|
|
@ -0,0 +1,474 @@
|
|||
Multi-monitor Mode Setting APIs
|
||||
Keith Packard, <keithp@keithp.com
|
||||
6 March 2007
|
||||
|
||||
1. Introduction
|
||||
|
||||
This document describes a set of mode setting APIs added in X server version
|
||||
1.3 that support multiple monitors per card. These interfaces expose the
|
||||
underlying hardware CRTC and output concepts to the xf86 DDX layer so that
|
||||
the implementation of initial server setup and mode changes through
|
||||
extensions can be shared across drivers. In addition, these new interfaces
|
||||
support a new configuration mechanism as well which allows each monitor to
|
||||
be customized separately providing a consistent cross-driver configuration
|
||||
mechanism that supports the full range of output features.
|
||||
|
||||
All of the code implementing this interface can be found in hw/xfree86/modes
|
||||
in the X server sources.
|
||||
|
||||
2. Overview
|
||||
|
||||
This document describes both the driver API and the configuration data
|
||||
placed in xorg.conf; these are entirely separate as the driver has no
|
||||
interaction with the configuration information at all. Much of the structure
|
||||
here is cloned from the RandR extension version 1.2 additions which deal
|
||||
with the same kinds of information.
|
||||
|
||||
2.1 API overview
|
||||
|
||||
The mode setting API is expressed through two new driver-visible objects,
|
||||
the 'CRTC' (xf86CrtcRec) and the 'Output' (xf86OutputRec). A CRTC refers to
|
||||
hardware within the video system that can scan a subset of the framebuffer
|
||||
and generate a video signal. An Output receives that signal and transmits it
|
||||
to a monitor, projector or other device.
|
||||
|
||||
The xf86CrtcRec and xf86OutputRec contain a small amount of state data
|
||||
related to the object along with a pointer to a set of functions provided by
|
||||
the driver that manipulate the object in fairly simple ways.
|
||||
|
||||
To emulate older behaviour, one of the outputs is picked as the 'compat'
|
||||
output; this output changes over time as outputs are detected and used, the
|
||||
goal is to always have one 'special' output which is used for operations
|
||||
which need a single defined monitor (like XFree86-VidModeExtension mode
|
||||
setting, RandR 1.1 mode setting, DDC property setting, etc.).
|
||||
|
||||
2.1.1 Output overview
|
||||
|
||||
As outputs are connected to monitors, they hold a list of modes supported by
|
||||
the monitor. If the monitor and output support DDC, then the list of modes
|
||||
generally comes from the EDID data in the monitor. Otherwise, the server
|
||||
uses the standard VESA modes, pruned by monitor timing. If the configuration
|
||||
file doesn't contain monitor timing data, the server uses default timing
|
||||
information which supports 640x480, 800x600 and 1024x768 all with a 60Hz
|
||||
refresh rate.
|
||||
|
||||
As hardware often limits possible configuration combinations, each output
|
||||
knows the set of CRTCs that it can be connected to as well as the set of
|
||||
other outputs which can be simutaneously connected to a CRTC.
|
||||
|
||||
2.1.2 CRTC overview
|
||||
|
||||
CRTCs serve only to stream frame buffer data to outputs using a mode line.
|
||||
Ideally, they would not be presented to the user at all, and in fact the
|
||||
configuration file doesn't expose them. The RandR 1.2 protocol does, but the
|
||||
hope there is that client-side applications will hide them carefully away.
|
||||
|
||||
Each crtc has an associated cursor, along with the current configuration.
|
||||
All of the data needed to determine valid configurations is contained within
|
||||
the Outputs.
|
||||
|
||||
2.2 Configuration overview
|
||||
|
||||
As outputs drive monitors, the "Monitor" section has been repurposed to
|
||||
define their configuration. This provides for a bit more syntax than
|
||||
the large list of driver-specific options that were used in the past for
|
||||
similar configuration.
|
||||
|
||||
However, the existing "Monitor" section referenced by the active "Screen"
|
||||
section no longer has any use at all; some sensible meaning for this
|
||||
parameter is needed now that a Screen can have multiple Monitors.
|
||||
|
||||
3. Public Functions
|
||||
|
||||
3.1 PreInit functions
|
||||
|
||||
These functions should be used during the driver PreInit phase, they are
|
||||
arranged in the order they should be invoked.
|
||||
|
||||
void
|
||||
xf86CrtcConfigInit (ScrnInfoPtr scrn
|
||||
const xf86CrtcConfigFuncsRec *funcs)
|
||||
|
||||
This function allocates and initializes structures needed to track CRTC and
|
||||
Output state.
|
||||
|
||||
void
|
||||
xf86CrtcSetSizeRange (ScrnInfoPtr scrn,
|
||||
int minWidth, int minHeight,
|
||||
int maxWidth, int maxHeight)
|
||||
|
||||
This sets the range of screen sizes supported by the driver.
|
||||
|
||||
xf86CrtcPtr
|
||||
xf86CrtcCreate (ScrnInfoPtr scrn,
|
||||
const xf86CrtcFuncsRec *funcs)
|
||||
|
||||
Create one CRTC object. See the discussion below for a description of the
|
||||
contents of the xf86CrtcFuncsRec. Note that this is done in PreInit, so it
|
||||
should not be re-invoked at each server generation. Create one of these for
|
||||
each CRTC present in the hardware.
|
||||
|
||||
xf86OutputPtr
|
||||
xf86OutputCreate (ScrnInfoPtr scrn,
|
||||
const xf86OutputFuncsRec *funcs,
|
||||
const char *name)
|
||||
|
||||
Create one Output object. See the discussion below for a description of the
|
||||
contents of the xf86OutputFuncsRec. This is also called from PreInit and
|
||||
need not be re-invoked at each ScreenInit time. An Output should be created
|
||||
for every Output present in the hardware, not just for outputs which have
|
||||
detected monitors.
|
||||
|
||||
Bool
|
||||
xf86OutputRename (xf86OutputPtr output, const char *name)
|
||||
|
||||
If necessary, the name of an output can be changed after it is created using
|
||||
this function.
|
||||
|
||||
Bool
|
||||
xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||
|
||||
Using the resources provided, and the configuration specified by the user,
|
||||
this function computes an initial configuration for the server. It tries to
|
||||
enable as much hardware as possible using some fairly simple heuristics.
|
||||
|
||||
The 'canGrow' parameter indicates that the frame buffer does not have a fixed
|
||||
size (fixed size frame buffers are required by XAA). When the frame buffer
|
||||
has a fixed size, the configuration selects a 'reasonablely large' frame
|
||||
buffer so that common reconfiguration options are possible. For resizable
|
||||
frame buffers, the frame buffer is set to the smallest size that encloses
|
||||
the desired configuration.
|
||||
|
||||
3.2 ScreenInit functions
|
||||
|
||||
These functions should be used during the driver ScreenInit phase.
|
||||
|
||||
Bool
|
||||
xf86DiDGAInit (ScreenPtr screen, unsigned long dga_address)
|
||||
|
||||
This function provides driver-independent accelerated DGA support for some
|
||||
of the DGA operations; using this, the driver can avoid needing to implement
|
||||
any of the rest of DGA.
|
||||
|
||||
Bool
|
||||
xf86SaveScreen(ScreenPtr pScreen, int mode)
|
||||
|
||||
Stick this in pScreen->SaveScreen and the core X screen saver will be
|
||||
implemented by disabling outputs and crtcs using their dpms functions.
|
||||
|
||||
void
|
||||
xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags)
|
||||
|
||||
Pass this function to xf86DPMSInit and all DPMS mode switching will be
|
||||
managed by using the dpms functions provided by the Outputs and CRTCs.
|
||||
|
||||
Bool
|
||||
xf86CrtcScreenInit (ScreenPtr screen)
|
||||
|
||||
This function completes the screen initialization process for the crtc and
|
||||
output objects. Call it near the end of the ScreenInit function, after the
|
||||
frame buffer and acceleration layers have been added.
|
||||
|
||||
3.3 EnterVT functions
|
||||
|
||||
Functions used during EnterVT, or whenever the current configuration needs
|
||||
to be applied to the hardware.
|
||||
|
||||
Bool
|
||||
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||
|
||||
xf86InitialConfiguration selects the desired configuration at PreInit time;
|
||||
when the server finally hits ScreenInit, xf86SetDesiredModes is used by the
|
||||
driver to take that configuration and apply it to the hardware. In addition,
|
||||
successful mode selection at other times updates the configuration that will
|
||||
be used by this function, so LeaveVT/EnterVT pairs can simply invoke this
|
||||
and return to the previous configuration.
|
||||
|
||||
3.4 SwitchMode functions
|
||||
|
||||
Functions called from the pScrn->SwitchMode hook, which is used by the
|
||||
XFree86-VidModeExtension and the keypad mode switch commands.
|
||||
|
||||
Bool
|
||||
xf86SetSingleMode (ScrnInfoPtr scrn,
|
||||
DisplayModePtr desired,
|
||||
Rotation rotation)
|
||||
|
||||
This function applies the specified mode to all active outputs. Which is to
|
||||
say, it picks reasonable modes for all active outputs, attempting to get the
|
||||
screen to the specified size while not breaking anything that is currently
|
||||
working.
|
||||
|
||||
3.7 get_modes functions
|
||||
|
||||
Functions called during output->get_modes to help build lists of modes
|
||||
|
||||
xf86MonPtr
|
||||
xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
|
||||
|
||||
This returns the EDID data structure for the 'output' using the I2C bus
|
||||
'pDDCBus'. This has no effect on 'output' itself.
|
||||
|
||||
void
|
||||
xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon)
|
||||
|
||||
Once the EDID data has been fetched, this call applies the EDID data to the
|
||||
output object, setting the physical size and also various properties, like
|
||||
the DDC root window property (when output is the 'compat' output), and the
|
||||
RandR 1.2 EDID output properties.
|
||||
|
||||
DisplayModePtr
|
||||
xf86OutputGetEDIDModes (xf86OutputPtr output)
|
||||
|
||||
Given an EDID data structure, this function computes a list of suitable
|
||||
modes. This function also applies a sequence of 'quirks' during this process
|
||||
so that the returned modes may not actually match the mode data present in
|
||||
the EDID data.
|
||||
|
||||
3.6 Other functions
|
||||
|
||||
These remaining functions in the API can be used by the driver as needed.
|
||||
|
||||
Bool
|
||||
xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
||||
int x, int y)
|
||||
|
||||
Applies a mode to a CRTC. All of the outputs which are currently using the
|
||||
specified CRTC are included in the mode setting process. 'x' and 'y' are the
|
||||
offset within the frame buffer that the crtc is placed at. No checking is
|
||||
done in this function to ensure that the mode is usable by the active
|
||||
outputs.
|
||||
|
||||
void
|
||||
xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY)
|
||||
|
||||
This discards the mode lists for all outputs, re-detects monitor presence
|
||||
and then acquires new mode lists for all monitors which are not disconnected.
|
||||
Monitor configuration data is used to modify the mode lists returned by the
|
||||
outputs. 'maxX' and 'maxY' limit the maximum size modes that will be
|
||||
returned.
|
||||
|
||||
void
|
||||
xf86SetScrnInfoModes (ScrnInfoPtr pScrn)
|
||||
|
||||
This copies the 'compat' output mode list into the pScrn modes list which is
|
||||
used by the XFree86-VidModeExtension and the keypad mode switching
|
||||
operations. The current 'desired' mode for the CRTC associated with the
|
||||
'compat' output is placed first in this list to indicate the current mode.
|
||||
Usually, the driver won't need to call this function as
|
||||
xf86InitialConfiguration will do so automatically, as well as any RandR
|
||||
functions which reprobe for modes. However, if the driver reprobes for modes
|
||||
at other times using xf86ProbeOutputModes, this function needs to be called.
|
||||
|
||||
Bool
|
||||
xf86DiDGAReInit (ScreenPtr pScreen)
|
||||
|
||||
This is similar to xf86SetScrnInfoModes, but it applies the 'compat' output
|
||||
mode list to the set of modes advertised by the DGA extension; it needs to
|
||||
be called whenever xf86ProbeOutputModes is invoked.
|
||||
|
||||
void
|
||||
xf86DisableUnusedFunctions(ScrnInfoPtr pScrn)
|
||||
|
||||
After any sequence of calls using xf86CrtcSetMode, this function cleans up
|
||||
any leftover Output and CRTC objects by disabling them, saving power. It is
|
||||
safe to call this whenever the server is running as it only disables objects
|
||||
which are not currently in use.
|
||||
|
||||
4. CRTC operations
|
||||
|
||||
4.1 CRTC functions
|
||||
|
||||
These functions provide an abstract interface for the CRTC object; most
|
||||
manipulation of the CRTC object is done through these functions.
|
||||
|
||||
void
|
||||
crtc->funcs->dpms (xf86CrtcPtr crtc, int mode)
|
||||
|
||||
Where 'mode' is one of DPMSModeOff, DPMSModeSuspend, DPMSModeStandby or
|
||||
DPMSModeOn. This requests that the crtc go to the specified power state.
|
||||
When changing power states, the output dpms functions are invoked before the
|
||||
crtc dpms functions.
|
||||
|
||||
void
|
||||
crtc->funcs->save (xf86CrtcPtr crtc)
|
||||
|
||||
void
|
||||
crtc->funcs->restore (xf86CrtcPtr crtc)
|
||||
|
||||
Preserve/restore any register contents related to the CRTC. These are
|
||||
strictly a convenience for the driver writer; if the existing driver has
|
||||
fully operation save/restore functions, you need not place any additional
|
||||
code here. In particular, the server itself never uses this function.
|
||||
|
||||
Bool
|
||||
crtc->funcs->lock (xf86CrtcPtr crtc)
|
||||
|
||||
void
|
||||
crtc->funcs->unlock (xf86CrtcPtr crtc)
|
||||
|
||||
These functions are invoked around mode setting operations; the intent is
|
||||
that DRI locking be done here to prevent DRI applications from manipulating
|
||||
the hardware while the server is busy changing the output configuration. If
|
||||
the lock function returns FALSE, the unlock function will not be invoked.
|
||||
|
||||
Bool
|
||||
crtc->funcs->mode_fixup (xf86CrtcPtr crtc,
|
||||
DisplayModePtr mode,
|
||||
DisplayModePtr adjusted_mode)
|
||||
|
||||
This call gives the CRTC a chance to see what mode will be set and to
|
||||
comment on the mode by changing 'adjusted_mode' as needed. This function
|
||||
shall not modify the state of the crtc hardware at all. If the CRTC cannot
|
||||
accept this mode, this function may return FALSE.
|
||||
|
||||
void
|
||||
crtc->funcs->prepare (xf86CrtcPtr crtc)
|
||||
|
||||
This call is made just before the mode is set to make the hardware ready for
|
||||
the operation. A usual function to perform here is to disable the crtc so
|
||||
that mode setting can occur with clocks turned off and outputs deactivated.
|
||||
|
||||
void
|
||||
crtc->funcs->mode_set (xf86CrtcPtr crtc,
|
||||
DisplayModePtr mode,
|
||||
DisplayModePtr adjusted_mode)
|
||||
|
||||
This function applies the specified mode (possibly adjusted by the CRTC
|
||||
and/or Outputs).
|
||||
|
||||
void
|
||||
crtc->funcs->commit (xf86CrtcPtr crtc)
|
||||
|
||||
Once the mode has been applied to the CRTC and Outputs, this function is
|
||||
invoked to let the hardware turn things back on.
|
||||
|
||||
void
|
||||
crtc->funcs->gamma_set (xf86CrtcPtr crtc, CARD16 *red,
|
||||
CARD16 *green, CARD16 *blue, int size)
|
||||
|
||||
This function adjusts the gamma ramps for the specified crtc.
|
||||
|
||||
void *
|
||||
crtc->funcs->shadow_allocate (xf86CrtcPtr crtc, int width, int height)
|
||||
|
||||
This function allocates frame buffer space for a shadow frame buffer. When
|
||||
allocated, the crtc must scan from the shadow instead of the main frame
|
||||
buffer. This is used for rotation. The address returned is passed to the
|
||||
shadow_create function. This function should return NULL on failure.
|
||||
|
||||
PixmapPtr
|
||||
crtc->funcs->shadow_create (xf86CrtcPtr crtc, void *data,
|
||||
int width, int height)
|
||||
|
||||
This function creates a pixmap object that will be used as a shadow of the
|
||||
main frame buffer for CRTCs which are rotated or reflected. 'data' is the
|
||||
value returned by shadow_allocate.
|
||||
|
||||
void
|
||||
crtc->funcs->shadow_destroy (xf86CrtcPtr crtc, PixmapPtr pPixmap,
|
||||
void *data)
|
||||
|
||||
Destroys any associated shadow objects. If pPixmap is NULL, then a pixmap
|
||||
was not created, but 'data' may still be non-NULL indicating that the shadow
|
||||
had been allocated.
|
||||
|
||||
void
|
||||
crtc->funcs->destroy (xf86CrtcPtr crtc)
|
||||
|
||||
When a CRTC is destroyed (which only happens in error cases), this function
|
||||
can clean up any driver-specific data.
|
||||
|
||||
4.2 CRTC fields
|
||||
|
||||
The CRTC object is not opaque; there are several fields of interest to the
|
||||
driver writer.
|
||||
|
||||
struct _xf86Crtc {
|
||||
/**
|
||||
* Associated ScrnInfo
|
||||
*/
|
||||
ScrnInfoPtr scrn;
|
||||
|
||||
/**
|
||||
* Active state of this CRTC
|
||||
*
|
||||
* Set when this CRTC is driving one or more outputs
|
||||
*/
|
||||
Bool enabled;
|
||||
|
||||
/** Track whether cursor is within CRTC range */
|
||||
Bool cursorInRange;
|
||||
|
||||
/** Track state of cursor associated with this CRTC */
|
||||
Bool cursorShown;
|
||||
|
||||
/**
|
||||
* Active mode
|
||||
*
|
||||
* This reflects the mode as set in the CRTC currently
|
||||
* It will be cleared when the VT is not active or
|
||||
* during server startup
|
||||
*/
|
||||
DisplayModeRec mode;
|
||||
Rotation rotation;
|
||||
PixmapPtr rotatedPixmap;
|
||||
void *rotatedData;
|
||||
|
||||
/**
|
||||
* Position on screen
|
||||
*
|
||||
* Locates this CRTC within the frame buffer
|
||||
*/
|
||||
int x, y;
|
||||
|
||||
/**
|
||||
* Desired mode
|
||||
*
|
||||
* This is set to the requested mode, independent of
|
||||
* whether the VT is active. In particular, it receives
|
||||
* the startup configured mode and saves the active mode
|
||||
* on VT switch.
|
||||
*/
|
||||
DisplayModeRec desiredMode;
|
||||
Rotation desiredRotation;
|
||||
int desiredX, desiredY;
|
||||
|
||||
/** crtc-specific functions */
|
||||
const xf86CrtcFuncsRec *funcs;
|
||||
|
||||
/**
|
||||
* Driver private
|
||||
*
|
||||
* Holds driver-private information
|
||||
*/
|
||||
void *driver_private;
|
||||
#ifdef RANDR_12_INTERFACE
|
||||
/**
|
||||
* RandR crtc
|
||||
*
|
||||
* When RandR 1.2 is available, this
|
||||
* points at the associated crtc object
|
||||
*/
|
||||
RRCrtcPtr randr_crtc;
|
||||
#else
|
||||
void *randr_crtc;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
5. Output functions.
|
||||
|
||||
6. Configuration
|
||||
|
||||
Because the configuration file syntax is fixed,
|
||||
this was done by creating new "Driver" section options that hook specific
|
||||
outputs to specific "Monitor" sections in the file. The option:
|
||||
section of the form:
|
||||
|
||||
Option "monitor-VGA" "My VGA Monitor"
|
||||
|
||||
connects the VGA output of this driver to the "Monitor" section with
|
||||
Identifier "My VGA Monitor". All of the usual monitor options can now be
|
||||
placed in that "Monitor" section and will be applied to the VGA output
|
||||
configuration.
|
|
@ -72,6 +72,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "xf86_OSproc.h"
|
||||
#include "inputstr.h"
|
||||
|
||||
#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
|
||||
|
||||
#if !defined(PANORAMIX)
|
||||
extern Bool noPanoramiXExtension;
|
||||
#endif
|
||||
|
@ -2203,8 +2205,8 @@ DRICreatePCIBusID(pciVideoPtr PciInfo)
|
|||
|
||||
tag = pciTag(PciInfo->bus, PciInfo->device, PciInfo->func);
|
||||
domain = xf86GetPciDomain(tag);
|
||||
snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain, PciInfo->bus,
|
||||
PciInfo->device, PciInfo->func);
|
||||
snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain,
|
||||
PCI_BUS_NO_DOMAIN(PciInfo->bus), PciInfo->device, PciInfo->func);
|
||||
return busID;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ static XF86ModuleVersionInfo uda1380VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XF86_VERSION_CURRENT,
|
||||
XORG_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_VIDEODRV, /* This needs the video driver ABI */
|
||||
ABI_VIDEODRV_VERSION,
|
||||
|
|
|
@ -2,7 +2,8 @@ noinst_LIBRARIES = libloader.a
|
|||
|
||||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \
|
||||
-I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \
|
||||
-I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes
|
||||
-I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \
|
||||
-I$(srcdir)/../ramdac
|
||||
|
||||
#AM_LDFLAGS = -r
|
||||
AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS)
|
||||
|
|
|
@ -271,10 +271,8 @@ _X_HIDDEN void *dixLookupTab[] = {
|
|||
SYMFUNC(AllocateColormapPrivateIndex)
|
||||
SYMFUNC(AllocateDevicePrivateIndex)
|
||||
SYMFUNC(AllocateDevicePrivate)
|
||||
#ifdef PIXPRIV
|
||||
SYMFUNC(AllocatePixmapPrivateIndex)
|
||||
SYMFUNC(AllocatePixmapPrivate)
|
||||
#endif
|
||||
/* resource.c */
|
||||
SYMFUNC(AddResource)
|
||||
SYMFUNC(ChangeResourceValue)
|
||||
|
|
|
@ -841,6 +841,7 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
|
|||
static const char *compiled_in_modules[] = {
|
||||
"ddc",
|
||||
"i2c",
|
||||
"ramdac",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -861,7 +862,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
|||
PatternPtr patterns = NULL;
|
||||
int noncanonical = 0;
|
||||
char *m = NULL;
|
||||
char **cim;
|
||||
const char **cim;
|
||||
|
||||
xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
|
||||
|
||||
|
|
|
@ -1220,6 +1220,11 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
|||
SYMFUNC(xf86RandR12SetConfig)
|
||||
SYMFUNC(xf86RandR12SetRotations)
|
||||
#endif
|
||||
SYMFUNC(xf86_cursors_init)
|
||||
SYMFUNC(xf86_reload_cursors)
|
||||
SYMFUNC(xf86_show_cursors)
|
||||
SYMFUNC(xf86_hide_cursors)
|
||||
SYMFUNC(xf86_cursors_fini)
|
||||
|
||||
SYMFUNC(xf86DoEDID_DDC1)
|
||||
SYMFUNC(xf86DoEDID_DDC2)
|
||||
|
|
|
@ -3,6 +3,7 @@ noinst_LIBRARIES = libxf86modes.a
|
|||
libxf86modes_a_SOURCES = \
|
||||
xf86Crtc.c \
|
||||
xf86Crtc.h \
|
||||
xf86Cursors.c \
|
||||
xf86cvt.c \
|
||||
xf86DiDGA.c \
|
||||
xf86EdidModes.c \
|
||||
|
@ -16,7 +17,8 @@ libxf86modes_a_SOURCES = \
|
|||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
|
||||
-I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
|
||||
-I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
|
||||
-I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod
|
||||
-I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \
|
||||
-I$(srcdir)/../dixmods/extmod
|
||||
|
||||
sdk_HEADERS = \
|
||||
xf86Crtc.h \
|
||||
|
|
|
@ -282,7 +282,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
|||
goto done;
|
||||
}
|
||||
|
||||
/* Disable the outputs and CRTCs before setting the mode. */
|
||||
/* Prepare the outputs and CRTCs before setting the mode. */
|
||||
for (i = 0; i < xf86_config->num_output; i++) {
|
||||
xf86OutputPtr output = xf86_config->output[i];
|
||||
|
||||
|
@ -290,10 +290,10 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
|||
continue;
|
||||
|
||||
/* Disable the output as the first thing we do. */
|
||||
output->funcs->dpms(output, DPMSModeOff);
|
||||
output->funcs->prepare(output);
|
||||
}
|
||||
|
||||
crtc->funcs->dpms(crtc, DPMSModeOff);
|
||||
crtc->funcs->prepare(crtc);
|
||||
|
||||
/* Set up the DPLL and any output state that needs to adjust or depend
|
||||
* on the DPLL.
|
||||
|
@ -307,12 +307,12 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
|||
}
|
||||
|
||||
/* Now, enable the clocks, plane, pipe, and outputs that we set up. */
|
||||
crtc->funcs->dpms(crtc, DPMSModeOn);
|
||||
crtc->funcs->commit(crtc);
|
||||
for (i = 0; i < xf86_config->num_output; i++)
|
||||
{
|
||||
xf86OutputPtr output = xf86_config->output[i];
|
||||
if (output->crtc == crtc)
|
||||
output->funcs->dpms(output, DPMSModeOn);
|
||||
output->funcs->commit(output);
|
||||
}
|
||||
|
||||
/* XXX free adjustedmode */
|
||||
|
@ -545,6 +545,60 @@ xf86OutputDestroy (xf86OutputPtr output)
|
|||
xfree (output);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called during CreateScreenResources to hook up RandR
|
||||
*/
|
||||
static Bool
|
||||
xf86CrtcCreateScreenResources (ScreenPtr screen)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
screen->CreateScreenResources = config->CreateScreenResources;
|
||||
|
||||
if (!(*screen->CreateScreenResources)(screen))
|
||||
return FALSE;
|
||||
|
||||
if (!xf86RandR12CreateScreenResources (screen))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called at ScreenInit time to set up
|
||||
*/
|
||||
Bool
|
||||
xf86CrtcScreenInit (ScreenPtr screen)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
/* Rotation */
|
||||
xf86DrvMsg(scrn->scrnIndex, X_INFO, "RandR 1.2 enabled, ignore the following RandR disabled message.\n");
|
||||
xf86DisableRandR(); /* Disable old RandR extension support */
|
||||
xf86RandR12Init (screen);
|
||||
|
||||
/* support all rotations if every crtc has the shadow alloc funcs */
|
||||
for (c = 0; c < config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = config->crtc[c];
|
||||
if (!crtc->funcs->shadow_allocate || !crtc->funcs->shadow_create)
|
||||
break;
|
||||
}
|
||||
if (c == config->num_crtc)
|
||||
xf86RandR12SetRotations (screen, RR_Rotate_0 | RR_Rotate_90 |
|
||||
RR_Rotate_180 | RR_Rotate_270);
|
||||
else
|
||||
xf86RandR12SetRotations (screen, RR_Rotate_0);
|
||||
|
||||
/* Wrap CreateScreenResources so we can initialize the RandR code */
|
||||
config->CreateScreenResources = screen->CreateScreenResources;
|
||||
screen->CreateScreenResources = xf86CrtcCreateScreenResources;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static DisplayModePtr
|
||||
xf86DefaultMode (xf86OutputPtr output, int width, int height)
|
||||
{
|
||||
|
@ -879,13 +933,17 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
|
|||
{
|
||||
xf86OutputPtr out_rel = config->output[or];
|
||||
XF86ConfMonitorPtr rel_mon = out_rel->conf_monitor;
|
||||
char *name;
|
||||
|
||||
if (rel_mon)
|
||||
name = rel_mon->mon_identifier;
|
||||
else
|
||||
name = out_rel->name;
|
||||
if (!strcmp (relative_name, name))
|
||||
{
|
||||
if (xf86nameCompare (rel_mon->mon_identifier,
|
||||
relative_name) == 0)
|
||||
{
|
||||
relative = config->output[or];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (strcmp (out_rel->name, relative_name) == 0)
|
||||
{
|
||||
relative = config->output[or];
|
||||
break;
|
||||
|
@ -1100,7 +1158,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
|||
output->status = (*output->funcs->detect)(output);
|
||||
|
||||
if (output->status == XF86OutputStatusDisconnected)
|
||||
{
|
||||
xf86OutputSetEDID (output, NULL);
|
||||
continue;
|
||||
}
|
||||
|
||||
memset (&mon_rec, '\0', sizeof (mon_rec));
|
||||
|
||||
|
@ -1542,6 +1603,189 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Using the desired mode information in each crtc, set
|
||||
* modes (used in EnterVT functions, or at server startup)
|
||||
*/
|
||||
|
||||
Bool
|
||||
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
for (c = 0; c < config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = config->crtc[c];
|
||||
xf86OutputPtr output = NULL;
|
||||
int o;
|
||||
|
||||
if (config->output[config->compat_output]->crtc == crtc)
|
||||
output = config->output[config->compat_output];
|
||||
else
|
||||
{
|
||||
for (o = 0; o < config->num_output; o++)
|
||||
if (config->output[o]->crtc == crtc)
|
||||
{
|
||||
output = config->output[o];
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Skip disabled crtcs
|
||||
*/
|
||||
if (!output)
|
||||
continue;
|
||||
|
||||
/* Mark that we'll need to re-set the mode for sure */
|
||||
memset(&crtc->mode, 0, sizeof(crtc->mode));
|
||||
if (!crtc->desiredMode.CrtcHDisplay)
|
||||
{
|
||||
DisplayModePtr mode = xf86OutputFindClosestMode (output, scrn->currentMode);
|
||||
|
||||
if (!mode)
|
||||
return FALSE;
|
||||
crtc->desiredMode = *mode;
|
||||
crtc->desiredRotation = RR_Rotate_0;
|
||||
crtc->desiredX = 0;
|
||||
crtc->desiredY = 0;
|
||||
}
|
||||
|
||||
if (!xf86CrtcSetMode (crtc, &crtc->desiredMode, crtc->desiredRotation,
|
||||
crtc->desiredX, crtc->desiredY))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
xf86DisableUnusedFunctions(scrn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* In the current world order, there are lists of modes per output, which may
|
||||
* or may not include the mode that was asked to be set by XFree86's mode
|
||||
* selection. Find the closest one, in the following preference order:
|
||||
*
|
||||
* - Equality
|
||||
* - Closer in size to the requested mode, but no larger
|
||||
* - Closer in refresh rate to the requested mode.
|
||||
*/
|
||||
|
||||
DisplayModePtr
|
||||
xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired)
|
||||
{
|
||||
DisplayModePtr best = NULL, scan = NULL;
|
||||
|
||||
for (scan = output->probed_modes; scan != NULL; scan = scan->next)
|
||||
{
|
||||
/* If there's an exact match, we're done. */
|
||||
if (xf86ModesEqual(scan, desired)) {
|
||||
best = desired;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Reject if it's larger than the desired mode. */
|
||||
if (scan->HDisplay > desired->HDisplay ||
|
||||
scan->VDisplay > desired->VDisplay)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we haven't picked a best mode yet, use the first
|
||||
* one in the size range
|
||||
*/
|
||||
if (best == NULL)
|
||||
{
|
||||
best = scan;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Find if it's closer to the right size than the current best
|
||||
* option.
|
||||
*/
|
||||
if ((scan->HDisplay > best->HDisplay &&
|
||||
scan->VDisplay >= best->VDisplay) ||
|
||||
(scan->HDisplay >= best->HDisplay &&
|
||||
scan->VDisplay > best->VDisplay))
|
||||
{
|
||||
best = scan;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Find if it's still closer to the right refresh than the current
|
||||
* best resolution.
|
||||
*/
|
||||
if (scan->HDisplay == best->HDisplay &&
|
||||
scan->VDisplay == best->VDisplay &&
|
||||
(fabs(scan->VRefresh - desired->VRefresh) <
|
||||
fabs(best->VRefresh - desired->VRefresh))) {
|
||||
best = scan;
|
||||
}
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
/**
|
||||
* When setting a mode through XFree86-VidModeExtension or XFree86-DGA,
|
||||
* take the specified mode and apply it to the crtc connected to the compat
|
||||
* output. Then, find similar modes for the other outputs, as with the
|
||||
* InitialConfiguration code above. The goal is to clone the desired
|
||||
* mode across all outputs that are currently active.
|
||||
*/
|
||||
|
||||
Bool
|
||||
xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
Bool ok = TRUE;
|
||||
xf86OutputPtr compat_output = config->output[config->compat_output];
|
||||
DisplayModePtr compat_mode;
|
||||
int c;
|
||||
|
||||
/*
|
||||
* Let the compat output drive the final mode selection
|
||||
*/
|
||||
compat_mode = xf86OutputFindClosestMode (compat_output, desired);
|
||||
if (compat_mode)
|
||||
desired = compat_mode;
|
||||
|
||||
for (c = 0; c < config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = config->crtc[c];
|
||||
DisplayModePtr crtc_mode = NULL;
|
||||
int o;
|
||||
|
||||
if (!crtc->enabled)
|
||||
continue;
|
||||
|
||||
for (o = 0; o < config->num_output; o++)
|
||||
{
|
||||
xf86OutputPtr output = config->output[o];
|
||||
DisplayModePtr output_mode;
|
||||
|
||||
/* skip outputs not on this crtc */
|
||||
if (output->crtc != crtc)
|
||||
continue;
|
||||
|
||||
if (crtc_mode)
|
||||
{
|
||||
output_mode = xf86OutputFindClosestMode (output, crtc_mode);
|
||||
if (output_mode != crtc_mode)
|
||||
output->crtc = NULL;
|
||||
}
|
||||
else
|
||||
crtc_mode = xf86OutputFindClosestMode (output, desired);
|
||||
}
|
||||
if (!xf86CrtcSetMode (crtc, crtc_mode, rotation, 0, 0))
|
||||
ok = FALSE;
|
||||
else
|
||||
crtc->desiredMode = *crtc_mode;
|
||||
}
|
||||
xf86DisableUnusedFunctions(pScrn);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the DPMS power mode of all outputs and CRTCs.
|
||||
*
|
||||
|
@ -1738,3 +1982,12 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
|
|||
|
||||
return xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
|
||||
}
|
||||
|
||||
static char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D",
|
||||
"DVI-A", "Composite", "S-Video",
|
||||
"Component", "LFP", "Proprietary" };
|
||||
char *
|
||||
xf86ConnectorGetName(xf86ConnectorType connector)
|
||||
{
|
||||
return _xf86ConnectorNames[connector];
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "xf86Rename.h"
|
||||
#endif
|
||||
#include "xf86Modes.h"
|
||||
#include "xf86Cursor.h"
|
||||
#include "damage.h"
|
||||
|
||||
/* Compat definitions for older X Servers. */
|
||||
|
@ -37,10 +38,27 @@
|
|||
#ifndef M_T_DRIVER
|
||||
#define M_T_DRIVER 0x40
|
||||
#endif
|
||||
#ifndef HARDWARE_CURSOR_ARGB
|
||||
#define HARDWARE_CURSOR_ARGB 0x00004000
|
||||
#endif
|
||||
|
||||
typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
|
||||
typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
|
||||
|
||||
/* define a standard for connector types */
|
||||
typedef enum _xf86ConnectorType {
|
||||
XF86ConnectorNone,
|
||||
XF86ConnectorVGA,
|
||||
XF86ConnectorDVI_I,
|
||||
XF86ConnectorDVI_D,
|
||||
XF86ConnectorDVI_A,
|
||||
XF86ConnectorComposite,
|
||||
XF86ConnectorSvideo,
|
||||
XF86ConnectorComponent,
|
||||
XF86ConnectorLFP,
|
||||
XF86ConnectorProprietary,
|
||||
} xf86ConnectorType;
|
||||
|
||||
typedef enum _xf86OutputStatus {
|
||||
XF86OutputStatusConnected,
|
||||
XF86OutputStatusDisconnected,
|
||||
|
@ -96,6 +114,12 @@ typedef struct _xf86CrtcFuncs {
|
|||
DisplayModePtr mode,
|
||||
DisplayModePtr adjusted_mode);
|
||||
|
||||
/**
|
||||
* Prepare CRTC for an upcoming mode set.
|
||||
*/
|
||||
void
|
||||
(*prepare)(xf86CrtcPtr crtc);
|
||||
|
||||
/**
|
||||
* Callback for setting up a video mode after fixups have been made.
|
||||
*/
|
||||
|
@ -105,6 +129,12 @@ typedef struct _xf86CrtcFuncs {
|
|||
DisplayModePtr adjusted_mode,
|
||||
int x, int y);
|
||||
|
||||
/**
|
||||
* Commit mode changes to a CRTC
|
||||
*/
|
||||
void
|
||||
(*commit)(xf86CrtcPtr crtc);
|
||||
|
||||
/* Set the color ramps for the CRTC to the given values. */
|
||||
void
|
||||
(*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
|
||||
|
@ -128,6 +158,42 @@ typedef struct _xf86CrtcFuncs {
|
|||
void
|
||||
(*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
|
||||
|
||||
/**
|
||||
* Set cursor colors
|
||||
*/
|
||||
void
|
||||
(*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
|
||||
|
||||
/**
|
||||
* Set cursor position
|
||||
*/
|
||||
void
|
||||
(*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
|
||||
|
||||
/**
|
||||
* Show cursor
|
||||
*/
|
||||
void
|
||||
(*show_cursor) (xf86CrtcPtr crtc);
|
||||
|
||||
/**
|
||||
* Hide cursor
|
||||
*/
|
||||
void
|
||||
(*hide_cursor) (xf86CrtcPtr crtc);
|
||||
|
||||
/**
|
||||
* Load monochrome image
|
||||
*/
|
||||
void
|
||||
(*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
|
||||
|
||||
/**
|
||||
* Load ARGB image
|
||||
*/
|
||||
void
|
||||
(*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
|
||||
|
||||
/**
|
||||
* Clean up driver-specific bits of the crtc
|
||||
*/
|
||||
|
@ -148,12 +214,6 @@ struct _xf86Crtc {
|
|||
*/
|
||||
Bool enabled;
|
||||
|
||||
/** Track whether cursor is within CRTC range */
|
||||
Bool cursorInRange;
|
||||
|
||||
/** Track state of cursor associated with this CRTC */
|
||||
Bool cursorShown;
|
||||
|
||||
/**
|
||||
* Active mode
|
||||
*
|
||||
|
@ -206,6 +266,19 @@ struct _xf86Crtc {
|
|||
#else
|
||||
void *randr_crtc;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Current cursor is ARGB
|
||||
*/
|
||||
Bool cursor_argb;
|
||||
/**
|
||||
* Track whether cursor is within CRTC range
|
||||
*/
|
||||
Bool cursor_in_range;
|
||||
/**
|
||||
* Track state of cursor associated with this CRTC
|
||||
*/
|
||||
Bool cursor_shown;
|
||||
};
|
||||
|
||||
typedef struct _xf86OutputFuncs {
|
||||
|
@ -263,6 +336,18 @@ typedef struct _xf86OutputFuncs {
|
|||
DisplayModePtr mode,
|
||||
DisplayModePtr adjusted_mode);
|
||||
|
||||
/**
|
||||
* Callback for preparing mode changes on an output
|
||||
*/
|
||||
void
|
||||
(*prepare)(xf86OutputPtr output);
|
||||
|
||||
/**
|
||||
* Callback for committing mode changes on an output
|
||||
*/
|
||||
void
|
||||
(*commit)(xf86OutputPtr output);
|
||||
|
||||
/**
|
||||
* Callback for setting up a video mode after fixups have been made.
|
||||
*
|
||||
|
@ -444,7 +529,8 @@ typedef struct _xf86CrtcConfig {
|
|||
int maxWidth, maxHeight;
|
||||
|
||||
/* For crtc-based rotation */
|
||||
DamagePtr rotationDamage;
|
||||
DamagePtr rotation_damage;
|
||||
Bool rotation_damage_registered;
|
||||
|
||||
/* DGA */
|
||||
unsigned int dga_flags;
|
||||
|
@ -456,6 +542,14 @@ typedef struct _xf86CrtcConfig {
|
|||
|
||||
const xf86CrtcConfigFuncsRec *funcs;
|
||||
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
|
||||
/* Cursor information */
|
||||
xf86CursorInfoPtr cursor_info;
|
||||
CursorPtr cursor;
|
||||
CARD8 *cursor_image;
|
||||
Bool cursor_on;
|
||||
CARD32 cursor_fg, cursor_bg;
|
||||
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
|
||||
|
||||
extern int xf86CrtcConfigPrivateIndex;
|
||||
|
@ -486,25 +580,6 @@ void
|
|||
xf86CrtcDestroy (xf86CrtcPtr crtc);
|
||||
|
||||
|
||||
/**
|
||||
* Allocate a crtc for the specified output
|
||||
*
|
||||
* Find a currently unused CRTC which is suitable for
|
||||
* the specified output
|
||||
*/
|
||||
|
||||
xf86CrtcPtr
|
||||
xf86AllocCrtc (xf86OutputPtr output);
|
||||
|
||||
/**
|
||||
* Free a crtc
|
||||
*
|
||||
* Mark the crtc as unused by any outputs
|
||||
*/
|
||||
|
||||
void
|
||||
xf86FreeCrtc (xf86CrtcPtr crtc);
|
||||
|
||||
/**
|
||||
* Sets the given video mode on the given crtc
|
||||
*/
|
||||
|
@ -544,6 +619,9 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY);
|
|||
void
|
||||
xf86SetScrnInfoModes (ScrnInfoPtr pScrn);
|
||||
|
||||
Bool
|
||||
xf86CrtcScreenInit (ScreenPtr pScreen);
|
||||
|
||||
Bool
|
||||
xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow);
|
||||
|
||||
|
@ -556,6 +634,12 @@ xf86SaveScreen(ScreenPtr pScreen, int mode);
|
|||
void
|
||||
xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
|
||||
|
||||
DisplayModePtr
|
||||
xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired);
|
||||
|
||||
Bool
|
||||
xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
|
||||
|
||||
/**
|
||||
* Set the EDID information for the specified output
|
||||
*/
|
||||
|
@ -594,4 +678,55 @@ xf86DiDGAReInit (ScreenPtr pScreen);
|
|||
void
|
||||
xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
|
||||
|
||||
/*
|
||||
* Get a standard string name for a connector type
|
||||
*/
|
||||
char *
|
||||
xf86ConnectorGetName(xf86ConnectorType connector);
|
||||
|
||||
/*
|
||||
* Using the desired mode information in each crtc, set
|
||||
* modes (used in EnterVT functions, or at server startup)
|
||||
*/
|
||||
|
||||
Bool
|
||||
xf86SetDesiredModes (ScrnInfoPtr pScrn);
|
||||
|
||||
/**
|
||||
* Initialize the CRTC-based cursor code. CRTC function vectors must
|
||||
* contain relevant cursor setting functions.
|
||||
*
|
||||
* Driver should call this from ScreenInit function
|
||||
*/
|
||||
Bool
|
||||
xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags);
|
||||
|
||||
/**
|
||||
* Called when anything on the screen is reconfigured.
|
||||
*
|
||||
* Reloads cursor images as needed, then adjusts cursor positions.
|
||||
*
|
||||
* Driver should call this from crtc commit function.
|
||||
*/
|
||||
void
|
||||
xf86_reload_cursors (ScreenPtr screen);
|
||||
|
||||
/**
|
||||
* Called from EnterVT to turn the cursors back on
|
||||
*/
|
||||
void
|
||||
xf86_show_cursors (ScrnInfoPtr scrn);
|
||||
|
||||
/**
|
||||
* Called by the driver to turn cursors off
|
||||
*/
|
||||
void
|
||||
xf86_hide_cursors (ScrnInfoPtr scrn);
|
||||
|
||||
/**
|
||||
* Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
|
||||
*/
|
||||
void
|
||||
xf86_cursors_fini (ScreenPtr screen);
|
||||
|
||||
#endif /* _XF86CRTC_H_ */
|
||||
|
|
|
@ -0,0 +1,608 @@
|
|||
/*
|
||||
* Copyright © 2007 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting documentation, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
#include <xorg-config.h>
|
||||
#else
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86DDC.h"
|
||||
#include "xf86Crtc.h"
|
||||
#include "xf86Modes.h"
|
||||
#include "xf86RandR12.h"
|
||||
#include "X11/extensions/render.h"
|
||||
#define DPMS_SERVER
|
||||
#include "X11/extensions/dpms.h"
|
||||
#include "X11/Xatom.h"
|
||||
#ifdef RENDER
|
||||
#include "picturestr.h"
|
||||
#endif
|
||||
#include "cursorstr.h"
|
||||
#include "inputstr.h"
|
||||
|
||||
/*
|
||||
* Given a screen coordinate, rotate back to a cursor source coordinate
|
||||
*/
|
||||
static void
|
||||
xf86_crtc_rotate_coord (Rotation rotation,
|
||||
int width,
|
||||
int height,
|
||||
int x_dst,
|
||||
int y_dst,
|
||||
int *x_src,
|
||||
int *y_src)
|
||||
{
|
||||
if (rotation & RR_Reflect_X)
|
||||
x_dst = width - x_dst - 1;
|
||||
if (rotation & RR_Reflect_Y)
|
||||
y_dst = height - y_dst - 1;
|
||||
|
||||
switch (rotation & 0xf) {
|
||||
case RR_Rotate_0:
|
||||
*x_src = x_dst;
|
||||
*y_src = y_dst;
|
||||
break;
|
||||
case RR_Rotate_90:
|
||||
*x_src = height - y_dst - 1;
|
||||
*y_src = x_dst;
|
||||
break;
|
||||
case RR_Rotate_180:
|
||||
*x_src = width - x_dst - 1;
|
||||
*y_src = height - y_dst - 1;
|
||||
break;
|
||||
case RR_Rotate_270:
|
||||
*x_src = y_dst;
|
||||
*y_src = width - x_dst - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert an x coordinate to a position within the cursor bitmap
|
||||
*/
|
||||
static int
|
||||
cursor_bitpos (int flags, int x, Bool mask)
|
||||
{
|
||||
if (flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)
|
||||
mask = !mask;
|
||||
if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED)
|
||||
x = (x & ~3) | (3 - (x & 3));
|
||||
if (flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST)
|
||||
x = (x & ~7) | (7 - (x & 7));
|
||||
if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1)
|
||||
x = (x << 1) + mask;
|
||||
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8)
|
||||
x = ((x & ~7) << 1) | (mask << 3) | (x & 7);
|
||||
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16)
|
||||
x = ((x & ~15) << 1) | (mask << 4) | (x & 15);
|
||||
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32)
|
||||
x = ((x & ~31) << 1) | (mask << 5) | (x & 31);
|
||||
else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64)
|
||||
x = ((x & ~63) << 1) | (mask << 6) | (x & 63);
|
||||
return x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fetch one bit from a cursor bitmap
|
||||
*/
|
||||
static CARD8
|
||||
get_bit (CARD8 *image, int stride, int flags, int x, int y, Bool mask)
|
||||
{
|
||||
x = cursor_bitpos (flags, x, mask);
|
||||
image += y * stride;
|
||||
return (image[(x >> 3)] >> (x & 7)) & 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set one bit in a cursor bitmap
|
||||
*/
|
||||
static void
|
||||
set_bit (CARD8 *image, int stride, int flags, int x, int y, Bool mask)
|
||||
{
|
||||
x = cursor_bitpos (flags, x, mask);
|
||||
image += y * stride;
|
||||
image[(x >> 3)] |= 1 << (x & 7);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a two color cursor into a driver that supports only ARGB cursors
|
||||
*/
|
||||
static void
|
||||
xf86_crtc_convert_cursor_to_argb (xf86CrtcPtr crtc, unsigned char *src)
|
||||
{
|
||||
ScrnInfoPtr scrn = crtc->scrn;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
|
||||
int x, y;
|
||||
int xin, yin;
|
||||
int stride = cursor_info->MaxWidth >> 2;
|
||||
int flags = cursor_info->Flags;
|
||||
CARD32 bits;
|
||||
|
||||
#ifdef ARGB_CURSOR
|
||||
crtc->cursor_argb = FALSE;
|
||||
#endif
|
||||
|
||||
for (y = 0; y < cursor_info->MaxHeight; y++)
|
||||
for (x = 0; x < cursor_info->MaxWidth; x++)
|
||||
{
|
||||
xf86_crtc_rotate_coord (crtc->rotation,
|
||||
cursor_info->MaxWidth,
|
||||
cursor_info->MaxHeight,
|
||||
x, y, &xin, &yin);
|
||||
if (get_bit (src, stride, flags, xin, yin, TRUE) ==
|
||||
((flags & HARDWARE_CURSOR_INVERT_MASK) == 0))
|
||||
{
|
||||
if (get_bit (src, stride, flags, xin, yin, FALSE))
|
||||
bits = xf86_config->cursor_fg;
|
||||
else
|
||||
bits = xf86_config->cursor_bg;
|
||||
}
|
||||
else
|
||||
bits = 0;
|
||||
cursor_image[y * cursor_info->MaxWidth + x] = bits;
|
||||
}
|
||||
crtc->funcs->load_cursor_argb (crtc, cursor_image);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the colors for a two-color cursor (ignore for ARGB cursors)
|
||||
*/
|
||||
static void
|
||||
xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
|
||||
{
|
||||
ScreenPtr screen = scrn->pScreen;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
CursorPtr cursor = xf86_config->cursor;
|
||||
int c;
|
||||
CARD8 *bits = cursor ? cursor->devPriv[screen->myNum] : NULL;
|
||||
|
||||
/* Save ARGB versions of these colors */
|
||||
xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
|
||||
xf86_config->cursor_bg = (CARD32) bg | 0xff000000;
|
||||
|
||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
if (crtc->enabled && !crtc->cursor_argb)
|
||||
{
|
||||
if (crtc->funcs->load_cursor_image)
|
||||
crtc->funcs->set_cursor_colors (crtc, bg, fg);
|
||||
else if (bits)
|
||||
xf86_crtc_convert_cursor_to_argb (crtc, bits);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_crtc_hide_cursor (xf86CrtcPtr crtc)
|
||||
{
|
||||
if (crtc->cursor_shown)
|
||||
{
|
||||
crtc->funcs->hide_cursor (crtc);
|
||||
crtc->cursor_shown = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xf86_hide_cursors (ScrnInfoPtr scrn)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
xf86_config->cursor_on = FALSE;
|
||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
if (crtc->enabled)
|
||||
xf86_crtc_hide_cursor (crtc);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_crtc_show_cursor (xf86CrtcPtr crtc)
|
||||
{
|
||||
if (!crtc->cursor_shown && crtc->cursor_in_range)
|
||||
{
|
||||
crtc->funcs->show_cursor (crtc);
|
||||
crtc->cursor_shown = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xf86_show_cursors (ScrnInfoPtr scrn)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
xf86_config->cursor_on = TRUE;
|
||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
if (crtc->enabled)
|
||||
xf86_crtc_show_cursor (crtc);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
|
||||
{
|
||||
ScrnInfoPtr scrn = crtc->scrn;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
DisplayModePtr mode = &crtc->mode;
|
||||
int x_temp;
|
||||
int y_temp;
|
||||
Bool in_range;
|
||||
|
||||
/*
|
||||
* Move to crtc coordinate space
|
||||
*/
|
||||
x -= crtc->x;
|
||||
y -= crtc->y;
|
||||
|
||||
/*
|
||||
* Rotate
|
||||
*/
|
||||
switch ((crtc->rotation) & 0xf) {
|
||||
case RR_Rotate_0:
|
||||
break;
|
||||
case RR_Rotate_90:
|
||||
x_temp = y;
|
||||
y_temp = mode->VDisplay - cursor_info->MaxWidth - x;
|
||||
x = x_temp;
|
||||
y = y_temp;
|
||||
break;
|
||||
case RR_Rotate_180:
|
||||
x_temp = mode->HDisplay - cursor_info->MaxWidth - x;
|
||||
y_temp = mode->VDisplay - cursor_info->MaxHeight - y;
|
||||
x = x_temp;
|
||||
y = y_temp;
|
||||
break;
|
||||
case RR_Rotate_270:
|
||||
x_temp = mode->HDisplay - cursor_info->MaxHeight - y;
|
||||
y_temp = x;
|
||||
x = x_temp;
|
||||
y = y_temp;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reflect
|
||||
*/
|
||||
if (crtc->rotation & RR_Reflect_X)
|
||||
x = mode->HDisplay - cursor_info->MaxWidth - x;
|
||||
if (crtc->rotation & RR_Reflect_Y)
|
||||
y = mode->VDisplay - cursor_info->MaxHeight - y;
|
||||
|
||||
/*
|
||||
* Disable the cursor when it is outside the viewport
|
||||
*/
|
||||
in_range = TRUE;
|
||||
if (x >= mode->HDisplay || y >= mode->VDisplay ||
|
||||
x <= -cursor_info->MaxWidth || y <= -cursor_info->MaxHeight)
|
||||
{
|
||||
in_range = FALSE;
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
crtc->cursor_in_range = in_range;
|
||||
|
||||
if (in_range)
|
||||
{
|
||||
crtc->funcs->set_cursor_position (crtc, x, y);
|
||||
xf86_crtc_show_cursor (crtc);
|
||||
}
|
||||
else
|
||||
xf86_crtc_hide_cursor (crtc);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_set_cursor_position (ScrnInfoPtr scrn, int x, int y)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
/* undo what xf86HWCurs did to the coordinates */
|
||||
x += scrn->frameX0;
|
||||
y += scrn->frameY0;
|
||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
if (crtc->enabled)
|
||||
xf86_crtc_set_cursor_position (crtc, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a two-color cursor into a crtc, performing rotation as needed
|
||||
*/
|
||||
static void
|
||||
xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src)
|
||||
{
|
||||
ScrnInfoPtr scrn = crtc->scrn;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
CARD8 *cursor_image;
|
||||
|
||||
#ifdef ARGB_CURSOR
|
||||
crtc->cursor_argb = FALSE;
|
||||
#endif
|
||||
|
||||
if (crtc->rotation == RR_Rotate_0)
|
||||
cursor_image = src;
|
||||
else
|
||||
{
|
||||
int x, y;
|
||||
int xin, yin;
|
||||
int stride = cursor_info->MaxWidth >> 2;
|
||||
int flags = cursor_info->Flags;
|
||||
|
||||
cursor_image = xf86_config->cursor_image;
|
||||
memset(cursor_image, 0, cursor_info->MaxWidth * stride);
|
||||
|
||||
for (y = 0; y < cursor_info->MaxHeight; y++)
|
||||
for (x = 0; x < cursor_info->MaxWidth; x++)
|
||||
{
|
||||
xf86_crtc_rotate_coord (crtc->rotation,
|
||||
cursor_info->MaxWidth,
|
||||
cursor_info->MaxHeight,
|
||||
x, y, &xin, &yin);
|
||||
if (get_bit(src, stride, flags, xin, yin, FALSE))
|
||||
set_bit(cursor_image, stride, flags, x, y, FALSE);
|
||||
if (get_bit(src, stride, flags, xin, yin, TRUE))
|
||||
set_bit(cursor_image, stride, flags, x, y, TRUE);
|
||||
}
|
||||
}
|
||||
crtc->funcs->load_cursor_image (crtc, cursor_image);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a cursor image into all active CRTCs
|
||||
*/
|
||||
static void
|
||||
xf86_load_cursor_image (ScrnInfoPtr scrn, unsigned char *src)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
if (crtc->enabled)
|
||||
{
|
||||
if (crtc->funcs->load_cursor_image)
|
||||
xf86_crtc_load_cursor_image (crtc, src);
|
||||
else if (crtc->funcs->load_cursor_argb)
|
||||
xf86_crtc_convert_cursor_to_argb (crtc, src);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Bool
|
||||
xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
xf86_config->cursor = cursor;
|
||||
|
||||
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||
cursor->bits->height> cursor_info->MaxHeight)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
xf86_config->cursor = cursor;
|
||||
|
||||
/* Make sure ARGB support is available */
|
||||
if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)
|
||||
return FALSE;
|
||||
|
||||
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||
cursor->bits->height> cursor_info->MaxHeight)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_crtc_load_cursor_argb (xf86CrtcPtr crtc, CursorPtr cursor)
|
||||
{
|
||||
ScrnInfoPtr scrn = crtc->scrn;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image;
|
||||
CARD32 *cursor_source = (CARD32 *) cursor->bits->argb;
|
||||
int x, y;
|
||||
int xin, yin;
|
||||
CARD32 bits;
|
||||
int source_width = cursor->bits->width;
|
||||
int source_height = cursor->bits->height;
|
||||
int image_width = cursor_info->MaxWidth;
|
||||
int image_height = cursor_info->MaxHeight;
|
||||
|
||||
for (y = 0; y < image_height; y++)
|
||||
for (x = 0; x < image_width; x++)
|
||||
{
|
||||
xf86_crtc_rotate_coord (crtc->rotation, image_width, image_height,
|
||||
x, y, &xin, &yin);
|
||||
if (xin < source_width && yin < source_height)
|
||||
bits = cursor_source[yin * source_width + xin];
|
||||
else
|
||||
bits = 0;
|
||||
cursor_image[y * image_width + x] = bits;
|
||||
}
|
||||
|
||||
crtc->funcs->load_cursor_argb (crtc, cursor_image);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86_load_cursor_argb (ScrnInfoPtr scrn, CursorPtr cursor)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
|
||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||
|
||||
if (crtc->enabled)
|
||||
xf86_crtc_load_cursor_argb (crtc, cursor);
|
||||
}
|
||||
}
|
||||
|
||||
Bool
|
||||
xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info;
|
||||
|
||||
cursor_info = xf86CreateCursorInfoRec();
|
||||
if (!cursor_info)
|
||||
return FALSE;
|
||||
|
||||
xf86_config->cursor_image = xalloc (max_width * max_height * 4);
|
||||
|
||||
if (!xf86_config->cursor_image)
|
||||
{
|
||||
xf86DestroyCursorInfoRec (cursor_info);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
xf86_config->cursor_info = cursor_info;
|
||||
|
||||
cursor_info->MaxWidth = max_width;
|
||||
cursor_info->MaxHeight = max_height;
|
||||
cursor_info->Flags = flags;
|
||||
|
||||
cursor_info->SetCursorColors = xf86_set_cursor_colors;
|
||||
cursor_info->SetCursorPosition = xf86_set_cursor_position;
|
||||
cursor_info->LoadCursorImage = xf86_load_cursor_image;
|
||||
cursor_info->HideCursor = xf86_hide_cursors;
|
||||
cursor_info->ShowCursor = xf86_show_cursors;
|
||||
cursor_info->UseHWCursor = xf86_use_hw_cursor;
|
||||
#ifdef ARGB_CURSOR
|
||||
if (flags & HARDWARE_CURSOR_ARGB)
|
||||
{
|
||||
cursor_info->UseHWCursorARGB = xf86_use_hw_cursor_argb;
|
||||
cursor_info->LoadCursorARGB = xf86_load_cursor_argb;
|
||||
}
|
||||
#endif
|
||||
|
||||
xf86_config->cursor = NULL;
|
||||
xf86_hide_cursors (scrn);
|
||||
|
||||
return xf86InitCursor (screen, cursor_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when anything on the screen is reconfigured.
|
||||
*
|
||||
* Reloads cursor images as needed, then adjusts cursor positions
|
||||
*/
|
||||
|
||||
void
|
||||
xf86_reload_cursors (ScreenPtr screen)
|
||||
{
|
||||
ScrnInfoPtr scrn;
|
||||
xf86CrtcConfigPtr xf86_config;
|
||||
xf86CursorInfoPtr cursor_info;
|
||||
CursorPtr cursor;
|
||||
int x, y;
|
||||
|
||||
/* initial mode setting will not have set a screen yet */
|
||||
if (!screen)
|
||||
return;
|
||||
scrn = xf86Screens[screen->myNum];
|
||||
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
/* make sure the cursor code has been initialized */
|
||||
cursor_info = xf86_config->cursor_info;
|
||||
if (!cursor_info)
|
||||
return;
|
||||
|
||||
cursor = xf86_config->cursor;
|
||||
GetSpritePosition (inputInfo.pointer, &x, &y);
|
||||
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
|
||||
(*cursor_info->HideCursor)(scrn);
|
||||
|
||||
if (cursor)
|
||||
{
|
||||
#ifdef ARGB_CURSOR
|
||||
if (cursor->bits->argb && cursor_info->LoadCursorARGB)
|
||||
(*cursor_info->LoadCursorARGB) (scrn, cursor);
|
||||
else
|
||||
#endif
|
||||
(*cursor_info->LoadCursorImage)(cursor_info->pScrn,
|
||||
cursor->devPriv[screen->myNum]);
|
||||
|
||||
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
|
||||
(*cursor_info->ShowCursor)(cursor_info->pScrn);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up CRTC-based cursor code
|
||||
*/
|
||||
void
|
||||
xf86_cursors_fini (ScreenPtr screen)
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
|
||||
if (xf86_config->cursor_info)
|
||||
{
|
||||
xf86DestroyCursorInfoRec (xf86_config->cursor_info);
|
||||
xf86_config->cursor_info = NULL;
|
||||
}
|
||||
if (xf86_config->cursor_image)
|
||||
{
|
||||
xfree (xf86_config->cursor_image);
|
||||
xf86_config->cursor_image = NULL;
|
||||
}
|
||||
}
|
|
@ -423,8 +423,28 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
|
|||
}
|
||||
else
|
||||
{
|
||||
mmWidth = pScreen->mmWidth;
|
||||
mmHeight = pScreen->mmHeight;
|
||||
xf86OutputPtr output = config->output[config->compat_output];
|
||||
xf86CrtcPtr crtc = output->crtc;
|
||||
|
||||
if (crtc && crtc->mode.HDisplay &&
|
||||
output->mm_width && output->mm_height)
|
||||
{
|
||||
/*
|
||||
* If the output has a mode and a declared size, use that
|
||||
* to scale the screen size
|
||||
*/
|
||||
DisplayModePtr mode = &crtc->mode;
|
||||
mmWidth = output->mm_width * width / mode->HDisplay;
|
||||
mmHeight = output->mm_height * height / mode->VDisplay;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Otherwise, just set the screen to 96dpi
|
||||
*/
|
||||
mmWidth = width * 25.4 / 96;
|
||||
mmHeight = height * 25.4 / 96;
|
||||
}
|
||||
}
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"Setting screen physical size to %d x %d\n",
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#define xf86CrtcDestroy XF86NAME(xf86CrtcDestroy)
|
||||
#define xf86CrtcInUse XF86NAME(xf86CrtcInUse)
|
||||
#define xf86CrtcRotate XF86NAME(xf86CrtcRotate)
|
||||
#define xf86CrtcScreenInit XF86NAME(xf86CrtcScreenInit)
|
||||
#define xf86CrtcSetMode XF86NAME(xf86CrtcSetMode)
|
||||
#define xf86CrtcSetSizeRange XF86NAME(xf86CrtcSetSizeRange)
|
||||
#define xf86CVTMode XF86NAME(xf86CVTMode)
|
||||
|
@ -76,5 +77,8 @@
|
|||
#define xf86CrtcSetScreenSubpixelOrder XF86NAME(xf86CrtcSetScreenSubpixelOrder)
|
||||
#define xf86ModeWidth XF86NAME(xf86ModeWidth)
|
||||
#define xf86ModeHeight XF86NAME(xf86ModeHeight)
|
||||
#define xf86OutputFindClosestMode XF86NAME(xf86OutputFindClosestMode)
|
||||
#define xf86SetSingleMode XF86NAME(xf86SetSingleMode)
|
||||
#define xf86SetDesiredModes XF86NAME(xf86SetDesiredModes)
|
||||
|
||||
#endif /* _XF86RENAME_H_ */
|
||||
|
|
|
@ -69,31 +69,44 @@ compWindowFormat (WindowPtr pWin)
|
|||
}
|
||||
|
||||
static void
|
||||
xf86RotateBox (BoxPtr dst, BoxPtr src, Rotation rotation,
|
||||
int dest_width, int dest_height)
|
||||
xf86TranslateBox (BoxPtr b, int dx, int dy)
|
||||
{
|
||||
b->x1 += dx;
|
||||
b->y1 += dy;
|
||||
b->x2 += dx;
|
||||
b->y2 += dy;
|
||||
}
|
||||
|
||||
static void
|
||||
xf86TransformBox (BoxPtr dst, BoxPtr src, Rotation rotation,
|
||||
int xoff, int yoff,
|
||||
int dest_width, int dest_height)
|
||||
{
|
||||
BoxRec stmp = *src;
|
||||
|
||||
xf86TranslateBox (&stmp, -xoff, -yoff);
|
||||
switch (rotation & 0xf) {
|
||||
default:
|
||||
case RR_Rotate_0:
|
||||
*dst = *src;
|
||||
*dst = stmp;
|
||||
break;
|
||||
case RR_Rotate_90:
|
||||
dst->x1 = src->y1;
|
||||
dst->y1 = dest_height - src->x2;
|
||||
dst->x2 = src->y2;
|
||||
dst->y2 = dest_height - src->x1;
|
||||
dst->x1 = stmp.y1;
|
||||
dst->y1 = dest_height - stmp.x2;
|
||||
dst->x2 = stmp.y2;
|
||||
dst->y2 = dest_height - stmp.x1;
|
||||
break;
|
||||
case RR_Rotate_180:
|
||||
dst->x1 = dest_width - src->x2;
|
||||
dst->y1 = dest_height - src->y2;
|
||||
dst->x2 = dest_width - src->x1;
|
||||
dst->y2 = dest_height - src->y1;
|
||||
dst->x1 = dest_width - stmp.x2;
|
||||
dst->y1 = dest_height - stmp.y2;
|
||||
dst->x2 = dest_width - stmp.x1;
|
||||
dst->y2 = dest_height - stmp.y1;
|
||||
break;
|
||||
case RR_Rotate_270:
|
||||
dst->x1 = dest_width - src->y2;
|
||||
dst->y1 = src->x1;
|
||||
dst->y2 = src->x2;
|
||||
dst->x2 = dest_width - src->y1;
|
||||
dst->x1 = dest_width - stmp.y2;
|
||||
dst->y1 = stmp.x1;
|
||||
dst->y2 = stmp.x2;
|
||||
dst->x2 = dest_width - stmp.y1;
|
||||
break;
|
||||
}
|
||||
if (rotation & RR_Reflect_X) {
|
||||
|
@ -130,10 +143,9 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
|||
&include_inferiors,
|
||||
serverClient,
|
||||
&error);
|
||||
if (!src) {
|
||||
ErrorF("couldn't create src pict\n");
|
||||
if (!src)
|
||||
return;
|
||||
}
|
||||
|
||||
dst = CreatePicture (None,
|
||||
&dst_pixmap->drawable,
|
||||
format,
|
||||
|
@ -141,10 +153,8 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
|||
NULL,
|
||||
serverClient,
|
||||
&error);
|
||||
if (!dst) {
|
||||
ErrorF("couldn't create src pict\n");
|
||||
if (!dst)
|
||||
return;
|
||||
}
|
||||
|
||||
memset (&transform, '\0', sizeof (transform));
|
||||
transform.matrix[2][2] = IntToxFixed(1);
|
||||
|
@ -185,17 +195,16 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
|||
}
|
||||
|
||||
error = SetPictureTransform (src, &transform);
|
||||
if (error) {
|
||||
ErrorF("Couldn't set transform\n");
|
||||
if (error)
|
||||
return;
|
||||
}
|
||||
|
||||
while (n--)
|
||||
{
|
||||
BoxRec dst_box;
|
||||
|
||||
xf86RotateBox (&dst_box, b, crtc->rotation,
|
||||
crtc->mode.HDisplay, crtc->mode.VDisplay);
|
||||
xf86TransformBox (&dst_box, b, crtc->rotation,
|
||||
crtc->x, crtc->y,
|
||||
crtc->mode.HDisplay, crtc->mode.VDisplay);
|
||||
CompositePicture (PictOpSrc,
|
||||
src, NULL, dst,
|
||||
dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1,
|
||||
|
@ -207,6 +216,24 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
|||
FreePicture (dst, None);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86CrtcDamageShadow (xf86CrtcPtr crtc)
|
||||
{
|
||||
ScrnInfoPtr pScrn = crtc->scrn;
|
||||
BoxRec damage_box;
|
||||
RegionRec damage_region;
|
||||
ScreenPtr pScreen = pScrn->pScreen;
|
||||
|
||||
damage_box.x1 = crtc->x;
|
||||
damage_box.x2 = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
|
||||
damage_box.y1 = crtc->y;
|
||||
damage_box.y2 = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
|
||||
REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
||||
DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||
&damage_region);
|
||||
REGION_UNINIT (pScreen, &damage_region);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86RotatePrepare (ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -220,25 +247,19 @@ xf86RotatePrepare (ScreenPtr pScreen)
|
|||
|
||||
if (crtc->rotatedData && !crtc->rotatedPixmap)
|
||||
{
|
||||
BoxRec damage_box;
|
||||
RegionRec damage_region;
|
||||
|
||||
crtc->rotatedPixmap = crtc->funcs->shadow_create (crtc,
|
||||
crtc->rotatedData,
|
||||
crtc->mode.HDisplay,
|
||||
crtc->mode.VDisplay);
|
||||
/* Hook damage to screen pixmap */
|
||||
DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||
xf86_config->rotationDamage);
|
||||
if (!xf86_config->rotation_damage_registered)
|
||||
{
|
||||
/* Hook damage to screen pixmap */
|
||||
DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||
xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage_registered = TRUE;
|
||||
}
|
||||
|
||||
damage_box.x1 = 0;
|
||||
damage_box.y1 = 0;
|
||||
damage_box.x2 = xf86ModeWidth (&crtc->mode, crtc->rotation);
|
||||
damage_box.y2 = xf86ModeHeight (&crtc->mode, crtc->rotation);
|
||||
REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
||||
DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||
&damage_region);
|
||||
REGION_UNINIT (pScreen, &damage_region);
|
||||
xf86CrtcDamageShadow (crtc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +269,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
|||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
DamagePtr damage = xf86_config->rotationDamage;
|
||||
DamagePtr damage = xf86_config->rotation_damage;
|
||||
RegionPtr region;
|
||||
|
||||
if (!damage)
|
||||
|
@ -317,13 +338,14 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
|||
crtc->rotatedData = NULL;
|
||||
}
|
||||
|
||||
if (xf86_config->rotationDamage)
|
||||
if (xf86_config->rotation_damage)
|
||||
{
|
||||
/* Free damage structure */
|
||||
DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||
xf86_config->rotationDamage);
|
||||
DamageDestroy (xf86_config->rotationDamage);
|
||||
xf86_config->rotationDamage = NULL;
|
||||
xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage_registered = FALSE;
|
||||
DamageDestroy (xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage = NULL;
|
||||
/* Free block/wakeup handler */
|
||||
RemoveBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
||||
xf86RotateWakeupHandler,
|
||||
|
@ -357,15 +379,21 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
|||
if (!shadowData)
|
||||
goto bail1;
|
||||
crtc->rotatedData = shadowData;
|
||||
/* shadow will be damaged in xf86RotatePrepare */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* mark shadowed area as damaged so it will be repainted */
|
||||
xf86CrtcDamageShadow (crtc);
|
||||
}
|
||||
|
||||
if (!xf86_config->rotationDamage)
|
||||
if (!xf86_config->rotation_damage)
|
||||
{
|
||||
/* Create damage structure */
|
||||
xf86_config->rotationDamage = DamageCreate (NULL, NULL,
|
||||
xf86_config->rotation_damage = DamageCreate (NULL, NULL,
|
||||
DamageReportNone,
|
||||
TRUE, pScreen, pScreen);
|
||||
if (!xf86_config->rotationDamage)
|
||||
if (!xf86_config->rotation_damage)
|
||||
goto bail2;
|
||||
|
||||
/* Assign block/wakeup handler */
|
||||
|
@ -379,8 +407,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
|||
if (0)
|
||||
{
|
||||
bail3:
|
||||
DamageDestroy (xf86_config->rotationDamage);
|
||||
xf86_config->rotationDamage = NULL;
|
||||
DamageDestroy (xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage = NULL;
|
||||
|
||||
bail2:
|
||||
if (shadow || shadowData)
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
module_LTLIBRARIES = libramdac.la
|
||||
noinst_LIBRARIES = libramdac.a
|
||||
|
||||
libramdac_la_LDFLAGS = -avoid-version
|
||||
|
||||
libramdac_la_SOURCES = xf86RamDacMod.c xf86RamDac.c xf86RamDacCmap.c \
|
||||
libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \
|
||||
xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \
|
||||
xf86BitOrder.c
|
||||
|
||||
|
|
|
@ -44,5 +44,8 @@ void xf86ForceHWCursor (ScreenPtr pScreen, Bool on);
|
|||
#define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800
|
||||
#define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000
|
||||
#define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000
|
||||
#ifdef ARGB_CURSOR
|
||||
#define HARDWARE_CURSOR_ARGB 0x00004000
|
||||
#endif
|
||||
|
||||
#endif /* _XF86CURSOR_H */
|
||||
|
|
|
@ -2082,7 +2082,7 @@ Implements the IMUL instruction and side effects.
|
|||
void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s)
|
||||
{
|
||||
#ifdef __HAS_LONG_LONG__
|
||||
s64 res = (s32)d * (s32)s;
|
||||
s64 res = (s64)(s32)d * (s32)s;
|
||||
|
||||
*res_lo = (u32)res;
|
||||
*res_hi = (u32)(res >> 32);
|
||||
|
@ -2174,7 +2174,7 @@ Implements the MUL instruction and side effects.
|
|||
void mul_long(u32 s)
|
||||
{
|
||||
#ifdef __HAS_LONG_LONG__
|
||||
u64 res = (u32)M.x86.R_EAX * (u32)s;
|
||||
u64 res = (u64)M.x86.R_EAX * s;
|
||||
|
||||
M.x86.R_EAX = (u32)res;
|
||||
M.x86.R_EDX = (u32)(res >> 32);
|
||||
|
|
|
@ -120,12 +120,8 @@ xf4bppCreatePixmap( pScreen, width, height, depth )
|
|||
pPixmap->devKind = size;
|
||||
pPixmap->refcnt = 1 ;
|
||||
size = height * pPixmap->devKind ;
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap)
|
||||
+ pScreen->totalPixmapSize);
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer) (pPixmap + 1);
|
||||
#endif
|
||||
bzero( (char *) pPixmap->devPrivate.ptr, size ) ;
|
||||
return pPixmap ;
|
||||
}
|
||||
|
|
|
@ -32,9 +32,7 @@ is" without express or implied warranty.
|
|||
#include "Screen.h"
|
||||
#include "XNPixmap.h"
|
||||
|
||||
#ifdef PIXPRIV
|
||||
int xnestPixmapPrivateIndex;
|
||||
#endif
|
||||
|
||||
PixmapPtr
|
||||
xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
|
||||
|
@ -57,12 +55,8 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
|
|||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pPixmap->refcnt = 1;
|
||||
pPixmap->devKind = PixmapBytePad(width, depth);
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
|
||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize);
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
||||
#endif
|
||||
if (width && height)
|
||||
xnestPixmapPriv(pPixmap)->pixmap =
|
||||
XCreatePixmap(xnestDisplay,
|
||||
|
|
|
@ -49,9 +49,7 @@ Window xnestScreenSaverWindows[MAXSCREENS];
|
|||
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
|
||||
#endif
|
||||
|
||||
#ifdef PIXPRIV
|
||||
int xnestScreenGeneration = -1;
|
||||
#endif
|
||||
|
||||
ScreenPtr
|
||||
xnestScreen(Window window)
|
||||
|
@ -154,7 +152,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
|||
sizeof(xnestPrivGC))))
|
||||
return False;
|
||||
|
||||
#ifdef PIXPRIV
|
||||
if (xnestScreenGeneration != serverGeneration) {
|
||||
if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0)
|
||||
return False;
|
||||
|
@ -164,7 +161,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
|||
if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex,
|
||||
sizeof (xnestPrivPixmap)))
|
||||
return False;
|
||||
#endif
|
||||
visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec));
|
||||
numVisuals = 0;
|
||||
|
||||
|
|
|
@ -15,21 +15,14 @@ is" without express or implied warranty.
|
|||
#ifndef XNESTPIXMAP_H
|
||||
#define XNESTPIXMAP_H
|
||||
|
||||
#ifdef PIXPRIV
|
||||
extern int xnestPixmapPrivateIndex;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
Pixmap pixmap;
|
||||
} xnestPrivPixmap;
|
||||
|
||||
#ifdef PIXPRIV
|
||||
#define xnestPixmapPriv(pPixmap) \
|
||||
((xnestPrivPixmap *)((pPixmap)->devPrivates[xnestPixmapPrivateIndex].ptr))
|
||||
#else
|
||||
#define xnestPixmapPriv(pPixmap) \
|
||||
((xnestPrivPixmap *)((pPixmap)->devPrivate.ptr))
|
||||
#endif
|
||||
|
||||
#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS/fonts
|
||||
|
||||
parentdir = @xpconfigdir@/C/print/models/PSdefault/fonts
|
||||
parentdir = ../../PSdefault/fonts
|
||||
|
||||
XPFONTS = \
|
||||
AvantGarde-Book.pmf \
|
||||
|
@ -19,10 +19,10 @@ XPFONTS = \
|
|||
LubalinGraph-BookOblique.pmf \
|
||||
LubalinGraph-Demi.pmf \
|
||||
LubalinGraph-DemiOblique.pmf \
|
||||
NewCenturySchlbk-Bold.pmf \
|
||||
NewCenturySchlbk-BoldItalic.pmf \
|
||||
NewCenturySchlbk-Italic.pmf \
|
||||
NewCenturySchlbk-Roman.pmf \
|
||||
NewCentSchlbk-Bold.pmf \
|
||||
NewCentSchlbk-BoldItal.pmf \
|
||||
NewCentSchlbk-Ital.pmf \
|
||||
NewCentSchlbk-Roman.pmf \
|
||||
Souvenir-Demi.pmf \
|
||||
Souvenir-DemiItalic.pmf \
|
||||
Souvenir-Light.pmf \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xpcdir = @xpconfigdir@/C/print/models/HPLJ4050-PS/fonts
|
||||
|
||||
parentdir = @xpconfigdir@/C/print/models/PSdefault/fonts
|
||||
parentdir = ../../PSdefault/fonts
|
||||
|
||||
XPFONTS = \
|
||||
AvantGarde-Book.pmf \
|
||||
|
@ -19,10 +19,10 @@ XPFONTS = \
|
|||
LubalinGraph-BookOblique.pmf \
|
||||
LubalinGraph-Demi.pmf \
|
||||
LubalinGraph-DemiOblique.pmf \
|
||||
NewCenturySchlbk-Bold.pmf \
|
||||
NewCenturySchlbk-BoldItalic.pmf \
|
||||
NewCenturySchlbk-Italic.pmf \
|
||||
NewCenturySchlbk-Roman.pmf \
|
||||
NewCentSchlbk-Bold.pmf \
|
||||
NewCentSchlbk-BoldItal.pmf \
|
||||
NewCentSchlbk-Ital.pmf \
|
||||
NewCentSchlbk-Roman.pmf \
|
||||
Souvenir-Demi.pmf \
|
||||
Souvenir-DemiItalic.pmf \
|
||||
Souvenir-Light.pmf \
|
||||
|
|
|
@ -17,9 +17,10 @@ dist_xpc_DATA = \
|
|||
LubalinGraph-Book.pmf \
|
||||
LubalinGraph-DemiOblique.pmf \
|
||||
LubalinGraph-Demi.pmf \
|
||||
NewCenturySchlbk-Bold.pmf \
|
||||
NewCenturySchlbk-Italic.pmf \
|
||||
NewCenturySchlbk-Roman.pmf \
|
||||
NewCentSchlbk-Bold.pmf \
|
||||
NewCentSchlbk-BoldItal.pmf \
|
||||
NewCentSchlbk-Ital.pmf \
|
||||
NewCentSchlbk-Roman.pmf \
|
||||
Souvenir-DemiItalic.pmf \
|
||||
Souvenir-Demi.pmf \
|
||||
Souvenir-LightItalic.pmf \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xpcdir = @xpconfigdir@/C/print/models/SPSPARC2/fonts
|
||||
|
||||
parentdir = @xpconfigdir@/C/print/models/PSdefault/fonts
|
||||
parentdir = ../../PSdefault/fonts
|
||||
|
||||
XPFONTS = \
|
||||
Courier-Bold.pmf \
|
||||
|
|
|
@ -86,9 +86,7 @@ typedef struct _Pixmap {
|
|||
int refcnt;
|
||||
int devKind;
|
||||
DevUnion devPrivate;
|
||||
#ifdef PIXPRIV
|
||||
DevUnion *devPrivates; /* real devPrivates like gcs & windows */
|
||||
#endif
|
||||
#ifdef COMPOSITE
|
||||
short screen_x;
|
||||
short screen_y;
|
||||
|
|
|
@ -86,8 +86,6 @@ extern int AddScreen(
|
|||
int /*argc*/,
|
||||
char** /*argv*/);
|
||||
|
||||
#ifdef PIXPRIV
|
||||
|
||||
extern void ResetPixmapPrivates(void);
|
||||
|
||||
extern int AllocatePixmapPrivateIndex(void);
|
||||
|
@ -97,8 +95,6 @@ extern Bool AllocatePixmapPrivate(
|
|||
int /* index */,
|
||||
unsigned /* amount */);
|
||||
|
||||
#endif /* PIXPRIV */
|
||||
|
||||
extern void ResetColormapPrivates(void);
|
||||
|
||||
|
||||
|
|
|
@ -566,11 +566,9 @@ typedef struct _Screen {
|
|||
|
||||
PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
|
||||
|
||||
#ifdef PIXPRIV
|
||||
int PixmapPrivateLen;
|
||||
unsigned int *PixmapPrivateSizes;
|
||||
unsigned int totalPixmapSize;
|
||||
#endif
|
||||
|
||||
MarkWindowProcPtr MarkWindow;
|
||||
MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
|
||||
|
|
|
@ -101,12 +101,8 @@ mfbCreatePixmap (pScreen, width, height, depth)
|
|||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedWidth;
|
||||
pPixmap->refcnt = 1;
|
||||
#ifdef PIXPRIV
|
||||
pPixmap->devPrivate.ptr = datasize ?
|
||||
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
|
||||
#else
|
||||
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
|
||||
#endif
|
||||
return pPixmap;
|
||||
}
|
||||
|
||||
|
|
100
mi/miarc.c
100
mi/miarc.c
|
@ -246,7 +246,7 @@ typedef struct _miPolyArc {
|
|||
static CARD32 gcvals[6];
|
||||
|
||||
static void fillSpans(DrawablePtr pDrawable, GCPtr pGC);
|
||||
static void newFinalSpan(int y, register int xmin, register int xmax);
|
||||
static void newFinalSpan(int y, int xmin, int xmax);
|
||||
static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right,
|
||||
miArcFacePtr left);
|
||||
static void drawZeroArc(DrawablePtr pDraw, GCPtr pGC, xArc *tarc, int lw,
|
||||
|
@ -284,7 +284,7 @@ miArcSegment(
|
|||
{
|
||||
int l = pGC->lineWidth;
|
||||
int a0, a1, startAngle, endAngle;
|
||||
miArcFacePtr temp;
|
||||
miArcFacePtr temp;
|
||||
|
||||
if (!l)
|
||||
l = 1;
|
||||
|
@ -432,8 +432,8 @@ static RESTYPE cacheType;
|
|||
/*ARGSUSED*/
|
||||
int
|
||||
miFreeArcCache (data, id)
|
||||
pointer data;
|
||||
XID id;
|
||||
pointer data;
|
||||
XID id;
|
||||
{
|
||||
int k;
|
||||
arcCacheRec *cent;
|
||||
|
@ -461,11 +461,11 @@ miComputeCircleSpans(
|
|||
xArc *parc,
|
||||
miArcSpanData *spdata)
|
||||
{
|
||||
register miArcSpan *span;
|
||||
miArcSpan *span;
|
||||
int doinner;
|
||||
register int x, y, e;
|
||||
int x, y, e;
|
||||
int xk, yk, xm, ym, dx, dy;
|
||||
register int slw, inslw;
|
||||
int slw, inslw;
|
||||
int inx = 0, iny, ine = 0;
|
||||
int inxk = 0, inyk = 0, inxm = 0, inym = 0;
|
||||
|
||||
|
@ -529,7 +529,7 @@ miComputeEllipseSpans(
|
|||
xArc *parc,
|
||||
miArcSpanData *spdata)
|
||||
{
|
||||
register miArcSpan *span;
|
||||
miArcSpan *span;
|
||||
double w, h, r, xorg;
|
||||
double Hs, Hf, WH, K, Vk, Nk, Fk, Vr, N, Nc, Z, rs;
|
||||
double A, T, b, d, x, y, t, inx, outx = 0.0, hepp, hepm;
|
||||
|
@ -859,13 +859,13 @@ tailX(
|
|||
|
||||
static miArcSpanData *
|
||||
miComputeWideEllipse(
|
||||
int lw,
|
||||
register xArc *parc,
|
||||
Bool *mustFree)
|
||||
int lw,
|
||||
xArc *parc,
|
||||
Bool *mustFree)
|
||||
{
|
||||
register miArcSpanData *spdata;
|
||||
register arcCacheRec *cent, *lruent;
|
||||
register int k;
|
||||
miArcSpanData *spdata;
|
||||
arcCacheRec *cent, *lruent;
|
||||
int k;
|
||||
arcCacheRec fakeent;
|
||||
|
||||
if (!lw)
|
||||
|
@ -943,14 +943,14 @@ miFillWideEllipse(
|
|||
xArc *parc)
|
||||
{
|
||||
DDXPointPtr points;
|
||||
register DDXPointPtr pts;
|
||||
DDXPointPtr pts;
|
||||
int *widths;
|
||||
register int *wids;
|
||||
int *wids;
|
||||
miArcSpanData *spdata;
|
||||
Bool mustFree;
|
||||
register miArcSpan *span;
|
||||
register int xorg, yorgu, yorgl;
|
||||
register int n;
|
||||
miArcSpan *span;
|
||||
int xorg, yorgu, yorgl;
|
||||
int n;
|
||||
|
||||
yorgu = parc->height + pGC->lineWidth;
|
||||
n = (sizeof(int) * 2) * yorgu;
|
||||
|
@ -1077,20 +1077,20 @@ miPolyArc(pDraw, pGC, narcs, parcs)
|
|||
int narcs;
|
||||
xArc *parcs;
|
||||
{
|
||||
register int i;
|
||||
xArc *parc;
|
||||
int xMin, xMax, yMin, yMax;
|
||||
int pixmapWidth = 0, pixmapHeight = 0;
|
||||
int xOrg = 0, yOrg = 0;
|
||||
int width;
|
||||
Bool fTricky;
|
||||
DrawablePtr pDrawTo;
|
||||
CARD32 fg, bg;
|
||||
GCPtr pGCTo;
|
||||
miPolyArcPtr polyArcs;
|
||||
int cap[2], join[2];
|
||||
int iphase;
|
||||
int halfWidth;
|
||||
int i;
|
||||
xArc *parc;
|
||||
int xMin, xMax, yMin, yMax;
|
||||
int pixmapWidth = 0, pixmapHeight = 0;
|
||||
int xOrg = 0, yOrg = 0;
|
||||
int width;
|
||||
Bool fTricky;
|
||||
DrawablePtr pDrawTo;
|
||||
CARD32 fg, bg;
|
||||
GCPtr pGCTo;
|
||||
miPolyArcPtr polyArcs;
|
||||
int cap[2], join[2];
|
||||
int iphase;
|
||||
int halfWidth;
|
||||
|
||||
width = pGC->lineWidth;
|
||||
if(width == 0 && pGC->lineStyle == LineSolid)
|
||||
|
@ -3139,9 +3139,9 @@ static struct finalSpanChunk *chunks;
|
|||
struct finalSpan *
|
||||
realAllocSpan ()
|
||||
{
|
||||
register struct finalSpanChunk *newChunk;
|
||||
register struct finalSpan *span;
|
||||
register int i;
|
||||
struct finalSpanChunk *newChunk;
|
||||
struct finalSpan *span;
|
||||
int i;
|
||||
|
||||
newChunk = (struct finalSpanChunk *) xalloc (sizeof (struct finalSpanChunk));
|
||||
if (!newChunk)
|
||||
|
@ -3179,14 +3179,14 @@ fillSpans (
|
|||
DrawablePtr pDrawable,
|
||||
GCPtr pGC)
|
||||
{
|
||||
register struct finalSpan *span;
|
||||
register DDXPointPtr xSpan;
|
||||
register int *xWidth;
|
||||
register int i;
|
||||
register struct finalSpan **f;
|
||||
register int spany;
|
||||
DDXPointPtr xSpans;
|
||||
int *xWidths;
|
||||
struct finalSpan *span;
|
||||
DDXPointPtr xSpan;
|
||||
int *xWidth;
|
||||
int i;
|
||||
struct finalSpan **f;
|
||||
int spany;
|
||||
DDXPointPtr xSpans;
|
||||
int *xWidths;
|
||||
|
||||
if (nspans == 0)
|
||||
return;
|
||||
|
@ -3280,13 +3280,13 @@ realFindSpan (int y)
|
|||
static void
|
||||
newFinalSpan (
|
||||
int y,
|
||||
register int xmin,
|
||||
register int xmax)
|
||||
int xmin,
|
||||
int xmax)
|
||||
{
|
||||
register struct finalSpan *x;
|
||||
register struct finalSpan **f;
|
||||
struct finalSpan *oldx;
|
||||
struct finalSpan *prev;
|
||||
struct finalSpan *x;
|
||||
struct finalSpan **f;
|
||||
struct finalSpan *oldx;
|
||||
struct finalSpan *prev;
|
||||
|
||||
f = findSpan (y);
|
||||
if (!f)
|
||||
|
|
|
@ -76,12 +76,12 @@ extern int ffs(int);
|
|||
_X_EXPORT RegionPtr
|
||||
miCopyArea(pSrcDrawable, pDstDrawable,
|
||||
pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut)
|
||||
register DrawablePtr pSrcDrawable;
|
||||
register DrawablePtr pDstDrawable;
|
||||
GCPtr pGC;
|
||||
int xIn, yIn;
|
||||
int widthSrc, heightSrc;
|
||||
int xOut, yOut;
|
||||
DrawablePtr pSrcDrawable;
|
||||
DrawablePtr pDstDrawable;
|
||||
GCPtr pGC;
|
||||
int xIn, yIn;
|
||||
int widthSrc, heightSrc;
|
||||
int xOut, yOut;
|
||||
{
|
||||
DDXPointPtr ppt, pptFirst;
|
||||
unsigned int *pwidthFirst, *pwidth, *pbits;
|
||||
|
|
|
@ -152,11 +152,11 @@ static void miBSClearBackingRegion(WindowPtr pWin, RegionPtr pRgn);
|
|||
|
||||
#define copyData(src,dst,n,morecopy) \
|
||||
{ \
|
||||
register short *srcCopy = (short *)(src); \
|
||||
register short *dstCopy = (short *)(dst); \
|
||||
register int i; \
|
||||
register int bsx = pBackingStore->x; \
|
||||
register int bsy = pBackingStore->y; \
|
||||
short *srcCopy = (short *)(src); \
|
||||
short *dstCopy = (short *)(dst); \
|
||||
int i; \
|
||||
int bsx = pBackingStore->x; \
|
||||
int bsy = pBackingStore->y; \
|
||||
for (i = n; --i >= 0; ) \
|
||||
{ \
|
||||
*dstCopy++ = *srcCopy++ - bsx; \
|
||||
|
@ -1010,7 +1010,7 @@ miBSSetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted)
|
|||
DrawablePtr pDrawable;
|
||||
GCPtr pGC;
|
||||
char *psrc;
|
||||
register DDXPointPtr ppt;
|
||||
DDXPointPtr ppt;
|
||||
int *pwidth;
|
||||
int nspans;
|
||||
int fSorted;
|
||||
|
@ -1150,8 +1150,8 @@ miBSDoCopy(
|
|||
} *boxes; /* Array of box/drawable pairs covering
|
||||
* source box. */
|
||||
int *sequence; /* Sequence of boxes to move */
|
||||
register int i, j, k, l, y;
|
||||
register BoxPtr pBox;
|
||||
int i, j, k, l, y;
|
||||
BoxPtr pBox;
|
||||
int dx, dy, nrects;
|
||||
Bool graphicsExposures;
|
||||
CopyPlaneProcPtr pixCopyProc;
|
||||
|
@ -1591,7 +1591,7 @@ static RegionPtr
|
|||
miBSCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane)
|
||||
DrawablePtr pSrc;
|
||||
DrawablePtr pDst;
|
||||
register GC *pGC;
|
||||
GC *pGC;
|
||||
int srcx,
|
||||
srcy;
|
||||
int w,
|
||||
|
@ -1901,9 +1901,9 @@ miBSPolyArc(pDrawable, pGC, narcs, parcs)
|
|||
static void
|
||||
miBSFillPolygon(pDrawable, pGC, shape, mode, count, pPts)
|
||||
DrawablePtr pDrawable;
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
int shape, mode;
|
||||
register int count;
|
||||
int count;
|
||||
DDXPointPtr pPts;
|
||||
{
|
||||
DDXPointPtr pPtsCopy;
|
||||
|
@ -2546,8 +2546,8 @@ static void
|
|||
miBSAllocate(pWin)
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register miBSWindowPtr pBackingStore;
|
||||
register ScreenPtr pScreen;
|
||||
miBSWindowPtr pBackingStore;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
if (pWin->drawable.pScreen->backingStoreSupport == NotUseful)
|
||||
return;
|
||||
|
@ -2648,7 +2648,7 @@ miBSFree(pWin)
|
|||
WindowPtr pWin;
|
||||
{
|
||||
miBSWindowPtr pBackingStore;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
||||
|
@ -2792,9 +2792,9 @@ miResizeBackingStore(
|
|||
*/
|
||||
static void
|
||||
miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
|
||||
register WindowPtr pWin;
|
||||
RegionPtr pObscured;
|
||||
int dx, dy;
|
||||
WindowPtr pWin;
|
||||
RegionPtr pObscured;
|
||||
int dx, dy;
|
||||
{
|
||||
miBSWindowPtr pBackingStore;
|
||||
ScreenPtr pScreen;
|
||||
|
@ -2899,14 +2899,14 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
|
|||
*/
|
||||
static RegionPtr
|
||||
miBSRestoreAreas(pWin, prgnExposed)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
RegionPtr prgnExposed;
|
||||
{
|
||||
PixmapPtr pBackingPixmap;
|
||||
miBSWindowPtr pBackingStore;
|
||||
RegionPtr prgnSaved;
|
||||
RegionPtr prgnRestored;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
RegionPtr exposures = prgnExposed;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
|
@ -3097,15 +3097,15 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
|
|||
int oldx; /* old window position */
|
||||
int oldy;
|
||||
{
|
||||
register miBSWindowPtr pBackingStore;
|
||||
register RegionPtr pSavedRegion;
|
||||
register RegionPtr newSaved, doomed;
|
||||
register ScreenPtr pScreen;
|
||||
BoxRec extents;
|
||||
int scrdx; /* bit translation distance on screen */
|
||||
int scrdy;
|
||||
int dx; /* distance window moved on screen */
|
||||
int dy;
|
||||
miBSWindowPtr pBackingStore;
|
||||
RegionPtr pSavedRegion;
|
||||
RegionPtr newSaved, doomed;
|
||||
ScreenPtr pScreen;
|
||||
BoxRec extents;
|
||||
int scrdx; /* bit translation distance on screen */
|
||||
int scrdy;
|
||||
int dx; /* distance window moved on screen */
|
||||
int dy;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
pBackingStore = (miBSWindowPtr)(pWin->backStorage);
|
||||
|
@ -3815,9 +3815,9 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
|
|||
miBSWindowPtr pBackingStore;
|
||||
CopyPlaneProcPtr copyProc;
|
||||
GCPtr pScratchGC;
|
||||
register BoxPtr pBox;
|
||||
register int i;
|
||||
register int dx, dy;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int dx, dy;
|
||||
BITS32 gcMask;
|
||||
|
||||
if (!REGION_NOTEMPTY(pGC->pScreen, prgnExposed))
|
||||
|
|
18
mi/micmap.c
18
mi/micmap.c
|
@ -125,8 +125,8 @@ miResolveColor(unsigned short *pred, unsigned short *pgreen,
|
|||
_X_EXPORT Bool
|
||||
miInitializeColormap(ColormapPtr pmap)
|
||||
{
|
||||
register unsigned i;
|
||||
register VisualPtr pVisual;
|
||||
unsigned i;
|
||||
VisualPtr pVisual;
|
||||
unsigned lim, maxent, shift;
|
||||
|
||||
pVisual = pmap->pVisual;
|
||||
|
@ -211,13 +211,13 @@ _X_EXPORT int
|
|||
miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs,
|
||||
xColorItem *outdefs)
|
||||
{
|
||||
register int red, green, blue;
|
||||
int maxred, maxgreen, maxblue;
|
||||
int stepred, stepgreen, stepblue;
|
||||
VisualPtr pVisual;
|
||||
register int pixel;
|
||||
register int nresult;
|
||||
register int i;
|
||||
int red, green, blue;
|
||||
int maxred, maxgreen, maxblue;
|
||||
int stepred, stepgreen, stepblue;
|
||||
VisualPtr pVisual;
|
||||
int pixel;
|
||||
int nresult;
|
||||
int i;
|
||||
|
||||
pVisual = pmap->pVisual;
|
||||
|
||||
|
|
|
@ -130,15 +130,15 @@ exposing is done by the backing store's GraphicsExpose function, of course.
|
|||
_X_EXPORT RegionPtr
|
||||
miHandleExposures(pSrcDrawable, pDstDrawable,
|
||||
pGC, srcx, srcy, width, height, dstx, dsty, plane)
|
||||
register DrawablePtr pSrcDrawable;
|
||||
register DrawablePtr pDstDrawable;
|
||||
DrawablePtr pSrcDrawable;
|
||||
DrawablePtr pDstDrawable;
|
||||
GCPtr pGC;
|
||||
int srcx, srcy;
|
||||
int width, height;
|
||||
int dstx, dsty;
|
||||
unsigned long plane;
|
||||
{
|
||||
register ScreenPtr pscr;
|
||||
ScreenPtr pscr;
|
||||
RegionPtr prgnSrcClip; /* drawable-relative source clip */
|
||||
RegionRec rgnSrcRec;
|
||||
RegionPtr prgnDstClip; /* drawable-relative dest clip */
|
||||
|
@ -387,9 +387,9 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
|
|||
if (pRgn && !REGION_NIL(pRgn))
|
||||
{
|
||||
xEvent *pEvent;
|
||||
register xEvent *pe;
|
||||
register BoxPtr pBox;
|
||||
register int i;
|
||||
xEvent *pe;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int numRects;
|
||||
|
||||
numRects = REGION_NUM_RECTS(pRgn);
|
||||
|
@ -431,12 +431,12 @@ void
|
|||
miSendExposures(pWin, pRgn, dx, dy)
|
||||
WindowPtr pWin;
|
||||
RegionPtr pRgn;
|
||||
register int dx, dy;
|
||||
int dx, dy;
|
||||
{
|
||||
register BoxPtr pBox;
|
||||
BoxPtr pBox;
|
||||
int numRects;
|
||||
register xEvent *pEvent, *pe;
|
||||
register int i;
|
||||
xEvent *pEvent, *pe;
|
||||
int i;
|
||||
|
||||
pBox = REGION_RECTS(pRgn);
|
||||
numRects = REGION_NUM_RECTS(pRgn);
|
||||
|
@ -493,7 +493,7 @@ miSendExposures(pWin, pRgn, dx, dy)
|
|||
_X_EXPORT void
|
||||
miWindowExposures(pWin, prgn, other_exposed)
|
||||
WindowPtr pWin;
|
||||
register RegionPtr prgn, other_exposed;
|
||||
RegionPtr prgn, other_exposed;
|
||||
{
|
||||
RegionPtr exposures = prgn;
|
||||
if (pWin->backStorage && prgn)
|
||||
|
@ -629,7 +629,7 @@ tossGC (
|
|||
|
||||
_X_EXPORT void
|
||||
miPaintWindow(pWin, prgn, what)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
RegionPtr prgn;
|
||||
int what;
|
||||
{
|
||||
|
@ -657,10 +657,10 @@ int what;
|
|||
BoxRec box;
|
||||
WindowPtr pBgWin;
|
||||
GCPtr pGC;
|
||||
register int i;
|
||||
register BoxPtr pbox;
|
||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
register xRectangle *prect;
|
||||
int i;
|
||||
BoxPtr pbox;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
xRectangle *prect;
|
||||
int numRects;
|
||||
|
||||
gcmask = 0;
|
||||
|
|
|
@ -54,8 +54,8 @@ Author: Bob Scheifler, MIT X Consortium
|
|||
|
||||
_X_EXPORT void
|
||||
miFillArcSetup(arc, info)
|
||||
register xArc *arc;
|
||||
register miFillArcRec *info;
|
||||
xArc *arc;
|
||||
miFillArcRec *info;
|
||||
{
|
||||
info->y = arc->height >> 1;
|
||||
info->dy = arc->height & 1;
|
||||
|
@ -109,8 +109,8 @@ miFillArcSetup(arc, info)
|
|||
|
||||
void
|
||||
miFillArcDSetup(arc, info)
|
||||
register xArc *arc;
|
||||
register miFillArcDRec *info;
|
||||
xArc *arc;
|
||||
miFillArcDRec *info;
|
||||
{
|
||||
/* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */
|
||||
/* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */
|
||||
|
@ -141,13 +141,13 @@ miFillArcDSetup(arc, info)
|
|||
|
||||
static void
|
||||
miGetArcEdge(
|
||||
register xArc *arc,
|
||||
register miSliceEdgePtr edge,
|
||||
xArc *arc,
|
||||
miSliceEdgePtr edge,
|
||||
int k,
|
||||
Bool top,
|
||||
Bool left )
|
||||
{
|
||||
register int xady, y;
|
||||
int xady, y;
|
||||
|
||||
y = arc->height >> 1;
|
||||
if (!(arc->width & 1))
|
||||
|
@ -271,13 +271,13 @@ miEllipseAngleToSlope (angle, width, height, dxp, dyp, d_dxp, d_dyp)
|
|||
|
||||
static void
|
||||
miGetPieEdge(
|
||||
register xArc *arc,
|
||||
register int angle,
|
||||
register miSliceEdgePtr edge,
|
||||
xArc *arc,
|
||||
int angle,
|
||||
miSliceEdgePtr edge,
|
||||
Bool top,
|
||||
Bool left )
|
||||
{
|
||||
register int k;
|
||||
int k;
|
||||
int dx, dy;
|
||||
|
||||
miEllipseAngleToSlope (angle, arc->width, arc->height, &dx, &dy, 0, 0);
|
||||
|
@ -316,11 +316,11 @@ miGetPieEdge(
|
|||
|
||||
_X_EXPORT void
|
||||
miFillArcSliceSetup(arc, slice, pGC)
|
||||
register xArc *arc;
|
||||
register miArcSliceRec *slice;
|
||||
xArc *arc;
|
||||
miArcSliceRec *slice;
|
||||
GCPtr pGC;
|
||||
{
|
||||
register int angle1, angle2;
|
||||
int angle1, angle2;
|
||||
|
||||
angle1 = arc->angle1;
|
||||
if (arc->angle2 < 0)
|
||||
|
@ -550,14 +550,14 @@ miFillEllipseI(
|
|||
GCPtr pGC,
|
||||
xArc *arc )
|
||||
{
|
||||
register int x, y, e;
|
||||
int x, y, e;
|
||||
int yk, xk, ym, xm, dx, dy, xorg, yorg;
|
||||
int slw;
|
||||
miFillArcRec info;
|
||||
DDXPointPtr points;
|
||||
register DDXPointPtr pts;
|
||||
DDXPointPtr pts;
|
||||
int *widths;
|
||||
register int *wids;
|
||||
int *wids;
|
||||
|
||||
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
|
||||
if (!points)
|
||||
|
@ -593,14 +593,14 @@ miFillEllipseD(
|
|||
GCPtr pGC,
|
||||
xArc *arc )
|
||||
{
|
||||
register int x, y;
|
||||
int x, y;
|
||||
int xorg, yorg, dx, dy, slw;
|
||||
double e, yk, xk, ym, xm;
|
||||
miFillArcDRec info;
|
||||
DDXPointPtr points;
|
||||
register DDXPointPtr pts;
|
||||
DDXPointPtr pts;
|
||||
int *widths;
|
||||
register int *wids;
|
||||
int *wids;
|
||||
|
||||
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
|
||||
if (!points)
|
||||
|
@ -659,14 +659,14 @@ miFillArcSliceI(
|
|||
xArc *arc )
|
||||
{
|
||||
int yk, xk, ym, xm, dx, dy, xorg, yorg, slw;
|
||||
register int x, y, e;
|
||||
int x, y, e;
|
||||
miFillArcRec info;
|
||||
miArcSliceRec slice;
|
||||
int ya, xl, xr, xc;
|
||||
DDXPointPtr points;
|
||||
register DDXPointPtr pts;
|
||||
DDXPointPtr pts;
|
||||
int *widths;
|
||||
register int *wids;
|
||||
int *wids;
|
||||
|
||||
miFillArcSetup(arc, &info);
|
||||
miFillArcSliceSetup(arc, &slice, pGC);
|
||||
|
@ -721,16 +721,16 @@ miFillArcSliceD(
|
|||
GCPtr pGC,
|
||||
xArc *arc )
|
||||
{
|
||||
register int x, y;
|
||||
int x, y;
|
||||
int dx, dy, xorg, yorg, slw;
|
||||
double e, yk, xk, ym, xm;
|
||||
miFillArcDRec info;
|
||||
miArcSliceRec slice;
|
||||
int ya, xl, xr, xc;
|
||||
DDXPointPtr points;
|
||||
register DDXPointPtr pts;
|
||||
DDXPointPtr pts;
|
||||
int *widths;
|
||||
register int *wids;
|
||||
int *wids;
|
||||
|
||||
miFillArcDSetup(arc, &info);
|
||||
miFillArcSliceSetup(arc, &slice, pGC);
|
||||
|
@ -790,8 +790,8 @@ miPolyFillArc(pDraw, pGC, narcs, parcs)
|
|||
int narcs;
|
||||
xArc *parcs;
|
||||
{
|
||||
register int i;
|
||||
register xArc *arc;
|
||||
int i;
|
||||
xArc *arc;
|
||||
|
||||
for(i = narcs, arc = parcs; --i >= 0; arc++)
|
||||
{
|
||||
|
|
|
@ -74,16 +74,16 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
|
|||
xRectangle *prectInit; /* Pointer to first rectangle to fill */
|
||||
{
|
||||
int i;
|
||||
register int height;
|
||||
register int width;
|
||||
register xRectangle *prect;
|
||||
int xorg;
|
||||
register int yorg;
|
||||
int maxheight;
|
||||
DDXPointPtr pptFirst;
|
||||
register DDXPointPtr ppt;
|
||||
int *pwFirst;
|
||||
register int *pw;
|
||||
int height;
|
||||
int width;
|
||||
xRectangle *prect;
|
||||
int xorg;
|
||||
int yorg;
|
||||
int maxheight;
|
||||
DDXPointPtr pptFirst;
|
||||
DDXPointPtr ppt;
|
||||
int *pwFirst;
|
||||
int *pw;
|
||||
|
||||
if (pGC->miTranslate)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ SOFTWARE.
|
|||
#include "pixmapstr.h"
|
||||
#include "mifpoly.h"
|
||||
|
||||
static int GetFPolyYBounds(register SppPointPtr pts, int n, double yFtrans,
|
||||
static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans,
|
||||
int *by, int *ty);
|
||||
|
||||
#ifdef ICEILTEMPDECL
|
||||
|
@ -101,7 +101,7 @@ miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans)
|
|||
*width,
|
||||
*FirstWidth, /* output buffer */
|
||||
*Marked; /* set if this vertex has been used */
|
||||
register int left, right, /* indices to first endpoints */
|
||||
int left, right, /* indices to first endpoints */
|
||||
nextleft,
|
||||
nextright; /* indices to second endpoints */
|
||||
DDXPointPtr ptsOut,
|
||||
|
@ -251,13 +251,13 @@ miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans)
|
|||
static
|
||||
int
|
||||
GetFPolyYBounds(
|
||||
register SppPointPtr pts,
|
||||
SppPointPtr pts,
|
||||
int n,
|
||||
double yFtrans,
|
||||
int *by,
|
||||
int *ty)
|
||||
{
|
||||
register SppPointPtr ptMin;
|
||||
SppPointPtr ptMin;
|
||||
double ymin, ymax;
|
||||
SppPointPtr ptsStart = pts;
|
||||
|
||||
|
|
20
mi/miglblt.c
20
mi/miglblt.c
|
@ -92,18 +92,18 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
|
|||
{
|
||||
int width, height;
|
||||
PixmapPtr pPixmap;
|
||||
int nbyLine; /* bytes per line of padded pixmap */
|
||||
int nbyLine; /* bytes per line of padded pixmap */
|
||||
FontPtr pfont;
|
||||
GCPtr pGCtmp;
|
||||
register int i;
|
||||
register int j;
|
||||
unsigned char *pbits; /* buffer for PutImage */
|
||||
register unsigned char *pb; /* temp pointer into buffer */
|
||||
register CharInfoPtr pci; /* currect char info */
|
||||
register unsigned char *pglyph; /* pointer bits in glyph */
|
||||
int gWidth, gHeight; /* width and height of glyph */
|
||||
register int nbyGlyphWidth; /* bytes per scanline of glyph */
|
||||
int nbyPadGlyph; /* server padded line of glyph */
|
||||
int i;
|
||||
int j;
|
||||
unsigned char *pbits; /* buffer for PutImage */
|
||||
unsigned char *pb; /* temp pointer into buffer */
|
||||
CharInfoPtr pci; /* currect char info */
|
||||
unsigned char *pglyph; /* pointer bits in glyph */
|
||||
int gWidth, gHeight; /* width and height of glyph */
|
||||
int nbyGlyphWidth; /* bytes per scanline of glyph */
|
||||
int nbyPadGlyph; /* server padded line of glyph */
|
||||
|
||||
XID gcvals[3];
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ extern void miSetZeroLineBias(
|
|||
}
|
||||
|
||||
#define SWAPINT(i, j) \
|
||||
{ register int _t = i; i = j; j = _t; }
|
||||
{ int _t = i; i = j; j = _t; }
|
||||
|
||||
#define SWAPPT(i, j) \
|
||||
{ DDXPointRec _t; _t = i; i = j; j = _t; }
|
||||
|
|
|
@ -1019,7 +1019,7 @@ miOverlayMoveWindow(
|
|||
static void
|
||||
miOverlayWindowExposures(
|
||||
WindowPtr pWin,
|
||||
register RegionPtr prgn,
|
||||
RegionPtr prgn,
|
||||
RegionPtr other_exposed
|
||||
){
|
||||
RegionPtr exposures = prgn;
|
||||
|
@ -1106,7 +1106,7 @@ miOverlayRecomputeExposures (
|
|||
WindowPtr pWin,
|
||||
pointer value
|
||||
){
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value;
|
||||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
||||
|
||||
|
@ -1161,10 +1161,10 @@ miOverlayResizeWindow(
|
|||
DDXPointRec oldpt;
|
||||
RegionPtr oldRegion = NULL, oldRegion2 = NULL;
|
||||
WindowPtr pFirstChange;
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
RegionPtr gravitate[StaticGravity + 1];
|
||||
RegionPtr gravitate2[StaticGravity + 1];
|
||||
register unsigned g;
|
||||
unsigned g;
|
||||
int nx, ny; /* destination x,y */
|
||||
int newx, newy; /* new inner window position */
|
||||
RegionPtr pRegion = NULL;
|
||||
|
@ -1669,7 +1669,7 @@ miOverlayChangeBorderWidth(
|
|||
unsigned int width
|
||||
){
|
||||
int oldwidth;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
Bool HadBorder;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
|
|
@ -70,14 +70,14 @@ SOFTWARE.
|
|||
_X_EXPORT void
|
||||
miFillPolygon(dst, pgc, shape, mode, count, pPts)
|
||||
DrawablePtr dst;
|
||||
register GCPtr pgc;
|
||||
GCPtr pgc;
|
||||
int shape, mode;
|
||||
register int count;
|
||||
int count;
|
||||
DDXPointPtr pPts;
|
||||
{
|
||||
int i;
|
||||
register int xorg, yorg;
|
||||
register DDXPointPtr ppt;
|
||||
int xorg, yorg;
|
||||
DDXPointPtr ppt;
|
||||
|
||||
if (count == 0)
|
||||
return;
|
||||
|
|
|
@ -78,9 +78,9 @@ miFillConvexPoly(dst, pgc, count, ptsIn)
|
|||
int count; /* number of points */
|
||||
DDXPointPtr ptsIn; /* the points */
|
||||
{
|
||||
register int xl = 0, xr = 0; /* x vals of left and right edges */
|
||||
register int dl = 0, dr = 0; /* decision variables */
|
||||
register int ml = 0, m1l = 0;/* left edge slope and slope+1 */
|
||||
int xl = 0, xr = 0; /* x vals of left and right edges */
|
||||
int dl = 0, dr = 0; /* decision variables */
|
||||
int ml = 0, m1l = 0;/* left edge slope and slope+1 */
|
||||
int mr = 0, m1r = 0; /* right edge slope and slope+1 */
|
||||
int incr1l = 0, incr2l = 0; /* left edge error increments */
|
||||
int incr1r = 0, incr2r = 0; /* right edge error increments */
|
||||
|
@ -221,7 +221,7 @@ miFillConvexPoly(dst, pgc, count, ptsIn)
|
|||
static int
|
||||
getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty)
|
||||
{
|
||||
register DDXPointPtr ptMin;
|
||||
DDXPointPtr ptMin;
|
||||
int ymin, ymax;
|
||||
DDXPointPtr ptsStart = pts;
|
||||
|
||||
|
|
|
@ -72,12 +72,12 @@ miFillGeneralPoly(dst, pgc, count, ptsIn)
|
|||
int count; /* number of points */
|
||||
DDXPointPtr ptsIn; /* the points */
|
||||
{
|
||||
register EdgeTableEntry *pAET; /* the Active Edge Table */
|
||||
register int y; /* the current scanline */
|
||||
register int nPts = 0; /* number of pts in buffer */
|
||||
register EdgeTableEntry *pWETE; /* Winding Edge Table */
|
||||
register ScanLineList *pSLL; /* Current ScanLineList */
|
||||
register DDXPointPtr ptsOut; /* ptr to output buffers */
|
||||
EdgeTableEntry *pAET; /* the Active Edge Table */
|
||||
int y; /* the current scanline */
|
||||
int nPts = 0; /* number of pts in buffer */
|
||||
EdgeTableEntry *pWETE; /* Winding Edge Table */
|
||||
ScanLineList *pSLL; /* Current ScanLineList */
|
||||
DDXPointPtr ptsOut; /* ptr to output buffers */
|
||||
int *width;
|
||||
DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
|
||||
int FirstWidth[NUMPTSTOBUFFER];
|
||||
|
|
|
@ -70,7 +70,7 @@ miPolyPoint(pDrawable, pGC, mode, npt, pptInit)
|
|||
XID fsOld, fsNew;
|
||||
int *pwidthInit, *pwidth;
|
||||
int i;
|
||||
register xPoint *ppt;
|
||||
xPoint *ppt;
|
||||
|
||||
/* make pointlist origin relative */
|
||||
if (mode == CoordModePrevious)
|
||||
|
|
|
@ -81,8 +81,8 @@ miInsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock)
|
|||
ScanLineListBlock **SLLBlock;
|
||||
int *iSLLBlock;
|
||||
{
|
||||
register EdgeTableEntry *start, *prev;
|
||||
register ScanLineList *pSLL, *pPrevSLL;
|
||||
EdgeTableEntry *start, *prev;
|
||||
ScanLineList *pSLL, *pPrevSLL;
|
||||
ScanLineListBlock *tmpSLLBlock;
|
||||
|
||||
/*
|
||||
|
@ -166,15 +166,15 @@ miInsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock)
|
|||
|
||||
Bool
|
||||
miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
|
||||
register int count;
|
||||
register DDXPointPtr pts;
|
||||
int count;
|
||||
DDXPointPtr pts;
|
||||
EdgeTable *ET;
|
||||
EdgeTableEntry *AET;
|
||||
register EdgeTableEntry *pETEs;
|
||||
EdgeTableEntry *pETEs;
|
||||
ScanLineListBlock *pSLLBlock;
|
||||
{
|
||||
register DDXPointPtr top, bottom;
|
||||
register DDXPointPtr PrevPt, CurrPt;
|
||||
DDXPointPtr top, bottom;
|
||||
DDXPointPtr PrevPt, CurrPt;
|
||||
int iSLLBlock = 0;
|
||||
|
||||
int dy;
|
||||
|
@ -262,10 +262,10 @@ miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
|
|||
|
||||
void
|
||||
miloadAET(AET, ETEs)
|
||||
register EdgeTableEntry *AET, *ETEs;
|
||||
EdgeTableEntry *AET, *ETEs;
|
||||
{
|
||||
register EdgeTableEntry *pPrevAET;
|
||||
register EdgeTableEntry *tmp;
|
||||
EdgeTableEntry *pPrevAET;
|
||||
EdgeTableEntry *tmp;
|
||||
|
||||
pPrevAET = AET;
|
||||
AET = AET->next;
|
||||
|
@ -310,11 +310,11 @@ miloadAET(AET, ETEs)
|
|||
*/
|
||||
void
|
||||
micomputeWAET(AET)
|
||||
register EdgeTableEntry *AET;
|
||||
EdgeTableEntry *AET;
|
||||
{
|
||||
register EdgeTableEntry *pWETE;
|
||||
register int inside = 1;
|
||||
register int isInside = 0;
|
||||
EdgeTableEntry *pWETE;
|
||||
int inside = 1;
|
||||
int isInside = 0;
|
||||
|
||||
AET->nextWETE = (EdgeTableEntry *)NULL;
|
||||
pWETE = AET;
|
||||
|
@ -349,12 +349,12 @@ micomputeWAET(AET)
|
|||
|
||||
int
|
||||
miInsertionSort(AET)
|
||||
register EdgeTableEntry *AET;
|
||||
EdgeTableEntry *AET;
|
||||
{
|
||||
register EdgeTableEntry *pETEchase;
|
||||
register EdgeTableEntry *pETEinsert;
|
||||
register EdgeTableEntry *pETEchaseBackTMP;
|
||||
register int changed = 0;
|
||||
EdgeTableEntry *pETEchase;
|
||||
EdgeTableEntry *pETEinsert;
|
||||
EdgeTableEntry *pETEchaseBackTMP;
|
||||
int changed = 0;
|
||||
|
||||
AET = AET->next;
|
||||
while (AET)
|
||||
|
@ -386,9 +386,9 @@ miInsertionSort(AET)
|
|||
*/
|
||||
void
|
||||
miFreeStorage(pSLLBlock)
|
||||
register ScanLineListBlock *pSLLBlock;
|
||||
ScanLineListBlock *pSLLBlock;
|
||||
{
|
||||
register ScanLineListBlock *tmpSLLBlock;
|
||||
ScanLineListBlock *tmpSLLBlock;
|
||||
|
||||
while (pSLLBlock)
|
||||
{
|
||||
|
|
|
@ -85,11 +85,11 @@ miPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
|
|||
int dx, dy, xOrg, yOrg;
|
||||
{
|
||||
int h, dxDivPPW, ibEnd;
|
||||
MiBits *pwLineStart;
|
||||
register MiBits *pw, *pwEnd;
|
||||
register MiBits msk;
|
||||
register int ib, w;
|
||||
register int ipt; /* index into above arrays */
|
||||
MiBits *pwLineStart;
|
||||
MiBits *pw, *pwEnd;
|
||||
MiBits msk;
|
||||
int ib, w;
|
||||
int ipt; /* index into above arrays */
|
||||
Bool fInBox;
|
||||
DDXPointRec pt[NPT], ptThisLine;
|
||||
int width[NPT];
|
||||
|
|
298
mi/miregion.c
298
mi/miregion.c
|
@ -228,7 +228,7 @@ miPrintRegion(rgn)
|
|||
RegionPtr rgn;
|
||||
{
|
||||
int num, size;
|
||||
register int i;
|
||||
int i;
|
||||
BoxPtr rects;
|
||||
|
||||
num = REGION_NUM_RECTS(rgn);
|
||||
|
@ -275,7 +275,7 @@ Bool
|
|||
miValidRegion(reg)
|
||||
RegionPtr reg;
|
||||
{
|
||||
register int i, numRects;
|
||||
int i, numRects;
|
||||
|
||||
if ((reg->extents.x1 > reg->extents.x2) ||
|
||||
(reg->extents.y1 > reg->extents.y2))
|
||||
|
@ -289,7 +289,7 @@ miValidRegion(reg)
|
|||
return (!reg->data);
|
||||
else
|
||||
{
|
||||
register BoxPtr pboxP, pboxN;
|
||||
BoxPtr pboxP, pboxN;
|
||||
BoxRec box;
|
||||
|
||||
pboxP = REGION_RECTS(reg);
|
||||
|
@ -331,7 +331,7 @@ miRegionCreate(rect, size)
|
|||
BoxPtr rect;
|
||||
int size;
|
||||
{
|
||||
register RegionPtr pReg;
|
||||
RegionPtr pReg;
|
||||
|
||||
pReg = (RegionPtr)xalloc(sizeof(RegionRec));
|
||||
if (!pReg)
|
||||
|
@ -414,7 +414,7 @@ miRegionBreak (pReg)
|
|||
|
||||
_X_EXPORT Bool
|
||||
miRectAlloc(
|
||||
register RegionPtr pRgn,
|
||||
RegionPtr pRgn,
|
||||
int n)
|
||||
{
|
||||
RegDataPtr data;
|
||||
|
@ -455,8 +455,8 @@ miRectAlloc(
|
|||
|
||||
_X_EXPORT Bool
|
||||
miRegionCopy(dst, src)
|
||||
register RegionPtr dst;
|
||||
register RegionPtr src;
|
||||
RegionPtr dst;
|
||||
RegionPtr src;
|
||||
{
|
||||
good(dst);
|
||||
good(src);
|
||||
|
@ -508,14 +508,14 @@ miRegionCopy(dst, src)
|
|||
*/
|
||||
INLINE static int
|
||||
miCoalesce (
|
||||
register RegionPtr pReg, /* Region to coalesce */
|
||||
RegionPtr pReg, /* Region to coalesce */
|
||||
int prevStart, /* Index of start of previous band */
|
||||
int curStart) /* Index of start of current band */
|
||||
{
|
||||
register BoxPtr pPrevBox; /* Current box in previous band */
|
||||
register BoxPtr pCurBox; /* Current box in current band */
|
||||
register int numRects; /* Number rectangles in both bands */
|
||||
register int y2; /* Bottom of current band */
|
||||
BoxPtr pPrevBox; /* Current box in previous band */
|
||||
BoxPtr pCurBox; /* Current box in current band */
|
||||
int numRects; /* Number rectangles in both bands */
|
||||
int y2; /* Bottom of current band */
|
||||
/*
|
||||
* Figure out how many rectangles are in the band.
|
||||
*/
|
||||
|
@ -592,14 +592,14 @@ miCoalesce (
|
|||
|
||||
INLINE static Bool
|
||||
miAppendNonO (
|
||||
register RegionPtr pReg,
|
||||
register BoxPtr r,
|
||||
BoxPtr rEnd,
|
||||
register int y1,
|
||||
register int y2)
|
||||
RegionPtr pReg,
|
||||
BoxPtr r,
|
||||
BoxPtr rEnd,
|
||||
int y1,
|
||||
int y2)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
register int newRects;
|
||||
BoxPtr pNextRect;
|
||||
int newRects;
|
||||
|
||||
newRects = rEnd - r;
|
||||
|
||||
|
@ -691,25 +691,25 @@ miRegionOp(
|
|||
/* in region 2 ? */
|
||||
Bool *pOverlap)
|
||||
{
|
||||
register BoxPtr r1; /* Pointer into first region */
|
||||
register BoxPtr r2; /* Pointer into 2d region */
|
||||
BoxPtr r1End; /* End of 1st region */
|
||||
BoxPtr r2End; /* End of 2d region */
|
||||
short ybot; /* Bottom of intersection */
|
||||
short ytop; /* Top of intersection */
|
||||
RegDataPtr oldData; /* Old data for newReg */
|
||||
int prevBand; /* Index of start of
|
||||
* previous band in newReg */
|
||||
int curBand; /* Index of start of current
|
||||
* band in newReg */
|
||||
register BoxPtr r1BandEnd; /* End of current band in r1 */
|
||||
register BoxPtr r2BandEnd; /* End of current band in r2 */
|
||||
short top; /* Top of non-overlapping band */
|
||||
short bot; /* Bottom of non-overlapping band*/
|
||||
register int r1y1; /* Temps for r1->y1 and r2->y1 */
|
||||
register int r2y1;
|
||||
int newSize;
|
||||
int numRects;
|
||||
BoxPtr r1; /* Pointer into first region */
|
||||
BoxPtr r2; /* Pointer into 2d region */
|
||||
BoxPtr r1End; /* End of 1st region */
|
||||
BoxPtr r2End; /* End of 2d region */
|
||||
short ybot; /* Bottom of intersection */
|
||||
short ytop; /* Top of intersection */
|
||||
RegDataPtr oldData; /* Old data for newReg */
|
||||
int prevBand; /* Index of start of
|
||||
* previous band in newReg */
|
||||
int curBand; /* Index of start of current
|
||||
* band in newReg */
|
||||
BoxPtr r1BandEnd; /* End of current band in r1 */
|
||||
BoxPtr r2BandEnd; /* End of current band in r2 */
|
||||
short top; /* Top of non-overlapping band */
|
||||
short bot; /* Bottom of non-overlapping band*/
|
||||
int r1y1; /* Temps for r1->y1 and r2->y1 */
|
||||
int r2y1;
|
||||
int newSize;
|
||||
int numRects;
|
||||
|
||||
/*
|
||||
* Break any region computed from a broken region
|
||||
|
@ -915,9 +915,9 @@ miRegionOp(
|
|||
*/
|
||||
void
|
||||
miSetExtents (pReg)
|
||||
register RegionPtr pReg;
|
||||
RegionPtr pReg;
|
||||
{
|
||||
register BoxPtr pBox, pBoxEnd;
|
||||
BoxPtr pBox, pBoxEnd;
|
||||
|
||||
if (!pReg->data)
|
||||
return;
|
||||
|
@ -974,18 +974,18 @@ miSetExtents (pReg)
|
|||
/*ARGSUSED*/
|
||||
static Bool
|
||||
miIntersectO (
|
||||
register RegionPtr pReg,
|
||||
register BoxPtr r1,
|
||||
RegionPtr pReg,
|
||||
BoxPtr r1,
|
||||
BoxPtr r1End,
|
||||
register BoxPtr r2,
|
||||
BoxPtr r2,
|
||||
BoxPtr r2End,
|
||||
short y1,
|
||||
short y2,
|
||||
Bool *pOverlap)
|
||||
{
|
||||
register int x1;
|
||||
register int x2;
|
||||
register BoxPtr pNextRect;
|
||||
int x1;
|
||||
int x2;
|
||||
BoxPtr pNextRect;
|
||||
|
||||
pNextRect = REGION_TOP(pReg);
|
||||
|
||||
|
@ -1022,9 +1022,9 @@ miIntersectO (
|
|||
|
||||
_X_EXPORT Bool
|
||||
miIntersect(newReg, reg1, reg2)
|
||||
register RegionPtr newReg; /* destination Region */
|
||||
register RegionPtr reg1;
|
||||
register RegionPtr reg2; /* source regions */
|
||||
RegionPtr newReg; /* destination Region */
|
||||
RegionPtr reg1;
|
||||
RegionPtr reg2; /* source regions */
|
||||
{
|
||||
good(reg1);
|
||||
good(reg2);
|
||||
|
@ -1117,18 +1117,18 @@ miIntersect(newReg, reg1, reg2)
|
|||
*/
|
||||
static Bool
|
||||
miUnionO (
|
||||
register RegionPtr pReg,
|
||||
register BoxPtr r1,
|
||||
BoxPtr r1End,
|
||||
register BoxPtr r2,
|
||||
BoxPtr r2End,
|
||||
short y1,
|
||||
short y2,
|
||||
Bool *pOverlap)
|
||||
RegionPtr pReg,
|
||||
BoxPtr r1,
|
||||
BoxPtr r1End,
|
||||
BoxPtr r2,
|
||||
BoxPtr r2End,
|
||||
short y1,
|
||||
short y2,
|
||||
Bool *pOverlap)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
register int x1; /* left and right side of current union */
|
||||
register int x2;
|
||||
BoxPtr pNextRect;
|
||||
int x1; /* left and right side of current union */
|
||||
int x2;
|
||||
|
||||
assert (y1 < y2);
|
||||
assert(r1 != r1End && r2 != r2End);
|
||||
|
@ -1178,8 +1178,8 @@ miUnionO (
|
|||
_X_EXPORT Bool
|
||||
miUnion(newReg, reg1, reg2)
|
||||
RegionPtr newReg; /* destination Region */
|
||||
register RegionPtr reg1;
|
||||
register RegionPtr reg2; /* source regions */
|
||||
RegionPtr reg1;
|
||||
RegionPtr reg2; /* source regions */
|
||||
{
|
||||
Bool overlap; /* result ignored */
|
||||
|
||||
|
@ -1276,8 +1276,8 @@ miUnion(newReg, reg1, reg2)
|
|||
*/
|
||||
_X_EXPORT Bool
|
||||
miRegionAppend(dstrgn, rgn)
|
||||
register RegionPtr dstrgn;
|
||||
register RegionPtr rgn;
|
||||
RegionPtr dstrgn;
|
||||
RegionPtr rgn;
|
||||
{
|
||||
int numRects, dnumRects, size;
|
||||
BoxPtr new, old;
|
||||
|
@ -1307,7 +1307,7 @@ miRegionAppend(dstrgn, rgn)
|
|||
dstrgn->extents = rgn->extents;
|
||||
else if (dstrgn->extents.x2 > dstrgn->extents.x1)
|
||||
{
|
||||
register BoxPtr first, last;
|
||||
BoxPtr first, last;
|
||||
|
||||
first = old;
|
||||
last = REGION_BOXPTR(dstrgn) + (dnumRects - 1);
|
||||
|
@ -1371,13 +1371,13 @@ miRegionAppend(dstrgn, rgn)
|
|||
|
||||
static void
|
||||
QuickSortRects(
|
||||
register BoxRec rects[],
|
||||
register int numRects)
|
||||
BoxRec rects[],
|
||||
int numRects)
|
||||
{
|
||||
register int y1;
|
||||
register int x1;
|
||||
register int i, j;
|
||||
register BoxPtr r;
|
||||
int y1;
|
||||
int x1;
|
||||
int i, j;
|
||||
BoxPtr r;
|
||||
|
||||
/* Always called with numRects > 1 */
|
||||
|
||||
|
@ -1472,17 +1472,17 @@ miRegionValidate(badreg, pOverlap)
|
|||
int curBand;
|
||||
} RegionInfo;
|
||||
|
||||
int numRects; /* Original numRects for badreg */
|
||||
RegionInfo *ri; /* Array of current regions */
|
||||
int numRI; /* Number of entries used in ri */
|
||||
int sizeRI; /* Number of entries available in ri */
|
||||
int i; /* Index into rects */
|
||||
register int j; /* Index into ri */
|
||||
register RegionInfo *rit; /* &ri[j] */
|
||||
register RegionPtr reg; /* ri[j].reg */
|
||||
register BoxPtr box; /* Current box in rects */
|
||||
register BoxPtr riBox; /* Last box in ri[j].reg */
|
||||
register RegionPtr hreg; /* ri[j_half].reg */
|
||||
int numRects; /* Original numRects for badreg */
|
||||
RegionInfo *ri; /* Array of current regions */
|
||||
int numRI; /* Number of entries used in ri */
|
||||
int sizeRI; /* Number of entries available in ri */
|
||||
int i; /* Index into rects */
|
||||
int j; /* Index into ri */
|
||||
RegionInfo *rit; /* &ri[j] */
|
||||
RegionPtr reg; /* ri[j].reg */
|
||||
BoxPtr box; /* Current box in rects */
|
||||
BoxPtr riBox; /* Last box in ri[j].reg */
|
||||
RegionPtr hreg; /* ri[j_half].reg */
|
||||
Bool ret = TRUE;
|
||||
|
||||
*pOverlap = FALSE;
|
||||
|
@ -1654,13 +1654,13 @@ bail:
|
|||
_X_EXPORT RegionPtr
|
||||
miRectsToRegion(nrects, prect, ctype)
|
||||
int nrects;
|
||||
register xRectangle *prect;
|
||||
xRectangle *prect;
|
||||
int ctype;
|
||||
{
|
||||
register RegionPtr pRgn;
|
||||
register RegDataPtr pData;
|
||||
register BoxPtr pBox;
|
||||
register int i;
|
||||
RegionPtr pRgn;
|
||||
RegDataPtr pData;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int x1, y1, x2, y2;
|
||||
|
||||
pRgn = miRegionCreate(NullBox, 0);
|
||||
|
@ -1754,17 +1754,17 @@ miRectsToRegion(nrects, prect, ctype)
|
|||
/*ARGSUSED*/
|
||||
static Bool
|
||||
miSubtractO (
|
||||
register RegionPtr pReg,
|
||||
register BoxPtr r1,
|
||||
BoxPtr r1End,
|
||||
register BoxPtr r2,
|
||||
BoxPtr r2End,
|
||||
register short y1,
|
||||
short y2,
|
||||
Bool *pOverlap)
|
||||
RegionPtr pReg,
|
||||
BoxPtr r1,
|
||||
BoxPtr r1End,
|
||||
BoxPtr r2,
|
||||
BoxPtr r2End,
|
||||
short y1,
|
||||
short y2,
|
||||
Bool *pOverlap)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
register int x1;
|
||||
BoxPtr pNextRect;
|
||||
int x1;
|
||||
|
||||
x1 = r1->x1;
|
||||
|
||||
|
@ -1878,9 +1878,9 @@ miSubtractO (
|
|||
*/
|
||||
_X_EXPORT Bool
|
||||
miSubtract(regD, regM, regS)
|
||||
register RegionPtr regD;
|
||||
register RegionPtr regM;
|
||||
register RegionPtr regS;
|
||||
RegionPtr regD;
|
||||
RegionPtr regM;
|
||||
RegionPtr regS;
|
||||
{
|
||||
Bool overlap; /* result ignored */
|
||||
|
||||
|
@ -2003,15 +2003,15 @@ miInverse(newReg, reg1, invRect)
|
|||
|
||||
_X_EXPORT int
|
||||
miRectIn(region, prect)
|
||||
register RegionPtr region;
|
||||
register BoxPtr prect;
|
||||
RegionPtr region;
|
||||
BoxPtr prect;
|
||||
{
|
||||
register int x;
|
||||
register int y;
|
||||
register BoxPtr pbox;
|
||||
register BoxPtr pboxEnd;
|
||||
int partIn, partOut;
|
||||
int numRects;
|
||||
int x;
|
||||
int y;
|
||||
BoxPtr pbox;
|
||||
BoxPtr pboxEnd;
|
||||
int partIn, partOut;
|
||||
int numRects;
|
||||
|
||||
good(region);
|
||||
numRects = REGION_NUM_RECTS(region);
|
||||
|
@ -2099,13 +2099,13 @@ miRectIn(region, prect)
|
|||
|
||||
_X_EXPORT void
|
||||
miTranslateRegion(pReg, x, y)
|
||||
register RegionPtr pReg;
|
||||
register int x;
|
||||
register int y;
|
||||
RegionPtr pReg;
|
||||
int x;
|
||||
int y;
|
||||
{
|
||||
int x1, x2, y1, y2;
|
||||
register int nbox;
|
||||
register BoxPtr pbox;
|
||||
int nbox;
|
||||
BoxPtr pbox;
|
||||
|
||||
good(pReg);
|
||||
pReg->extents.x1 = x1 = pReg->extents.x1 + x;
|
||||
|
@ -2144,7 +2144,7 @@ miTranslateRegion(pReg, x, y)
|
|||
pReg->extents.y2 = MAXSHORT;
|
||||
if (pReg->data && (nbox = pReg->data->numRects))
|
||||
{
|
||||
register BoxPtr pboxout;
|
||||
BoxPtr pboxout;
|
||||
|
||||
for (pboxout = pbox = REGION_BOXPTR(pReg); nbox--; pbox++)
|
||||
{
|
||||
|
@ -2184,8 +2184,8 @@ miTranslateRegion(pReg, x, y)
|
|||
|
||||
Bool
|
||||
miRegionDataCopy(
|
||||
register RegionPtr dst,
|
||||
register RegionPtr src)
|
||||
RegionPtr dst,
|
||||
RegionPtr src)
|
||||
{
|
||||
good(dst);
|
||||
good(src);
|
||||
|
@ -2226,11 +2226,11 @@ miRegionReset(pReg, pBox)
|
|||
|
||||
_X_EXPORT Bool
|
||||
miPointInRegion(pReg, x, y, box)
|
||||
register RegionPtr pReg;
|
||||
register int x, y;
|
||||
RegionPtr pReg;
|
||||
int x, y;
|
||||
BoxPtr box; /* "return" value */
|
||||
{
|
||||
register BoxPtr pbox, pboxEnd;
|
||||
BoxPtr pbox, pboxEnd;
|
||||
int numRects;
|
||||
|
||||
good(pReg);
|
||||
|
@ -2294,8 +2294,8 @@ miRegionExtents(pReg)
|
|||
|
||||
#define ExchangeSpans(a, b) \
|
||||
{ \
|
||||
DDXPointRec tpt; \
|
||||
register int tw; \
|
||||
DDXPointRec tpt; \
|
||||
int tw; \
|
||||
\
|
||||
tpt = spans[a]; spans[a] = spans[b]; spans[b] = tpt; \
|
||||
tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
|
||||
|
@ -2307,13 +2307,13 @@ miRegionExtents(pReg)
|
|||
*/
|
||||
|
||||
static void QuickSortSpans(
|
||||
register DDXPointRec spans[],
|
||||
register int widths[],
|
||||
register int numSpans)
|
||||
DDXPointRec spans[],
|
||||
int widths[],
|
||||
int numSpans)
|
||||
{
|
||||
register int y;
|
||||
register int i, j, m;
|
||||
register DDXPointPtr r;
|
||||
int y;
|
||||
int i, j, m;
|
||||
DDXPointPtr r;
|
||||
|
||||
/* Always called with numSpans > 1 */
|
||||
/* Sorts only by y, doesn't bother to sort by x */
|
||||
|
@ -2323,7 +2323,7 @@ static void QuickSortSpans(
|
|||
if (numSpans < 9)
|
||||
{
|
||||
/* Do insertion sort */
|
||||
register int yprev;
|
||||
int yprev;
|
||||
|
||||
yprev = spans[0].y;
|
||||
i = 1;
|
||||
|
@ -2412,18 +2412,18 @@ static void QuickSortSpans(
|
|||
|
||||
_X_EXPORT int
|
||||
miClipSpans(
|
||||
RegionPtr prgnDst,
|
||||
register DDXPointPtr ppt,
|
||||
register int *pwidth,
|
||||
int nspans,
|
||||
register DDXPointPtr pptNew,
|
||||
int *pwidthNew,
|
||||
int fSorted)
|
||||
RegionPtr prgnDst,
|
||||
DDXPointPtr ppt,
|
||||
int *pwidth,
|
||||
int nspans,
|
||||
DDXPointPtr pptNew,
|
||||
int *pwidthNew,
|
||||
int fSorted)
|
||||
{
|
||||
register DDXPointPtr pptLast;
|
||||
int *pwidthNewStart; /* the vengeance of Xerox! */
|
||||
register int y, x1, x2;
|
||||
register int numRects;
|
||||
DDXPointPtr pptLast;
|
||||
int *pwidthNewStart; /* the vengeance of Xerox! */
|
||||
int y, x1, x2;
|
||||
int numRects;
|
||||
|
||||
good(prgnDst);
|
||||
pptLast = ppt + nspans;
|
||||
|
@ -2435,7 +2435,7 @@ miClipSpans(
|
|||
/* It doesn't pay much to make use of fSorted in this case,
|
||||
so we lump everything together. */
|
||||
|
||||
register int clipx1, clipx2, clipy1, clipy2;
|
||||
int clipx1, clipx2, clipy1, clipy2;
|
||||
|
||||
clipx1 = prgnDst->extents.x1;
|
||||
clipy1 = prgnDst->extents.y1;
|
||||
|
@ -2467,10 +2467,10 @@ miClipSpans(
|
|||
else if ((numRects = prgnDst->data->numRects))
|
||||
{
|
||||
/* Have to clip against many boxes */
|
||||
BoxPtr pboxBandStart, pboxBandEnd;
|
||||
register BoxPtr pbox;
|
||||
register BoxPtr pboxLast;
|
||||
register int clipy1, clipy2;
|
||||
BoxPtr pboxBandStart, pboxBandEnd;
|
||||
BoxPtr pbox;
|
||||
BoxPtr pboxLast;
|
||||
int clipy1, clipy2;
|
||||
|
||||
/* In this case, taking advantage of sorted spans gains more than
|
||||
the sorting costs. */
|
||||
|
@ -2493,7 +2493,7 @@ miClipSpans(
|
|||
x2 = x1 + *pwidth;
|
||||
do
|
||||
{ /* For each box in band */
|
||||
register int newx1, newx2;
|
||||
int newx1, newx2;
|
||||
|
||||
newx1 = x1;
|
||||
newx2 = x2;
|
||||
|
@ -2531,10 +2531,10 @@ _X_EXPORT int
|
|||
miFindMaxBand(prgn)
|
||||
RegionPtr prgn;
|
||||
{
|
||||
register int nbox;
|
||||
register BoxPtr pbox;
|
||||
register int nThisBand;
|
||||
register int nMaxBand = 0;
|
||||
int nbox;
|
||||
BoxPtr pbox;
|
||||
int nThisBand;
|
||||
int nMaxBand = 0;
|
||||
short yThisBand;
|
||||
|
||||
good(prgn);
|
||||
|
|
|
@ -185,7 +185,7 @@ miCreateScreenResources(pScreen)
|
|||
|
||||
Bool
|
||||
miScreenDevPrivateInit(pScreen, width, pbits)
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
int width;
|
||||
pointer pbits;
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ miScreenDevPrivateInit(pScreen, width, pbits)
|
|||
_X_EXPORT Bool
|
||||
miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
||||
rootDepth, numDepths, depths, rootVisual, numVisuals, visuals)
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
pointer pbits; /* pointer to screen bits */
|
||||
int xsize, ysize; /* in pixels */
|
||||
int dpix, dpiy; /* dots per inch */
|
||||
|
|
56
mi/mispans.c
56
mi/mispans.c
|
@ -188,8 +188,8 @@ void miAppendSpans(spanGroup, otherGroup, spans)
|
|||
SpanGroup *otherGroup;
|
||||
Spans *spans;
|
||||
{
|
||||
register int ymin, ymax;
|
||||
register int spansCount;
|
||||
int ymin, ymax;
|
||||
int spansCount;
|
||||
|
||||
spansCount = spans->count;
|
||||
if (spansCount > 0) {
|
||||
|
@ -226,21 +226,21 @@ void miFreeSpanGroup(spanGroup)
|
|||
}
|
||||
|
||||
static void QuickSortSpansX(
|
||||
register DDXPointRec points[],
|
||||
register int widths[],
|
||||
register int numSpans )
|
||||
DDXPointRec points[],
|
||||
int widths[],
|
||||
int numSpans )
|
||||
{
|
||||
register int x;
|
||||
register int i, j, m;
|
||||
register DDXPointPtr r;
|
||||
int x;
|
||||
int i, j, m;
|
||||
DDXPointPtr r;
|
||||
|
||||
/* Always called with numSpans > 1 */
|
||||
/* Sorts only by x, as all y should be the same */
|
||||
|
||||
#define ExchangeSpans(a, b) \
|
||||
{ \
|
||||
DDXPointRec tpt; \
|
||||
register int tw; \
|
||||
DDXPointRec tpt; \
|
||||
int tw; \
|
||||
\
|
||||
tpt = points[a]; points[a] = points[b]; points[b] = tpt; \
|
||||
tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
|
||||
|
@ -249,7 +249,7 @@ static void QuickSortSpansX(
|
|||
do {
|
||||
if (numSpans < 9) {
|
||||
/* Do insertion sort */
|
||||
register int xprev;
|
||||
int xprev;
|
||||
|
||||
xprev = points[0].x;
|
||||
i = 1;
|
||||
|
@ -313,14 +313,14 @@ static void QuickSortSpansX(
|
|||
|
||||
|
||||
static int UniquifySpansX(
|
||||
Spans *spans,
|
||||
register DDXPointRec *newPoints,
|
||||
register int *newWidths )
|
||||
Spans *spans,
|
||||
DDXPointRec *newPoints,
|
||||
int *newWidths )
|
||||
{
|
||||
register int newx1, newx2, oldpt, i, y;
|
||||
register DDXPointRec *oldPoints;
|
||||
register int *oldWidths;
|
||||
int *startNewWidths;
|
||||
int newx1, newx2, oldpt, i, y;
|
||||
DDXPointRec *oldPoints;
|
||||
int *oldWidths;
|
||||
int *startNewWidths;
|
||||
|
||||
/* Always called with numSpans > 1 */
|
||||
/* Uniquify the spans, and stash them into newPoints and newWidths. Return the
|
||||
|
@ -384,16 +384,16 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
|
|||
GCPtr pGC;
|
||||
SpanGroup *spanGroup;
|
||||
{
|
||||
register int i;
|
||||
register Spans *spans;
|
||||
register Spans *yspans;
|
||||
register int *ysizes;
|
||||
register int ymin, ylength;
|
||||
int i;
|
||||
Spans *spans;
|
||||
Spans *yspans;
|
||||
int *ysizes;
|
||||
int ymin, ylength;
|
||||
|
||||
/* Outgoing spans for one big call to FillSpans */
|
||||
register DDXPointPtr points;
|
||||
register int *widths;
|
||||
register int count;
|
||||
DDXPointPtr points;
|
||||
int *widths;
|
||||
int count;
|
||||
|
||||
if (spanGroup->count == 0) return;
|
||||
|
||||
|
@ -545,8 +545,8 @@ void miFillSpanGroup(pDraw, pGC, spanGroup)
|
|||
GCPtr pGC;
|
||||
SpanGroup *spanGroup;
|
||||
{
|
||||
register int i;
|
||||
register Spans *spans;
|
||||
int i;
|
||||
Spans *spans;
|
||||
|
||||
for (i = 0, spans = spanGroup->group; i != spanGroup->count; i++, spans++) {
|
||||
(*pGC->ops->FillSpans)
|
||||
|
|
|
@ -400,11 +400,11 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
|
|||
|
||||
if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp)
|
||||
{
|
||||
register DDXPointPtr pts;
|
||||
register int *widths;
|
||||
register int nPts;
|
||||
register int xorg,
|
||||
yorg;
|
||||
DDXPointPtr pts;
|
||||
int *widths;
|
||||
int nPts;
|
||||
int xorg,
|
||||
yorg;
|
||||
|
||||
xorg = pDrawable->x;
|
||||
yorg = pDrawable->y;
|
||||
|
|
|
@ -112,13 +112,13 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y)
|
|||
ScreenPtr pScreen;
|
||||
RegionPtr universe, bounding;
|
||||
BoxPtr rect;
|
||||
register int x, y;
|
||||
int x, y;
|
||||
{
|
||||
BoxRec box;
|
||||
register BoxPtr boundBox;
|
||||
int nbox;
|
||||
Bool someIn, someOut;
|
||||
register int t, x1, y1, x2, y2;
|
||||
BoxRec box;
|
||||
BoxPtr boundBox;
|
||||
int nbox;
|
||||
Bool someIn, someOut;
|
||||
int t, x1, y1, x2, y2;
|
||||
|
||||
nbox = REGION_NUM_RECTS (bounding);
|
||||
boundBox = REGION_RECTS (bounding);
|
||||
|
@ -202,16 +202,16 @@ miRegisterRedirectBorderClipProc (SetRedirectBorderClipProcPtr setBorderClip,
|
|||
*/
|
||||
static void
|
||||
miComputeClips (
|
||||
register WindowPtr pParent,
|
||||
register ScreenPtr pScreen,
|
||||
register RegionPtr universe,
|
||||
WindowPtr pParent,
|
||||
ScreenPtr pScreen,
|
||||
RegionPtr universe,
|
||||
VTKind kind,
|
||||
RegionPtr exposed ) /* for intermediate calculations */
|
||||
{
|
||||
int dx,
|
||||
dy;
|
||||
RegionRec childUniverse;
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
int oldVis, newVis;
|
||||
BoxRec borderSize;
|
||||
RegionRec childUnion;
|
||||
|
@ -535,10 +535,10 @@ miComputeClips (
|
|||
|
||||
static void
|
||||
miTreeObscured(
|
||||
register WindowPtr pParent )
|
||||
WindowPtr pParent )
|
||||
{
|
||||
register WindowPtr pChild;
|
||||
register int oldVis;
|
||||
WindowPtr pChild;
|
||||
int oldVis;
|
||||
|
||||
pChild = pParent;
|
||||
while (1)
|
||||
|
@ -609,8 +609,8 @@ miValidateTree (pParent, pChild, kind)
|
|||
RegionRec childUnion; /* the space covered by borderSize for
|
||||
* all marked children */
|
||||
RegionRec exposed; /* For intermediate calculations */
|
||||
register ScreenPtr pScreen;
|
||||
register WindowPtr pWin;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr pWin;
|
||||
Bool overlap;
|
||||
int viewvals;
|
||||
Bool forward;
|
||||
|
|
216
mi/miwideline.c
216
mi/miwideline.c
|
@ -56,10 +56,10 @@ from The Open Group.
|
|||
ICEILTEMPDECL
|
||||
#endif
|
||||
|
||||
static void miLineArc(DrawablePtr pDraw, register GCPtr pGC,
|
||||
static void miLineArc(DrawablePtr pDraw, GCPtr pGC,
|
||||
unsigned long pixel, SpanDataPtr spanData,
|
||||
register LineFacePtr leftFace,
|
||||
register LineFacePtr rightFace,
|
||||
LineFacePtr leftFace,
|
||||
LineFacePtr rightFace,
|
||||
double xorg, double yorg, Bool isInt);
|
||||
|
||||
|
||||
|
@ -79,12 +79,12 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height,
|
|||
PolyEdgePtr left, right;
|
||||
int left_count, right_count;
|
||||
{
|
||||
register int left_x = 0, left_e = 0;
|
||||
int left_x = 0, left_e = 0;
|
||||
int left_stepx = 0;
|
||||
int left_signdx = 0;
|
||||
int left_dy = 0, left_dx = 0;
|
||||
|
||||
register int right_x = 0, right_e = 0;
|
||||
int right_x = 0, right_e = 0;
|
||||
int right_stepx = 0;
|
||||
int right_signdx = 0;
|
||||
int right_dy = 0, right_dx = 0;
|
||||
|
@ -92,10 +92,10 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height,
|
|||
int height = 0;
|
||||
int left_height = 0, right_height = 0;
|
||||
|
||||
register DDXPointPtr ppt;
|
||||
DDXPointPtr ppt;
|
||||
DDXPointPtr pptInit = NULL;
|
||||
register int *pwidth;
|
||||
int *pwidthInit = NULL;
|
||||
int *pwidth;
|
||||
int *pwidthInit = NULL;
|
||||
XID oldPixel;
|
||||
int xorg;
|
||||
Spans spanRec;
|
||||
|
@ -203,8 +203,8 @@ miFillRectPolyHelper (
|
|||
int w,
|
||||
int h)
|
||||
{
|
||||
register DDXPointPtr ppt;
|
||||
register int *pwidth;
|
||||
DDXPointPtr ppt;
|
||||
int *pwidth;
|
||||
XID oldPixel;
|
||||
Spans spanRec;
|
||||
xRectangle rect;
|
||||
|
@ -265,10 +265,10 @@ _X_EXPORT /* static */ int
|
|||
miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge)
|
||||
double x0, y0;
|
||||
double k; /* x0 * dy - y0 * dx */
|
||||
register int dx, dy;
|
||||
int dx, dy;
|
||||
int xi, yi;
|
||||
int left;
|
||||
register PolyEdgePtr edge;
|
||||
PolyEdgePtr edge;
|
||||
{
|
||||
int x, y, e;
|
||||
int xady;
|
||||
|
@ -322,23 +322,23 @@ miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge)
|
|||
|
||||
_X_EXPORT /* static */ int
|
||||
miPolyBuildPoly (vertices, slopes, count, xi, yi, left, right, pnleft, pnright, h)
|
||||
register PolyVertexPtr vertices;
|
||||
register PolySlopePtr slopes;
|
||||
int count;
|
||||
int xi, yi;
|
||||
PolyEdgePtr left, right;
|
||||
int *pnleft, *pnright;
|
||||
int *h;
|
||||
PolyVertexPtr vertices;
|
||||
PolySlopePtr slopes;
|
||||
int count;
|
||||
int xi, yi;
|
||||
PolyEdgePtr left, right;
|
||||
int *pnleft, *pnright;
|
||||
int *h;
|
||||
{
|
||||
int top, bottom;
|
||||
double miny, maxy;
|
||||
register int i;
|
||||
int j;
|
||||
int clockwise;
|
||||
int slopeoff;
|
||||
register int s;
|
||||
register int nright, nleft;
|
||||
int y, lasty = 0, bottomy, topy = 0;
|
||||
int top, bottom;
|
||||
double miny, maxy;
|
||||
int i;
|
||||
int j;
|
||||
int clockwise;
|
||||
int slopeoff;
|
||||
int s;
|
||||
int nright, nleft;
|
||||
int y, lasty = 0, bottomy, topy = 0;
|
||||
|
||||
/* find the top of the polygon */
|
||||
maxy = miny = vertices[0].y;
|
||||
|
@ -467,12 +467,12 @@ miLineOnePoint (
|
|||
|
||||
static void
|
||||
miLineJoin (
|
||||
DrawablePtr pDrawable,
|
||||
GCPtr pGC,
|
||||
unsigned long pixel,
|
||||
SpanDataPtr spanData,
|
||||
register LineFacePtr pLeft,
|
||||
register LineFacePtr pRight)
|
||||
DrawablePtr pDrawable,
|
||||
GCPtr pGC,
|
||||
unsigned long pixel,
|
||||
SpanDataPtr spanData,
|
||||
LineFacePtr pLeft,
|
||||
LineFacePtr pRight)
|
||||
{
|
||||
double mx = 0, my = 0;
|
||||
double denom = 0.0;
|
||||
|
@ -624,9 +624,9 @@ miLineArcI (
|
|||
DDXPointPtr points,
|
||||
int *widths)
|
||||
{
|
||||
register DDXPointPtr tpts, bpts;
|
||||
register int *twids, *bwids;
|
||||
register int x, y, e, ex, slw;
|
||||
DDXPointPtr tpts, bpts;
|
||||
int *twids, *bwids;
|
||||
int x, y, e, ex, slw;
|
||||
|
||||
tpts = points;
|
||||
twids = widths;
|
||||
|
@ -717,8 +717,8 @@ miLineArcD (
|
|||
int edgey2,
|
||||
Bool edgeleft2)
|
||||
{
|
||||
register DDXPointPtr pts;
|
||||
register int *wids;
|
||||
DDXPointPtr pts;
|
||||
int *wids;
|
||||
double radius, x0, y0, el, er, yk, xlk, xrk, k;
|
||||
int xbase, ybase, y, boty, xl, xr, xcl, xcr;
|
||||
int ymin, ymax;
|
||||
|
@ -875,8 +875,8 @@ miLineArcD (
|
|||
|
||||
int
|
||||
miRoundJoinFace (face, edge, leftEdge)
|
||||
register LineFacePtr face;
|
||||
register PolyEdgePtr edge;
|
||||
LineFacePtr face;
|
||||
PolyEdgePtr edge;
|
||||
Bool *leftEdge;
|
||||
{
|
||||
int y;
|
||||
|
@ -924,7 +924,7 @@ miRoundJoinFace (face, edge, leftEdge)
|
|||
|
||||
_X_EXPORT void
|
||||
miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2)
|
||||
register LineFacePtr pLeft, pRight;
|
||||
LineFacePtr pLeft, pRight;
|
||||
PolyEdgePtr edge1, edge2;
|
||||
int *y1, *y2;
|
||||
Bool *left1, *left2;
|
||||
|
@ -949,14 +949,14 @@ miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2)
|
|||
|
||||
_X_EXPORT int
|
||||
miRoundCapClip (face, isInt, edge, leftEdge)
|
||||
register LineFacePtr face;
|
||||
LineFacePtr face;
|
||||
Bool isInt;
|
||||
register PolyEdgePtr edge;
|
||||
PolyEdgePtr edge;
|
||||
Bool *leftEdge;
|
||||
{
|
||||
int y;
|
||||
register int dx, dy;
|
||||
double xa, ya, k;
|
||||
int y;
|
||||
int dx, dy;
|
||||
double xa, ya, k;
|
||||
Bool left;
|
||||
|
||||
dx = -face->dy;
|
||||
|
@ -999,15 +999,15 @@ miRoundCapClip (face, isInt, edge, leftEdge)
|
|||
|
||||
static void
|
||||
miLineArc (
|
||||
DrawablePtr pDraw,
|
||||
register GCPtr pGC,
|
||||
unsigned long pixel,
|
||||
SpanDataPtr spanData,
|
||||
register LineFacePtr leftFace,
|
||||
register LineFacePtr rightFace,
|
||||
double xorg,
|
||||
double yorg,
|
||||
Bool isInt)
|
||||
DrawablePtr pDraw,
|
||||
GCPtr pGC,
|
||||
unsigned long pixel,
|
||||
SpanDataPtr spanData,
|
||||
LineFacePtr leftFace,
|
||||
LineFacePtr rightFace,
|
||||
double xorg,
|
||||
double yorg,
|
||||
Bool isInt)
|
||||
{
|
||||
DDXPointPtr points;
|
||||
int *widths;
|
||||
|
@ -1116,14 +1116,14 @@ miLineArc (
|
|||
|
||||
void
|
||||
miLineProjectingCap (pDrawable, pGC, pixel, spanData, face, isLeft, xorg, yorg, isInt)
|
||||
DrawablePtr pDrawable;
|
||||
register GCPtr pGC;
|
||||
unsigned long pixel;
|
||||
SpanDataPtr spanData;
|
||||
register LineFacePtr face;
|
||||
Bool isLeft;
|
||||
double xorg, yorg;
|
||||
Bool isInt;
|
||||
DrawablePtr pDrawable;
|
||||
GCPtr pGC;
|
||||
unsigned long pixel;
|
||||
SpanDataPtr spanData;
|
||||
LineFacePtr face;
|
||||
Bool isLeft;
|
||||
double xorg, yorg;
|
||||
Bool isInt;
|
||||
{
|
||||
int xorgi = 0, yorgi = 0;
|
||||
int lw;
|
||||
|
@ -1286,18 +1286,18 @@ miLineProjectingCap (pDrawable, pGC, pixel, spanData, face, isLeft, xorg, yorg,
|
|||
|
||||
static void
|
||||
miWideSegment (
|
||||
DrawablePtr pDrawable,
|
||||
GCPtr pGC,
|
||||
unsigned long pixel,
|
||||
SpanDataPtr spanData,
|
||||
register int x1,
|
||||
register int y1,
|
||||
register int x2,
|
||||
register int y2,
|
||||
Bool projectLeft,
|
||||
Bool projectRight,
|
||||
register LineFacePtr leftFace,
|
||||
register LineFacePtr rightFace)
|
||||
DrawablePtr pDrawable,
|
||||
GCPtr pGC,
|
||||
unsigned long pixel,
|
||||
SpanDataPtr spanData,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
int y2,
|
||||
Bool projectLeft,
|
||||
Bool projectRight,
|
||||
LineFacePtr leftFace,
|
||||
LineFacePtr rightFace)
|
||||
{
|
||||
double l, L, r;
|
||||
double xa, ya;
|
||||
|
@ -1508,7 +1508,7 @@ miWideSegment (
|
|||
|
||||
SpanDataPtr
|
||||
miSetupSpanData (pGC, spanData, npt)
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
SpanDataPtr spanData;
|
||||
int npt;
|
||||
{
|
||||
|
@ -1552,21 +1552,21 @@ miCleanupSpanData (pDrawable, pGC, spanData)
|
|||
_X_EXPORT void
|
||||
miWideLine (pDrawable, pGC, mode, npt, pPts)
|
||||
DrawablePtr pDrawable;
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
int mode;
|
||||
register int npt;
|
||||
register DDXPointPtr pPts;
|
||||
int npt;
|
||||
DDXPointPtr pPts;
|
||||
{
|
||||
int x1, y1, x2, y2;
|
||||
SpanDataRec spanDataRec;
|
||||
SpanDataPtr spanData;
|
||||
unsigned long pixel;
|
||||
Bool projectLeft, projectRight;
|
||||
LineFaceRec leftFace, rightFace, prevRightFace;
|
||||
LineFaceRec firstFace;
|
||||
register int first;
|
||||
Bool somethingDrawn = FALSE;
|
||||
Bool selfJoin;
|
||||
int x1, y1, x2, y2;
|
||||
SpanDataRec spanDataRec;
|
||||
SpanDataPtr spanData;
|
||||
long pixel;
|
||||
Bool projectLeft, projectRight;
|
||||
LineFaceRec leftFace, rightFace, prevRightFace;
|
||||
LineFaceRec firstFace;
|
||||
int first;
|
||||
Bool somethingDrawn = FALSE;
|
||||
Bool selfJoin;
|
||||
|
||||
spanData = miSetupSpanData (pGC, &spanDataRec, npt);
|
||||
pixel = pGC->fgPixel;
|
||||
|
@ -1693,7 +1693,7 @@ miWideLine (pDrawable, pGC, mode, npt, pPts)
|
|||
static void
|
||||
miWideDashSegment (
|
||||
DrawablePtr pDrawable,
|
||||
register GCPtr pGC,
|
||||
GCPtr pGC,
|
||||
SpanDataPtr spanData,
|
||||
int *pDashOffset,
|
||||
int *pDashIndex,
|
||||
|
@ -2050,25 +2050,25 @@ miWideDashSegment (
|
|||
_X_EXPORT void
|
||||
miWideDash (pDrawable, pGC, mode, npt, pPts)
|
||||
DrawablePtr pDrawable;
|
||||
register GCPtr pGC;
|
||||
GCPtr pGC;
|
||||
int mode;
|
||||
register int npt;
|
||||
register DDXPointPtr pPts;
|
||||
int npt;
|
||||
DDXPointPtr pPts;
|
||||
{
|
||||
int x1, y1, x2, y2;
|
||||
unsigned long pixel;
|
||||
Bool projectLeft, projectRight;
|
||||
LineFaceRec leftFace, rightFace, prevRightFace;
|
||||
LineFaceRec firstFace;
|
||||
int first;
|
||||
int dashIndex, dashOffset;
|
||||
register int prevDashIndex;
|
||||
SpanDataRec spanDataRec;
|
||||
SpanDataPtr spanData;
|
||||
Bool somethingDrawn = FALSE;
|
||||
Bool selfJoin;
|
||||
Bool endIsFg = FALSE, startIsFg = FALSE;
|
||||
Bool firstIsFg = FALSE, prevIsFg = FALSE;
|
||||
int x1, y1, x2, y2;
|
||||
unsigned long pixel;
|
||||
Bool projectLeft, projectRight;
|
||||
LineFaceRec leftFace, rightFace, prevRightFace;
|
||||
LineFaceRec firstFace;
|
||||
int first;
|
||||
int dashIndex, dashOffset;
|
||||
int prevDashIndex;
|
||||
SpanDataRec spanDataRec;
|
||||
SpanDataPtr spanData;
|
||||
Bool somethingDrawn = FALSE;
|
||||
Bool selfJoin;
|
||||
Bool endIsFg = FALSE, startIsFg = FALSE;
|
||||
Bool firstIsFg = FALSE, prevIsFg = FALSE;
|
||||
|
||||
#if 0
|
||||
/* XXX backward compatibility */
|
||||
|
|
|
@ -160,12 +160,12 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
|
|||
*/
|
||||
static Bool
|
||||
miCheckSubSaveUnder(
|
||||
register WindowPtr pParent, /* Parent to check */
|
||||
WindowPtr pParent, /* Parent to check */
|
||||
WindowPtr pFirst, /* first reconfigured window */
|
||||
RegionPtr pRegion) /* Initial area obscured by saveUnder */
|
||||
{
|
||||
register WindowPtr pChild; /* Current child */
|
||||
register ScreenPtr pScreen; /* Screen to use */
|
||||
WindowPtr pChild; /* Current child */
|
||||
ScreenPtr pScreen; /* Screen to use */
|
||||
RegionRec SubRegion; /* Area of children obscured */
|
||||
Bool res = FALSE; /* result */
|
||||
Bool subInited=FALSE;/* SubRegion initialized */
|
||||
|
@ -268,12 +268,12 @@ miCheckSubSaveUnder(
|
|||
*/
|
||||
Bool
|
||||
miChangeSaveUnder(pWin, first)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
WindowPtr first; /* First window to check.
|
||||
* Used when pWin was restacked */
|
||||
{
|
||||
RegionRec rgn; /* Area obscured by saveUnder windows */
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Bool res;
|
||||
|
||||
if (!deltaSaveUndersViewable && !numSaveUndersViewable)
|
||||
|
@ -309,7 +309,7 @@ miPostChangeSaveUnder(pWin, pFirst)
|
|||
WindowPtr pWin;
|
||||
WindowPtr pFirst;
|
||||
{
|
||||
register WindowPtr pParent, pChild;
|
||||
WindowPtr pParent, pChild;
|
||||
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
||||
|
||||
if (!(pParent = pWin->parent))
|
||||
|
@ -342,9 +342,9 @@ miPostChangeSaveUnder(pWin, pFirst)
|
|||
|
||||
void
|
||||
miMarkWindow(pWin)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register ValidatePtr val;
|
||||
ValidatePtr val;
|
||||
|
||||
if (pWin->valdata)
|
||||
return;
|
||||
|
@ -362,8 +362,8 @@ miMarkOverlappedWindows(pWin, pFirst, ppLayerWin)
|
|||
WindowPtr pFirst;
|
||||
WindowPtr *ppLayerWin;
|
||||
{
|
||||
register BoxPtr box;
|
||||
register WindowPtr pChild, pLast;
|
||||
BoxPtr box;
|
||||
WindowPtr pChild, pLast;
|
||||
Bool anyMarked = FALSE;
|
||||
MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow;
|
||||
ScreenPtr pScreen;
|
||||
|
@ -449,8 +449,8 @@ _X_EXPORT void
|
|||
miHandleValidateExposures(pWin)
|
||||
WindowPtr pWin;
|
||||
{
|
||||
register WindowPtr pChild;
|
||||
register ValidatePtr val;
|
||||
WindowPtr pChild;
|
||||
ValidatePtr val;
|
||||
ScreenPtr pScreen;
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
|
||||
|
@ -487,7 +487,7 @@ miHandleValidateExposures(pWin)
|
|||
|
||||
void
|
||||
miMoveWindow(pWin, x, y, pNextSib, kind)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
int x,y;
|
||||
WindowPtr pNextSib;
|
||||
VTKind kind;
|
||||
|
@ -498,7 +498,7 @@ miMoveWindow(pWin, x, y, pNextSib, kind)
|
|||
RegionPtr oldRegion = NULL;
|
||||
DDXPointRec oldpt;
|
||||
Bool anyMarked = FALSE;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr windowToValidate;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
|
@ -576,10 +576,10 @@ miMoveWindow(pWin, x, y, pNextSib, kind)
|
|||
|
||||
static int
|
||||
miRecomputeExposures (
|
||||
register WindowPtr pWin,
|
||||
WindowPtr pWin,
|
||||
pointer value) /* must conform to VisitWindowProcPtr */
|
||||
{
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
RegionPtr pValid = (RegionPtr)value;
|
||||
|
||||
if (pWin->valdata)
|
||||
|
@ -604,7 +604,7 @@ miRecomputeExposures (
|
|||
|
||||
void
|
||||
miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
int x,y;
|
||||
unsigned int w, h;
|
||||
WindowPtr pSib;
|
||||
|
@ -620,11 +620,11 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
|
|||
DDXPointRec oldpt;
|
||||
RegionPtr oldRegion = NULL;
|
||||
Bool anyMarked = FALSE;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr pFirstChange;
|
||||
register WindowPtr pChild;
|
||||
WindowPtr pChild;
|
||||
RegionPtr gravitate[StaticGravity + 1];
|
||||
register unsigned g;
|
||||
unsigned g;
|
||||
int nx, ny; /* destination x,y */
|
||||
int newx, newy; /* new inner window position */
|
||||
RegionPtr pRegion = NULL;
|
||||
|
@ -981,10 +981,10 @@ miGetLayerWindow(pWin)
|
|||
|
||||
_X_EXPORT void
|
||||
miSetShape(pWin)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
{
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
register ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
Bool anyMarked = FALSE;
|
||||
RegionPtr pOldClip = NULL, bsExposed;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
@ -1081,12 +1081,12 @@ miSetShape(pWin)
|
|||
|
||||
_X_EXPORT void
|
||||
miChangeBorderWidth(pWin, width)
|
||||
register WindowPtr pWin;
|
||||
WindowPtr pWin;
|
||||
unsigned int width;
|
||||
{
|
||||
int oldwidth;
|
||||
Bool anyMarked = FALSE;
|
||||
register ScreenPtr pScreen;
|
||||
ScreenPtr pScreen;
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
Bool HadBorder;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
|
|
|
@ -97,8 +97,8 @@ static miZeroArcPtRec oob = {65536, 65536, 0};
|
|||
|
||||
_X_EXPORT Bool
|
||||
miZeroArcSetup(arc, info, ok360)
|
||||
register xArc *arc;
|
||||
register miZeroArcRec *info;
|
||||
xArc *arc;
|
||||
miZeroArcRec *info;
|
||||
Bool ok360;
|
||||
{
|
||||
int l;
|
||||
|
@ -404,11 +404,11 @@ miZeroArcSetup(arc, info, ok360)
|
|||
DDXPointPtr
|
||||
miZeroArcPts(arc, pts)
|
||||
xArc *arc;
|
||||
register DDXPointPtr pts;
|
||||
DDXPointPtr pts;
|
||||
{
|
||||
miZeroArcRec info;
|
||||
register int x, y, a, b, d, mask;
|
||||
register int k1, k3, dx, dy;
|
||||
int x, y, a, b, d, mask;
|
||||
int k1, k3, dx, dy;
|
||||
Bool do360;
|
||||
|
||||
do360 = miZeroArcSetup(arc, &info, TRUE);
|
||||
|
@ -509,14 +509,14 @@ miZeroArcDashPts(
|
|||
GCPtr pGC,
|
||||
xArc *arc,
|
||||
DashInfo *dinfo,
|
||||
register DDXPointPtr points,
|
||||
DDXPointPtr points,
|
||||
int maxPts,
|
||||
register DDXPointPtr *evenPts,
|
||||
register DDXPointPtr *oddPts )
|
||||
DDXPointPtr *evenPts,
|
||||
DDXPointPtr *oddPts )
|
||||
{
|
||||
miZeroArcRec info;
|
||||
register int x, y, a, b, d, mask;
|
||||
register int k1, k3, dx, dy;
|
||||
int x, y, a, b, d, mask;
|
||||
int k1, k3, dx, dy;
|
||||
int dashRemaining;
|
||||
DDXPointPtr arcPts[4];
|
||||
DDXPointPtr startPts[5], endPts[5];
|
||||
|
@ -715,11 +715,11 @@ miZeroPolyArc(pDraw, pGC, narcs, parcs)
|
|||
xArc *parcs;
|
||||
{
|
||||
int maxPts = 0;
|
||||
register int n, maxw = 0;
|
||||
register xArc *arc;
|
||||
register int i;
|
||||
int n, maxw = 0;
|
||||
xArc *arc;
|
||||
int i;
|
||||
DDXPointPtr points, pts, oddPts;
|
||||
register DDXPointPtr pt;
|
||||
DDXPointPtr pt;
|
||||
int numPts;
|
||||
Bool dospans;
|
||||
int *widths = NULL;
|
||||
|
|
|
@ -490,7 +490,7 @@ RRCrtcInit (void)
|
|||
int
|
||||
ProcRRGetCrtcInfo (ClientPtr client)
|
||||
{
|
||||
REQUEST(xRRGetCrtcInfoReq);;
|
||||
REQUEST(xRRGetCrtcInfoReq);
|
||||
xRRGetCrtcInfoReply rep;
|
||||
RRCrtcPtr crtc;
|
||||
CARD8 *extra;
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include "randrstr.h"
|
||||
|
||||
#define SERVER_RANDR_MAJOR 1
|
||||
#define SERVER_RANDR_MINOR 2
|
||||
|
||||
Bool
|
||||
RRClientKnowsRates (ClientPtr pClient)
|
||||
{
|
||||
|
@ -49,8 +52,8 @@ ProcRRQueryVersion (ClientPtr client)
|
|||
* Report the current version; the current
|
||||
* spec says they're all compatible after 1.0
|
||||
*/
|
||||
rep.majorVersion = RANDR_MAJOR;
|
||||
rep.minorVersion = RANDR_MINOR;
|
||||
rep.majorVersion = SERVER_RANDR_MAJOR;
|
||||
rep.minorVersion = SERVER_RANDR_MINOR;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
|
|
|
@ -366,7 +366,7 @@ RROutputInit (void)
|
|||
int
|
||||
ProcRRGetOutputInfo (ClientPtr client)
|
||||
{
|
||||
REQUEST(xRRGetOutputInfoReq);;
|
||||
REQUEST(xRRGetOutputInfoReq);
|
||||
xRRGetOutputInfoReply rep;
|
||||
RROutputPtr output;
|
||||
CARD8 *extra;
|
||||
|
|
|
@ -104,7 +104,7 @@ void
|
|||
RRPointerMoved (ScreenPtr pScreen, int x, int y)
|
||||
{
|
||||
rrScrPriv (pScreen);
|
||||
RRCrtcPtr pointerCrtc = pScrPriv->pointerCrtc;;
|
||||
RRCrtcPtr pointerCrtc = pScrPriv->pointerCrtc;
|
||||
int c;
|
||||
|
||||
/* Check last known CRTC */
|
||||
|
|
Loading…
Reference in New Issue