Commit 015d728b authored by Peter Hutterer's avatar Peter Hutterer

Merge branch 'master' into mpx

Conflicts:

	dix/devices.c
	dix/events.c
	mi/misprite.c
parents 65b0eb60 b167583f
......@@ -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;
......
......@@ -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;
......
This diff is collapsed.
......@@ -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--)
......
This diff is collapsed.
......@@ -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;