diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2021-04-08 16:29:55 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2021-04-20 15:03:02 +0100 |
commit | e1a3956f252404f07d93be47f7845b23e4a2c4de (patch) | |
tree | 9f702e5846dbeba82ccf4b65a28434a8b80de708 /devices/gdevcfax.c | |
parent | 8d83e9871f14d44c7120f0e170c43064c6a738ea (diff) | |
download | ghostpdl-e1a3956f252404f07d93be47f7845b23e4a2c4de.tar.gz |
Move devices away from static init of procs.
Diffstat (limited to 'devices/gdevcfax.c')
-rw-r--r-- | devices/gdevcfax.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/devices/gdevcfax.c b/devices/gdevcfax.c index cd3dc15cc..9ffead664 100644 --- a/devices/gdevcfax.c +++ b/devices/gdevcfax.c @@ -28,9 +28,22 @@ static dev_proc_close_device(cfax_prn_close); /* an additional "end of document" signature after the last */ /* "end page" signature */ /* Since the print_page doesn't alter the device, this device can print in the background */ +static int +cfax_initialize(gx_device *dev) +{ + int code = gdev_prn_initialize_mono_bg(dev); + + if (code < 0) + return code; + + set_dev_proc(dev, close_device, cfax_prn_close); + set_dev_proc(dev, get_params, gdev_fax_get_params); + set_dev_proc(dev, put_params, gdev_fax_put_params); + + return 0; +} static const gx_device_procs gdev_cfax_std_procs = - prn_params_procs(gdev_prn_open, gdev_prn_bg_output_page, cfax_prn_close, - gdev_fax_get_params, gdev_fax_put_params); + devprocs_initialize(cfax_initialize); const gx_device_fax gs_cfax_device = { FAX_DEVICE_BODY(gx_device_fax, gdev_cfax_std_procs, "cfax", cfax_print_page) |