--- /dev/null
+typedef struct gs_memory_struct_type_s gs_memory_struct_type_t;
+typedef struct gs_matrix_s gs_matrix;
+typedef unsigned long long gx_color_index_data;
+typedef gx_color_index_data gx_color_index;
+typedef unsigned short gx_color_value;
+typedef struct gx_device_s gx_device;
+typedef struct gs_param_list_s gs_param_list;
+typedef struct gx_device_anti_alias_info_s {
+ int text_bits;
+ int graphics_bits;
+} gx_device_anti_alias_info;
+typedef enum {
+ GX_CINFO_UNKNOWN_SEP_LIN = -1
+} gx_color_enc_sep_lin_t;
+typedef struct gx_device_color_info_s {
+ int max_components;
+ gx_device_anti_alias_info anti_alias;
+ gx_color_enc_sep_lin_t separable_and_linear;
+ unsigned char comp_shift[(8 * 8)];
+ unsigned char comp_bits[(8 * 8)];
+ int black_component;
+} gx_device_color_info;
+typedef struct gx_device_procs_s gx_device_procs;
+typedef struct gs_devn_params_s gs_devn_params;
+struct gx_device_procs_s {
+ int (*open_device) (gx_device * dev);
+ void (*get_initial_matrix) (gx_device * dev, gs_matrix * pmat);
+ int (*sync_output) (gx_device * dev);
+ int (*output_page) (gx_device * dev, int num_copies, int flush);
+ int (*close_device) (gx_device * dev);
+ gx_color_index(*map_rgb_color) (gx_device * dev,
+ const gx_color_value cv[]);
+ int (*map_color_rgb) (gx_device * dev, gx_color_index color,
+ gx_color_value rgb[3]);
+ gs_devn_params *(*ret_devn_params) (gx_device * dev);
+};
+gx_device *gx_page_device_get_page_device(gx_device * dev);
+typedef struct gx_device_printer_s gx_device_printer;
+struct gx_device_printer_s {
+};
+extern const gs_memory_struct_type_t st_device_printer;
+int gdev_prn_output_page(gx_device * dev, int num_copies, int flush);
+int gdev_prn_get_params(gx_device * dev, gs_param_list * plist);
+int gdev_prn_put_params(gx_device * dev, gs_param_list * plist);
+static int inferno_cmap2rgb(gx_device * dev, gx_color_index color,
+ gx_color_value rgb[3]);
+static int inferno_open(gx_device * dev);
+static int inferno_close(gx_device * dev);
+typedef struct inferno_device_s {
+ int retained;
+ int is_open;
+ gx_device_color_info color_info;
+ gx_device_procs orig_procs;
+ int ldepth;
+ int cmapcall;
+} inferno_device;
+static gx_color_index inferno_rgb2cmap(void *dev)
+{
+ inferno_device *bdev;
+ bdev = (inferno_device *) dev;
+ int mask;
+ gx_color_value red;
+ gx_color_value green;
+ gx_color_value blue;
+ if (red == mask)
+ bdev->ldepth = 3;
+ bdev->cmapcall = 1;
+ return mask;
+}
+static const gx_device_procs inferno_procs = {
+inferno_rgb2cmap
+};
+inferno_device gs_inferno_device = {
+&inferno_procs
+};