Lines 1-6
Link Here
|
1 |
--- reset_image.H.orig Tue Jul 16 10:59:50 1996 |
1 |
--- reset_image.H.orig Wed Jul 17 02:59:50 1996 |
2 |
+++ reset_image.H Tue Apr 7 15:34:33 1998 |
2 |
+++ reset_image.H Fri Aug 6 03:12:24 2004 |
3 |
@@ -16,15 +16,24 @@ |
3 |
@@ -16,15 +16,25 @@ |
4 |
// to access data beyond the allocated image, that might lead to a segmentation |
4 |
// to access data beyond the allocated image, that might lead to a segmentation |
5 |
// violation. Therefore, it might be good to allocated some additional |
5 |
// violation. Therefore, it might be good to allocated some additional |
6 |
// rows of data for the image. |
6 |
// rows of data for the image. |
Lines 21-27
Link Here
|
21 |
- *xdata_run++=(DATA_TYPE)blk_pixel; |
21 |
- *xdata_run++=(DATA_TYPE)blk_pixel; |
22 |
+ // *xdata_run++=(DATA_TYPE)blk_pixel; |
22 |
+ // *xdata_run++=(DATA_TYPE)blk_pixel; |
23 |
+ *xdata_run=(DATA_TYPE)blk_pixel; // align fault |
23 |
+ *xdata_run=(DATA_TYPE)blk_pixel; // align fault |
24 |
+ ((char *)xdata_run) += DATA_BYTES; |
24 |
+ char *my_xdata_run = (char *)xdata_run; |
|
|
25 |
+ my_xdata_run += DATA_BYTES; |
25 |
} |
26 |
} |
26 |
} |
27 |
} |
27 |
- xdata+=(offset_bytes/sizeof(DATA_TYPE)); |
28 |
- xdata+=(offset_bytes/sizeof(DATA_TYPE)); |
Lines 29-35
Link Here
|
29 |
|
30 |
|
30 |
if (!xdata) { |
31 |
if (!xdata) { |
31 |
fprintf(stderr,"not enough memory for XImage-data"); |
32 |
fprintf(stderr,"not enough memory for XImage-data"); |
32 |
@@ -32,9 +41,11 @@ |
33 |
@@ -32,9 +42,11 @@ |
33 |
} |
34 |
} |
34 |
|
35 |
|
35 |
// create the XImage |
36 |
// create the XImage |
Lines 43-49
Link Here
|
43 |
|
44 |
|
44 |
if (!ximage) { |
45 |
if (!ximage) { |
45 |
fprintf(stderr,"\n*** can't allocate ximage.\n" ); |
46 |
fprintf(stderr,"\n*** can't allocate ximage.\n" ); |
46 |
@@ -47,9 +58,23 @@ |
47 |
@@ -47,9 +59,23 @@ |
47 |
register const byte *org = Data(); |
48 |
register const byte *org = Data(); |
48 |
register int j,i; |
49 |
register int j,i; |