aboutsummaryrefslogtreecommitdiffstats
path: root/www/Mosaic/files/patch-ae
blob: 5bc2836656fb39090a1b97521b5f77caa3bb39da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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)
  			{