aboutsummaryrefslogtreecommitdiffstats
path: root/www/Mosaic
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1995-11-29 18:48:30 +0800
committerasami <asami@FreeBSD.org>1995-11-29 18:48:30 +0800
commit97b75051d45133a3a8aa6177dc8c94bc67d178aa (patch)
tree968427b73964b401a395cdad6afa7f95c8118dcf /www/Mosaic
parent2fa28371138cd6022cbcc823a7bac598c5f846bc (diff)
downloadfreebsd-ports-gnome-97b75051d45133a3a8aa6177dc8c94bc67d178aa.tar.gz
freebsd-ports-gnome-97b75051d45133a3a8aa6177dc8c94bc67d178aa.tar.zst
freebsd-ports-gnome-97b75051d45133a3a8aa6177dc8c94bc67d178aa.zip
Make mosaic work in 15/16bpp mode. I haven't tested it here (I don't
have Motif!), but verifies that the patch at least applies. Submitted by: Steve Passe <smp@ilsa.systemsix.com>
Diffstat (limited to 'www/Mosaic')
-rw-r--r--www/Mosaic/files/patch-ae108
1 files changed, 108 insertions, 0 deletions
diff --git a/www/Mosaic/files/patch-ae b/www/Mosaic/files/patch-ae
new file mode 100644
index 000000000000..5bc2836656fb
--- /dev/null
+++ b/www/Mosaic/files/patch-ae
@@ -0,0 +1,108 @@
+*** src/pixmaps.c.orig Thu Feb 2 17:56:46 1995
+--- src/pixmaps.c Fri Nov 17 12:21:32 1995
+***************
+*** 397,412 ****
+ * TrueColor displays. I have no access to such displays, so I
+ * can't really test it.
+ * Donated by - andrew@icarus.demon.co.uk
+ */
+ case 16:
+ bit_data = (unsigned char *)malloc(size * 2);
+ bitp = bit_data;
+ datap = data;
+ for (w = size; w > 0; w--)
+ {
+! temp = (((colrs[(int)*datap].red >> 1) & 0x7c00) |
+! ((colrs[(int)*datap].green >> 6) & 0x03e0) |
+! ((colrs[(int)*datap].blue >> 11) & 0x001f));
+
+ if (BitmapBitOrder(XtDisplay(wid)) == MSBFirst)
+ {
+--- 397,429 ----
+ * TrueColor displays. I have no access to such displays, so I
+ * can't really test it.
+ * Donated by - andrew@icarus.demon.co.uk
++ * modified by smp@csn.net for XFree86-3.1.x
+ */
++ case 15:
+ case 16:
+ bit_data = (unsigned char *)malloc(size * 2);
+ bitp = bit_data;
+ datap = data;
+ for (w = size; w > 0; w--)
+ {
+! if (depth == 15) /* weight == 555 */
+! {
+! temp = (((colrs[(int)*datap].red >> 1)
+! & 0x7c00) |
+! ((colrs[(int)*datap].green >> 6)
+! & 0x03e0) |
+! ((colrs[(int)*datap].blue >> 11)
+! & 0x001f));
+! }
+! else /* depth == 16, weight == 565 */
+! {
+! temp = ( (colrs[(int)*datap].red
+! & 0xf800) |
+! ((colrs[(int)*datap].green >> 5)
+! & 0x07e0) |
+! ((colrs[(int)*datap].blue >> 11)
+! & 0x001f));
+! }
+
+ if (BitmapBitOrder(XtDisplay(wid)) == MSBFirst)
+ {
+*** libhtmlw/HTMLimages.c.orig Tue Jan 10 17:03:32 1995
+--- libhtmlw/HTMLimages.c Fri Nov 17 12:27:58 1995
+***************
+*** 356,371 ****
+ * TrueColor displays. I have no access to such displays, so I
+ * can't really test it.
+ * Donated by - andrew@icarus.demon.co.uk
+ */
+ case 16:
+ bit_data = (unsigned char *)malloc(width * height * 2);
+ bitp = bit_data;
+ datap = data;
+ for (w = (width * height); w > 0; w--)
+ {
+! temp = (((img_info->reds[(int)*datap] >> 1)& 0x7c00) |
+! ((img_info->greens[(int)*datap] >> 6)& 0x03e0) |
+! ((img_info->blues[(int)*datap] >> 11)& 0x001f));
+
+ if (BitmapBitOrder(dsp) == MSBFirst)
+ {
+--- 356,388 ----
+ * TrueColor displays. I have no access to such displays, so I
+ * can't really test it.
+ * Donated by - andrew@icarus.demon.co.uk
++ * modified by smp@csn.net for XFree86-3.1.x
+ */
++ case 15:
+ case 16:
+ bit_data = (unsigned char *)malloc(width * height * 2);
+ bitp = bit_data;
+ datap = data;
+ for (w = (width * height); w > 0; w--)
+ {
+! if (depth == 15) /* weight == 555 */
+! {
+! temp = (((img_info->reds[(int)*datap] >> 1)
+! & 0x7c00) |
+! ((img_info->greens[(int)*datap] >> 6)
+! & 0x03e0) |
+! ((img_info->blues[(int)*datap] >> 11)
+! & 0x001f));
+! }
+! else /* depth == 16, weight == 565 */
+! {
+! temp = ((img_info->reds[(int)*datap]
+! & 0xf800) |
+! ((img_info->greens[(int)*datap] >> 5)
+! & 0x07e0) |
+! ((img_info->blues[(int)*datap] >> 11)
+! & 0x001f));
+! }
+
+ if (BitmapBitOrder(dsp) == MSBFirst)
+ {