summaryrefslogtreecommitdiffstats
path: root/redhat/applications/gwenview/gwenview-3.5.13-fix_ftbfs_in_jpeg_code.patch
blob: b2935457f82b0b2646c8d93600e638b845935f7b (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
commit ace6f27083b0acc2f30195f0d8908a9a346a5910
Author: Timothy Pearson <[email protected]>
Date:   1326325099 -0600

    Fix FTBFS in jpeg code

diff --git a/src/imageutils/jpegint.h b/src/imageutils/jpegint.h
index 9d00c59..95b00d4 100644
--- a/src/imageutils/jpegint.h
+++ b/src/imageutils/jpegint.h
@@ -43,9 +43,9 @@ typedef enum {			/* Operating modes for buffer controllers */
 
 /* Master control module */
 struct jpeg_comp_master {
-  JTQT_METHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, pass_startup, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, finish_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
+  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
 
   /* State variables made visible to other modules */
   boolean call_pass_startup;	/* True if pass_startup must be called */
@@ -54,16 +54,16 @@ struct jpeg_comp_master {
 
 /* Main buffer control (downsampled-data buffer) */
 struct jpeg_c_main_controller {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
-  JTQT_METHOD(void, process_data, (j_compress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, process_data, (j_compress_ptr cinfo,
 			       JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
 			       JDIMENSION in_rows_avail));
 };
 
 /* Compression preprocessing (downsampling input buffer control) */
 struct jpeg_c_prep_controller {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
-  JTQT_METHOD(void, pre_process_data, (j_compress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
 				   JSAMPARRAY input_buf,
 				   JDIMENSION *in_row_ctr,
 				   JDIMENSION in_rows_avail,
@@ -74,23 +74,23 @@ struct jpeg_c_prep_controller {
 
 /* Coefficient buffer control */
 struct jpeg_c_coef_controller {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
-  JTQT_METHOD(boolean, compress_data, (j_compress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
 				   JSAMPIMAGE input_buf));
 };
 
 /* Colorspace conversion */
 struct jpeg_color_converter {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, color_convert, (j_compress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, color_convert, (j_compress_ptr cinfo,
 				JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 				JDIMENSION output_row, int num_rows));
 };
 
 /* Downsampling */
 struct jpeg_downsampler {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, downsample, (j_compress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, downsample, (j_compress_ptr cinfo,
 			     JSAMPIMAGE input_buf, JDIMENSION in_row_index,
 			     JSAMPIMAGE output_buf,
 			     JDIMENSION out_row_group_index));
@@ -100,9 +100,9 @@ struct jpeg_downsampler {
 
 /* Forward DCT (also controls coefficient quantization) */
 struct jpeg_forward_dct {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo));
   /* perhaps this should be an array??? */
-  JTQT_METHOD(void, forward_DCT, (j_compress_ptr cinfo,
+  JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
 			      jpeg_component_info * compptr,
 			      JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
 			      JDIMENSION start_row, JDIMENSION start_col,
@@ -111,23 +111,23 @@ struct jpeg_forward_dct {
 
 /* Entropy encoding */
 struct jpeg_entropy_encoder {
-  JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
-  JTQT_METHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
-  JTQT_METHOD(void, finish_pass, (j_compress_ptr cinfo));
+  JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
+  JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
+  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
 };
 
 /* Marker writing */
 struct jpeg_marker_writer {
-  JTQT_METHOD(void, write_file_header, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, write_frame_header, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, write_scan_header, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, write_file_trailer, (j_compress_ptr cinfo));
-  JTQT_METHOD(void, write_tables_only, (j_compress_ptr cinfo));
+  JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
+  JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
+  JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
   /* These routines are exported to allow insertion of extra markers */
   /* Probably only COM and APPn markers should be written this way */
-  JTQT_METHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
+  JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
 				      unsigned int datalen));
-  JTQT_METHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
+  JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
 };
 
 
@@ -135,8 +135,8 @@ struct jpeg_marker_writer {
 
 /* Master control module */
 struct jpeg_decomp_master {
-  JTQT_METHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
 
   /* State variables made visible to other modules */
   boolean is_dummy_pass;	/* True during 1st pass for 2-pass quant */
@@ -144,10 +144,10 @@ struct jpeg_decomp_master {
 
 /* Input control module */
 struct jpeg_input_controller {
-  JTQT_METHOD(int, consume_input, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, start_input_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
+  JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
 
   /* State variables made visible to other modules */
   boolean has_multiple_scans;	/* True if file has multiple scans */
@@ -156,18 +156,18 @@ struct jpeg_input_controller {
 
 /* Main buffer control (downsampled-data buffer) */
 struct jpeg_d_main_controller {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
-  JTQT_METHOD(void, process_data, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, process_data, (j_decompress_ptr cinfo,
 			       JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
 			       JDIMENSION out_rows_avail));
 };
 
 /* Coefficient buffer control */
 struct jpeg_d_coef_controller {
-  JTQT_METHOD(void, start_input_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(int, consume_data, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, start_output_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(int, decompress_data, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
+  JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
 				 JSAMPIMAGE output_buf));
   /* Pointer to array of coefficient virtual arrays, or NULL if none */
   jvirt_barray_ptr *coef_arrays;
@@ -175,8 +175,8 @@ struct jpeg_d_coef_controller {
 
 /* Decompression postprocessing (color quantization buffer control) */
 struct jpeg_d_post_controller {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
-  JTQT_METHOD(void, post_process_data, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+  JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
 				    JSAMPIMAGE input_buf,
 				    JDIMENSION *in_row_group_ctr,
 				    JDIMENSION in_row_groups_avail,
@@ -187,12 +187,12 @@ struct jpeg_d_post_controller {
 
 /* Marker reading & parsing */
 struct jpeg_marker_reader {
-  JTQT_METHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
+  JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
   /* Read markers until SOS or EOI.
    * Returns same codes as are defined for jpeg_consume_input:
    * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
    */
-  JTQT_METHOD(int, read_markers, (j_decompress_ptr cinfo));
+  JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
   /* Read a restart marker --- exported for use by entropy decoder only */
   jpeg_marker_parser_method read_restart_marker;
 
@@ -207,8 +207,8 @@ struct jpeg_marker_reader {
 
 /* Entropy decoding */
 struct jpeg_entropy_decoder {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
 				JBLOCKROW *MCU_data));
 
   /* This is here to share code between baseline and progressive decoders; */
@@ -217,21 +217,21 @@ struct jpeg_entropy_decoder {
 };
 
 /* Inverse DCT (also performs dequantization) */
-typedef JTQT_METHOD(void, inverse_DCT_method_ptr,
+typedef JMETHOD(void, inverse_DCT_method_ptr,
 		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col));
 
 struct jpeg_inverse_dct {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
   /* It is useful to allow each component to have a separate IDCT method. */
   inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
 };
 
 /* Upsampling (note that upsampler must also call color converter) */
 struct jpeg_upsampler {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, upsample, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, upsample, (j_decompress_ptr cinfo,
 			   JSAMPIMAGE input_buf,
 			   JDIMENSION *in_row_group_ctr,
 			   JDIMENSION in_row_groups_avail,
@@ -244,20 +244,20 @@ struct jpeg_upsampler {
 
 /* Colorspace conversion */
 struct jpeg_color_deconverter {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, color_convert, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
 				JSAMPIMAGE input_buf, JDIMENSION input_row,
 				JSAMPARRAY output_buf, int num_rows));
 };
 
 /* Color quantization or color precision reduction */
 struct jpeg_color_quantizer {
-  JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
-  JTQT_METHOD(void, color_quantize, (j_decompress_ptr cinfo,
+  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
+  JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
 				 JSAMPARRAY input_buf, JSAMPARRAY output_buf,
 				 int num_rows));
-  JTQT_METHOD(void, finish_pass, (j_decompress_ptr cinfo));
-  JTQT_METHOD(void, new_color_map, (j_decompress_ptr cinfo));
+  JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
+  JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
 };