summaryrefslogtreecommitdiff
path: root/devices/gdevwpr2.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-02-18 16:31:31 +0000
committerRobin Watts <robin.watts@artifex.com>2016-02-18 16:32:14 +0000
commit9bb42182c7637e11bc2939fb359ab79365594202 (patch)
tree4483cde486308c2807722e84a8f3bfccf26456fc /devices/gdevwpr2.c
parentc00965e4c05f08ec000303d53942e846187eed1a (diff)
downloadghostpdl-9bb42182c7637e11bc2939fb359ab79365594202.tar.gz
Update devices to return errors using return_error.
Diffstat (limited to 'devices/gdevwpr2.c')
-rw-r--r--devices/gdevwpr2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/devices/gdevwpr2.c b/devices/gdevwpr2.c
index 4e918c353..45690af30 100644
--- a/devices/gdevwpr2.c
+++ b/devices/gdevwpr2.c
@@ -281,7 +281,7 @@ win_pr2_open(gx_device * dev)
GlobalUnlock(wdev->win32_hdevnames);
if (wdev->hdcprn == NULL) {
- return gs_error_Fatal;
+ return_error(gs_error_Fatal);
}
} else if (!win_pr2_getdc(wdev)) {
@@ -302,7 +302,7 @@ win_pr2_open(gx_device * dev)
if (!PrintDlg(&pd)) {
/* device not opened - exit ghostscript */
- return gs_error_Fatal; /* exit Ghostscript cleanly */
+ return_error(gs_error_Fatal); /* exit Ghostscript cleanly */
}
devmode = GlobalLock(pd.hDevMode);
@@ -324,7 +324,7 @@ win_pr2_open(gx_device * dev)
if (!(GetDeviceCaps(wdev->hdcprn, RASTERCAPS) != RC_DIBTODEV)) {
errprintf(dev->memory, "Windows printer does not have RC_DIBTODEV\n");
DeleteDC(wdev->hdcprn);
- return gs_error_limitcheck;
+ return_error(gs_error_limitcheck);
}
/* initialise printer, install abort proc */
wdev->lpfnAbortProc = (DLGPROC) AbortProc2;
@@ -350,7 +350,7 @@ win_pr2_open(gx_device * dev)
errprintf(dev->memory,
"Printer StartDoc failed (error %08x)\n", GetLastError());
DeleteDC(wdev->hdcprn);
- return gs_error_limitcheck;
+ return_error(gs_error_limitcheck);
}
dev->x_pixels_per_inch = (float)GetDeviceCaps(wdev->hdcprn, LOGPIXELSX);