In zopen_file() when we're opening a Postscript device, ensure that we set the
"state" entry in the iodev structure before calling the device specific "open"
method - as we do elsewhere in the same circumstances. That is required to
properly access devices like "%stdin" and co.
No cluster differences.
{
gx_io_device *const iodev = pfn->iodev;
- if (pfn->fname == NULL) /* just a device */
+ if (pfn->fname == NULL) { /* just a device */
+ iodev->state = i_ctx_p;
return iodev->procs.open_device(iodev, file_access, ps, mem);
+ iodev->state = NULL;
+ }
else { /* file */
iodev_proc_open_file((*open_file)) = iodev->procs.open_file;