summaryrefslogtreecommitdiffstats
path: root/rdp/rdp_bitmap.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2006-02-06 00:33:18 +0000
committerjsorg71 <jsorg71>2006-02-06 00:33:18 +0000
commit64bdbed95fcacb3c491109b8d5317cd2585f072a (patch)
treead66eb4da7648d79beb1fcd8033946fd3ff2d777 /rdp/rdp_bitmap.c
parent285a1139c1d606bdad13eed30b87393b716b0be9 (diff)
downloadxrdp-proprietary-64bdbed95fcacb3c491109b8d5317cd2585f072a.tar.gz
xrdp-proprietary-64bdbed95fcacb3c491109b8d5317cd2585f072a.zip
64 bit big endian fixes
Diffstat (limited to 'rdp/rdp_bitmap.c')
-rw-r--r--rdp/rdp_bitmap.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/rdp/rdp_bitmap.c b/rdp/rdp_bitmap.c
index 8c6f1597..be59b4b3 100644
--- a/rdp/rdp_bitmap.c
+++ b/rdp/rdp_bitmap.c
@@ -25,6 +25,14 @@
/******************************************************************************/
#define CVAL(p) ((unsigned char)(*(p++)))
+#if defined(B_ENDIAN)
+#define EIK0 1
+#define EIK1 0
+#else
+#define EIK0 0
+#define EIK1 1
+#endif
+
/******************************************************************************/
#define REPEAT(statement) \
{ \
@@ -395,16 +403,16 @@ bitmap_decompress2(char* output, int width, int height, char* input, int size)
}
break;
case 8: /* Bicolor */
- color1[0] = CVAL(input);
- color1[1] = CVAL(input);
+ color1[EIK0] = CVAL(input);
+ color1[EIK1] = CVAL(input);
case 3: /* Color */
- color2[0] = CVAL(input);
- color2[1] = CVAL(input);
+ color2[EIK0] = CVAL(input);
+ color2[EIK1] = CVAL(input);
break;
case 6: /* SetMix/Mix */
case 7: /* SetMix/FillOrMix */
- mix[0] = CVAL(input);
- mix[1] = CVAL(input);
+ mix[EIK0] = CVAL(input);
+ mix[EIK1] = CVAL(input);
opcode -= 5;
break;
case 9: /* FillOrMix_1 */
@@ -534,8 +542,8 @@ bitmap_decompress2(char* output, int width, int height, char* input, int size)
case 4: /* Copy */
REPEAT
(
- line[x * 2 + 0] = CVAL(input);
- line[x * 2 + 1] = CVAL(input);
+ line[x * 2 + EIK0] = CVAL(input);
+ line[x * 2 + EIK1] = CVAL(input);
)
break;
case 8: /* Bicolor */