Updated xc.patch for X.Org 6.8.2
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@172 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/xc.patch b/xc.patch
index 45a046f..cc90f16 100644
--- a/xc.patch
+++ b/xc.patch
@@ -1,8 +1,131 @@
-*** xc/programs/Xserver/Imakefile.orig Fri Jun 6 11:02:36 2003
---- xc/programs/Xserver/Imakefile Fri Jun 6 11:14:39 2003
+diff -bcr xc.org/programs/Xserver/cfb/cfb8line.c xc/programs/Xserver/cfb/cfb8line.c
+*** xc.org/programs/Xserver/cfb/cfb8line.c 2004-04-23 21:00:12.000000000 +0200
+--- xc/programs/Xserver/cfb/cfb8line.c 2005-02-11 16:47:34.000000000 +0100
***************
-*** 409,412 ****
---- 409,435 ----
+*** 695,716 ****
+ # if PSZ == 24
+ y1_or_e1 = xOffset & 3;
+ # else
+! # if PGSZ == 64 /* PIM value from <cfbmskbits.h> is not it! (for 16/32 PSZ)*/
+! y1_or_e1 = ((long) addrp) & 0x7;
+! addrp = (PixelType *) (((unsigned char *) addrp) - y1_or_e1);
+! # else
+! y1_or_e1 = ((long) addrp) & PIM;
+! addrp = (PixelType *) (((unsigned char *) addrp) - y1_or_e1);
+! # endif
+! #if PGSZ == 32
+! # if PWSH != 2
+! y1_or_e1 >>= (2 - PWSH);
+! # endif
+! #else /* PGSZ == 64 */
+! # if PWSH != 3
+! y1_or_e1 >>= (3 - PWSH);
+! # endif
+! #endif /* PGSZ */
+ # endif /* PSZ == 24 */
+ #if PSZ == 24
+ {
+--- 695,705 ----
+ # if PSZ == 24
+ y1_or_e1 = xOffset & 3;
+ # else
+! /* Round addrp down to the next PixelGroup boundary, and
+! * set y1_or_e1 to the excess (in pixels)
+! * (assumes PGSZB is a power of 2). */
+! y1_or_e1 = (((unsigned long) addrp) & (PGSZB - 1)) / (PSZ / 8);
+! addrp -= y1_or_e1;
+ # endif /* PSZ == 24 */
+ #if PSZ == 24
+ {
+diff -bcr xc.org/programs/Xserver/cfb/cfbcppl.c xc/programs/Xserver/cfb/cfbcppl.c
+*** xc.org/programs/Xserver/cfb/cfbcppl.c 2004-04-23 21:00:12.000000000 +0200
+--- xc/programs/Xserver/cfb/cfbcppl.c 2005-02-11 16:47:34.000000000 +0100
+***************
+*** 383,389 ****
+ psrcLine = (unsigned int *)psrcBase + srcy * widthSrc + srcx;
+ #endif
+ pdstLine = (unsigned int *)pdstBase + dsty * widthDst + (dstx >> 5);
+! if (dstx + width <= 32)
+ {
+ mfbmaskpartialbits(dstx, width, startmask);
+ nlMiddle = 0;
+--- 383,389 ----
+ psrcLine = (unsigned int *)psrcBase + srcy * widthSrc + srcx;
+ #endif
+ pdstLine = (unsigned int *)pdstBase + dsty * widthDst + (dstx >> 5);
+! if ((dstx & 0x1f) + width <= 32)
+ {
+ mfbmaskpartialbits(dstx, width, startmask);
+ nlMiddle = 0;
+diff -bcr xc.org/programs/Xserver/cfb/cfbtile32.c xc/programs/Xserver/cfb/cfbtile32.c
+*** xc.org/programs/Xserver/cfb/cfbtile32.c 2004-04-23 21:00:12.000000000 +0200
+--- xc/programs/Xserver/cfb/cfbtile32.c 2005-02-11 16:47:34.000000000 +0100
+***************
+*** 72,78 ****
+ (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<16)|(srcpix>>8)),*(p))), \
+ (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<8)|(srcpix>>16)),*(p))))
+
+! #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE)
+ # define Expand(left,right) {\
+ int part = nlwMiddle & ((PGSZB*2)-1); \
+ nlwMiddle *= 3; \
+--- 72,84 ----
+ (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<16)|(srcpix>>8)),*(p))), \
+ (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<8)|(srcpix>>16)),*(p))))
+
+!
+!
+! /* XXX TJR: I doubt that this optimised case works (because the non-24 bit case
+! was broken), so I've added the #if 0 below. Someone who knows what they're
+! doing can re-enable it if they fix it */
+!
+! #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE) && 0
+ # define Expand(left,right) {\
+ int part = nlwMiddle & ((PGSZB*2)-1); \
+ nlwMiddle *= 3; \
+***************
+*** 144,151 ****
+
+ #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE)
+ # define Expand(left,right) {\
+! int part = nlwMiddle & ((PGSZB*2)-1); \
+! nlwMiddle >>= PWSH + 1; \
+ while (h--) { \
+ srcpix = psrc[srcy]; \
+ MROP_PREBUILD(srcpix); \
+--- 150,157 ----
+
+ #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE)
+ # define Expand(left,right) {\
+! int part = nlwMiddle & 7; \
+! nlwMiddle >>= 3; \
+ while (h--) { \
+ srcpix = psrc[srcy]; \
+ MROP_PREBUILD(srcpix); \
+diff -bcr xc.org/programs/Xserver/Imakefile xc/programs/Xserver/Imakefile
+*** xc.org/programs/Xserver/Imakefile 2004-12-15 20:22:53.000000000 +0100
+--- xc/programs/Xserver/Imakefile 2005-02-11 16:50:00.000000000 +0100
+***************
+*** 128,134 ****
+ LIBREGEX = RegexLibrary
+
+ #if DoLoadableServer
+! LIBCWRAPPER = os/libcwrapper.o
+ #endif
+
+ #if BuildXprint
+--- 128,134 ----
+ LIBREGEX = RegexLibrary
+
+ #if DoLoadableServer
+! LIBCWRAPPER = os/libcwrapper.o os/libos.a
+ #endif
+
+ #if BuildXprint
+***************
+*** 414,419 ****
+--- 414,442 ----
+ #define ServerToInstall Xsun
#endif
#endif /* XsunServer */
+ XCOMM
@@ -30,11 +153,14 @@
+ $(XVNCLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XVNCSYSLIBS))
-*** xc/programs/Xserver/mi/miinitext.c.orig Fri Jun 6 11:02:59 2003
---- xc/programs/Xserver/mi/miinitext.c Fri Jun 6 11:17:15 2003
+ #if defined(Xsun24Server) && Xsun24Server
+diff -bcr xc.org/programs/Xserver/mi/miinitext.c xc/programs/Xserver/mi/miinitext.c
+*** xc.org/programs/Xserver/mi/miinitext.c 2004-12-13 06:48:41.000000000 +0100
+--- xc/programs/Xserver/mi/miinitext.c 2005-02-11 16:47:34.000000000 +0100
***************
-*** 150,153 ****
---- 150,156 ----
+*** 286,291 ****
+--- 286,294 ----
+ #ifdef MITMISC
extern void MITMiscExtensionInit(INITARGS);
#endif
+ #ifdef VNCEXT
@@ -42,156 +168,16 @@
+ #endif
#ifdef XIDLE
extern void XIdleExtensionInit(INITARGS);
+ #endif
***************
-*** 285,288 ****
---- 288,294 ----
- MITMiscExtensionInit();
+*** 587,592 ****
+--- 590,598 ----
+ #ifdef MITMISC
+ if (!noMITMiscExtension) MITMiscExtensionInit();
#endif
+ #ifdef VNCEXT
+ vncExtensionInit();
+ #endif
#ifdef XIDLE
- XIdleExtensionInit();
-*** xc/programs/Xserver/cfb/cfb8line.c.orig Wed Sep 18 18:11:47 2002
---- xc/programs/Xserver/cfb/cfb8line.c Thu Jun 5 18:32:04 2003
-***************
-*** 688,707 ****
- y1_or_e1 = xOffset & 3;
- # else
-! # if PGSZ == 64 /* PIM value from <cfbmskbits.h> is not it! (for 16/32 PSZ)*/
-! y1_or_e1 = ((long) addrp) & 0x7;
-! addrp = (PixelType *) (((unsigned char *) addrp) - y1_or_e1);
-! # else
-! y1_or_e1 = ((long) addrp) & PIM;
-! addrp = (PixelType *) (((unsigned char *) addrp) - y1_or_e1);
-! # endif
-! #if PGSZ == 32
-! # if PWSH != 2
-! y1_or_e1 >>= (2 - PWSH);
-! # endif
-! #else /* PGSZ == 64 */
-! # if PWSH != 3
-! y1_or_e1 >>= (3 - PWSH);
-! # endif
-! #endif /* PGSZ */
- # endif /* PSZ == 24 */
- #if PSZ == 24
---- 688,696 ----
- y1_or_e1 = xOffset & 3;
- # else
-! /* Round addrp down to the next PixelGroup boundary, and
-! * set y1_or_e1 to the excess (in pixels)
-! * (assumes PGSZB is a power of 2). */
-! y1_or_e1 = (((unsigned long) addrp) & (PGSZB - 1)) / (PSZ / 8);
-! addrp -= y1_or_e1;
- # endif /* PSZ == 24 */
- #if PSZ == 24
-*** xc/programs/Xserver/cfb/cfbtile32.c.orig Fri Dec 14 19:59:25 2001
---- xc/programs/Xserver/cfb/cfbtile32.c Thu Jun 5 18:16:48 2003
-***************
-*** 73,77 ****
- (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<8)|(srcpix>>16)),*(p))))
-
-! #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE)
- # define Expand(left,right) {\
- int part = nlwMiddle & ((PGSZB*2)-1); \
---- 73,83 ----
- (p)++,(*(p) = MROP_PREBUILT_SOLID(((srcpix<<8)|(srcpix>>16)),*(p))))
-
-!
-!
-! /* XXX TJR: I doubt that this optimised case works (because the non-24 bit case
-! was broken), so I've added the #if 0 below. Someone who knows what they're
-! doing can re-enable it if they fix it */
-!
-! #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE) && 0
- # define Expand(left,right) {\
- int part = nlwMiddle & ((PGSZB*2)-1); \
-***************
-*** 145,150 ****
- #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE)
- # define Expand(left,right) {\
-! int part = nlwMiddle & ((PGSZB*2)-1); \
-! nlwMiddle >>= PWSH + 1; \
- while (h--) { \
- srcpix = psrc[srcy]; \
---- 151,156 ----
- #if (MROP == Mcopy) && defined(FAST_CONSTANT_OFFSET_MODE) && defined(SHARED_IDCACHE)
- # define Expand(left,right) {\
-! int part = nlwMiddle & 7; \
-! nlwMiddle >>= 3; \
- while (h--) { \
- srcpix = psrc[srcy]; \
-*** xc/programs/Xserver/cfb/cfbglblt8.c.orig Fri Dec 14 19:59:23 2001
---- xc/programs/Xserver/cfb/cfbglblt8.c Tue Aug 12 10:05:57 2003
-***************
-*** 284,288 ****
- register glyphPointer glyphBits;
- register int xoff;
-! #if defined(USE_LEFT_BITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE))
- register CfbBits *dst;
+ if (!noXIdleExtension) XIdleExtensionInit();
#endif
---- 284,288 ----
- register glyphPointer glyphBits;
- register int xoff;
-! #if defined(USE_LEFTBITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE))
- register CfbBits *dst;
- #endif
-***************
-*** 292,296 ****
- CfbBits *dstLine;
- CfbBits *pdstBase;
-! #ifdef USE_LEFT_BITS
- CARD32 *cTmp;
- #endif
---- 292,296 ----
- CfbBits *dstLine;
- CfbBits *pdstBase;
-! #ifdef USE_LEFTBITS
- CARD32 *cTmp;
- #endif
-***************
-*** 399,403 ****
- } while (--hTmp);
- break;
-! #else /* !USE_LEFT_BITS */
- {
- int h;
---- 399,403 ----
- } while (--hTmp);
- break;
-! #else /* !USE_LEFTBITS */
- {
- int h;
-***************
-*** 412,416 ****
- glyphBits = clips;
- /* fall through */
-! #endif /* USE_LEFT_BITS */
- case rgnIN:
- #ifdef STIPPLE
---- 412,416 ----
- glyphBits = clips;
- /* fall through */
-! #endif /* USE_LEFTBITS */
- case rgnIN:
- #ifdef STIPPLE
-*** xc/programs/Xserver/cfb/cfbcppl.c.orig Fri Dec 14 19:59:22 2001
---- xc/programs/Xserver/cfb/cfbcppl.c Sun Apr 18 12:53:36 2004
-***************
-*** 383,389 ****
- psrcLine = (unsigned int *)psrcBase + srcy * widthSrc + srcx;
- #endif
- pdstLine = (unsigned int *)pdstBase + dsty * widthDst + (dstx >> 5);
-! if (dstx + width <= 32)
- {
- mfbmaskpartialbits(dstx, width, startmask);
- nlMiddle = 0;
---- 383,389 ----
- psrcLine = (unsigned int *)psrcBase + srcy * widthSrc + srcx;
- #endif
- pdstLine = (unsigned int *)pdstBase + dsty * widthDst + (dstx >> 5);
-! if ((dstx & 0x1f) + width <= 32)
- {
- mfbmaskpartialbits(dstx, width, startmask);
- nlMiddle = 0;