diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-29 16:08:53 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-29 16:08:53 +0000 |
commit | 77836ebda2a47e04c56c5842f62fab5992909712 (patch) | |
tree | 6c4b1c15ae1d7babdf3c1788ccaeb2f714149c58 | |
parent | 88193e928be7cf5a526b50ad1e0b4ac9cddef297 (diff) |
xfree86 merge
-rw-r--r-- | cfb/cfbbitblt.c | 232 | ||||
-rw-r--r-- | cfb/cfbsetsp.c | 6 | ||||
-rw-r--r-- | dix/main.c | 2 | ||||
-rw-r--r-- | include/regionstr.h | 3 | ||||
-rw-r--r-- | include/resource.h | 17 | ||||
-rw-r--r-- | include/scrnintstr.h | 32 | ||||
-rw-r--r-- | os/utils.c | 25 | ||||
-rw-r--r-- | xkb/xkbActions.c | 65 |
8 files changed, 1 insertions, 381 deletions
diff --git a/cfb/cfbbitblt.c b/cfb/cfbbitblt.c index 151a50edd..18f90f1fd 100644 --- a/cfb/cfbbitblt.c +++ b/cfb/cfbbitblt.c @@ -1085,238 +1085,6 @@ cfbCopyPlane1to32 #if PSZ == 24 widthDst <<= 2; #endif -#if PSZ == 32 - pdstLine = (unsigned int *)pdstBase + dsty * widthDst + dstx; -#endif - xoffSrc = srcx & 0x1f; - - /* - * compute constants for the first four bits to be - * copied. This avoids troubles with partial first - * writes, and difficult shift computation - */ - leftShift = xoffSrc; - rightShift = 32 - leftShift; - - if (rop == GXcopy && (planemask & PMSK) == PMSK) - { - while (height--) - { - psrc = psrcLine; - pdst = pdstLine; - psrcLine += widthSrc; - pdstLine += widthDst; - bits = *psrc++; - nl = width; - while (nl >= 32) - { - tmp = BitLeft(bits, leftShift); - bits = *psrc++; - if (rightShift != 32) - tmp |= BitRight(bits, rightShift); - i = 0; -#if PSZ == 16 - /* - * I've thrown in some optimization to at least write - * some aligned 32-bit words instead of 16-bit shorts. - */ - if ((unsigned long)psrc & 2) { - /* Write unaligned 16-bit word at left edge. */ - if (tmp & 0x01) - *pdst = fgpixel; - else - *pdst = bgpixel; - pdst++; - i++; - } - while (i <= 24) - { - unsigned tmpbits = tmp >> i; - *(unsigned int *)pdst = doublet[tmpbits & 0x03]; - *(unsigned int *)(pdst + 2) = - doublet[(tmpbits >> 2) & 0x03]; - *(unsigned int *)(pdst + 4) = - doublet[(tmpbits >> 4) & 0x03]; - *(unsigned int *)(pdst + 6) = - doublet[(tmpbits >> 6) & 0x03]; - pdst += 8; /* Advance four 32-bit words. */ - i += 8; - } - while (i <= 30) - { - *(unsigned int *)pdst = - doublet[(tmp >> i) & 0x03]; - pdst += 2; /* Advance one 32-bit word. */ - i += 2; - } - if (i == 31) { - if ((tmp >> 31) & 0x01) - *pdst = fgpixel; - else - *pdst = bgpixel; - pdst++; - } -#endif -#if PSZ == 24 - while (i < 32) { - if ((tmp >> i) & 0x01) { - *pdst = fgpixel; - *(pdst + 1) = fgpixel >> 8; - *(pdst + 2) = fgpixel >> 16; - } - else { - *pdst = bgpixel; - *(pdst + 1) = bgpixel >> 8; - *(pdst + 2) = bgpixel >> 16; - } - pdst += 3; - i++; - } -#endif -#if PSZ == 32 - while (i <= 28) { - int pair; - pair = (tmp >> i) & 0x03; - *pdst = doublet[pair * 2]; - *(pdst + 1) = doublet[pair * 2 + 1]; - pair = (tmp >> (i + 2)) & 0x03; - *(pdst + 2) = doublet[pair * 2]; - *(pdst + 3) = doublet[pair * 2 + 1]; - pdst += 4; - i += 4; - } - while (i < 32) { - *pdst = ((tmp >> i) & 0x01) ? fgpixel : bgpixel; - pdst++; - i++; - } -#endif - nl -= 32; - } - - if (nl) - { - tmp = BitLeft(bits, leftShift); - /* - * better condition needed -- mustn't run - * off the end of the source... - */ - if (rightShift != 32) - { - bits = *psrc++; - tmp |= BitRight (bits, rightShift); - } - i = 32; - while (nl--) - { - --i; -#if PSZ == 24 - if ((tmp >> (31 - i)) & 0x01) { - *pdst = fgpixel; - *(pdst + 1) = fgpixel >> 8; - *(pdst + 2) = fgpixel >> 16; - } - else { - *pdst = bgpixel; - *(pdst + 1) = bgpixel >> 8; - *(pdst + 2) = bgpixel >> 16; - } - pdst += 3; -#else - *pdst = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel; - pdst++; -#endif - } - } - } - } - else - { - while (height--) - { - psrc = psrcLine; - pdst = pdstLine; - psrcLine += widthSrc; - pdstLine += widthDst; - bits = *psrc++; - nl = width; - while (nl >= 32) - { - tmp = BitLeft(bits, leftShift); - bits = *psrc++; - if (rightShift != 32) - tmp |= BitRight(bits, rightShift); - i = 32; - while (i--) - { - src = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel; -#if PSZ == 24 - dst = *pdst; - dst |= (*(pdst + 1)) << 8; - dst |= (*(pdst + 2)) << 16; - DoRop (result, rop, src, dst); - *pdst = (dst & ~planemask) | - (result & planemask); - *(pdst+1) = ((dst & ~planemask) >> 8) | - ((result & planemask) >> 8); - *(pdst+2) = ((dst & ~planemask) >> 16) | - ((result & planemask) >> 16); - pdst += 3; -#else - DoRop (result, rop, src, *pdst); - - *pdst = (*pdst & ~planemask) | - (result & planemask); - pdst++; -#endif - } - nl -= 32; - } - - if (nl) - { - tmp = BitLeft(bits, leftShift); - /* - * better condition needed -- mustn't run - * off the end of the source... - */ - if (rightShift != 32) - { - bits = *psrc++; - tmp |= BitRight (bits, rightShift); - } - i = 32; - while (nl--) - { - --i; - src = ((tmp >> (31 - i)) & 0x01) ? fgpixel : bgpixel; -#if PSZ == 24 - dst = *pdst; - dst |= (*(pdst + 1)) << 8; - dst |= (*(pdst + 2)) << 16; - DoRop (result, rop, src, dst); - *pdst = (dst & ~planemask) | - (result & planemask); - *(pdst+1) = ((dst & ~planemask) >> 8) | - ((result & planemask) >> 8); - *(pdst+2) = ((dst & ~planemask) >> 16) | - ((result & planemask) >> 16); - pdst += 3; -#else - DoRop (result, rop, src, *pdst); - - *pdst = (*pdst & ~planemask) | - (result & planemask); - pdst++; -#endif - } - } - } - } - } -} - -#endif /* PSZ == 8 */ nbox = REGION_NUM_RECTS(prgnDst); pbox = REGION_RECTS(prgnDst); diff --git a/cfb/cfbsetsp.c b/cfb/cfbsetsp.c index 4b75c7f2c..4f7dfaee1 100644 --- a/cfb/cfbsetsp.c +++ b/cfb/cfbsetsp.c @@ -91,12 +91,6 @@ cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemas #else int dstBit; /* offset in bits from beginning of * word */ - int offSrc; - int nl; -#if PSZ == 24 - register char *psrcb, *pdstb; - register int xIndex; -#else register int nstart; /* number of bits from first partial */ #if PSZ != 32 || PPW != 1 register int nend; /* " " last partial word */ diff --git a/dix/main.c b/dix/main.c index 89f428f1d..37add2a62 100644 --- a/dix/main.c +++ b/dix/main.c @@ -480,8 +480,6 @@ main(int argc, char *argv[], char *envp[]) if (dispatchException & DE_TERMINATE) { - CloseWellKnownConnections(); - OsCleanup(); ddxGiveUp(); break; } diff --git a/include/regionstr.h b/include/regionstr.h index 325c02a80..5754e5333 100644 --- a/include/regionstr.h +++ b/include/regionstr.h @@ -284,9 +284,6 @@ extern volatile ScreenPtr currentRegionScreen; #define REGION_BROKEN(_pScreen, _pReg) \ (REGION_SCREEN(_pScreen), REGION_NAR(_pReg)) -#define REGION_BROKEN(_pScreen, _pReg) \ - REGION_NAR(_pReg) - #define REGION_EMPTY(_pScreen, _pReg) \ { \ REGION_UNINIT(_pScreen, _pReg); \ diff --git a/include/resource.h b/include/resource.h index 15a655035..0408f0400 100644 --- a/include/resource.h +++ b/include/resource.h @@ -142,23 +142,6 @@ typedef Bool (*FindComplexResType)( XID /*id*/, pointer /*cdata*/); -typedef void (*FindAllRes)( -#if NeedNestedPrototypes - pointer /*value*/, - XID /*id*/, - RESTYPE /*type*/, - pointer /*cdata*/ -#endif -); - -typedef Bool (*FindComplexResType)( -#if NeedNestedPrototypes - pointer /*value*/, - XID /*id*/, - pointer /*cdata*/ -#endif -); - extern RESTYPE CreateNewResourceType( DeleteType /*deleteFunc*/); diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 2728fd9d7..2e9b19c8b 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -158,13 +158,6 @@ typedef void (* RestackWindowProcPtr)( WindowPtr /*pWindow*/, WindowPtr /*pOldNextSib*/); -typedef void (* RestackWindowProcPtr)( -#if NeedNestedPrototypes - WindowPtr /*pWindow*/, - WindowPtr /*pOldNextSib*/ -#endif -); - typedef int (* ValidateTreeProcPtr)( WindowPtr /*pParent*/, WindowPtr /*pChild*/, @@ -493,31 +486,6 @@ typedef PixmapPtr (* GetScreenPixmapProcPtr)( typedef void (* SetScreenPixmapProcPtr)( PixmapPtr /*pPix*/); -typedef PixmapPtr (* GetWindowPixmapProcPtr)( -#if NeedNestedPrototypes - WindowPtr /*pWin*/ -#endif -); - -typedef void (* SetWindowPixmapProcPtr)( -#if NeedNestedPrototypes - WindowPtr /*pWin*/, - PixmapPtr /*pPix*/ -#endif -); - -typedef PixmapPtr (* GetScreenPixmapProcPtr)( -#if NeedNestedPrototypes - ScreenPtr /*pScreen*/ -#endif -); - -typedef void (* SetScreenPixmapProcPtr)( -#if NeedNestedPrototypes - PixmapPtr /*pPix*/ -#endif -); - typedef void (* MarkWindowProcPtr)( WindowPtr /*pWin*/); diff --git a/os/utils.c b/os/utils.c index d9d9ab7f6..e01793604 100644 --- a/os/utils.c +++ b/os/utils.c @@ -136,10 +136,6 @@ Bool PanoramiXWindowExposureSent = FALSE; Bool PanoramiXOneExposeRequest = FALSE; #endif -#ifdef DDXOSVERRORF -void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL; -#endif - int auditTrailLevel = 1; Bool Must_have_memory = FALSE; @@ -1263,24 +1259,6 @@ XNFcalloc(unsigned long amount) } /***************** - * XNFcalloc - *****************/ - -void * -XNFcalloc (amount) - unsigned long amount; -{ - unsigned long *ret; - - ret = Xalloc (amount); - if (ret) - bzero ((char *) ret, (int) amount); - else if ((long)amount > 0) - FatalError("Out of memory"); - return ret; -} - -/***************** * Xrealloc *****************/ @@ -1812,9 +1790,6 @@ Fclose(pointer iop) #ifndef REMOVE_ENV_LD #define REMOVE_ENV_LD 1 #endif - AbortServer(); - /*NOTREACHED*/ -} /* Remove long environment variables? */ #ifndef REMOVE_LONG_ENV diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 9fce74267..403c2fb89 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -920,71 +920,8 @@ unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0; filter->keycode= 0; filter->active= 0; } - return 1; -} - -static int -#if NeedFunctionPrototypes -_XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, - XkbFilterPtr filter, - unsigned keycode, - XkbAction * pAction) -#else -_XkbFilterSwitchScreen(xkbi,filter,keycode,pAction) - XkbSrvInfoPtr xkbi; - XkbFilterPtr filter; - unsigned keycode; - XkbAction * pAction; -#endif -{ - if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; - filter->keycode = keycode; - filter->active = 1; - filter->filterOthers = 0; - filter->filter = _XkbFilterSwitchScreen; - AccessXCancelRepeatKey(xkbi, keycode); - XkbDDXSwitchScreen(dev,keycode,pAction); - return 0; - } - else if (filter->keycode==keycode) { - filter->active= 0; - return 0; - } - return 1; -} - -#ifdef XFree86Server -static int -#if NeedFunctionPrototypes -_XkbFilterXF86Private( XkbSrvInfoPtr xkbi, - XkbFilterPtr filter, - unsigned keycode, - XkbAction * pAction) -#else -_XkbFilterXF86Private(xkbi,filter,keycode,pAction) - XkbSrvInfoPtr xkbi; - XkbFilterPtr filter; - unsigned keycode; - XkbAction * pAction; -#endif -{ - if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; - filter->keycode = keycode; - filter->active = 1; - filter->filterOthers = 0; - filter->filter = _XkbFilterXF86Private; - XkbDDXPrivate(dev,keycode,pAction); - return 0; - } - else if (filter->keycode==keycode) { - filter->active= 0; - return 0; - } - return 1; + return 0; } -#endif static int _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, |