summaryrefslogtreecommitdiff
path: root/base/gxclipm.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-04-26 18:10:56 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-04-26 19:49:13 +0100
commit20610dc28ee3cf7e64ad46f11e9b96fb3befba00 (patch)
treecaf1ecd133beea5ab478858fc8f022081912ab89 /base/gxclipm.c
parentedd20b3b8c3c1a7117dd5dbee0b54cd1de7838bf (diff)
downloadghostpdl-20610dc28ee3cf7e64ad46f11e9b96fb3befba00.tar.gz
Split initialize device proc into two.
The device initialize function currently performs 2 jobs. Firstly, it fills out the device_procs. Secondly, it performs any minimal initialization required by the device (typically none). At various points in the code we want to be able to copy procs from one 'prototype' device to another, so we call initialize for that. This populates the device procs, but does other work that typically requires a 'derived device' structure rather than a vanilla gx_device to work in. Accordingly, we split the job into two; initialize_device_procs (the first part) and initialize_device (the second part). The initialize_device_procs function will set up the initialize_device function pointer along with the rest if required.
Diffstat (limited to 'base/gxclipm.c')
-rw-r--r--base/gxclipm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/gxclipm.c b/base/gxclipm.c
index c4c08f0f8..e023d1f2b 100644
--- a/base/gxclipm.c
+++ b/base/gxclipm.c
@@ -38,8 +38,8 @@ static dev_proc_get_clipping_box(mask_clip_get_clipping_box);
/* The device descriptor. */
-static int
-mask_clip_initialize(gx_device *dev)
+static void
+mask_clip_initialize_device_procs(gx_device *dev)
{
set_dev_proc(dev, get_initial_matrix, gx_forward_get_initial_matrix);
set_dev_proc(dev, map_rgb_color, gx_forward_map_rgb_color);
@@ -99,11 +99,11 @@ mask_clip_initialize(gx_device *dev)
set_dev_proc(dev, begin_typed_image, gx_default_begin_typed_image);
set_dev_proc(dev, text_begin, gx_default_text_begin);
- return 0;
}
const gx_device_mask_clip gs_mask_clip_device =
-{std_device_std_body_open(gx_device_mask_clip, mask_clip_initialize,
+{std_device_std_body_open(gx_device_mask_clip,
+ mask_clip_initialize_device_procs,
"mask clipper",
0, 0, 1, 1)
};