diff options
-rw-r--r-- | base/gsptype1.c | 2 | ||||
-rw-r--r-- | base/gsptype2.c | 6 | ||||
-rw-r--r-- | base/gsptype2.h | 4 | ||||
-rw-r--r-- | base/gxcolor2.h | 4 | ||||
-rw-r--r-- | psi/zcolor.c | 11 |
5 files changed, 16 insertions, 11 deletions
diff --git a/base/gsptype1.c b/base/gsptype1.c index 27fdd5a1b..e98dde18e 100644 --- a/base/gsptype1.c +++ b/base/gsptype1.c | |||
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | /* GC descriptors */ | 51 | /* GC descriptors */ |
52 | private_st_pattern1_template(); | 52 | private_st_pattern1_template(); |
53 | private_st_pattern1_instance(); | 53 | public_st_pattern1_instance(); |
54 | 54 | ||
55 | /* GC procedures */ | 55 | /* GC procedures */ |
56 | static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) { | 56 | static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) { |
diff --git a/base/gsptype2.c b/base/gsptype2.c index 791e538c0..c53eb2e9f 100644 --- a/base/gsptype2.c +++ b/base/gsptype2.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | /* GC descriptors */ | 34 | /* GC descriptors */ |
35 | private_st_pattern2_template(); | 35 | private_st_pattern2_template(); |
36 | private_st_pattern2_instance(); | 36 | public_st_pattern2_instance(); |
37 | 37 | ||
38 | /* GC procedures */ | 38 | /* GC procedures */ |
39 | static ENUM_PTRS_BEGIN(pattern2_instance_enum_ptrs) { | 39 | static ENUM_PTRS_BEGIN(pattern2_instance_enum_ptrs) { |
@@ -206,10 +206,10 @@ gs_pattern2_set_color(const gs_client_color * pcc, gs_gstate * pgs) | |||
206 | 206 | ||
207 | pinst->saved->overprint_mode = pgs->overprint_mode; | 207 | pinst->saved->overprint_mode = pgs->overprint_mode; |
208 | pinst->saved->overprint = pgs->overprint; | 208 | pinst->saved->overprint = pgs->overprint; |
209 | 209 | ||
210 | num_comps = pgs->device->color_info.num_components; | 210 | num_comps = pgs->device->color_info.num_components; |
211 | for (k = 0; k < num_comps; k++) { | 211 | for (k = 0; k < num_comps; k++) { |
212 | pgs->color_component_map.color_map[k] = | 212 | pgs->color_component_map.color_map[k] = |
213 | pinst->saved->color_component_map.color_map[k]; | 213 | pinst->saved->color_component_map.color_map[k]; |
214 | } | 214 | } |
215 | code = pcs->type->set_overprint(pcs, pgs); | 215 | code = pcs->type->set_overprint(pcs, pgs); |
diff --git a/base/gsptype2.h b/base/gsptype2.h index f0f26d19b..4186201d0 100644 --- a/base/gsptype2.h +++ b/base/gsptype2.h | |||
@@ -57,8 +57,8 @@ typedef struct gs_pattern2_instance_s { | |||
57 | bool shfill; | 57 | bool shfill; |
58 | } gs_pattern2_instance_t; | 58 | } gs_pattern2_instance_t; |
59 | 59 | ||
60 | #define private_st_pattern2_instance() /* in gsptype2.c */\ | 60 | #define public_st_pattern2_instance() /* in gsptype2.c */\ |
61 | gs_private_st_composite(st_pattern2_instance, gs_pattern2_instance_t,\ | 61 | gs_public_st_composite(st_pattern2_instance, gs_pattern2_instance_t,\ |
62 | "gs_pattern2_instance_t", pattern2_instance_enum_ptrs,\ | 62 | "gs_pattern2_instance_t", pattern2_instance_enum_ptrs,\ |
63 | pattern2_instance_reloc_ptrs) | 63 | pattern2_instance_reloc_ptrs) |
64 | 64 | ||
diff --git a/base/gxcolor2.h b/base/gxcolor2.h index 62ec05e9b..d5b109573 100644 --- a/base/gxcolor2.h +++ b/base/gxcolor2.h | |||
@@ -92,8 +92,8 @@ struct gs_pattern1_instance_s { | |||
92 | gx_bitmap_id id; /* key for cached bitmap (= id of mask) */ | 92 | gx_bitmap_id id; /* key for cached bitmap (= id of mask) */ |
93 | }; | 93 | }; |
94 | 94 | ||
95 | #define private_st_pattern1_instance() /* in gsptype1.c */\ | 95 | #define public_st_pattern1_instance() /* in gsptype1.c */\ |
96 | gs_private_st_composite(st_pattern1_instance, gs_pattern1_instance_t,\ | 96 | gs_public_st_composite(st_pattern1_instance, gs_pattern1_instance_t,\ |
97 | "gs_pattern1_instance_t", pattern1_instance_enum_ptrs,\ | 97 | "gs_pattern1_instance_t", pattern1_instance_enum_ptrs,\ |
98 | pattern1_instance_reloc_ptrs) | 98 | pattern1_instance_reloc_ptrs) |
99 | 99 | ||
diff --git a/psi/zcolor.c b/psi/zcolor.c index 74b428801..3b8849ff3 100644 --- a/psi/zcolor.c +++ b/psi/zcolor.c | |||
@@ -65,6 +65,8 @@ static const float default_0_1[] = {0, 1, 0, 1, 0, 1, 0, 1}; | |||
65 | 65 | ||
66 | /* imported from gsht.c */ | 66 | /* imported from gsht.c */ |
67 | extern void gx_set_effective_transfer(gs_gstate *); | 67 | extern void gx_set_effective_transfer(gs_gstate *); |
68 | extern_st(st_pattern1_instance); | ||
69 | extern_st(st_pattern2_instance); | ||
68 | 70 | ||
69 | /* Essential forward declarations */ | 71 | /* Essential forward declarations */ |
70 | static int validate_spaces(i_ctx_t *i_ctx_p, ref *arr, int *depth); | 72 | static int validate_spaces(i_ctx_t *i_ctx_p, ref *arr, int *depth); |
@@ -289,6 +291,9 @@ zsetcolor(i_ctx_t * i_ctx_p) | |||
289 | code = array_get(imemory, pImpl, 0, &pPatInst); | 291 | code = array_get(imemory, pImpl, 0, &pPatInst); |
290 | if (code < 0) | 292 | if (code < 0) |
291 | return code; | 293 | return code; |
294 | if (!r_is_struct(&pPatInst) || (!r_has_stype(&pPatInst, imemory, st_pattern1_instance) && !r_has_stype(&pPatInst, imemory, st_pattern2_instance))) | ||
295 | return_error(gs_error_typecheck); | ||
296 | |||
292 | cc.pattern = r_ptr(&pPatInst, gs_pattern_instance_t); | 297 | cc.pattern = r_ptr(&pPatInst, gs_pattern_instance_t); |
293 | n_numeric_comps = ( pattern_instance_uses_base_space(cc.pattern) | 298 | n_numeric_comps = ( pattern_instance_uses_base_space(cc.pattern) |
294 | ? n_comps - 1 | 299 | ? n_comps - 1 |
@@ -4423,7 +4428,7 @@ static int setindexedspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int | |||
4423 | /* If we have a named color profile and the base space is DeviceN or | 4428 | /* If we have a named color profile and the base space is DeviceN or |
4424 | Separation use a different set of procedures to ensure the named | 4429 | Separation use a different set of procedures to ensure the named |
4425 | color remapping code is used */ | 4430 | color remapping code is used */ |
4426 | if (igs->icc_manager->device_named != NULL && | 4431 | if (igs->icc_manager->device_named != NULL && |
4427 | (base_type == gs_color_space_index_Separation || | 4432 | (base_type == gs_color_space_index_Separation || |
4428 | base_type == gs_color_space_index_DeviceN)) | 4433 | base_type == gs_color_space_index_DeviceN)) |
4429 | pcs = gs_cspace_alloc(imemory, &gs_color_space_type_Indexed_Named); | 4434 | pcs = gs_cspace_alloc(imemory, &gs_color_space_type_Indexed_Named); |
@@ -5585,7 +5590,7 @@ static int iccompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace) | |||
5585 | return 0; | 5590 | return 0; |
5586 | 5591 | ||
5587 | /* As a quick check see if current is same as new */ | 5592 | /* As a quick check see if current is same as new */ |
5588 | if (ICCdict1.value.bytes == ICCdict2.value.bytes) | 5593 | if (ICCdict1.value.bytes == ICCdict2.value.bytes) |
5589 | return 1; | 5594 | return 1; |
5590 | 5595 | ||
5591 | /* Need to check all the various parts */ | 5596 | /* Need to check all the various parts */ |
@@ -5605,7 +5610,7 @@ static int iccompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace) | |||
5605 | code2 = dict_find_string(&ICCdict2, "DataSource", &tempref2); | 5610 | code2 = dict_find_string(&ICCdict2, "DataSource", &tempref2); |
5606 | if (code2 <= 0) | 5611 | if (code2 <= 0) |
5607 | return 0; | 5612 | return 0; |
5608 | if (r_size(tempref1) != r_size(tempref2)) | 5613 | if (r_size(tempref1) != r_size(tempref2)) |
5609 | return 0; | 5614 | return 0; |
5610 | 5615 | ||
5611 | buff_size = r_size(tempref1); | 5616 | buff_size = r_size(tempref1); |