/src/ghostpdl/base/gxdevice.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Copyright (C) 2001-2025 Artifex Software, Inc. |
2 | | All Rights Reserved. |
3 | | |
4 | | This software is provided AS-IS with no warranty, either express or |
5 | | implied. |
6 | | |
7 | | This software is distributed under license and may not be copied, |
8 | | modified or distributed except as expressly authorized under the terms |
9 | | of the license contained in the file LICENSE in this distribution. |
10 | | |
11 | | Refer to licensing information at http://www.artifex.com or contact |
12 | | Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, |
13 | | CA 94129, USA, for further information. |
14 | | */ |
15 | | |
16 | | |
17 | | /* Definitions for device implementors */ |
18 | | |
19 | | #ifndef gxdevice_INCLUDED |
20 | | # define gxdevice_INCLUDED |
21 | | |
22 | | #include "stdio_.h" /* for FILE */ |
23 | | #include "gxdevcli.h" |
24 | | #include "gsfname.h" |
25 | | #include "gsparam.h" |
26 | | /* |
27 | | * Many drivers still use gs_malloc and gs_free, so include the interface |
28 | | * for these. (Eventually they should go away.) |
29 | | */ |
30 | | #include "gsmalloc.h" |
31 | | /* |
32 | | * Similarly, quite a few drivers reference stdout and/or stderr. |
33 | | * (Eventually these references must go away.) |
34 | | */ |
35 | | #include "gxstdio.h" |
36 | | |
37 | | /* |
38 | | * NOTE: if you write code that creates device instances (either with |
39 | | * gs_copydevice or by allocating them explicitly), allocates device |
40 | | * instances as either local or static variables (actual instances, not |
41 | | * pointers to instances), or sets the target of forwarding devices, please |
42 | | * read the documentation in gxdevcli.h about memory management for devices. |
43 | | * The rules for doing these things changed substantially in release 5.68, |
44 | | * in a non-backward-compatible way, and unfortunately we could not find a |
45 | | * way to make the compiler give an error at places that need changing. |
46 | | */ |
47 | | |
48 | | /* ---------------- Auxiliary types and structures ---------------- */ |
49 | | |
50 | | /* Define default pages sizes. */ |
51 | | /* U.S. letter paper (8.5" x 11"). */ |
52 | | #define DEFAULT_WIDTH_10THS_US_LETTER 85 |
53 | | #define DEFAULT_HEIGHT_10THS_US_LETTER 110 |
54 | | /* A4 paper (210mm x 297mm), we use 595pt x 842pt. */ |
55 | | #define DEFAULT_WIDTH_10THS_A4 82.6389f |
56 | | #define DEFAULT_HEIGHT_10THS_A4 116.9444f |
57 | | /* Choose a default. A4 may be set in the makefile. */ |
58 | | #ifdef A4 |
59 | | # define DEFAULT_WIDTH_10THS DEFAULT_WIDTH_10THS_A4 |
60 | | # define DEFAULT_HEIGHT_10THS DEFAULT_HEIGHT_10THS_A4 |
61 | | #else |
62 | | # define DEFAULT_WIDTH_10THS DEFAULT_WIDTH_10THS_US_LETTER |
63 | | # define DEFAULT_HEIGHT_10THS DEFAULT_HEIGHT_10THS_US_LETTER |
64 | | #endif |
65 | | |
66 | | /* Define parameters for machines with little dinky RAMs.... */ |
67 | | #if ARCH_SMALL_MEMORY |
68 | | # define MAX_BITMAP 32000 |
69 | | # define BUFFER_SPACE 25000 |
70 | | # define MIN_MEMORY_LEFT 32000 |
71 | | #else |
72 | 204k | # define MAX_BITMAP 10000000L /* reasonable on most modern hosts */ |
73 | | # define BUFFER_SPACE 4000000L |
74 | 0 | # define MIN_MEMORY_LEFT 500000L |
75 | | #endif |
76 | 258k | #define MIN_BUFFER_SPACE 10000 /* give up if less than this */ |
77 | | |
78 | | #ifndef MaxPatternBitmap_DEFAULT |
79 | 198k | # define MaxPatternBitmap_DEFAULT MAX_BITMAP |
80 | | #endif |
81 | | |
82 | | /* ---------------- Device structure ---------------- */ |
83 | | |
84 | | /* |
85 | | * To insulate statically defined device templates from the |
86 | | * consequences of changes in the device structure, the following macros |
87 | | * must be used for generating initialized device structures. |
88 | | * |
89 | | * The computations of page width and height in pixels should really be |
90 | | * ((int)(page_width_inches*x_dpi)) |
91 | | * but some compilers (the Ultrix 3.X pcc compiler and the HPUX compiler) |
92 | | * can't cast a computed float to an int. That's why we specify |
93 | | * the page width and height in inches/10 instead of inches. |
94 | | * This has been now been changed to use floats. |
95 | | * |
96 | | * Note that the macro is broken up so as to be usable for devices that |
97 | | * add further initialized state to the generic device. |
98 | | * Note also that the macro does not initialize procs, which is |
99 | | * the next element of the structure. |
100 | | */ |
101 | | #define std_device_part1_(devtype, init, dev_name, stype, open_init)\ |
102 | | sizeof(devtype), init, dev_name,\ |
103 | | 0 /*memory*/, stype, 0 /*stype_is_dynamic*/, 0 /*finalize*/,\ |
104 | | { 0 } /*rc*/, 0 /*retained*/, 0 /* parent */, 0 /* child */, 0 /* subclass_data */, 0 /* PageList */,\ |
105 | | open_init() /*is_open, max_fill_band*/ |
106 | | /* color_info goes here */ |
107 | | /* |
108 | | * The MetroWerks compiler has some bizarre bug that produces a spurious |
109 | | * error message if the width and/or height are defined as 0 below, |
110 | | * unless we use the +/- workaround in the next macro. |
111 | | */ |
112 | | #define std_device_part2_(width, height, x_dpi, y_dpi)\ |
113 | | { gx_no_color_index, gx_no_color_index },\ |
114 | | width, height, 0/*Pad*/, 0/*align*/, 0/*Num planes*/, 0/*TrayOrientation*/,\ |
115 | | { (float)((((width) * 72.0 + 0.5) - 0.5) / (x_dpi))/*MediaSize[0]*/,\ |
116 | | (float)((((height) * 72.0 + 0.5) - 0.5) / (y_dpi))/*MediaSize[1]*/},\ |
117 | | { 0, 0, 0, 0 }/*ImagingBBox*/, 0/*ImagingBBox_set*/,\ |
118 | | { x_dpi, y_dpi }/*HWResolution*/ |
119 | | |
120 | | /* offsets and margins go here */ |
121 | | #define std_device_part3_sc(ins, bp, ep)\ |
122 | | 0/*FirstPage*/, 0/*LastPage*/, 0/*PageHandlerPushed*/, 0/*DisablePageHandler*/,\ |
123 | | 0/* Object Filter*/, 0/*ObjectHandlerPushed*/,\ |
124 | | 0, /* NupControl */ 0, /* NupHandlerPushed */\ |
125 | | 0/*PageCount*/, 0/*ShowpageCount*/, 1/*NumCopies*/, 0/*NumCopies_set*/,\ |
126 | | 0/*IgnoreNumCopies*/, 0/*UseCIEColor*/, 0/*LockSafetyParams*/,\ |
127 | | 0/*band_offset_x*/, 0/*band_offset_y*/, false /*BLS_force_memory*/, \ |
128 | | {false}/* sgr */,\ |
129 | | 0/* MaxPatternBitmap */, 0/*page_uses_transparency*/, 0/*page_uses_overprint*/,\ |
130 | | { MAX_BITMAP, BUFFER_SPACE,\ |
131 | | { BAND_PARAMS_INITIAL_VALUES },\ |
132 | | 0/*false*/, /* params_are_read_only */\ |
133 | | BandingAuto /* banding_type */\ |
134 | | }, /*space_params*/\ |
135 | | 0/*Profile Array*/,\ |
136 | | 0/* graphics_type_tag default GS_UNTOUCHED_TAG */,\ |
137 | | 1/* interpolate_control default 1, uses image /Interpolate flag, full device resolution */,\ |
138 | | 0/*non_strict_bounds - default is to be strict*/,\ |
139 | | { ins, bp, ep } |
140 | | #define std_device_part3_()\ |
141 | | std_device_part3_sc(gx_default_install, gx_default_begin_page, gx_default_end_page) |
142 | | |
143 | | /* |
144 | | * We need a number of different variants of the std_device_ macro simply |
145 | | * because we can't pass the color_info or offsets/margins |
146 | | * as macro arguments, which in turn is because of the early macro |
147 | | * expansion issue noted in stdpre.h. The basic variants are: |
148 | | * ...body_with_macros_, which uses 0-argument macros to supply |
149 | | * open_init, color_info, and offsets/margins; |
150 | | * ...full_body, which takes 12 values (6 for dci_values, |
151 | | * 6 for offsets/margins); |
152 | | * ...color_full_body, which takes 9 values (3 for dci_color, |
153 | | * 6 for margins/offset). |
154 | | * ...std_color_full_body, which takes 7 values (1 for dci_std_color, |
155 | | * 6 for margins/offset). |
156 | | * |
157 | | */ |
158 | | #define std_device_body_with_macros_(dtype, init, dname, stype, w, h, xdpi, ydpi, open_init, dci_macro, margins_macro)\ |
159 | | std_device_part1_(dtype, init, dname, stype, open_init),\ |
160 | | dci_macro(),\ |
161 | | std_device_part2_(w, h, xdpi, ydpi),\ |
162 | | margins_macro(),\ |
163 | | std_device_part3_() |
164 | | |
165 | | #define std_device_std_body_type(dtype, init, dname, stype, w, h, xdpi, ydpi)\ |
166 | | std_device_body_with_macros_(dtype, init, dname, stype,\ |
167 | | w, h, xdpi, ydpi,\ |
168 | | open_init_closed, dci_black_and_white_, no_margins_) |
169 | | |
170 | | #define std_device_std_body(dtype, init, dname, w, h, xdpi, ydpi)\ |
171 | | std_device_std_body_type(dtype, init, dname, 0, w, h, xdpi, ydpi) |
172 | | |
173 | | #define std_device_std_body_type_open(dtype, init, dname, stype, w, h, xdpi, ydpi)\ |
174 | | std_device_body_with_macros_(dtype, init, dname, stype,\ |
175 | | w, h, xdpi, ydpi,\ |
176 | | open_init_open, dci_black_and_white_, no_margins_) |
177 | | |
178 | | #define std_device_std_body_open(dtype, init, dname, w, h, xdpi, ydpi)\ |
179 | | std_device_std_body_type_open(dtype, init, dname, 0, w, h, xdpi, ydpi) |
180 | | |
181 | | #define std_device_full_body_type(dtype, init, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, xoff, yoff, lm, bm, rm, tm)\ |
182 | | std_device_part1_(dtype, init, dname, stype, open_init_closed),\ |
183 | | dci_values(ncomp, depth, mg, mc, dg, dc),\ |
184 | | std_device_part2_(w, h, xdpi, ydpi),\ |
185 | | offset_margin_values(xoff, yoff, lm, bm, rm, tm),\ |
186 | | std_device_part3_() |
187 | | |
188 | | #define std_device_full_body_type_extended(dtype, init, dname, stype, w, h, xdpi, ydpi, mcomp, ncomp, pol, depth, gi, mg, mc, dg, dc, ef, cn, xoff, yoff, lm, bm, rm, tm)\ |
189 | | std_device_part1_(dtype, init, dname, stype, open_init_closed),\ |
190 | | dci_extended_alpha_values(mcomp, ncomp, pol, depth, gi, mg, mc, dg, dc, 1, 1, ef, cn), \ |
191 | | std_device_part2_(w, h, xdpi, ydpi),\ |
192 | | offset_margin_values(xoff, yoff, lm, bm, rm, tm),\ |
193 | | std_device_part3_() |
194 | | |
195 | | #define std_device_full_body(dtype, init, dname, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, xoff, yoff, lm, bm, rm, tm)\ |
196 | | std_device_full_body_type(dtype, init, dname, 0, w, h, xdpi, ydpi,\ |
197 | | ncomp, depth, mg, mc, dg, dc, xoff, yoff, lm, bm, rm, tm) |
198 | | |
199 | | #define std_device_dci_alpha_type_body(dtype, init, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, ta, ga)\ |
200 | | std_device_part1_(dtype, init, dname, stype, open_init_closed),\ |
201 | | dci_alpha_values(ncomp, depth, mg, mc, dg, dc, ta, ga),\ |
202 | | std_device_part2_(w, h, xdpi, ydpi),\ |
203 | | offset_margin_values(0, 0, 0, 0, 0, 0),\ |
204 | | std_device_part3_() |
205 | | #define std_device_dci_alpha_type_body_sc(dtype, init, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, ta, ga, ins, bp, ep)\ |
206 | | std_device_part1_(dtype, init, dname, stype, open_init_closed),\ |
207 | | dci_alpha_values(ncomp, depth, mg, mc, dg, dc, ta, ga),\ |
208 | | std_device_part2_(w, h, xdpi, ydpi),\ |
209 | | offset_margin_values(0, 0, 0, 0, 0, 0),\ |
210 | | std_device_part3_sc(ins, bp, ep) |
211 | | |
212 | | #define std_device_dci_type_body(dtype, init, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc)\ |
213 | | std_device_dci_alpha_type_body(dtype, init, dname, stype, w, h,\ |
214 | | xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, 1, 1) |
215 | | |
216 | | #define std_device_dci_type_body_sc(dtype, init, dname, stype, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, ins, bp, ep)\ |
217 | | std_device_dci_alpha_type_body_sc(dtype, init, dname, stype, w, h,\ |
218 | | xdpi, ydpi, ncomp, depth, mg, mc, dg, dc, 1, 1, ins, bp, ep) |
219 | | |
220 | | #define std_device_dci_body(dtype, init, dname, w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc)\ |
221 | | std_device_dci_type_body(dtype, init, dname, 0,\ |
222 | | w, h, xdpi, ydpi, ncomp, depth, mg, mc, dg, dc) |
223 | | |
224 | | #define std_device_color_full_body(dtype, init, dname, w, h, xdpi, ydpi, depth, max_value, dither, xoff, yoff, lm, bm, rm, tm)\ |
225 | | std_device_part1_(dtype, init, dname, 0, open_init_closed),\ |
226 | | dci_color(depth, max_value, dither),\ |
227 | | std_device_part2_(w, h, xdpi, ydpi),\ |
228 | | offset_margin_values(xoff, yoff, lm, bm, rm, tm),\ |
229 | | std_device_part3_() |
230 | | |
231 | | #define std_device_color_body(dtype, init, dname, w, h, xdpi, ydpi, depth, max_value, dither)\ |
232 | | std_device_color_full_body(dtype, init, dname,\ |
233 | | w, h, xdpi, ydpi,\ |
234 | | depth, max_value, dither,\ |
235 | | 0, 0, 0, 0, 0, 0) |
236 | | |
237 | | #define std_device_color_stype_body(dtype, init, dname, stype, w, h, xdpi, ydpi, depth, max_value, dither)\ |
238 | | std_device_part1_(dtype, init, dname, stype, open_init_closed),\ |
239 | | dci_color(depth, max_value, dither),\ |
240 | | std_device_part2_(w, h, xdpi, ydpi),\ |
241 | | offset_margin_values(0, 0, 0, 0, 0, 0),\ |
242 | | std_device_part3_() |
243 | | |
244 | | #define std_device_std_color_full_body_type(dtype, init, dname, stype, w, h, xdpi, ydpi, depth, xoff, yoff, lm, bm, rm, tm)\ |
245 | | std_device_part1_(dtype, init, dname, stype, open_init_closed),\ |
246 | | dci_std_color(depth),\ |
247 | | std_device_part2_(w, h, xdpi, ydpi),\ |
248 | | offset_margin_values(xoff, yoff, lm, bm, rm, tm),\ |
249 | | std_device_part3_() |
250 | | |
251 | | #define std_device_std_color_full_body(dtype, init, dname, w, h, xdpi, ydpi, depth, xoff, yoff, lm, bm, rm, tm)\ |
252 | | std_device_std_color_full_body_type(dtype, init, dname, 0,\ |
253 | | w, h, xdpi, ydpi, depth, xoff, yoff, lm, bm, rm, tm) |
254 | | |
255 | | /* ---------------- Default implementations ---------------- */ |
256 | | |
257 | | /* Default implementations of optional procedures. */ |
258 | | /* Note that the default map_xxx_color routines assume white_on_black. */ |
259 | | dev_proc_open_device(gx_default_open_device); |
260 | | dev_proc_get_initial_matrix(gx_default_get_initial_matrix); |
261 | | dev_proc_get_initial_matrix(gx_upright_get_initial_matrix); |
262 | | dev_proc_sync_output(gx_default_sync_output); |
263 | | dev_proc_output_page(gx_default_output_page); |
264 | | dev_proc_close_device(gx_default_close_device); |
265 | | dev_proc_map_rgb_color(gx_default_w_b_map_rgb_color); |
266 | | dev_proc_map_color_rgb(gx_default_w_b_map_color_rgb); |
267 | | dev_proc_encode_color(gx_default_w_b_mono_encode_color); |
268 | | dev_proc_decode_color(gx_default_w_b_mono_decode_color); |
269 | | #define gx_default_map_rgb_color gx_default_w_b_map_rgb_color |
270 | 0 | #define gx_default_map_color_rgb gx_default_w_b_map_color_rgb |
271 | | dev_proc_copy_mono(gx_default_copy_mono); |
272 | | dev_proc_copy_color(gx_default_copy_color); |
273 | | dev_proc_get_params(gx_default_get_params); |
274 | | dev_proc_put_params(gx_default_put_params); |
275 | | dev_proc_map_cmyk_color(gx_default_map_cmyk_color); |
276 | | dev_proc_get_page_device(gx_default_get_page_device); /* returns NULL */ |
277 | | dev_proc_get_page_device(gx_page_device_get_page_device); /* returns dev */ |
278 | | dev_proc_get_alpha_bits(gx_default_get_alpha_bits); |
279 | | dev_proc_copy_alpha(gx_no_copy_alpha); /* gives error */ |
280 | | dev_proc_copy_alpha(gx_default_copy_alpha); |
281 | | dev_proc_fill_path(gx_default_fill_path); |
282 | | dev_proc_fill_path(gx_default_fill_path_shading_or_pattern); |
283 | | dev_proc_stroke_path(gx_default_stroke_path); |
284 | | dev_proc_stroke_path(gx_default_stroke_path_shading_or_pattern); |
285 | | dev_proc_fill_mask(gx_default_fill_mask); |
286 | | dev_proc_fill_trapezoid(gx_default_fill_trapezoid); |
287 | | dev_proc_fill_parallelogram(gx_default_fill_parallelogram); |
288 | | dev_proc_fill_triangle(gx_default_fill_triangle); |
289 | | dev_proc_draw_thin_line(gx_default_draw_thin_line); |
290 | | dev_proc_strip_tile_rectangle(gx_default_strip_tile_rectangle); |
291 | | dev_proc_strip_copy_rop2(gx_no_strip_copy_rop2); |
292 | | dev_proc_get_clipping_box(gx_default_get_clipping_box); |
293 | | dev_proc_get_clipping_box(gx_get_largest_clipping_box); |
294 | | dev_proc_begin_typed_image(gx_default_begin_typed_image); |
295 | | dev_proc_get_bits_rectangle(gx_default_get_bits_rectangle); /* just returns error */ |
296 | | dev_proc_get_bits_rectangle(gx_blank_get_bits_rectangle); |
297 | | dev_proc_composite(gx_no_composite); |
298 | | /* default is for ordinary "leaf" devices, null is for */ |
299 | | /* devices that only care about coverage and not contents. */ |
300 | | dev_proc_composite(gx_default_composite); |
301 | | dev_proc_composite(gx_null_composite); |
302 | | dev_proc_get_hardware_params(gx_default_get_hardware_params); |
303 | | dev_proc_text_begin(gx_default_text_begin); |
304 | | dev_proc_dev_spec_op(gx_default_dev_spec_op); |
305 | | dev_proc_fill_rectangle_hl_color(gx_default_fill_rectangle_hl_color); |
306 | | dev_proc_include_color_space(gx_default_include_color_space); |
307 | | dev_proc_fill_linear_color_scanline(gx_default_fill_linear_color_scanline); |
308 | | dev_proc_fill_linear_color_scanline(gx_hl_fill_linear_color_scanline); |
309 | | dev_proc_fill_linear_color_trapezoid(gx_default_fill_linear_color_trapezoid); |
310 | | dev_proc_fill_linear_color_triangle(gx_default_fill_linear_color_triangle); |
311 | | dev_proc_update_spot_equivalent_colors(gx_default_update_spot_equivalent_colors); |
312 | | dev_proc_ret_devn_params(gx_default_ret_devn_params); |
313 | | dev_proc_fillpage(gx_default_fillpage); |
314 | | dev_proc_get_profile(gx_default_get_profile); |
315 | | dev_proc_set_graphics_type_tag(gx_default_set_graphics_type_tag); |
316 | | dev_proc_strip_copy_rop2(gx_default_strip_copy_rop2); |
317 | | dev_proc_strip_tile_rect_devn(gx_default_strip_tile_rect_devn); |
318 | | dev_proc_copy_alpha_hl_color(gx_default_copy_alpha_hl_color); |
319 | | dev_proc_process_page(gx_default_process_page); |
320 | | dev_proc_transform_pixel_region(gx_default_transform_pixel_region); |
321 | | dev_proc_fill_stroke_path(gx_default_fill_stroke_path); |
322 | | dev_proc_lock_pattern(gx_default_lock_pattern); |
323 | | dev_proc_begin_transparency_group(gx_default_begin_transparency_group); |
324 | | dev_proc_end_transparency_group(gx_default_end_transparency_group); |
325 | | dev_proc_begin_transparency_mask(gx_default_begin_transparency_mask); |
326 | | dev_proc_end_transparency_mask(gx_default_end_transparency_mask); |
327 | | dev_proc_discard_transparency_layer(gx_default_discard_transparency_layer); |
328 | | dev_proc_push_transparency_state(gx_default_push_transparency_state); |
329 | | dev_proc_pop_transparency_state(gx_default_pop_transparency_state); |
330 | | dev_proc_put_image(gx_default_put_image); |
331 | | dev_proc_copy_alpha_hl_color(gx_default_no_copy_alpha_hl_color); |
332 | | dev_proc_copy_planes(gx_default_copy_planes); |
333 | | |
334 | | int gx_default_initialize_device(gx_device *dev); |
335 | | |
336 | | /* BACKWARD COMPATIBILITY */ |
337 | | #define gx_non_imaging_composite gx_null_composite |
338 | | |
339 | | /* Color mapping routines for black-on-white, gray scale, true RGB, */ |
340 | | /* true CMYK, and 1-bit CMYK color. */ |
341 | | dev_proc_map_rgb_color(gx_default_b_w_map_rgb_color); |
342 | | dev_proc_map_color_rgb(gx_default_b_w_map_color_rgb); |
343 | | dev_proc_encode_color(gx_default_b_w_mono_encode_color); |
344 | | dev_proc_decode_color(gx_default_b_w_mono_decode_color); |
345 | | dev_proc_map_rgb_color(gx_default_gray_map_rgb_color); |
346 | | dev_proc_map_color_rgb(gx_default_gray_map_color_rgb); |
347 | | dev_proc_map_color_rgb(gx_default_rgb_map_color_rgb); |
348 | | dev_proc_encode_color(gx_default_gray_encode_color); |
349 | | dev_proc_decode_color(gx_default_gray_decode_color); |
350 | | #define gx_default_cmyk_map_cmyk_color cmyk_8bit_map_cmyk_color /*see below*/ |
351 | | /* |
352 | | * The following are defined as "standard" color mapping procedures |
353 | | * that can be propagated through device pipelines and that color |
354 | | * processing code can test for. |
355 | | */ |
356 | | dev_proc_map_rgb_color(gx_default_rgb_map_rgb_color); |
357 | | dev_proc_map_cmyk_color(cmyk_1bit_map_cmyk_color); |
358 | | dev_proc_map_color_rgb(cmyk_1bit_map_color_rgb); |
359 | | dev_proc_decode_color(cmyk_1bit_map_color_cmyk); |
360 | | dev_proc_map_cmyk_color(cmyk_8bit_map_cmyk_color); |
361 | | dev_proc_map_color_rgb(cmyk_8bit_map_color_rgb); |
362 | | dev_proc_decode_color(cmyk_8bit_map_color_cmyk); |
363 | | dev_proc_map_cmyk_color(cmyk_16bit_map_cmyk_color); |
364 | | dev_proc_map_color_rgb(cmyk_16bit_map_color_rgb); |
365 | | dev_proc_decode_color(cmyk_16bit_map_color_cmyk); |
366 | | dev_proc_encode_color(gx_default_8bit_map_gray_color); |
367 | | dev_proc_decode_color(gx_default_8bit_map_color_gray); |
368 | | |
369 | | /* Default implementations for forwarding devices */ |
370 | | void gx_forward_initialize_procs(gx_device *dev); |
371 | | dev_proc_close_device(gx_forward_close_device); |
372 | | dev_proc_get_initial_matrix(gx_forward_get_initial_matrix); |
373 | | dev_proc_sync_output(gx_forward_sync_output); |
374 | | dev_proc_output_page(gx_forward_output_page); |
375 | | dev_proc_map_rgb_color(gx_forward_map_rgb_color); |
376 | | dev_proc_map_color_rgb(gx_forward_map_color_rgb); |
377 | | dev_proc_fill_rectangle(gx_forward_fill_rectangle); |
378 | | dev_proc_copy_mono(gx_forward_copy_mono); |
379 | | dev_proc_copy_color(gx_forward_copy_color); |
380 | | dev_proc_get_params(gx_forward_get_params); |
381 | | dev_proc_put_params(gx_forward_put_params); |
382 | | dev_proc_map_cmyk_color(gx_forward_map_cmyk_color); |
383 | | dev_proc_get_page_device(gx_forward_get_page_device); |
384 | | #define gx_forward_get_alpha_bits gx_default_get_alpha_bits |
385 | | dev_proc_copy_alpha(gx_forward_copy_alpha); |
386 | | dev_proc_fill_path(gx_forward_fill_path); |
387 | | dev_proc_stroke_path(gx_forward_stroke_path); |
388 | | dev_proc_fill_mask(gx_forward_fill_mask); |
389 | | dev_proc_fill_trapezoid(gx_forward_fill_trapezoid); |
390 | | dev_proc_fill_parallelogram(gx_forward_fill_parallelogram); |
391 | | dev_proc_fill_triangle(gx_forward_fill_triangle); |
392 | | dev_proc_draw_thin_line(gx_forward_draw_thin_line); |
393 | | dev_proc_strip_tile_rectangle(gx_forward_strip_tile_rectangle); |
394 | | dev_proc_get_clipping_box(gx_forward_get_clipping_box); |
395 | | dev_proc_begin_typed_image(gx_forward_begin_typed_image); |
396 | | dev_proc_get_bits_rectangle(gx_forward_get_bits_rectangle); |
397 | | /* There is no forward_composite (see Drivers.htm). */ |
398 | | dev_proc_get_hardware_params(gx_forward_get_hardware_params); |
399 | | dev_proc_text_begin(gx_forward_text_begin); |
400 | | dev_proc_get_color_mapping_procs(gx_forward_get_color_mapping_procs); |
401 | | dev_proc_get_color_comp_index(gx_forward_get_color_comp_index); |
402 | | dev_proc_encode_color(gx_forward_encode_color); |
403 | | dev_proc_decode_color(gx_forward_decode_color); |
404 | | dev_proc_dev_spec_op(gx_forward_dev_spec_op); |
405 | | dev_proc_fill_rectangle_hl_color(gx_forward_fill_rectangle_hl_color); |
406 | | dev_proc_include_color_space(gx_forward_include_color_space); |
407 | | dev_proc_fill_linear_color_scanline(gx_forward_fill_linear_color_scanline); |
408 | | dev_proc_fill_linear_color_trapezoid(gx_forward_fill_linear_color_trapezoid); |
409 | | dev_proc_fill_linear_color_triangle(gx_forward_fill_linear_color_triangle); |
410 | | dev_proc_update_spot_equivalent_colors(gx_forward_update_spot_equivalent_colors); |
411 | | dev_proc_ret_devn_params(gx_forward_ret_devn_params); |
412 | | dev_proc_fillpage(gx_forward_fillpage); |
413 | | dev_proc_put_image(gx_forward_put_image); |
414 | | dev_proc_copy_planes(gx_forward_copy_planes); |
415 | | dev_proc_composite(gx_forward_composite); |
416 | | dev_proc_get_profile(gx_forward_get_profile); |
417 | | dev_proc_set_graphics_type_tag(gx_forward_set_graphics_type_tag); |
418 | | dev_proc_strip_copy_rop2(gx_forward_strip_copy_rop2); |
419 | | dev_proc_strip_tile_rect_devn(gx_forward_strip_tile_rect_devn); |
420 | | dev_proc_copy_alpha_hl_color(gx_forward_copy_alpha_hl_color); |
421 | | dev_proc_transform_pixel_region(gx_forward_transform_pixel_region); |
422 | | dev_proc_fill_stroke_path(gx_forward_fill_stroke_path); |
423 | | dev_proc_lock_pattern(gx_forward_lock_pattern); |
424 | | void gx_forward_device_initialize_procs(gx_device *dev); |
425 | | |
426 | | /* ---------------- Implementation utilities ---------------- */ |
427 | | int gx_default_get_param(gx_device *dev, char *Param, void *list); |
428 | | |
429 | | /* Fill in defaulted procedures in a device procedure record. */ |
430 | | void gx_device_fill_in_procs(gx_device *); |
431 | | void gx_device_forward_fill_in_procs(gx_device_forward *); |
432 | | |
433 | | /* Forward the color mapping procedures from a device to its target. */ |
434 | | void gx_device_forward_color_procs(gx_device_forward *); |
435 | | |
436 | | /* |
437 | | * Check if the device's encode_color routine uses 'separable' bit encodings |
438 | | * for each colorant. For more info see the routine's header. |
439 | | */ |
440 | | void check_device_separable(gx_device * dev); |
441 | | /* |
442 | | * Is this a contone device? |
443 | | */ |
444 | | bool device_is_contone(gx_device* pdev); |
445 | | /* |
446 | | * Check if the device's encode_color routine uses a pdf14 compatible |
447 | | * encoding. For more info see the routine's header. |
448 | | */ |
449 | | void check_device_compatible_encoding(gx_device * dev); |
450 | | /* |
451 | | * If a device has a linear and separable encode color function then |
452 | | * set up the comp_bits, comp_mask, and comp_shift fields. |
453 | | */ |
454 | | void set_linear_color_bits_mask_shift(gx_device * dev); |
455 | | /* |
456 | | * Copy the color mapping procedures from the target if they are |
457 | | * standard ones (saving a level of procedure call at mapping time). |
458 | | */ |
459 | | void gx_device_copy_color_procs(gx_device *dev, const gx_device *target); |
460 | | |
461 | | /* Get the black and white pixel values of a device. */ |
462 | | gx_color_index gx_device_black(gx_device *dev); |
463 | | #define gx_device_black_inline(dev)\ |
464 | | ((dev)->cached_colors.black == gx_no_color_index ?\ |
465 | | gx_device_black(dev) : (dev)->cached_colors.black) |
466 | | gx_color_index gx_device_white(gx_device *dev); |
467 | | #define gx_device_white_inline(dev)\ |
468 | | ((dev)->cached_colors.white == gx_no_color_index ?\ |
469 | | gx_device_white(dev) : (dev)->cached_colors.white) |
470 | | |
471 | | /* Clear the black/white pixel cache. */ |
472 | | void gx_device_decache_colors(gx_device *dev); |
473 | | |
474 | | /* |
475 | | * Copy the color-related device parameters back from the target: |
476 | | * color_info and color mapping procedures. |
477 | | */ |
478 | | void gx_device_copy_color_params(gx_device *dev, const gx_device *target); |
479 | | |
480 | | /* |
481 | | * Copy device parameters back from a target. This copies all standard |
482 | | * parameters related to page size and resolution, plus color_info |
483 | | * and (if appropriate) color mapping procedures. |
484 | | */ |
485 | | void gx_device_copy_params(gx_device *dev, const gx_device *target); |
486 | | |
487 | | /* |
488 | | * Parse the output file name for a device, recognizing "-" and "|command", |
489 | | * and also detecting and validating any %nnd format for inserting the |
490 | | * page count. If a format is present, store a pointer to its last |
491 | | * character in *pfmt, otherwise store 0 there. Note that an empty name |
492 | | * is currently allowed. |
493 | | */ |
494 | | int gx_parse_output_file_name(gs_parsed_file_name_t *pfn, |
495 | | const char **pfmt, const char *fname, |
496 | | uint len, gs_memory_t *memory); |
497 | | |
498 | | /* |
499 | | * Returns true if the outputfile requests separate pages (contains %d) |
500 | | */ |
501 | | bool gx_outputfile_is_separate_pages(const char *fname, gs_memory_t *memory); |
502 | | |
503 | | /* |
504 | | * Open the output file for a device. Note that if the file name is empty, |
505 | | * it may be replaced with the name of a scratch file. |
506 | | */ |
507 | | int gx_device_open_output_file(const gx_device * dev, char *fname, |
508 | | bool binary, bool positionable, |
509 | | gp_file ** pfile); |
510 | | |
511 | | /* Close the output file for a device. */ |
512 | | int gx_device_close_output_file(const gx_device * dev, const char *fname, |
513 | | gp_file *file); |
514 | | |
515 | | /* Delete the current output file for a device (file must be closed first) */ |
516 | | int gx_device_delete_output_file(const gx_device * dev, const char *fname); |
517 | | |
518 | | /* |
519 | | * Define the number of levels for a colorant above which we do not halftone. |
520 | | */ |
521 | 1.20G | #define MIN_CONTONE_LEVELS 31 |
522 | | |
523 | | /* |
524 | | * Determine whether a given device needs to halftone. Eventually this |
525 | | * should take a gs_gstate as an additional argument. |
526 | | */ |
527 | | #define gx_device_must_halftone(dev)\ |
528 | 157M | ((gx_device_has_color(dev) ? (dev)->color_info.max_color :\ |
529 | 157M | (dev)->color_info.max_gray) < MIN_CONTONE_LEVELS) |
530 | | |
531 | | /* |
532 | | * Do generic work for output_page. All output_page procedures must call |
533 | | * this as the last thing they do, unless an error has occurred earlier. |
534 | | */ |
535 | | dev_proc_output_page(gx_finish_output_page); |
536 | | |
537 | | /* |
538 | | * Device procedures that draw into rectangles need to clip the coordinates |
539 | | * to the rectangle ((0,0),(dev->width,dev->height)). The following macros |
540 | | * do the clipping. They assume that the arguments of the procedure are |
541 | | * named dev, x, y, w, and h, and may modify the arguments (other than dev). |
542 | | * |
543 | | * For procedures that fill a region, dev, x, y, w, and h are the only |
544 | | * relevant arguments. For procedures that copy bitmaps, see below. |
545 | | * |
546 | | * The following group of macros for region-filling procedures clips |
547 | | * specific edges of the supplied rectangle, as indicated by the macro name. |
548 | | */ |
549 | | #define fit_fill_xy(dev, x, y, w, h)\ |
550 | 3.79G | BEGIN\ |
551 | 3.79G | if ( (x | y) < 0 ) {\ |
552 | 385M | if ( x < 0 )\ |
553 | 385M | w += x, x = 0;\ |
554 | 385M | if ( y < 0 )\ |
555 | 385M | h += y, y = 0;\ |
556 | 385M | }\ |
557 | 3.79G | END |
558 | | #define fit_fill_y(dev, y, h)\ |
559 | 7.80M | BEGIN\ |
560 | 7.80M | if ( y < 0 )\ |
561 | 7.80M | h += y, y = 0;\ |
562 | 7.80M | END |
563 | | #define fit_fill_w(dev, x, w)\ |
564 | 3.91G | BEGIN\ |
565 | 3.91G | if ( w > (dev)->width - x )\ |
566 | 3.91G | w = (dev)->width - x;\ |
567 | 3.91G | END |
568 | | #define fit_fill_h(dev, y, h)\ |
569 | 3.69G | BEGIN\ |
570 | 3.69G | if ( h > (dev)->height - y )\ |
571 | 3.69G | h = (dev)->height - y;\ |
572 | 3.69G | END |
573 | | #define fit_fill_xywh(dev, x, y, w, h)\ |
574 | 3.68G | BEGIN\ |
575 | 3.68G | fit_fill_xy(dev, x, y, w, h);\ |
576 | 3.68G | fit_fill_w(dev, x, w);\ |
577 | 3.68G | fit_fill_h(dev, y, h);\ |
578 | 3.68G | END |
579 | | /* |
580 | | * Clip all edges, and return from the procedure if the result is empty. |
581 | | */ |
582 | | #define fit_fill(dev, x, y, w, h)\ |
583 | 2.22G | BEGIN\ |
584 | 2.22G | fit_fill_xywh(dev, x, y, w, h);\ |
585 | 2.22G | if ( w <= 0 || h <= 0 )\ |
586 | 2.22G | return 0;\ |
587 | 2.22G | END |
588 | | |
589 | | /* |
590 | | * For driver procedures that copy bitmaps (e.g., copy_mono, copy_color), |
591 | | * clipping the destination region also may require adjusting the pointer to |
592 | | * the source data. In addition to dev, x, y, w, and h, the clipping macros |
593 | | * for these procedures reference data, data_x, raster, and id; they may |
594 | | * modify the values of data, data_x, and id. |
595 | | * |
596 | | * Clip the edges indicated by the macro name. |
597 | | */ |
598 | | #define fit_copy_xyw(dev, data, data_x, raster, id, x, y, w, h)\ |
599 | 610M | BEGIN\ |
600 | 610M | if ( (x | y) < 0 ) {\ |
601 | 14.3M | if ( x < 0 )\ |
602 | 14.3M | w += x, data_x -= x, x = 0;\ |
603 | 14.3M | if ( y < 0 )\ |
604 | 14.3M | h += y, data -= (int)(y * raster), id = gx_no_bitmap_id, y = 0; \ |
605 | 14.3M | }\ |
606 | 610M | if ( w > (dev)->width - x )\ |
607 | 610M | w = (dev)->width - x;\ |
608 | 610M | END |
609 | | /* |
610 | | * Clip all edges, and return from the procedure if the result is empty. |
611 | | */ |
612 | | #define fit_copy(dev, data, data_x, raster, id, x, y, w, h)\ |
613 | 613M | BEGIN\ |
614 | 613M | fit_copy_xyw(dev, data, data_x, raster, id, x, y, w, h);\ |
615 | 613M | if ( h > (dev)->height - y )\ |
616 | 613M | h = (dev)->height - y;\ |
617 | 613M | if ( w <= 0 || h <= 0 )\ |
618 | 613M | return 0;\ |
619 | 613M | END |
620 | | |
621 | | /* ---------------- Media parameters ---------------- */ |
622 | | |
623 | | /* Define the InputAttributes and OutputAttributes of a device. */ |
624 | | /* The device get_params procedure would call these. */ |
625 | | |
626 | | typedef struct gdev_input_media_s { |
627 | | float PageSize[4]; /* nota bene */ |
628 | | const char *MediaColor; |
629 | | float MediaWeight; |
630 | | const char *MediaType; |
631 | | } gdev_input_media_t; |
632 | | |
633 | | #define gdev_input_media_default_values { 0, 0, 0, 0 }, 0, 0, 0 |
634 | | extern const gdev_input_media_t gdev_input_media_default; |
635 | | |
636 | | void gdev_input_media_init(gdev_input_media_t * pim); |
637 | | |
638 | | int gdev_begin_input_media(gs_param_list * mlist, gs_param_dict * pdict, |
639 | | int count); |
640 | | |
641 | | int gdev_write_input_page_size(int index, gs_param_dict * pdict, |
642 | | double width_points, double height_points); |
643 | | |
644 | | int gdev_write_input_media(int index, gs_param_dict * pdict, |
645 | | const gdev_input_media_t * pim); |
646 | | |
647 | | int gdev_end_input_media(gs_param_list * mlist, gs_param_dict * pdict); |
648 | | |
649 | | typedef struct gdev_output_media_s { |
650 | | const char *OutputType; |
651 | | } gdev_output_media_t; |
652 | | |
653 | | #define gdev_output_media_default_values 0 |
654 | | extern const gdev_output_media_t gdev_output_media_default; |
655 | | |
656 | | int gdev_begin_output_media(gs_param_list * mlist, gs_param_dict * pdict, |
657 | | int count); |
658 | | |
659 | | int gdev_write_output_media(int index, gs_param_dict * pdict, |
660 | | const gdev_output_media_t * pom); |
661 | | |
662 | | int gdev_end_output_media(gs_param_list * mlist, gs_param_dict * pdict); |
663 | | |
664 | | void gx_device_request_leadingedge(gx_device *dev, int le_req); |
665 | | |
666 | | /* ---------------- Device subclassing procedures ---------------- */ |
667 | | int gs_is_pdf14trans_compositor(const gs_composite_t * pct); |
668 | | |
669 | | #define subclass_common\ |
670 | | t_dev_proc_composite *saved_compositor_method;\ |
671 | | gx_device_forward *forwarding_dev;\ |
672 | | gx_device *pre_composite_device;\ |
673 | | void (*saved_finalize_method)(gx_device *) |
674 | | |
675 | | typedef int (t_dev_proc_composite) (gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_gstate *pgs, gs_memory_t *memory, gx_device *cdev); |
676 | | |
677 | | typedef struct { |
678 | | t_dev_proc_composite *saved_compositor_method; |
679 | | gx_device_forward *forwarding_dev; |
680 | | gx_device *pre_composite_device; |
681 | | void (*saved_finalize_method)(gx_device *); |
682 | | } generic_subclass_data; |
683 | | |
684 | | int gx_copy_device_procs(gx_device *dest, const gx_device *src, const gx_device *prototype); |
685 | | int gx_device_subclass(gx_device *dev_to_subclass, gx_device *new_prototype, unsigned int private_data_size); |
686 | | void gx_device_unsubclass(gx_device *dev); |
687 | | int gx_update_from_subclass(gx_device *dev); |
688 | | int gx_subclass_composite(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, |
689 | | gs_gstate *pgs, gs_memory_t *memory, gx_device *cdev); |
690 | | void gx_subclass_fill_in_page_procs(gx_device *dev); |
691 | | |
692 | | /* ---------------- End subclassing procedures ---------------- */ |
693 | | |
694 | | static inline int check_64bit_multiply(int64_t x, int64_t y, int64_t *result) |
695 | 801k | { |
696 | 801k | *result = x * y; |
697 | | |
698 | 801k | if (x != 0 && (*result) / x != y) |
699 | 0 | return -1; |
700 | 801k | return 0; |
701 | 801k | } Unexecuted instantiation: imain.c:check_64bit_multiply Unexecuted instantiation: gconfig.c:check_64bit_multiply Unexecuted instantiation: gximage3.c:check_64bit_multiply Unexecuted instantiation: gxmclip.c:check_64bit_multiply Unexecuted instantiation: gsptype1.c:check_64bit_multiply Unexecuted instantiation: gxp1fill.c:check_64bit_multiply Unexecuted instantiation: gxpcmap.c:check_64bit_multiply Unexecuted instantiation: gxicolor.c:check_64bit_multiply Unexecuted instantiation: gsdps1.c:check_64bit_multiply Unexecuted instantiation: gsciemap.c:check_64bit_multiply Unexecuted instantiation: gstrans.c:check_64bit_multiply Unexecuted instantiation: gximag3x.c:check_64bit_multiply Unexecuted instantiation: gxblend.c:check_64bit_multiply Unexecuted instantiation: gdevp14.c:check_64bit_multiply Unexecuted instantiation: gdevdevn.c:check_64bit_multiply Unexecuted instantiation: gsequivc.c:check_64bit_multiply Unexecuted instantiation: gscpixel.c:check_64bit_multiply Unexecuted instantiation: gdevbbox.c:check_64bit_multiply Unexecuted instantiation: gdevprn.c:check_64bit_multiply Unexecuted instantiation: gdevppla.c:check_64bit_multiply Unexecuted instantiation: gdevflp.c:check_64bit_multiply Unexecuted instantiation: gdevoflt.c:check_64bit_multiply Unexecuted instantiation: gdevnup.c:check_64bit_multiply Unexecuted instantiation: gdevsclass.c:check_64bit_multiply Unexecuted instantiation: gxclist.c:check_64bit_multiply Unexecuted instantiation: gxclpage.c:check_64bit_multiply Unexecuted instantiation: gxclread.c:check_64bit_multiply Unexecuted instantiation: gxclrect.c:check_64bit_multiply Unexecuted instantiation: gxclutil.c:check_64bit_multiply Unexecuted instantiation: gxclimag.c:check_64bit_multiply Unexecuted instantiation: gxclpath.c:check_64bit_multiply Unexecuted instantiation: gxdhtserial.c:check_64bit_multiply Unexecuted instantiation: gxclthrd.c:check_64bit_multiply Unexecuted instantiation: gsicc.c:check_64bit_multiply Unexecuted instantiation: gsicc_manage.c:check_64bit_multiply Unexecuted instantiation: gsicc_cache.c:check_64bit_multiply Unexecuted instantiation: gsicc_lcms2mt.c:check_64bit_multiply Unexecuted instantiation: gsicc_create.c:check_64bit_multiply Unexecuted instantiation: gsicc_nocm.c:check_64bit_multiply Unexecuted instantiation: gsicc_replacecm.c:check_64bit_multiply Unexecuted instantiation: gsicc_monitorcm.c:check_64bit_multiply Unexecuted instantiation: gsicc_blacktext.c:check_64bit_multiply Unexecuted instantiation: gdevbmp.c:check_64bit_multiply Unexecuted instantiation: gdevbmpc.c:check_64bit_multiply Unexecuted instantiation: gdevpccm.c:check_64bit_multiply Unexecuted instantiation: gdevcups.c:check_64bit_multiply Unexecuted instantiation: gdevpdf.c:check_64bit_multiply Unexecuted instantiation: gdevpdfb.c:check_64bit_multiply Unexecuted instantiation: gdevpdfc.c:check_64bit_multiply Unexecuted instantiation: gdevpdfd.c:check_64bit_multiply Unexecuted instantiation: gdevpdfe.c:check_64bit_multiply Unexecuted instantiation: gdevpdfg.c:check_64bit_multiply Unexecuted instantiation: gdevpdfi.c:check_64bit_multiply Unexecuted instantiation: gdevpdfj.c:check_64bit_multiply Unexecuted instantiation: gdevpdfk.c:check_64bit_multiply Unexecuted instantiation: gdevpdfm.c:check_64bit_multiply Unexecuted instantiation: gdevpdfo.c:check_64bit_multiply Unexecuted instantiation: gdevpdfp.c:check_64bit_multiply Unexecuted instantiation: gdevpdft.c:check_64bit_multiply Unexecuted instantiation: gdevpdfr.c:check_64bit_multiply Unexecuted instantiation: gdevpdfu.c:check_64bit_multiply Unexecuted instantiation: gdevpdfv.c:check_64bit_multiply Unexecuted instantiation: gdevpsdi.c:check_64bit_multiply Unexecuted instantiation: gdevpsdp.c:check_64bit_multiply Unexecuted instantiation: gdevpsds.c:check_64bit_multiply Unexecuted instantiation: gdevpsdu.c:check_64bit_multiply Unexecuted instantiation: gdevvec.c:check_64bit_multiply Unexecuted instantiation: gdevpdt.c:check_64bit_multiply Unexecuted instantiation: gdevpdtd.c:check_64bit_multiply Unexecuted instantiation: gdevpdtf.c:check_64bit_multiply Unexecuted instantiation: gdevpdti.c:check_64bit_multiply Unexecuted instantiation: gdevpdts.c:check_64bit_multiply Unexecuted instantiation: gdevpdtt.c:check_64bit_multiply Unexecuted instantiation: gdevpdtw.c:check_64bit_multiply Unexecuted instantiation: gxfcopy.c:check_64bit_multiply Unexecuted instantiation: gdevfax.c:check_64bit_multiply Unexecuted instantiation: gdevdjet.c:check_64bit_multiply Unexecuted instantiation: gdevdljm.c:check_64bit_multiply Unexecuted instantiation: gdevpcl.c:check_64bit_multiply Unexecuted instantiation: gdevpcl3.c:check_64bit_multiply Unexecuted instantiation: pclcap.c:check_64bit_multiply Unexecuted instantiation: gdevpbm.c:check_64bit_multiply Unexecuted instantiation: gdevmpla.c:check_64bit_multiply Unexecuted instantiation: gdevpng.c:check_64bit_multiply Unexecuted instantiation: gdevpsd.c:check_64bit_multiply Unexecuted instantiation: gdevpx.c:check_64bit_multiply Unexecuted instantiation: gdevtsep.c:check_64bit_multiply Unexecuted instantiation: gdevtifs.c:check_64bit_multiply Unexecuted instantiation: gdevupd.c:check_64bit_multiply Unexecuted instantiation: gdevxps.c:check_64bit_multiply Unexecuted instantiation: gdevkrnlsclass.c:check_64bit_multiply Unexecuted instantiation: gschar.c:check_64bit_multiply Unexecuted instantiation: gscolor.c:check_64bit_multiply Unexecuted instantiation: gscoord.c:check_64bit_multiply Unexecuted instantiation: gscspace.c:check_64bit_multiply gsovrc.c:check_64bit_multiply Line | Count | Source | 695 | 229 | { | 696 | 229 | *result = x * y; | 697 | | | 698 | 229 | if (x != 0 && (*result) / x != y) | 699 | 0 | return -1; | 700 | 229 | return 0; | 701 | 229 | } |
gxoprect.c:check_64bit_multiply Line | Count | Source | 695 | 801k | { | 696 | 801k | *result = x * y; | 697 | | | 698 | 801k | if (x != 0 && (*result) / x != y) | 699 | 0 | return -1; | 700 | 801k | return 0; | 701 | 801k | } |
Unexecuted instantiation: gsdevice.c:check_64bit_multiply Unexecuted instantiation: gsdparam.c:check_64bit_multiply Unexecuted instantiation: gsfont.c:check_64bit_multiply Unexecuted instantiation: gsht.c:check_64bit_multiply Unexecuted instantiation: gshtscr.c:check_64bit_multiply Unexecuted instantiation: gsimage.c:check_64bit_multiply Unexecuted instantiation: gsgstate.c:check_64bit_multiply Unexecuted instantiation: gsline.c:check_64bit_multiply Unexecuted instantiation: gspaint.c:check_64bit_multiply Unexecuted instantiation: gspath.c:check_64bit_multiply Unexecuted instantiation: gsstate.c:check_64bit_multiply Unexecuted instantiation: gstext.c:check_64bit_multiply Unexecuted instantiation: gxfapi.c:check_64bit_multiply Unexecuted instantiation: write_t2.c:check_64bit_multiply Unexecuted instantiation: gxccache.c:check_64bit_multiply Unexecuted instantiation: gxccman.c:check_64bit_multiply Unexecuted instantiation: gxchar.c:check_64bit_multiply Unexecuted instantiation: gxcht.c:check_64bit_multiply Unexecuted instantiation: gxclip.c:check_64bit_multiply Unexecuted instantiation: gxcmap.c:check_64bit_multiply Unexecuted instantiation: gxcpath.c:check_64bit_multiply Unexecuted instantiation: gxdcconv.c:check_64bit_multiply Unexecuted instantiation: gxdcolor.c:check_64bit_multiply Unexecuted instantiation: gxhldevc.c:check_64bit_multiply Unexecuted instantiation: gxfill.c:check_64bit_multiply Unexecuted instantiation: gxht.c:check_64bit_multiply Unexecuted instantiation: gxht_thresh.c:check_64bit_multiply Unexecuted instantiation: gxidata.c:check_64bit_multiply Unexecuted instantiation: gxifast.c:check_64bit_multiply Unexecuted instantiation: gximono.c:check_64bit_multiply Unexecuted instantiation: gxipixel.c:check_64bit_multiply Unexecuted instantiation: gximask.c:check_64bit_multiply Unexecuted instantiation: gxi12bit.c:check_64bit_multiply Unexecuted instantiation: gxi16bit.c:check_64bit_multiply Unexecuted instantiation: gxiscale.c:check_64bit_multiply Unexecuted instantiation: gxpaint.c:check_64bit_multiply Unexecuted instantiation: gxpcopy.c:check_64bit_multiply Unexecuted instantiation: gxstroke.c:check_64bit_multiply Unexecuted instantiation: gdevabuf.c:check_64bit_multiply Unexecuted instantiation: gdevdbit.c:check_64bit_multiply Unexecuted instantiation: gdevddrw.c:check_64bit_multiply Unexecuted instantiation: gdevdflt.c:check_64bit_multiply Unexecuted instantiation: gdevdgbr.c:check_64bit_multiply Unexecuted instantiation: gdevnfwd.c:check_64bit_multiply Unexecuted instantiation: gdevmem.c:check_64bit_multiply Unexecuted instantiation: gdevplnx.c:check_64bit_multiply Unexecuted instantiation: gdevm1.c:check_64bit_multiply Unexecuted instantiation: gdevm2.c:check_64bit_multiply Unexecuted instantiation: gdevm4.c:check_64bit_multiply Unexecuted instantiation: gdevm8.c:check_64bit_multiply Unexecuted instantiation: gdevm16.c:check_64bit_multiply Unexecuted instantiation: gdevm24.c:check_64bit_multiply Unexecuted instantiation: gdevm32.c:check_64bit_multiply Unexecuted instantiation: gdevm40.c:check_64bit_multiply Unexecuted instantiation: gdevm48.c:check_64bit_multiply Unexecuted instantiation: gdevm56.c:check_64bit_multiply Unexecuted instantiation: gdevm64.c:check_64bit_multiply Unexecuted instantiation: gdevmx.c:check_64bit_multiply Unexecuted instantiation: gdevdsha.c:check_64bit_multiply Unexecuted instantiation: gxscanc.c:check_64bit_multiply Unexecuted instantiation: gdevdrop.c:check_64bit_multiply Unexecuted instantiation: gdevmr1.c:check_64bit_multiply Unexecuted instantiation: gdevmr2n.c:check_64bit_multiply Unexecuted instantiation: gdevmr8n.c:check_64bit_multiply Unexecuted instantiation: gdevrops.c:check_64bit_multiply Unexecuted instantiation: gsrop.c:check_64bit_multiply Unexecuted instantiation: zcolor1.c:check_64bit_multiply Unexecuted instantiation: zht1.c:check_64bit_multiply Unexecuted instantiation: zupath.c:check_64bit_multiply Unexecuted instantiation: gdevhit.c:check_64bit_multiply Unexecuted instantiation: zdps1.c:check_64bit_multiply Unexecuted instantiation: zchar1.c:check_64bit_multiply Unexecuted instantiation: zcharout.c:check_64bit_multiply Unexecuted instantiation: zfont1.c:check_64bit_multiply Unexecuted instantiation: zusparam.c:check_64bit_multiply Unexecuted instantiation: zchar42.c:check_64bit_multiply Unexecuted instantiation: zfont0.c:check_64bit_multiply Unexecuted instantiation: zdevice2.c:check_64bit_multiply Unexecuted instantiation: zpcolor.c:check_64bit_multiply Unexecuted instantiation: idisp.c:check_64bit_multiply Unexecuted instantiation: psapi.c:check_64bit_multiply Unexecuted instantiation: zfileio.c:check_64bit_multiply Unexecuted instantiation: zbfont.c:check_64bit_multiply Unexecuted instantiation: zchar.c:check_64bit_multiply Unexecuted instantiation: zcolor.c:check_64bit_multiply Unexecuted instantiation: zdevice.c:check_64bit_multiply Unexecuted instantiation: zfont.c:check_64bit_multiply Unexecuted instantiation: zht.c:check_64bit_multiply Unexecuted instantiation: zfapi.c:check_64bit_multiply Unexecuted instantiation: zht2.c:check_64bit_multiply Unexecuted instantiation: zfunc4.c:check_64bit_multiply Unexecuted instantiation: zform.c:check_64bit_multiply Unexecuted instantiation: zicc.c:check_64bit_multiply Unexecuted instantiation: ztrans.c:check_64bit_multiply Unexecuted instantiation: zpdfops.c:check_64bit_multiply Unexecuted instantiation: pdf_loop_detect.c:check_64bit_multiply Unexecuted instantiation: ghostpdf.c:check_64bit_multiply Unexecuted instantiation: pdf_dict.c:check_64bit_multiply Unexecuted instantiation: pdf_array.c:check_64bit_multiply Unexecuted instantiation: pdf_xref.c:check_64bit_multiply Unexecuted instantiation: pdf_int.c:check_64bit_multiply Unexecuted instantiation: pdf_file.c:check_64bit_multiply Unexecuted instantiation: pdf_path.c:check_64bit_multiply Unexecuted instantiation: pdf_colour.c:check_64bit_multiply Unexecuted instantiation: pdf_pattern.c:check_64bit_multiply Unexecuted instantiation: pdf_gstate.c:check_64bit_multiply Unexecuted instantiation: pdf_stack.c:check_64bit_multiply Unexecuted instantiation: pdf_image.c:check_64bit_multiply Unexecuted instantiation: pdf_page.c:check_64bit_multiply Unexecuted instantiation: pdf_annot.c:check_64bit_multiply Unexecuted instantiation: pdf_mark.c:check_64bit_multiply Unexecuted instantiation: pdf_font.c:check_64bit_multiply Unexecuted instantiation: pdf_font0.c:check_64bit_multiply Unexecuted instantiation: pdf_ciddec.c:check_64bit_multiply Unexecuted instantiation: pdf_font1.c:check_64bit_multiply Unexecuted instantiation: pdf_font1C.c:check_64bit_multiply Unexecuted instantiation: pdf_fontps.c:check_64bit_multiply Unexecuted instantiation: pdf_font3.c:check_64bit_multiply Unexecuted instantiation: pdf_fontTT.c:check_64bit_multiply Unexecuted instantiation: pdf_font11.c:check_64bit_multiply Unexecuted instantiation: pdf_cmap.c:check_64bit_multiply Unexecuted instantiation: pdf_fmap.c:check_64bit_multiply Unexecuted instantiation: pdf_text.c:check_64bit_multiply Unexecuted instantiation: pdf_shading.c:check_64bit_multiply Unexecuted instantiation: pdf_func.c:check_64bit_multiply Unexecuted instantiation: pdf_trans.c:check_64bit_multiply Unexecuted instantiation: pdf_device.c:check_64bit_multiply Unexecuted instantiation: pdf_misc.c:check_64bit_multiply Unexecuted instantiation: pdf_optcontent.c:check_64bit_multiply Unexecuted instantiation: pdf_check.c:check_64bit_multiply Unexecuted instantiation: pdf_sec.c:check_64bit_multiply Unexecuted instantiation: pdf_utf8.c:check_64bit_multiply Unexecuted instantiation: pdf_deref.c:check_64bit_multiply Unexecuted instantiation: pdf_repair.c:check_64bit_multiply Unexecuted instantiation: pdf_obj.c:check_64bit_multiply Unexecuted instantiation: pdf_doc.c:check_64bit_multiply Unexecuted instantiation: imainarg.c:check_64bit_multiply Unexecuted instantiation: gsclipsr.c:check_64bit_multiply Unexecuted instantiation: gscdevn.c:check_64bit_multiply Unexecuted instantiation: gxdevndi.c:check_64bit_multiply Unexecuted instantiation: gxclipm.c:check_64bit_multiply Unexecuted instantiation: gscolor3.c:check_64bit_multiply Unexecuted instantiation: gsptype2.c:check_64bit_multiply Unexecuted instantiation: gsshade.c:check_64bit_multiply Unexecuted instantiation: gxshade.c:check_64bit_multiply Unexecuted instantiation: gxshade1.c:check_64bit_multiply Unexecuted instantiation: gxshade4.c:check_64bit_multiply Unexecuted instantiation: gxshade6.c:check_64bit_multiply Unexecuted instantiation: gscolor1.c:check_64bit_multiply Unexecuted instantiation: gsht1.c:check_64bit_multiply Unexecuted instantiation: gscolor2.c:check_64bit_multiply Unexecuted instantiation: gspcolor.c:check_64bit_multiply Unexecuted instantiation: gxclip2.c:check_64bit_multiply Unexecuted instantiation: gspath1.c:check_64bit_multiply Unexecuted instantiation: gstype42.c:check_64bit_multiply Unexecuted instantiation: gxchrout.c:check_64bit_multiply Unexecuted instantiation: gxttfb.c:check_64bit_multiply Unexecuted instantiation: gzspotan.c:check_64bit_multiply Unexecuted instantiation: gscie.c:check_64bit_multiply Unexecuted instantiation: gscsepr.c:check_64bit_multiply Unexecuted instantiation: gxblend1.c:check_64bit_multiply Unexecuted instantiation: gxdownscale.c:check_64bit_multiply Unexecuted instantiation: gdevepo.c:check_64bit_multiply Unexecuted instantiation: gxclbits.c:check_64bit_multiply Unexecuted instantiation: gxclrast.c:check_64bit_multiply Unexecuted instantiation: gschar0.c:check_64bit_multiply Unexecuted instantiation: gsfont0.c:check_64bit_multiply Unexecuted instantiation: gstype1.c:check_64bit_multiply Unexecuted instantiation: gxtype1.c:check_64bit_multiply Unexecuted instantiation: gstype2.c:check_64bit_multiply Unexecuted instantiation: gsicc_profilecache.c:check_64bit_multiply Unexecuted instantiation: gdevpdtb.c:check_64bit_multiply Unexecuted instantiation: gdevpdtc.c:check_64bit_multiply Unexecuted instantiation: gdevpdte.c:check_64bit_multiply Unexecuted instantiation: gdevpsfx.c:check_64bit_multiply Unexecuted instantiation: gstiffio.c:check_64bit_multiply Unexecuted instantiation: gdeveprn.c:check_64bit_multiply Unexecuted instantiation: eprnparm.c:check_64bit_multiply Unexecuted instantiation: eprnrend.c:check_64bit_multiply Unexecuted instantiation: eprnfs.c:check_64bit_multiply Unexecuted instantiation: gsdevmem.c:check_64bit_multiply Unexecuted instantiation: gxacpath.c:check_64bit_multiply Unexecuted instantiation: gxpdash.c:check_64bit_multiply Unexecuted instantiation: pdf_fapi.c:check_64bit_multiply Unexecuted instantiation: gscscie.c:check_64bit_multiply |
702 | | |
703 | | int gx_init_non_threadsafe_device(gx_device *dev); |
704 | | |
705 | | |
706 | | #endif /* gxdevice_INCLUDED */ |