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/gdevfax.c | |
parent | 8d83e9871f14d44c7120f0e170c43064c6a738ea (diff) | |
download | ghostpdl-e1a3956f252404f07d93be47f7845b23e4a2c4de.tar.gz |
Move devices away from static init of procs.
Diffstat (limited to 'devices/gdevfax.c')
-rw-r--r-- | devices/gdevfax.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/devices/gdevfax.c b/devices/gdevfax.c index f85d8392f..03396f33c 100644 --- a/devices/gdevfax.c +++ b/devices/gdevfax.c @@ -27,9 +27,23 @@ static dev_proc_print_page(faxg4_print_page); /* Define procedures that adjust the paper size. */ /* Since the print_page doesn't alter the device, this device can print in the background */ +static int +fax_initialize(gx_device *dev) +{ + int code = gdev_prn_initialize_mono_bg(dev); + + if (code < 0) + return code; + + set_dev_proc(dev, open_device, gdev_prn_open); + set_dev_proc(dev, get_params, gdev_fax_get_params); + set_dev_proc(dev, put_params, gdev_fax_put_params); + + return 0; +} + const gx_device_procs gdev_fax_std_procs = - prn_params_procs(gdev_prn_open, gdev_prn_bg_output_page, gdev_prn_close, - gdev_fax_get_params, gdev_fax_put_params); + devprocs_initialize(fax_initialize); #define FAX_DEVICE(dname, print_page)\ {\ |