summaryrefslogtreecommitdiff
path: root/base/gsicc_cache.c
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2019-05-07 12:52:25 +0100
committerKen Sharp <ken.sharp@artifex.com>2019-05-08 15:27:28 +0100
commit0d75869134c69963406500b536fb1bb1c97c8621 (patch)
tree23c9014d895b88f15b0cf0fa7d18622492a1bf31 /base/gsicc_cache.c
parent97253bf54a701d5e433378df953e066d009afde0 (diff)
downloadghostpdl-0d75869134c69963406500b536fb1bb1c97c8621.tar.gz
Separation - change ink name to be a C string instead of name index
As indicated in previous commits, change the stored ink name in the colour space structure params.separation from a numeric value (gs_separation_name) into a C string. We never have to pass these back to the interpreter, so we allocate the storage using the non-GC allocater.
Diffstat (limited to 'base/gsicc_cache.c')
-rw-r--r--base/gsicc_cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/gsicc_cache.c b/base/gsicc_cache.c
index a7a0be9a3..c95d8d36c 100644
--- a/base/gsicc_cache.c
+++ b/base/gsicc_cache.c
@@ -1530,7 +1530,6 @@ gsicc_support_named_color(const gs_color_space *pcs, const gs_gstate *pgs)
int k, code, i, num_comp, num_spots=0, num_process=0, num_other=0;
gs_color_space_index type = gs_color_space_get_index(pcs);
char **names = NULL;
- gs_separation_name name = 0; /* quite compiler warning*/
byte *pname;
uint name_size;
bool is_supported;
@@ -1553,7 +1552,7 @@ gsicc_support_named_color(const gs_color_space *pcs, const gs_gstate *pgs)
names = pcs->params.device_n.names;
num_comp = pcs->params.device_n.num_components;
} else if (type == gs_color_space_index_Separation) {
- name = pcs->params.separation.sep_name;
+ pname = (byte *)pcs->params.separation.sep_name;
num_comp = 1;
} else
return false;
@@ -1564,8 +1563,9 @@ gsicc_support_named_color(const gs_color_space *pcs, const gs_gstate *pgs)
pname = (byte *)names[i];
name_size = strlen(names[i]);
}
- else
- pcs->params.separation.get_colorname_string(pgs->memory, name, &pname, &name_size);
+ else {
+ name_size = strlen(pcs->params.separation.sep_name);
+ }
/* Classify */
if (strncmp((char *)pname, "None", name_size) == 0 ||