int gx_serialize_device_n_map(const gs_color_space * pcs, gs_device_n_map * m, stream * s) { const gs_function_t *pfn; if (m->tint_transform != map_devn_using_function) return_error(gs_error_unregistered); /* Unimplemented. */ pfn = (const gs_function_t *)m->tint_transform_data; return gs_function_serialize(pfn, s); }
/* Serialize. */ static int gs_function_AdOt_serialize(const gs_function_t * pfn, stream *s) { const gs_function_AdOt_params_t * p = (const gs_function_AdOt_params_t *)&pfn->params; int code = fn_common_serialize(pfn, s); int k; if (code < 0) return code; for (k = 0; k < p->n && code >= 0; k++) code = gs_function_serialize(p->Functions[k], s); return code; }
/* Serialize. */ static int gs_function_1ItSg_serialize(const gs_function_t * pfn, stream *s) { uint n; const gs_function_1ItSg_params_t * p = (const gs_function_1ItSg_params_t *)&pfn->params; int code = fn_common_serialize(pfn, s); int k; if (code < 0) return code; code = sputs(s, (const byte *)&p->k, sizeof(p->k), &n); if (code < 0) return code; for (k = 0; k < p->k && code >= 0; k++) code = gs_function_serialize(p->Functions[k], s); if (code < 0) return code; code = sputs(s, (const byte *)&p->Bounds[0], sizeof(p->Bounds[0]) * (p->k - 1), &n); if (code < 0) return code; return sputs(s, (const byte *)&p->Encode[0], sizeof(p->Encode[0]) * (p->k * 2), &n); }