summaryrefslogtreecommitdiff
path: root/base/gzspotan.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/gzspotan.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/gzspotan.c')
-rw-r--r--base/gzspotan.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/base/gzspotan.c b/base/gzspotan.c
index f11bbb62c..4deef1c87 100644
--- a/base/gzspotan.c
+++ b/base/gzspotan.c
@@ -205,18 +205,17 @@ trap_is_last(const gx_san_trap *list, const gx_san_trap *t)
/* The device descriptor */
/* Many of these procedures won't be called; they are set to NULL. */
-static int
-san_initialize(gx_device *dev)
+static void
+san_initialize_device_procs(gx_device *dev)
{
set_dev_proc(dev, open_device, san_open);
set_dev_proc(dev, close_device, san_close);
set_dev_proc(dev, fill_path, gx_default_fill_path);
set_dev_proc(dev, get_clipping_box, san_get_clipping_box);
-
- return 0;
}
static const gx_device_spot_analyzer gx_spot_analyzer_device =
-{std_device_std_body(gx_device_spot_analyzer, san_initialize, "spot analyzer",
+{std_device_std_body(gx_device_spot_analyzer,
+ san_initialize_device_procs, "spot analyzer",
0, 0, 1, 1)
};