summaryrefslogtreecommitdiff
path: root/graphics/xv
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2006-12-15 07:01:35 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2006-12-15 07:01:35 +0000
commit9502699c06c87e40600fead6d76475bba5e055da (patch)
tree36fa5be9a73e6c3ddaeb0d8cde039d2127c2854f /graphics/xv
parent- added GSBench, PopplerKit, SVGViewer, MP3ToWav (diff)
- fix build with gcc42
Diffstat (limited to 'graphics/xv')
-rw-r--r--graphics/xv/files/patch-xvimage.c55
1 files changed, 49 insertions, 6 deletions
diff --git a/graphics/xv/files/patch-xvimage.c b/graphics/xv/files/patch-xvimage.c
index 32bb035156f3..a233568a4955 100644
--- a/graphics/xv/files/patch-xvimage.c
+++ b/graphics/xv/files/patch-xvimage.c
@@ -1,13 +1,26 @@
---- xvimage.c.orig Sat Oct 7 21:38:26 2006
-+++ xvimage.c Sat Oct 7 21:44:00 2006
+--- xvimage.c.orig Fri Dec 15 07:32:23 2006
++++ xvimage.c Fri Dec 15 07:45:46 2006
+@@ -1977,10 +1977,10 @@
+ case 12:
+ case 15:
+ case 16: {
+- unsigned short *imagedata, *ip;
++ byte *imagedata, *ip;
+ byte *pp;
+
+- imagedata = (unsigned short *) malloc((size_t) (2*wide*high));
++ imagedata = (byte *) malloc((size_t) (2*wide*high));
+ if (!imagedata) FatalError("couldn't malloc imagedata");
+
+ xim = XCreateImage(theDisp,theVisual,dispDEEP,ZPixmap,0,
@@ -2003,8 +2003,8 @@
if (dithpic) xcol = ((*pp) ? white : black) & 0xffff;
else xcol = xcolors[*pp] & 0xffff;
- *((unsigned char *)ip)++ = (xcol>>8) & 0xff;
- *((unsigned char *)ip)++ = (xcol) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol>>8) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol) & 0xff;
++ *(ip++) = (xcol>>8) & 0xff;
++ *(ip++) = (xcol) & 0xff;
}
}
else { /* LSBFirst */
@@ -17,8 +30,38 @@
- *((unsigned char *)ip)++ = (xcol) & 0xff;
- *((unsigned char *)ip)++ = (xcol>>8) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol>>8) & 0xff;
++ *(ip++) = (xcol) & 0xff;
++ *(ip++) = (xcol>>8) & 0xff;
}
}
}
+@@ -2214,7 +2214,8 @@
+ *ip++ = xcol & 0xff;
+ break;
+ case 16:
+- *((CARD16 *)ip)++ = (CARD16)xcol;
++ *((CARD16 *)ip) = (CARD16)xcol;
++ ip += 2;
+ break;
+ }
+ }
+@@ -2243,7 +2244,8 @@
+ *ip++ = xcol & 0xff;
+ break;
+ case 16:
+- *((CARD16 *)ip)++ = (CARD16)xcol;
++ *((CARD16 *)ip) = (CARD16)xcol;
++ ip += 2;
+ break;
+ case 24:
+ *ip++ = (xcol >> 16) & 0xff;
+@@ -2251,7 +2253,8 @@
+ *ip++ = xcol & 0xff;
+ break;
+ case 32:
+- *((CARD32 *)ip)++ = (CARD32)xcol;
++ *((CARD32 *)ip) = (CARD32)xcol;
++ ip += 4;
+ break;
+ }
+ }