summaryrefslogtreecommitdiff
path: root/base/gdevprn.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2018-11-05 20:07:50 +0000
committerRobin Watts <robin.watts@artifex.com>2018-11-05 20:12:55 +0000
commit2b42541db28423c49cbf47549551a27e9399fd23 (patch)
tree9c926621e2a0adc2ce656506191fc4dc7cfbbbbc /base/gdevprn.c
parentd1d59a332b8c560e8949976006424439933c9c64 (diff)
downloadghostpdl-2b42541db28423c49cbf47549551a27e9399fd23.tar.gz
Fix dev spec op warning/handling.
My previous fiddling in this area wasn't quite right. Originally, the code here didn't allow any device to provide their own dev spec op (and the warning was hence never hit). In lifting that restriction, the first commit allowed devices to provide their own one. They then ran into the warning message. The second commit fixed the warning message in this case, but sadly left the warning message going off in many 'default' cases (and what is more, failed to put the prn one in). This one hopefully gets everything right. As the comments say this does feel like a hack.
Diffstat (limited to 'base/gdevprn.c')
-rw-r--r--base/gdevprn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gdevprn.c b/base/gdevprn.c
index 51e1f7529..9e9ce3f9b 100644
--- a/base/gdevprn.c
+++ b/base/gdevprn.c
@@ -1478,7 +1478,7 @@ gx_default_create_buf_device(gx_device **pbdev, gx_device *target, int y,
dev_proc(mdev, dev_spec_op) = orig_dso;
check_device_separable((gx_device *)mdev);
/* In order for saved-pages to work, we need to hook the dev_spec_op */
- if (mdev->procs.dev_spec_op == NULL)
+ if (mdev->procs.dev_spec_op == NULL || mdev->procs.dev_spec_op == gx_default_dev_spec_op)
set_dev_proc(mdev, dev_spec_op, gdev_prn_dev_spec_op);
#ifdef DEBUG
/* scanning sources didn't show anything, but if a device gets changed or added */