summaryrefslogtreecommitdiff
path: root/www/Mosaic
diff options
context:
space:
mode:
authortron <tron>1999-06-07 20:47:24 +0000
committertron <tron>1999-06-07 20:47:24 +0000
commita0675b2b401b079aa52d67160820dbc10fe65c2c (patch)
tree8e03d1c4b192ef124f9fe7315096d8ea7a6457c8 /www/Mosaic
parent45eab52043aa5d2c8c933ef37a8a1f9014a31202 (diff)
downloadpkgsrc-a0675b2b401b079aa52d67160820dbc10fe65c2c.tar.gz
Make Mosaic work on 24BPP displays without breaking 32BPP displays.
Fixes PR pkg/7627 by Wolfgang Rupprecht.
Diffstat (limited to 'www/Mosaic')
-rw-r--r--www/Mosaic/patches/patch-aa47
-rw-r--r--www/Mosaic/patches/patch-ao49
2 files changed, 96 insertions, 0 deletions
diff --git a/www/Mosaic/patches/patch-aa b/www/Mosaic/patches/patch-aa
new file mode 100644
index 00000000000..3397822d943
--- /dev/null
+++ b/www/Mosaic/patches/patch-aa
@@ -0,0 +1,47 @@
+$NetBSD: patch-aa,v 1.3 1999/06/07 20:47:24 tron Exp $
+
+--- libhtmlw/HTMLimages.c.orig Thu Jun 27 01:37:01 1996
++++ libhtmlw/HTMLimages.c Mon Jun 7 22:27:36 1999
+@@ -511,6 +511,11 @@
+ bshift = highbit(theVisual->blue_mask) - 7;
+ bmap_order = BitmapBitOrder(dsp);
+
++ newimage = XCreateImage(dsp,
++ DefaultVisual(dsp, DefaultScreen(dsp)),
++ depth, ZPixmap, 0, (char *)bit_data,
++ width, height, 8, 0);
++
+ bitp = bit_data;
+ datap = data;
+ for (w = (width * height); w > 0; w--)
+@@ -524,7 +529,10 @@
+
+ if (bmap_order == MSBFirst)
+ {
+- *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ if (newimage->bits_per_pixel == 32)
++ {
++ *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ }
+ *bitp++ = (unsigned char)((c >> 16) & 0xff);
+ *bitp++ = (unsigned char)((c >> 8) & 0xff);
+ *bitp++ = (unsigned char)(c & 0xff);
+@@ -534,14 +542,13 @@
+ *bitp++ = (unsigned char)(c & 0xff);
+ *bitp++ = (unsigned char)((c >> 8) & 0xff);
+ *bitp++ = (unsigned char)((c >> 16) & 0xff);
+- *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ if (newimage->bits_per_pixel == 32)
++ {
++ *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ }
+ }
+ }
+
+- newimage = XCreateImage(dsp,
+- DefaultVisual(dsp, DefaultScreen(dsp)),
+- depth, ZPixmap, 0, (char *)bit_data,
+- width, height, 32, 0);
+ break;
+ default:
+ #ifndef DISABLE_TRACE
diff --git a/www/Mosaic/patches/patch-ao b/www/Mosaic/patches/patch-ao
new file mode 100644
index 00000000000..a1d8f8691f8
--- /dev/null
+++ b/www/Mosaic/patches/patch-ao
@@ -0,0 +1,49 @@
+$NetBSD: patch-ao,v 1.1 1999/06/07 20:47:25 tron Exp $
+
+--- src/pixmaps.c.orig Tue Jun 25 23:53:50 1996
++++ src/pixmaps.c Mon Jun 7 22:34:53 1999
+@@ -685,6 +685,12 @@
+ bshift = highbit(theVisual->blue_mask) - 7;
+ bmap_order = BitmapBitOrder(XtDisplay(wid));
+
++ newimage = XCreateImage(XtDisplay(wid),
++ DefaultVisual(XtDisplay(wid),
++ DefaultScreen(XtDisplay(wid))),
++ depth, ZPixmap, 0, (char *)bit_data,
++ width, height, 8, 0);
++
+ bitp = bit_data;
+ datap = data;
+ for (w = size; w > 0; w--)
+@@ -698,7 +704,10 @@
+
+ if (bmap_order == MSBFirst)
+ {
+- *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ if (newimage->bits_per_pixel == 32)
++ {
++ *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ }
+ *bitp++ = (unsigned char)((c >> 16) & 0xff);
+ *bitp++ = (unsigned char)((c >> 8) & 0xff);
+ *bitp++ = (unsigned char)(c & 0xff);
+@@ -708,15 +717,13 @@
+ *bitp++ = (unsigned char)(c & 0xff);
+ *bitp++ = (unsigned char)((c >> 8) & 0xff);
+ *bitp++ = (unsigned char)((c >> 16) & 0xff);
+- *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ if (newimage->bits_per_pixel == 32)
++ {
++ *bitp++ = (unsigned char)((c >> 24) & 0xff);
++ }
+ }
+ }
+
+- newimage = XCreateImage(XtDisplay(wid),
+- DefaultVisual(XtDisplay(wid),
+- DefaultScreen(XtDisplay(wid))),
+- depth, ZPixmap, 0, (char *)bit_data,
+- width, height, 32, 0);
+ break;
+ default:
+ newimage = NULL;