summaryrefslogtreecommitdiff
path: root/devices/gdevccr.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-04-08 16:29:55 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-04-20 15:03:02 +0100
commite1a3956f252404f07d93be47f7845b23e4a2c4de (patch)
tree9f702e5846dbeba82ccf4b65a28434a8b80de708 /devices/gdevccr.c
parent8d83e9871f14d44c7120f0e170c43064c6a738ea (diff)
downloadghostpdl-e1a3956f252404f07d93be47f7845b23e4a2c4de.tar.gz
Move devices away from static init of procs.
Diffstat (limited to 'devices/gdevccr.c')
-rw-r--r--devices/gdevccr.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/devices/gdevccr.c b/devices/gdevccr.c
index 451cb82c0..d4906c99c 100644
--- a/devices/gdevccr.c
+++ b/devices/gdevccr.c
@@ -96,10 +96,23 @@ static dev_proc_map_color_rgb(ccr_map_color_rgb);
static dev_proc_print_page(ccr_print_page);
/* The device procedures */
+static int
+ccr_initialize(gx_device *dev)
+{
+ int code = gdev_prn_initialize_bg(dev);
+
+ if (code < 0)
+ return code;
+
+ set_dev_proc(dev, map_rgb_color, ccr_map_rgb_color);
+ set_dev_proc(dev, map_color_rgb, ccr_map_color_rgb);
+
+ return 0;
+}
+
/* Since the print_page doesn't alter the device, this device can print in the background */
static gx_device_procs ccr_procs =
- prn_color_procs(gdev_prn_open, gdev_prn_bg_output_page, gdev_prn_close,
- ccr_map_rgb_color, ccr_map_color_rgb);
+ devprocs_initialize(ccr_initialize);
/* The device descriptors themselves */
gx_device_ccr far_data gs_ccr_device =