summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/dix
diff options
context:
space:
mode:
authordawes <dawes>2000-11-08 02:53:41 +0000
committerdawes <dawes>2000-11-08 02:53:41 +0000
commit23d67f1befe18a4aba21b7cae48f3d293cfed1ee (patch)
tree2cdf6024b3a671041104d5d95b909f6cfe1b751d /xc/programs/Xserver/dix
parentf93d27aa9ffc3e26ebb937ccd8dfe3319315c70c (diff)
Import of XFree86 4.0.1eX_4_0_1e
Diffstat (limited to 'xc/programs/Xserver/dix')
-rw-r--r--xc/programs/Xserver/dix/swaprep.c48
1 files changed, 19 insertions, 29 deletions
diff --git a/xc/programs/Xserver/dix/swaprep.c b/xc/programs/Xserver/dix/swaprep.c
index 8fe758e8b..247a40ada 100644
--- a/xc/programs/Xserver/dix/swaprep.c
+++ b/xc/programs/Xserver/dix/swaprep.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.4 1999/08/31 08:39:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.5 2000/11/03 00:06:35 mvojkovi Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -1312,57 +1312,47 @@ SKeymapNotifyEvent(from, to)
}
void
-SwapConnSetupInfo(pInfo, pInfoTBase)
- char *pInfo;
- char *pInfoTBase;
+SwapConnSetupInfo(
+ char *pInfo,
+ char *pInfoT
+)
{
int i, j, k;
- ScreenPtr pScreen;
- DepthPtr pDepth;
- char *pInfoT;
xConnSetup *pConnSetup = (xConnSetup *)pInfo;
- int numScreens;
+ xDepth *depth;
+ xWindowRoot *root;
- pInfoT = pInfoTBase;
SwapConnSetup(pConnSetup, (xConnSetup *)pInfoT);
pInfo += sizeof(xConnSetup);
pInfoT += sizeof(xConnSetup);
/* Copy the vendor string */
i = (pConnSetup->nbytesVendor + 3) & ~3;
- memmove(pInfoT, pInfo, i);
+ memcpy(pInfoT, pInfo, i);
pInfo += i;
pInfoT += i;
/* The Pixmap formats don't need to be swapped, just copied. */
- i = sizeof(xPixmapFormat) * screenInfo.numPixmapFormats;
- memmove(pInfoT, pInfo, i);
+ i = sizeof(xPixmapFormat) * pConnSetup->numFormats;
+ memcpy(pInfoT, pInfo, i);
pInfo += i;
pInfoT += i;
-#ifndef PANORAMIX
- numScreens = screenInfo.numScreens;
-#else
- if (noPanoramiXExtension)
- numScreens = screenInfo.numScreens;
- else
- numScreens = pConnSetup->numRoots;
-#endif
-
- for(i = 0; i < numScreens; i++)
+ for(i = 0; i < pConnSetup->numRoots; i++)
{
- pScreen = screenInfo.screens[i];
- SwapWinRoot((xWindowRoot *)pInfo, (xWindowRoot *)pInfoT);
+ root = (xWindowRoot*)pInfo;
+ SwapWinRoot(root, (xWindowRoot *)pInfoT);
pInfo += sizeof(xWindowRoot);
pInfoT += sizeof(xWindowRoot);
- pDepth = pScreen->allowedDepths;
- for(j = 0; j < pScreen->numDepths; j++, pDepth++)
+
+ for(j = 0; j < root->nDepths; j++)
{
- ((xDepth *)pInfoT)->depth = ((xDepth *)pInfo)->depth;
- cpswaps(((xDepth *)pInfo)->nVisuals, ((xDepth *)pInfoT)->nVisuals);
+ depth = (xDepth*)pInfo;
+ ((xDepth *)pInfoT)->depth = depth->depth;
+ cpswaps(depth->nVisuals, ((xDepth *)pInfoT)->nVisuals);
pInfo += sizeof(xDepth);
pInfoT += sizeof(xDepth);
- for(k = 0; k < pDepth->numVids; k++)
+ for(k = 0; k < depth->nVisuals; k++)
{
SwapVisual((xVisualType *)pInfo, (xVisualType *)pInfoT);
pInfo += sizeof(xVisualType);